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

Fix cargo remove incorrectly removing used patches #12454

Merged
merged 4 commits into from
Aug 10, 2023

Conversation

alcolmenar
Copy link
Contributor

What does this PR try to resolve?

Fixes an issue where patches are being removed when member dependencies don't explicitly contain the patched crate.

Fixes #12419

How should we test and review this PR?

  • Created a test for the failing use case
  • Verify passing test

@rustbot
Copy link
Collaborator

rustbot commented Aug 6, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @weihanglo (or someone else) soon.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 6, 2023
@alcolmenar alcolmenar force-pushed the alcolmenar/fix-invalid-rm branch from 9d3fcfa to 199c82a Compare August 8, 2023 17:38
@rustbot rustbot added A-cli Area: Command-line interface, option parsing, etc. Command-remove labels Aug 8, 2023
@alcolmenar alcolmenar force-pushed the alcolmenar/fix-invalid-rm branch from f589504 to f6b94f3 Compare August 8, 2023 22:06
@alcolmenar alcolmenar changed the title WIP fix cargo remove incorrectly removing patches Fix cargo remove incorrectly removing used patches Aug 8, 2023
@alcolmenar alcolmenar requested a review from epage August 8, 2023 22:11
@alcolmenar alcolmenar force-pushed the alcolmenar/fix-invalid-rm branch 2 times, most recently from 87e86ea to 87d9c47 Compare August 9, 2023 19:56
@alcolmenar alcolmenar force-pushed the alcolmenar/fix-invalid-rm branch from 87d9c47 to 0153221 Compare August 9, 2023 20:12
@alcolmenar alcolmenar requested a review from epage August 9, 2023 20:14
@alcolmenar alcolmenar force-pushed the alcolmenar/fix-invalid-rm branch from 84296e2 to 8864058 Compare August 10, 2023 14:27
@alcolmenar alcolmenar force-pushed the alcolmenar/fix-invalid-rm branch from 8864058 to 72e66fb Compare August 10, 2023 16:52
@alcolmenar alcolmenar requested a review from epage August 10, 2023 16:53
@epage
Copy link
Contributor

epage commented Aug 10, 2023

Thanks for all of the work you put into researching and fixing this!

@bors r+

@bors
Copy link
Contributor

bors commented Aug 10, 2023

📌 Commit 72e66fb has been approved by epage

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 10, 2023
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Aug 10, 2023
@bors
Copy link
Contributor

bors commented Aug 10, 2023

⌛ Testing commit 72e66fb with merge af431e1...

@alcolmenar
Copy link
Contributor Author

Thanks for all of the work you put into researching and fixing this!

Definitely was my pleasure! Thank you for your guidance. It was a good first experience on the project

@bors
Copy link
Contributor

bors commented Aug 10, 2023

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

@bors bors merged commit af431e1 into rust-lang:master Aug 10, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 13, 2023
Update cargo

21 commits in d78bbf4bde3c6b95caca7512f537c6f9721426ff..7e9de3f4ec3708f500bec142317895b96131e47c
2023-08-03 12:58:25 +0000 to 2023-08-13 00:47:32 +0000
- feat: remove `--keep-going` from `cargo test/bench` (rust-lang/cargo#12478)
- chore: window-sys should be a platform-specific dependency (rust-lang/cargo#12483)
- docs: make the env var source of rerun-if-env-changed clearer (rust-lang/cargo#12482)
- doc: note the backward compatible `.cargo/credential` file exists (rust-lang/cargo#12479)
- Fix elided lifetime in associated const (rust-lang/cargo#12475)
- prompt the use of `--nocapture` flag if `cargo test` process is terminated via a signal. (rust-lang/cargo#12463)
- cargo-credential: reset stdin & stdout to the Console (rust-lang/cargo#12469)
- Fix cargo remove incorrectly removing used patches (rust-lang/cargo#12454)
- chore(gh): Expand update window (rust-lang/cargo#12466)
- Fix panic when enabling http.debug for certain strings (rust-lang/cargo#12468)
- fix(cli): Make `--help` easier to browse (rust-lang/cargo#11905)
- fix: preserve jobserver file descriptors on rustc invocation to get `TargetInfo` (rust-lang/cargo#12447)
- refactor: migrate to `tracing` (rust-lang/cargo#12458)
- docs: add example for cargo-credential (rust-lang/cargo#12461)
- Bail out an error when using cargo:: in custom build script (rust-lang/cargo#12332)
- Fix printing multiple warning messages for unused fields in [registries] table (rust-lang/cargo#12439)
- Update windows dependencies (rust-lang/cargo#12453)
- Rustfmt a let-else statement (rust-lang/cargo#12451)
- Add allow(internal_features) (rust-lang/cargo#12450)
- Update pretty_env_logger to 0.5 (rust-lang/cargo#12445)
- Remove build metadata from libgit2-sys dependency (rust-lang/cargo#12444)

r? `@ghost`
@ehuss ehuss added this to the 1.73.0 milestone Aug 22, 2023
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. Command-remove 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.

cargo rm unexpectedly removes patches
6 participants