Skip to content
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
merged 1 commit into from
Jun 5, 2024

Conversation

weihanglo
Copy link
Member

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.

>=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

How should we test and review this PR?

Additional information

Tracking issue #13290

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
Copy link
Collaborator

rustbot commented Jun 5, 2024

r? @epage

rustbot has assigned @epage.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot 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
@epage
Copy link
Contributor

epage commented Jun 5, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Jun 5, 2024

📌 Commit 050f88c has been approved by epage

It is now in the queue for this repository.

@bors 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
@bors
Copy link
Contributor

bors commented Jun 5, 2024

⌛ Testing commit 050f88c with merge 1a504a5...

@bors
Copy link
Contributor

bors commented Jun 5, 2024

☀️ Test successful - checks-actions
Approved by: epage
Pushing 1a504a5 to master...

@bors bors merged commit 1a504a5 into rust-lang:master Jun 5, 2024
21 checks passed
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
@rustbot rustbot added this to the 1.81.0 milestone Jun 8, 2024
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
@weihanglo weihanglo deleted the pre-release branch July 9, 2024 20:00
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants