Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Semantic versions are compared as strings for aggregation, notably the pre-release segment #99

Open
FichteFoll opened this issue Oct 19, 2017 · 3 comments

Comments

@FichteFoll
Copy link
Contributor

FichteFoll commented Oct 19, 2017

Apparently, the channel aggregation, which picks the latest releases for each major and the the latest minor releases (with their latest patch release) for inclusion in the distributed channel_v3.json, happens in postgres, where the semantic versions are compared by string and not how semantic versions should be compared. This is noticeable for versions such as 1.0.0-beta.33, which would be errorneously considered smaller than 1.0.0-beta.7.

@FichteFoll
Copy link
Contributor Author

FichteFoll commented Jan 7, 2018

Just occured again with SublimeLinter, after previously happening for SublimeCodeIntel.

@FichteFoll
Copy link
Contributor Author

FichteFoll commented Jun 13, 2020

Occured again with JSCustom. As soon as a package reaches 10 in a pre-release identifier, basically.

The workaround is to jump from 9 to 90 instead of 10.

@michaelblyons
Copy link

The workaround is to jump from 9 to 90 instead of 10.

Or to start off zero-padding the numbers (but this requires knowing you'll have the problem before getting there).

I also wonder if you can go from 1.0.0-beta.9 to 1.0.0-charlie.10 and use ASCII-incrementing pre-release identifiers each time the integer rolls over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants