Repository navigation
fix(resolver): exclude prereleases from stable version ranges - #11
Merged
Merged
Conversation
Versions must be at or above the lower bound and below the upper bound. Prereleases also require a bound with prerelease identifiers and the same major.minor.patch. Resolves #6
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Assert that equal-precedence range tags resolve to the lexicographically highest tag.
This was referenced Oct 17, 2026
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.
Summary
Stable version ranges could select a prerelease outside the requested range. With tags
v1.0.0, v1.1.0, v1.2.0-rc.1, v2.0.0-beta.1,--from 1.0.0resolved to2.0.0-beta.1and--up-to-next-minor-from 1.1.0resolved to1.2.0-rc.1, because2.0.0-beta.1 < 2.0.0under SemVer precedence.Range membership is now separate from ordering (
SemanticVersion.isInRange(from:to:)) and applies to--from,--up-to-next-minor-fromand explicit--from … --toranges:lower <= candidate < upper;major.minor.patch.Stable-only ranges therefore never select a prerelease; when no eligible tag exists, resolution fails with the existing "tag in range" error. Explicit prerelease ranges (for example
0.1.0-alpha.1..<0.1.0), prerelease upper bounds, exact matches and SemVer ordering are unchanged.Validation
swift build— passswift test— 113 tests in 17 suites passxcrun swift-format lint --configuration .swift-format --recursive Package.swift Sources Tests— exit 0, no warnings in changed filesgit diff --check— cleanHOME:--from 1.0.0selects1.1.0;--up-to-next-minor-from 1.1.0selects1.1.0;--from 1.2.0with only1.2.0-rc.1/2.0.0-beta.1above fails withtag in range 1.2.0..<2.0.0.Resolves #6