-
Couldn't load subscription status.
- Fork 2.7k
Closed
Description
Here's the setup with two workspaces
.cargo
config
w1/
Cargo.toml
vendor/
w2/
Cargo.toml
The .cargo/config points to
[source.vendored-sources]
directory = "./w1/vendor"
When compiling something in w1, the command line might look like this:
rustc --crate-name byteorder vendor/byteorder-1.1.0/src/lib.rs
When compiling something in w2 the command line might look like this
rustc --crate-name byteorder /Users/nipunn/src/client/rust/vendor/byteorder-1.1.0/src/lib.rs
Given that I share a CARGO_HOME across these two, and AFAICT, the cargo dep caching is based on rustc command line, if I alternate between compiling these two, it kicks off full recompiles.
If I move the vendor directory up to root, they both use absolute paths, and deps are cached across the two projects.
Proposed solution: cargo should always pass an absolute path to the vendor directory to rustc to work around this issue.
Metadata
Metadata
Assignees
Labels
No labels