-
Notifications
You must be signed in to change notification settings - Fork 30
Vendor sources into separate directories #96
Conversation
Thanks for the PR! I wonder if perhaps we could still put everything into a |
The scheme of this PR is |
Ah ok, I just think we by default want to stick with mostly the same layout as we have today to avoid lots of churn in vendored repos. This could also be behind a flag though to prevent that! |
I updated the PR. It is possible to get the old behavior with the flag [source.crates-io]
replace-with = "vendor+crates-io"
[source."https://github.com/rust-lang/libc"]
git = "https://github.com/rust-lang/libc"
rev = "add1a320b4e1b454794a034e3f4218f877c393fc"
replace-with = "vendor+https://github.com/rust-lang/libc"
[source."vendor+crates-io"]
directory = "/home/me/devel/cargo-vendor/target/tmp/test0/vendor/registry-40351f815f426200"
[source."vendor+https://github.com/rust-lang/libc"]
directory = "/home/me/devel/cargo-vendor/target/tmp/test0/vendor/git-4d8ca19d6a651200" I made the new behavior the default for now, but I don't have a strong opinion on this and no insight into how many users checked vendor folders into version control, if you want another default I'll change it. |
Thanks! Could the old behavior be left as the default though? Perhaps a |
8ec0e6a
to
f8ffcf6
Compare
The flag --no-merge-sources activates the new behavior. Vendoring Cargo projects with [replace] sections can fail without this flag.
Done
Done |
Thanks! |
I thought #59 could be addressed by keeping sources in separate directories and replacing them 1-to-1, instead of replacing all sources with a single merged source.
It seems to work so far. Currently it breaks most of the tests, if this is the way to go I'll fix the tests, incorporate any feedback and update the PR.