To be honest I dont think this needs fixing on the Maven side. If we change 
behavior we just break other approaches.

Instead users that want to use semver with three digits and want logic ordering 
should just do so.

So do NOT use a version like 2.1 .. instead use 2.1.0.

Problem solved.

Also .. beyond the three digit semver usage .. dont assume anything beyond 
purely alphanumeric sort to work. 

And of course dont ever do something like "latest", which is so popular in 
other ecosystems like Docker or npm since you are just introducing a quicksand 
scenario for your users.
E.g. latest release by date for example could be a patch release of an lower 
version...

manfred

Elliotte Rusty Harold wrote on 2020-01-07 04:16 (GMT -08:00):

> I've been looking at Maven 's version comparison algorithm: what it
> does, what it's documented to do, and what it should do. I ran a quick
> poll on my twitter feed to see what developers expect how version
> strings such as 2.1.q and 2.1 are compared. That is, what's the higher
> version? 2.1.q or 2.1?
> 
> https://twitter.com/elharo/status/1213457533358223361
> 
> 2.1.q won in a landslide. This is, unfortunately, the opposite of what
> Maven currently assumes. See
> https://issues.apache.org/jira/browse/MNG-6420?focusedCommentId=17008025&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17008025
> to understand how.
> 
> This has real world consequences. xpp3:xpp3 for example uses letters
> with the expectation that 1.4.1.c comes after 1.4.1. There are
> probably other artifacts that use letters with these semantics too.
> 
> I'm about 90% convinced this is something we should fix. It's a
> breaking change but I expect the high majority of devs who encounter
> this would classify the existing behavior as a bug.
> 
> My main question is what version of Maven should we fix this in?
> 3.6.5? 3.7? 4.0? Thoughts?
> 
> -- 
> Elliotte Rusty Harold
> [email protected]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to