-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
test(semver): track the behavior of --precise <prerelease>
#14013
Merged
Conversation
This file contains 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
As of the writing, this test is not the final semantic of pre-release semver matching. Part of the behavior is buggy. This test just tracks the current behavior of the unstable `--precise <prerelease>`. The below transformation proposed in the RFC is hard to implement outside the semver crate. ``` >=1.2.3, <2.0.0 -> >=1.2.3, <2.0.0-0 ``` The upper bound semantic is also not resolved. So, at least two outstanding issues are required to be fixed before the stabilization: * Bug 1: `x.y.z-pre.0` shouldn't match `x.y.z`. * Upper bound: Whether `>=x.y.z-0, <x.y.z` should match `x.y.z-0`. See the RFC 3493 for the unresolved upper bound issue: https://rust-lang.github.io/rfcs/3493-precise-pre-release-cargo-update.html#version-ranges-with-pre-release-upper-bounds
rustbot
added
A-semver
Area: semver specifications, version matching, etc.
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Jun 5, 2024
2 tasks
@bors r+ |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Jun 5, 2024
☀️ Test successful - checks-actions |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jun 8, 2024
Update cargo 8 commits in 34a6a87d8a2330d8c9d578f927489689328a652d..b1feb75d062444e2cee8b3d2aaa95309d65e9ccd 2024-06-04 15:31:01 +0000 to 2024-06-07 20:16:17 +0000 - Keep lints updated (rust-lang/cargo#14030) - test(lints): Ensure unused optional dep fires for shadowed dep (rust-lang/cargo#14028) - Add `cargo update --breaking` (rust-lang/cargo#13979) - Add tooling to document lints (rust-lang/cargo#14025) - Rename --out-dir to --artifact-dir (rust-lang/cargo#13809) - fix(lints): Add unknown_lints to lints list (rust-lang/cargo#14024) - docs(contrib): Suggest atomic commits with separate test commits (rust-lang/cargo#14014) - test(semver): track the behavior of `--precise <prerelease>` (rust-lang/cargo#14013) r? ghost
flip1995
pushed a commit
to flip1995/rust-clippy
that referenced
this pull request
Jun 28, 2024
Update cargo 8 commits in 34a6a87d8a2330d8c9d578f927489689328a652d..b1feb75d062444e2cee8b3d2aaa95309d65e9ccd 2024-06-04 15:31:01 +0000 to 2024-06-07 20:16:17 +0000 - Keep lints updated (rust-lang/cargo#14030) - test(lints): Ensure unused optional dep fires for shadowed dep (rust-lang/cargo#14028) - Add `cargo update --breaking` (rust-lang/cargo#13979) - Add tooling to document lints (rust-lang/cargo#14025) - Rename --out-dir to --artifact-dir (rust-lang/cargo#13809) - fix(lints): Add unknown_lints to lints list (rust-lang/cargo#14024) - docs(contrib): Suggest atomic commits with separate test commits (rust-lang/cargo#14014) - test(semver): track the behavior of `--precise <prerelease>` (rust-lang/cargo#14013) r? ghost
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-semver
Area: semver specifications, version matching, etc.
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
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.
What does this PR try to resolve?
As of the writing, this test is not the final semantic of pre-release semver matching. Part of the behavior is buggy. This test just tracks the current behavior of the unstable
--precise <prerelease>
.The below transformation proposed in the RFC is hard to implement outside the semver crate.
The upper bound semantic is also not resolved. So, at least two outstanding issues are required to be fixed before the stabilization:
x.y.z-pre.0
shouldn't matchx.y.z
.>=x.y.z-0, <x.y.z
should matchx.y.z-0
.See the RFC 3493 for the unresolved upper bound issue: https://rust-lang.github.io/rfcs/3493-precise-pre-release-cargo-update.html#version-ranges-with-pre-release-upper-bounds
How should we test and review this PR?
Additional information
Tracking issue #13290