Example in Version ordering doc does not match implementation - #9
Merged
alexarchambault merged 4 commits intoSep 4, 2026
Merged
Conversation
Member
|
Thanks for the report! That needs to be investigated… |
alexarchambault
force-pushed
the
topic/failing-examples-from-doc
branch
from
September 3, 2026 23:30
fe65549 to
84af9d6
Compare
alexarchambault
marked this pull request as draft
September 3, 2026 23:42
The [documentation for Version ordering](https://get-coursier.io/docs/other-version-handling.html#ordering) contains this example: > 1.0.1 or 1.0.1.0 goes before 1.0.1e (literal e goes after empty / zero items) But this does not match the implementation which is demonstrated by the added test: ``` utest.AssertionError: assert(compare("1.0.1", "1.0.1e" ) < 0) ``` 1.0.1 and 1.0.1.0 are both actually greater than 1.0.1e: ```scala scala> Version("1.0.1").compare(Version("1.0.1e")) val res1: Int = 1 scala> Version("1.0.1.0").compare(Version("1.0.1e")) val res2: Int = 1 ```
alexarchambault
force-pushed
the
topic/failing-examples-from-doc
branch
from
September 4, 2026 00:03
84af9d6 to
3ef0079
Compare
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
alexarchambault
force-pushed
the
topic/failing-examples-from-doc
branch
from
September 4, 2026 00:04
3ef0079 to
d0dd52c
Compare
alexarchambault
marked this pull request as ready for review
September 4, 2026 00:09
Member
|
This also contains slight departure from the current doc. coursier/coursier#3813 updates the documentation accordingly. |
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.
The documentation for Version ordering contains this example:
But this does not match the implementation which is demonstrated by the
added test:
1.0.1 and 1.0.1.0 are both actually greater than 1.0.1e: