Fix: cargo vendor can't handle duplicates.#13271
Fix: cargo vendor can't handle duplicates.#13271junjihashimoto wants to merge 1 commit intorust-lang:masterfrom
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
weihanglo
left a comment
There was a problem hiding this comment.
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. |
|
☔ The latest upstream changes (possibly 081d7ba) made this pull request unmergeable. Please resolve the merge conflicts. |
|
If anyone still needs it, here is the rebased commit: im-0@c8524eb |
i agree, if |
What does this PR try to resolve?
part of #10310
Add
--no-merge-sourcesoptions 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-sourcesbecome as follows.The vendor directory without
--no-merge-sourcesbecomes as follows.How should we test and review this PR?
Check out the unit tests.
Additional information
None.