Introduce semantic equality, make (non-semantic) comparison total - #118
Merged
Conversation
Add a semantic comparison for interval and constraint logic while using representation as a tie-breaker for total ordering. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
`ga` and `final` stand for the absence of a qualifier, so `1.1.0`, `1.1.0.GA` and `1.1.0.Final` all mean the same version. `compareSemantic` now returns 0 for them, which is what interval and constraint logic needs. `compare` still tells them apart, in the order the coursier documentation lists, so that it stays total and consistent with equality. The tests that pin that documented order now use it rather than `compareSemantic`. Also drop `1.0-a` from an equivalence group: since the ordering rework, a lone `a` is a plain literal, and only expands to `alpha` when followed by a digit. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Recognize semantic-version pre-releases while allowing release qualifiers such as `Final` and `v20191220` to participate in compatibility checks. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.
Fixes #10
Fixes #13