Using a comparison that supports semver#240
Draft
arvkonstantin wants to merge 7 commits intosbt:mainfrom
Draft
Conversation
Member
|
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...? |
Member
|
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. |
Member
|
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
eed3si9n
reviewed
Dec 3, 2024
| versions | ||
| .map(Version.parse) | ||
| .sortWith(_.compareTo(_) > 0) | ||
| .headOption |
Member
There was a problem hiding this comment.
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.
Author
There was a problem hiding this comment.
@eed3si9n I didn't manage to use it, can you try it yourself?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Semver is the most common option for forming a version name, so it would be better to use it.