Ordering of versions

mark.reinhold at oracle.com mark.reinhold at oracle.com
Tue Nov 8 14:54:03 PST 2011


2011/11/7 2:10 -0800, gnormington at vmware.com:
> The requirements document description of versioning ([1]) says:
> 
> "Version strings must be totally ordered but otherwise the module
> system must not impose any particular structure or semantics upon
> them."
> 
> Dalibor Topic's presentation on Jigsaw at EclipseCon Europe gave some
> interesting examples of versions supported by Jigsaw, but it wasn't
> clear how a total ordering could be defined that preserved the total
> ordering of multiple version conventions.
> 
> For example, what is the order of the following versions, where "-" is
> taken to delimit a qualifier: 1.2-3,1.2.1-3, 1.2.3?

Exactly the order you gave: 1.2-3 < 1.2.1-3 < 1.2.3

Jigsaw presently treats the last '-' as introducing a qualifier or branch
version.  When comparing two version strings the qualifiers are tested
only if the segments preceding them are identical.

This design is imperfect.  If nothing else, a direct mapping to Debian
package versions violates the Debian versioning policy [1].

- Mark


[1] http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version



More information about the jigsaw-dev mailing list