[GH-ISSUE #239] Which version is greater? beta or betas #1030

Closed
opened 2026-04-16 10:13:16 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @hartungstenio on GitHub (Jan 6, 2015).
Original GitHub issue: https://github.com/semver/semver/issues/239

I was dealing with some implementations, and found a really weird case, which left me thinking:

Which version is greater? 1.0.0-beta or 1.0.0-betas
Both of them have the same amount of pre-release identifiers, but one is longer.
Which one of those is the newest version?

Originally created by @hartungstenio on GitHub (Jan 6, 2015). Original GitHub issue: https://github.com/semver/semver/issues/239 I was dealing with some implementations, and found a really weird case, which left me thinking: Which version is greater? 1.0.0-beta or 1.0.0-betas Both of them have the same amount of pre-release identifiers, but one is longer. Which one of those is the newest version?
Author
Owner

@DavidFichtmueller commented on GitHub (Jan 6, 2015):

I think the rules are pretty clear on this one:
1.0.0-beta < 1.0.0-betas
Rule 9: "A pre-release version MAY be denoted by appending a hyphen and a series of dot separated identifiers. [...]"
Rule 11: "[...] identifiers with letters or hyphens are compared lexically in ASCII sort order"

It would be really helpful to have a web app/web services/library that would do the ordering according to the rules, so one could check the ordering for questions like this.

<!-- gh-comment-id:68857939 --> @DavidFichtmueller commented on GitHub (Jan 6, 2015): I think the rules are pretty clear on this one: 1.0.0-beta < 1.0.0-betas Rule 9: "A pre-release version MAY be denoted by appending a hyphen and a series of dot separated identifiers. [...]" Rule 11: "[...] identifiers with letters or hyphens are compared lexically in ASCII sort order" It would be really helpful to have a web app/web services/library that would do the ordering according to the rules, so one could check the ordering for questions like this.
Author
Owner

@hartungstenio commented on GitHub (Jan 6, 2015):

@DavidFichtmueller actually, I was creating exactly that kind of library. It is more like a "Learn Java" thing, since I begun to work with Java just now. But it is a library capable of parsing and comparing versions (actually just parsing since I'm coding the comparison as I write this comment just now).

Just don't expect too much of it right now, since I'm still learning Java. It should be usable some time in the future.

<!-- gh-comment-id:68859121 --> @hartungstenio commented on GitHub (Jan 6, 2015): @DavidFichtmueller actually, I was creating exactly [that kind of library](https://bitbucket.org/chrishartung/semver-j/). It is more like a "Learn Java" thing, since I begun to work with Java just now. But it is a library capable of parsing and comparing versions (actually just parsing since I'm coding the comparison as I write this comment just now). Just don't expect too much of it right now, since I'm still learning Java. It should be usable some time in the future.
Author
Owner

@DavidFichtmueller commented on GitHub (Jan 6, 2015):

Wow, cool thing. I guess this could be useful to a lot of people. And it is a great project to learn a programming language as well. Happy Coding!

<!-- gh-comment-id:68895429 --> @DavidFichtmueller commented on GitHub (Jan 6, 2015): Wow, cool thing. I guess this could be useful to a lot of people. And it is a great project to learn a programming language as well. Happy Coding!
Author
Owner

@ghost commented on GitHub (Jun 13, 2015):

@hartungstenio your link is broken...

<!-- gh-comment-id:111719009 --> @ghost commented on GitHub (Jun 13, 2015): @hartungstenio your link is broken...
Author
Owner

@hartungstenio commented on GitHub (Jun 15, 2015):

@Computer-Whiz123 sorry. I changed my BitBucket username. The current link is: https://bitbucket.org/hartungstenio/semver-j

<!-- gh-comment-id:112174224 --> @hartungstenio commented on GitHub (Jun 15, 2015): @Computer-Whiz123 sorry. I changed my BitBucket username. The current link is: https://bitbucket.org/hartungstenio/semver-j
Author
Owner

@jwdonahue commented on GitHub (Dec 8, 2017):

@hartungstenio, unless you have further questions or comments, please close this issue at your earliest possible convenience.

<!-- gh-comment-id:350163534 --> @jwdonahue commented on GitHub (Dec 8, 2017): @hartungstenio, unless you have further questions or comments, please close this issue at your earliest possible convenience.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/semver#1030