Ordering of versions
mark.reinhold at oracle.com
mark.reinhold at oracle.com
Wed Nov 9 14:19:47 PST 2011
2011/11/9 11:45 -0800, njbartlett at gmail.com:
> Right: there is no general way to tell the order of two versions
> *just* by looking at the version strings. You need to know the scheme
> that is force, and there are multiple possible schemes, some of which
> are more sane and intuitive than others.
... and some of which effectively contain others.
> The Java 8 module system needs to choose a version scheme that is, at
> the very least, totally ordered... otherwise the version string is
> meaningless, and is just a part of the module identity.
Yep.
> The next most
> important concern is that the scheme should be intuitive with respect
> to ordering, and follow the principle of least surprise.
Yep.
> Next I would
> suggest that the scheme should support sensible semantics for the
> meaning of each version segment with regard to signalling the scope of
> a change.
Support such semantics, sure, but I'm not sure it should prescribe them.
OSGi and Maven have established some useful and widely-used conventions
around version semantics but I've seen developers and customers use all
sorts of other wild and woolly version schemes over the years. I'm not
convinced that a standard Java module system should require people to
abandon such schemes, unless they're just really totally broken.
> The final concern might be compatibility with existing
> practice, which essentially boils down to OSGi and Maven
> (incidentally, I hear that these will be compatible in the next OSGi
> specification revision, with the introduction of "negative
> qualifiers".. basically the same as snapshots).
The Java standard module system should accommodate the OSGi and Maven
schemes if at all possible, but that's not the same thing as adopting
precisely one or the other.
> I would submit that Mark's description of the Jigsaw versions and
> tokens, though I have not fully understood it yet, fails the intuition
> test.
As I said, it's just an initial prototype.
- Mark
More information about the jigsaw-dev
mailing list