[ 
https://issues.apache.org/jira/browse/MNG-7701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17694269#comment-17694269
 ] 

David M. Lloyd commented on MNG-7701:
-------------------------------------

It is easy to demonstrate that this is *not* fixed and also *not* in line with 
the spec, with just this one important example (yes this does break for us):

{code}
$ jbang org.apache.maven:maven-artifact:3.8.6 1.0.final-redhat-0001 
1.0.sp1-redhat-0001
Display parameters as parsed by Maven (in canonical form and as a list of 
tokens) and comparison result:
1. 1.0.final-redhat-0001 -> 1-redhat-1; tokens: [1, [redhat, [1]]]
   1.0.final-redhat-0001 < 1.0.sp1-redhat-0001
2. 1.0.sp1-redhat-0001 -> 1.0.sp-1-redhat-1; tokens: [1, 0, sp, [1, [redhat, 
[1]]]]
{code}

versus

{code}
$ jbang org.apache.maven:maven-artifact:3.8.7 1.0.final-redhat-0001 
1.0.sp1-redhat-0001
Display parameters as parsed by Maven (in canonical form and as a list of 
tokens) and comparison result:
1. 1.0.final-redhat-0001 -> 1-redhat-1; tokens: [1, [redhat, [1]]]
   1.0.final-redhat-0001 > 1.0.sp1-redhat-0001
2. 1.0.sp1-redhat-0001 -> 1-sp-1-redhat-1; tokens: [1, [sp, [1, [redhat, [1]]]]]
{code}

As you can see, our `sp` release is now ordered *after* our `final` release 
despite this clear text in the "spec":

bq. Non-numeric tokens ("qualifiers") have the alphabetical order, except for 
the following tokens which come first in this order: "alpha" < "beta" < 
"milestone" < "rc" = "cr" < "snapshot" < "" = "final" = "ga" < "sp"

It's clear that this tokenization isn't really correct by any reasonable 
measurement, and breaking large amounts of (our) existing artifacts in the wild 
is definitely not OK.

> Incompatible version sorting changes
> ------------------------------------
>
>                 Key: MNG-7701
>                 URL: https://issues.apache.org/jira/browse/MNG-7701
>             Project: Maven
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 3.8.7, 3.9.0
>            Reporter: David M. Lloyd
>            Assignee: Elliotte Rusty Harold
>            Priority: Major
>
> Between 3.8.6 and 3.8.7, the sorting of a variety of version strings has 
> changed. This table captures the observed relations:
> ||Input 1||3.8.6||3.8.7||Input 2||
> |{{0.x}}|{{>}}|{{==}}|{{0-x}}|
> |{{1.x}}|{{<}}|{{==}}|{{1-x}}|
> |{{1.x}}|{{<}}|{{>}}|{{1_y}}|
> |{{1.y}}|{{<}}|{{>}}|{{1_x}}|
> |{{1-alpha}}|{{>}}|{{==}}|{{1.alpha}}|



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to