hexpm / hex

Package manager for the Erlang ecosystem.
https://hex.pm
972 stars 184 forks source link

Release canditate version resolution incorrect after two digits #1002

Closed eliasdarruda closed 1 year ago

eliasdarruda commented 1 year ago

How to reproduce

If i have the following dependency:

{:my_dependency, "~> 1.0.0-rc9"}

and I upgrade to:

{:my_dependency, "~> 1.0.0-rc10"}

It will resolve to rc9 instead of rc10.

Expected output

Resolve to rc10 instead of rc9

Context

I haven't tested for other versions other than release canditates.

wojtekmach commented 1 year ago

Can you change rcN to rc.N (ie separated by dot) and see if it works? Per spec the former should be compared lexically but the latter numerically.

eliasdarruda commented 1 year ago

@wojtekmach that solves it

{:my_dependency, "~> 1.0.0-rc.11"}

wojtekmach commented 1 year ago

Great, thanks for checking. I believe we can close this.