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(reslve): Respect '--ignore-rust-version' #13738

Merged
merged 3 commits into from
Apr 11, 2024
Merged

Conversation

epage
Copy link
Contributor

@epage epage commented Apr 11, 2024

What does this PR try to resolve?

This is a part of #9930.

How should we test and review this PR?

I had considered several ways of implementing this. I first looked at passing this into ops::resolve*.
.This would get a bit annoying with the function signature, so I considered moving it to a builder..
Each of the entry points is slightly different with different ownership needs, making it hard to have a common abstraction.
In doing this, I noticed we currently pass some state around to the resolver via Workspace, so I mirrored that.

The nice thing about this location is it provides a good place to hook in config and package.resolve so they affect this.

Additional information

@rustbot
Copy link
Collaborator

rustbot commented Apr 11, 2024

r? @weihanglo

rustbot has assigned @weihanglo.
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-cli Area: Command-line interface, option parsing, etc. A-workspaces Area: workspaces S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 11, 2024
Copy link
Member

@Muscraft Muscraft left a comment

Choose a reason for hiding this comment

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

Thanks!

@Muscraft
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 11, 2024

📌 Commit cd3d31b has been approved by Muscraft

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 11, 2024
@bors
Copy link
Collaborator

bors commented Apr 11, 2024

⌛ Testing commit cd3d31b with merge 7b09375...

bors added a commit that referenced this pull request Apr 11, 2024
feat(reslve): Respect '--ignore-rust-version'

### What does this PR try to resolve?

This is a part of #9930.

### How should we test and review this PR?

I had considered several ways of implementing this.  I first looked at passing this into `ops::resolve*`.
.This would get a bit annoying with the function signature, so I considered moving it to a builder..
Each of the entry points is slightly different with different ownership needs, making it hard to have a common abstraction.
In doing this, I noticed we currently pass some state around to the resolver via `Workspace`, so I mirrored that.

The nice thing about this location is it provides a good place to hook in config and `package.resolve` so they affect this.

### Additional information
@bors
Copy link
Collaborator

bors commented Apr 11, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 11, 2024
@Muscraft
Copy link
Member

I think the failure is similar to the one I described in #13740

@Muscraft
Copy link
Member

@bors retry

@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 11, 2024
@bors
Copy link
Collaborator

bors commented Apr 11, 2024

⌛ Testing commit cd3d31b with merge c375398...

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.

Scott beat me by speed

@bors
Copy link
Collaborator

bors commented Apr 11, 2024

☀️ Test successful - checks-actions
Approved by: Muscraft
Pushing c375398 to master...

@bors bors merged commit c375398 into rust-lang:master Apr 11, 2024
21 checks passed
@epage epage deleted the msrv branch April 12, 2024 14:48
bors added a commit that referenced this pull request Apr 12, 2024
fix(help): Generalize --ignore-rust-version

### What does this PR try to resolve?

This is part of #9930 and updates for the help to accommodate #13738 and adding `--ignore-rust-version` to `cargo update`  for when they are stable

This includes
- Moving `--ignore-rust-version` to be under the "Manifest options" header
- Generalizing the help description

### How should we test and review this PR?

### Additional information
epage added a commit to epage/cargo that referenced this pull request Apr 12, 2024
Seeing recent fialures on Windows
- rust-lang#13748
- rust-lang#13738
- rust-lang#13740

and maybe more

The test was added in rust-lang#12744.  It seems of limited utility because there
are innumerable ways of adding new writes that aren't atomic and we
can't test for them all.
Even this case, its limited.

See also https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/Flaky.20test.3A.20.20-death.3A.3Akill_cargo_add_never_corrupts_cargo/near/432979594
bors added a commit that referenced this pull request Apr 12, 2024
test: Remove add/remove death tests

Seeing recent fialures on Windows
- #13748
- #13738
- #13740

and maybe more

The test was added in #12744.  It seems of limited utility because there are innumerable ways of adding new writes that aren't atomic and we can't test for them all.
Even this case, its limited.

See also https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/Flaky.20test.3A.20.20-death.3A.3Akill_cargo_add_never_corrupts_cargo/near/432979594
epage added a commit to epage/cargo that referenced this pull request Apr 12, 2024
Seeing recent fialures on Windows
- rust-lang#13748
- rust-lang#13738
- rust-lang#13740

and maybe more

The test was added in rust-lang#12744.  It seems of limited utility because there
are innumerable ways of adding new writes that aren't atomic and we
can't test for them all.
Even this case, its limited.

See also https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/Flaky.20test.3A.20.20-death.3A.3Akill_cargo_add_never_corrupts_cargo/near/432979594
bors added a commit that referenced this pull request Apr 12, 2024
test: Remove add/remove death tests

Seeing recent fialures on Windows
- #13748
- #13738
- #13740

and maybe more

The test was added in #12744.  It seems of limited utility because there are innumerable ways of adding new writes that aren't atomic and we can't test for them all.
Even this case, its limited.

See also https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/Flaky.20test.3A.20.20-death.3A.3Akill_cargo_add_never_corrupts_cargo/near/432979594
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 13, 2024
Update cargo

8 commits in 74fd5bc730b828dbc956335b229ac34ba47f7ef7..48eca1b164695022295ce466b64b44e4e0228b08
2024-04-10 18:40:49 +0000 to 2024-04-12 21:16:36 +0000
- test: Remove add/remove death tests (rust-lang/cargo#13750)
- feat(resolve): Fallback to 'rustc -V' for MSRV resolving (rust-lang/cargo#13743)
- feat(cli): Add --ignore-rust-version to update/generate-lockfile (rust-lang/cargo#13742)
- `cargo package -p no-exist` emitt  error when the -p `package` not found (rust-lang/cargo#13735)
- fix(help): Generalize --ignore-rust-version (rust-lang/cargo#13741)
- test: don't compress test registry crates (rust-lang/cargo#13744)
- feat(reslve): Respect '--ignore-rust-version' (rust-lang/cargo#13738)
- refactor: Remove `rust_2024_compatibility` lint group (rust-lang/cargo#13740)

r? ghost
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 13, 2024
Update cargo

8 commits in 74fd5bc730b828dbc956335b229ac34ba47f7ef7..48eca1b164695022295ce466b64b44e4e0228b08
2024-04-10 18:40:49 +0000 to 2024-04-12 21:16:36 +0000
- test: Remove add/remove death tests (rust-lang/cargo#13750)
- feat(resolve): Fallback to 'rustc -V' for MSRV resolving (rust-lang/cargo#13743)
- feat(cli): Add --ignore-rust-version to update/generate-lockfile (rust-lang/cargo#13742)
- `cargo package -p no-exist` emitt  error when the -p `package` not found (rust-lang/cargo#13735)
- fix(help): Generalize --ignore-rust-version (rust-lang/cargo#13741)
- test: don't compress test registry crates (rust-lang/cargo#13744)
- feat(reslve): Respect '--ignore-rust-version' (rust-lang/cargo#13738)
- refactor: Remove `rust_2024_compatibility` lint group (rust-lang/cargo#13740)

r? ghost
@rustbot rustbot added this to the 1.79.0 milestone Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Area: Command-line interface, option parsing, etc. A-workspaces Area: workspaces 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