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

Confirm semver spec for mixed alpha-numeric #473

Closed
phil-davis opened this issue Oct 29, 2018 · 2 comments
Closed

Confirm semver spec for mixed alpha-numeric #473

phil-davis opened this issue Oct 29, 2018 · 2 comments

Comments

@phil-davis
Copy link

phil-davis commented Oct 29, 2018

Looking at the spec:

"Precedence for two pre-release versions with the same major, minor, and patch version MUST be determined by comparing each dot separated identifier from left to right until a difference is found as follows: identifiers consisting of only digits are compared numerically and identifiers with letters or hyphens are compared lexically in ASCII sort order. Numeric identifiers always have lower precedence than non-numeric identifiers."

  1. For example, let's say you use some alpha-numeric strings in position 4. According to the spec, they will sort:
2.0.0-alpha1
2.0.0-alpha10
2.0.0-alpha11
2.0.0-alpha2
2.0.0-alpha3
...
2.0.0-alpha8
2.0.0-alpha9

and you will cause some people (who don't read the spec properly) to wonder why alpha releases alpha10 and alpha11 are followed by alpha2

  1. A more "recommended" way to "number" a set of "alpha" releases is to do:
2.0.0-alpha.1
2.0.0-alpha.2
2.0.0-alpha.3
...
2.0.0-alpha.8
2.0.0-alpha.9
2.0.0-alpha.10
2.0.0-alpha.11

in the style of the example in the spec.

Yes?

@jwdonahue
Copy link
Contributor

jwdonahue commented Nov 25, 2018

Yes, you have listed them in ascending order.

@phil-davis, unless you have further questions, please close this issue at your earliest possible convenience.

@phil-davis
Copy link
Author

Thanks, I was just looking for confirmation of my reading of the spec - and that the example here might help make the situation clear for someone who finds this in future. Closing.

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