-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: deduplicate crate types in cargo rustc command #15314
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: deduplicate crate types in cargo rustc command #15314
Conversation
r? @weihanglo rustbot has assigned @weihanglo. Use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the patch! This looks good.
Would you mind splitting this into two commits?
- The first commit adds a test with the snapshot of the current problematic behavior (and the test passes). This can be seen as a reproduction verifying the bug does exist.
- The second commit contains both the actual fix, and the test change, so the test snapshot change could beautifully reflect the behavior change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not a hard blocker btw!
38c03b2
to
aa6f442
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Any reason this is still a draft?
aa6f442
to
36de02f
Compare
sorry, the test I added is not correctly capture the behavior before! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Thank you for the contribution @Frank-III :)
Update cargo 14 commits in 6cf8267012570f63d6b86e85a2ae5627de52df9e..307cbfda3119f06600e43cd38283f4a746fe1f8b 2025-03-14 15:25:36 +0000 to 2025-03-20 20:00:39 +0000 - feat: Add custom completer for cargo <TAB> to complete aliases defined in config.toml (rust-lang/cargo#15319) - fix(build-dir): Renamed workspace-manifest-path-hash to workspace-path-hash (rust-lang/cargo#15334) - feat: vcs, color, and message format native completion (rust-lang/cargo#15322) - Fix `[env]` `relative` description in reference (rust-lang/cargo#15332) - chore: fix some typos (rust-lang/cargo#15329) - Cleanup for rustc-link-arg-cdylib (rust-lang/cargo#15326) - fix(toml): Report '<target>.edition' deprecation to users (rust-lang/cargo#15321) - test(build-std): address overly-matched snapshot (rust-lang/cargo#15325) - Added `build.build_dir` templating support (rust-lang/cargo#15236) - docs: make it clearer that `rust_version` is enforced during compile (rust-lang/cargo#15303) - feat: Add custom completer for cargo +<TAB> to complete toolchain name (rust-lang/cargo#15301) - chore: fix some typos (rust-lang/cargo#15316) - fix: deduplicate crate types in cargo rustc command (rust-lang/cargo#15314) - docs: mention wrong URLs as a cause of git authentication errors (rust-lang/cargo#15304) r? ghost
What does this PR try to resolve?
close: #15312
How should we test and review this PR?
deduplicate
crate-type
in cargorustc
command