Open comp500 opened 1 year ago
I've been considering additional rules to adjust for slight mismatches between components like this, including some other weird cases... that I can't remember right now. The idea being if there was a "significant" amount of components that match exactly, the entire RHS would be shifted over by one or two components.
This is particularly important for Modrinth version numbers, where authors occasionally forget to add the
v
(or intentionally change version format to add/remove it).
Why would you add a v
? I never use v
in my Modrinth versions, as it does not reflect the real version.
I probably didn't word that quite right - I don't personally add (and wouldn't suggest adding) a v
prefix, but if an author normally uses a v
prefix but sometimes doesn't add it, the versions will be out of order when sorted using FlexVer. Some version conventions do use a v
prefix, particularly Git tags, so they are used in Modrinth version numbers (e.g. from a CI pipeline publishing GitHub releases to Modrinth)
Quite a few version numbers seen in the wild are prefixed with
v
, e.g.v1.0.0
. I think that these should compare equal to versions without, sov1.0.0 == 1.0.0
, such as by stripping an initial textual component containing onlyv
. This is particularly important for Modrinth version numbers, where authors occasionally forget to add thev
(or intentionally change version format to add/remove it).