FlexVer icon indicating copy to clipboard operation
FlexVer copied to clipboard

Proposal: ignore 'v' prefix

Open comp500 opened this issue 2 years ago • 3 comments

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, so v1.0.0 == 1.0.0, such as by stripping an initial textual component containing only v. 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).

comp500 avatar Feb 14 '23 15:02 comp500

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.

unascribed avatar Mar 11 '23 07:03 unascribed

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.

sylv256 avatar Mar 30 '23 05:03 sylv256

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)

comp500 avatar Mar 30 '23 11:03 comp500