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

feat: Add -Zmsrv-policy feature flag #12043

Merged
merged 4 commits into from
Apr 28, 2023
Merged

Conversation

epage
Copy link
Contributor

@epage epage commented Apr 27, 2023

What does this PR try to resolve?

Nothing noticeable....

The intent is to unblock experiments with different compatible MSRV policies like

While I normally don't like PRs that do nothing on their own, this at least allows any one of those efforts to move forward with different people without juggling these base commits for whoever is first to include in their PR

While there isn't an RFC for this yet, this is intended to allow us to experiment to get a better idea of what we should put in an RFC. In some cases, we first do an eRFC for this but I assumed this wouldn't be needed in this case as this builds on rust-lang/rfcs#2495 and, I'm assuming, will be more surgical in nature

How should we test and review this PR?

The Summary changes are largely untested as they will be mostly tested through the future work that builds on this PR. However, I wasn't too concerned about that because the code is relatively trivial.

Additional information

I chose the name msrv-policy to distinguish this unstable feature from rust-version. Though those appear in different places (Cargo.toml vs -Z), I can see them being confusing which was especially apparent when editing unstable.md which has an anchor for rust-version.

@rustbot
Copy link
Collaborator

rustbot commented Apr 27, 2023

r? @weihanglo

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-dependency-resolution Area: dependency resolution and the resolver A-documenting-cargo-itself Area: Cargo's documentation A-manifest Area: Cargo.toml issues A-registries Area: registries A-testing-cargo-itself Area: cargo's tests A-unstable Area: nightly unstable support S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 27, 2023
Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good. Some questions.

  • Would old Cargo fail in reading new index caches with rust_version field?
  • When old Cargo writes an index cache for a crate containing rust-version in index, and then we use a new Cargo understand rust_version to build it. Any chance inconsistent behavior happens?

@epage
Copy link
Contributor Author

epage commented Apr 27, 2023

. Some questions.

From my reading of the code, the index cache is populated independent of the version of cargo; it does a raw dump of the json blob into the cache without interpreting it.

@weihanglo
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Apr 28, 2023

📌 Commit 2a87dd0 has been approved by weihanglo

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 Apr 28, 2023
@bors
Copy link
Contributor

bors commented Apr 28, 2023

⌛ Testing commit 2a87dd0 with merge 7a90ba1...

@bors
Copy link
Contributor

bors commented Apr 28, 2023

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing 7a90ba1 to master...

@bors bors merged commit 7a90ba1 into rust-lang:master Apr 28, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request May 3, 2023
Update cargo

16 commits in 9e586fbd8b931494067144623b76c37d213b1ab6..ac84010322a31f4a581dafe26258aa4ac8dea9cd
2023-04-25 22:09:11 +0000 to 2023-05-02 13:41:16 +0000
- docs(registry): Further specify owner-remove response (rust-lang/cargo#12056) (rust-lang/cargo#12068)
- Remove repeated definite articles (rust-lang/cargo#12067)
- Document that adding `#[non_exhaustive]` on existing items is breaking. (rust-lang/cargo#10877)
- docs(commands): add missed preposition (rust-lang/cargo#12073)
- Fix warning with unused mut (rust-lang/cargo#12065)
- chore: move build-man workflow away from shell (rust-lang/cargo#12048)
- feat: Add `-Zmsrv-policy` feature flag (rust-lang/cargo#12043)
- chore: new xtask to check stale paths in autolabel defintions (rust-lang/cargo#12051)
- cargo-tree: Handle -e no-proc-macro when building the graph (rust-lang/cargo#12044)
- chore: update trigger_files in autolabel (rust-lang/cargo#12052)
- fix broken markdown in docs (rust-lang/cargo#12049)
- home: fix & enhance documentation (rust-lang/cargo#12047)
- chore: Mark unpublished crates as such (rust-lang/cargo#12045)
- Include rust-version in publish request (rust-lang/cargo#12041)
- chore(xtask): Add `cargo xtask unpublished` (rust-lang/cargo#12039)
- docs(ref): Specify 'rust_version' in Index format (rust-lang/cargo#12040)

r? `@ghost`
RalfJung pushed a commit to RalfJung/miri that referenced this pull request May 3, 2023
Update cargo

16 commits in 9e586fbd8b931494067144623b76c37d213b1ab6..ac84010322a31f4a581dafe26258aa4ac8dea9cd
2023-04-25 22:09:11 +0000 to 2023-05-02 13:41:16 +0000
- docs(registry): Further specify owner-remove response (rust-lang/cargo#12056) (rust-lang/cargo#12068)
- Remove repeated definite articles (rust-lang/cargo#12067)
- Document that adding `#[non_exhaustive]` on existing items is breaking. (rust-lang/cargo#10877)
- docs(commands): add missed preposition (rust-lang/cargo#12073)
- Fix warning with unused mut (rust-lang/cargo#12065)
- chore: move build-man workflow away from shell (rust-lang/cargo#12048)
- feat: Add `-Zmsrv-policy` feature flag (rust-lang/cargo#12043)
- chore: new xtask to check stale paths in autolabel defintions (rust-lang/cargo#12051)
- cargo-tree: Handle -e no-proc-macro when building the graph (rust-lang/cargo#12044)
- chore: update trigger_files in autolabel (rust-lang/cargo#12052)
- fix broken markdown in docs (rust-lang/cargo#12049)
- home: fix & enhance documentation (rust-lang/cargo#12047)
- chore: Mark unpublished crates as such (rust-lang/cargo#12045)
- Include rust-version in publish request (rust-lang/cargo#12041)
- chore(xtask): Add `cargo xtask unpublished` (rust-lang/cargo#12039)
- docs(ref): Specify 'rust_version' in Index format (rust-lang/cargo#12040)

r? `@ghost`
@ehuss ehuss added this to the 1.71.0 milestone May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-dependency-resolution Area: dependency resolution and the resolver A-documenting-cargo-itself Area: Cargo's documentation A-manifest Area: Cargo.toml issues A-registries Area: registries A-testing-cargo-itself Area: cargo's tests A-unstable Area: nightly unstable support 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.

5 participants