Skip to content
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

--manifest-path forces recompile when using vendoring #6999

Closed
sebastianblunt opened this issue May 31, 2019 · 2 comments
Closed

--manifest-path forces recompile when using vendoring #6999

sebastianblunt opened this issue May 31, 2019 · 2 comments
Labels
C-bug Category: bug

Comments

@sebastianblunt
Copy link

sebastianblunt commented May 31, 2019

Problem

If vendoring dependencies instead of pulling from crates.io, then using --manifest-path will cause cargo to recompile whenever switching from inside the repo to outside.

Steps

  1. I created a minimal repository to reproduce this: https://github.com/sebastianblunt/cargo-6999
  2. cd into the repo and run cargo build
  3. cd ..
  4. cargo build --manifest-path example/Cargo.toml
  5. Notice that it will recompile both the dependency and example.

If you go into the example repo and remove/rename the .cargo directory, thereby removing the vendoring, then cargo will not recompile when you do the above.

It does not seem to make any difference whether you use absolute or relative paths in the .cargo/config.

Possible Solution(s)

Notes

Output of cargo version: cargo 1.37.0-nightly (545f35425 2019-05-23)

@sebastianblunt sebastianblunt added the C-bug Category: bug label May 31, 2019
@ehuss
Copy link
Contributor

ehuss commented Jun 4, 2019

Thanks for making the repro! Cargo doesn't read the .cargo/config file when using --manifest-path (it uses the current working directory). I believe this is a dupe of #2930.

@ehuss
Copy link
Contributor

ehuss commented Jun 24, 2019

Closing in favor of #2930.

@ehuss ehuss closed this as completed Jun 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

2 participants