The baby and the bathwater

Cédric Champeau cedric.champeau at gmail.com
Tue Mar 27 14:09:14 UTC 2018


2018-03-27 15:56 GMT+02:00 Gregg Wonderly <greggwon at cox.net>:

> I think that Stephen is largely announcing that JigSaw presents more
> problems than it solves for the community.  My list of issues, which I have
> shared before, goes basically like this.
>
> 1. Modules should have versions which new tooling on community toolsets
> could use for managing details like maven is doing now, but without
> explicit version details available at runtime.  There should be runtime
> version details available.  Java’s dynamic binding mechanisms would allow a
> lot more flexibility in how software was assembled at runtime, and that
> would be a good thing.
>

I'm not sure what you mean by "modules should have versions". They do,
today, it's just not used, and I think it's a good thing. So I assume you
are talking about enforcing requirements on versions in the module info
file, in which case I strongly disagree. Disclaimer: I'm in the Gradle
team. We think it's the build tool system (or runtime system when runtime
plugins) do determine the right versions, given a set of constraints
provided by the producer (the library author) and the consumer. Any real
world application has version conflicts, and solving conflicts is *not* a
trivial business, so you clearly don't want the JVM to do it. What if a
library requires module X:1.0.1, but you discover a critical vulnerability
in X? Should you upgrade to 1.0.2? Where do you find this information?
Metadata is live, the only thing that the module should say, IMO, is
precisely what it does today: "I require this module", but then delegate to
the build tool the responsibility to find a version that works given all
requirements/constraints (environment, target JDK, vulnerabilities, ...). I
think what the JDK does today is the right balance. In particular,
module-info is mostly focused on the runtime aspect, but there are clear
differences between what you need for compile, for runtime, or to compile
against a component. The constraints are not necessarily the same for all
those, so they shouldn't be mixed.


More information about the jigsaw-dev mailing list