-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 vendor can't handle duplicates. #13271
base: master
Are you sure you want to change the base?
Fix: cargo vendor can't handle duplicates. #13271
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ehuss (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 (
|
edf2ba7
to
3ee1557
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.
Could you brief the design in the PR description? such as how the layout of vendor directory look like, and the difference between with and without --no-merge-sources
?
Note that the flag was proposed but at that time the Cargo team prefered to do it automatically without a flag: #10344 (review)
In the case of automation, the use cases may be different and are not compatible for current users. |
If it is better to use #10344 as a base, I will consider that. |
@weihanglo Do you actually have a schedule to fix this issue? |
For myself, I would wait for FCP in rust-lang/rfcs#3243 (comment) and see if we can avoid adding an extra flag. We can perhaps think ahead how the layout should be like with namespaced package feature. That being said, if there is any proposal with better UX, feel free to share. (General design discussions are expected to happen in the issue #10310 and leave PR for specific implementation btw) |
@weihanglo Thank you for pointing it out. The rfc does not include what namespace to use when linking git like this NPM. |
@junjihashimoto Thank you very much! This has been a "life" saver. |
☔ The latest upstream changes (presumably #13461) made this pull request unmergeable. Please resolve the merge conflicts. |
3ee1557
to
663eea9
Compare
@bors The merge is resolved. Thx! |
663eea9
to
96303f1
Compare
96303f1
to
f97a61c
Compare
☔ The latest upstream changes (presumably #13602) made this pull request unmergeable. Please resolve the merge conflicts. |
I'm not quite clear, why does this need a new flag? Why can't it just use separate directories when there is a conflict? |
I think it's due to different use cases. I would like to be able to build with automatic collision avoidance. |
In this case they should use tools like cargo-deny instead of cargo vendor. |
What does this PR try to resolve?
part of #10310
Add
--no-merge-sources
options for cargo-vendor to handle duplicates and offline-build.This is a reimplementation of alexcrichton/cargo-vendor#96.
CC: @ljli @alexcrichton.
The vendor directory and cargo.toml with
--no-merge-sources
become as follows.The vendor directory without
--no-merge-sources
becomes as follows.How should we test and review this PR?
Check out the unit tests.
Additional information
None.