-
Notifications
You must be signed in to change notification settings - Fork 103
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
Using a comparison that supports semver #240
base: main
Are you sure you want to change the base?
Conversation
Sorry this PR got ignored for so long. In order for this to be mergeable, could you add at least one test showing the improved behavior...? |
The extra commits I added are from #249 — once that PR goes through, we can rebase this and drop those commits. I wanted to see if they would help with the CI failure. |
the CI failure seems to be real, so it appears this needs further work |
Steward missed some places when we went to 1.10.0, maybe having them all in sync now means it will get them all next time?
976f014
to
612b212
Compare
versions | ||
.map(Version.parse) | ||
.sortWith(_.compareTo(_) > 0) | ||
.headOption |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sbt has https://github.com/sbt/librarymanagement/blob/develop/core/src/test/scala/sbt/librarymanagement/SemanticSelectorSpec.scala, which I think can be used for sorting with a few more lines of code.
In cases where there are 2 or more tags on the same commit, and semver is also used, the previous version fell with an error, because it did a split point by point and cast everything to int.
Server is the most common option for forming a version name, so it would be better to use it.