-
Notifications
You must be signed in to change notification settings - Fork 2.6k
"error: failed to download <dependency>" because of CARGO_HOME #8120
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
Comments
And I owe you a short explanation of why it's a problem. We used to have this setup with shared Basically, our cache was structured like this:
After we started to stumble upon this bug,
|
Hello, still happens in |
I just hit this as well, was hitting a very strange issue in a docker build that didn't happen on a local build where If I |
Uh oh!
There was an error while loading. Please reload this page.
Some logs are listed in #4007.
Problem
Happens when there is a custom
CARGO_HOME
dir (can't really try with the default) and it starts having different versions of the same dependency. In this case, something is being removed in$CARGO_HOME/registry
and it causes different errors.Some examples of errors:
The most popular one:
cargo +nightly build
cargo check
cargo deny check
cargo +nightly check
cargo test --release
They are always reproducible and do not depend on the network. Purging
CARGO_HOME
always helps.Steps
@ehuss
This repro is very close to how our cache in GitLab is organised:
sudo docker run -it -v /place/you/want/:/cache/ parity/rust-builder:latest
Possible Solution(s)
As a workaround,
cargo vendor
could help, but didn't try it so far.It would be really cool if
cargo
respected CIs, instead of locking files.Notes
The output of
cargo version
: started to be a problem in the middle of stable 1.41, and still stands.This happens in CI where we have the shared
CARGO_HOME
(and I've already excluded the locking problem, it doesn't cause this kind of errors, the worst case with it is a parallel job waits). CI runs code within docker containers and the cache dirs is mapped via docker volumes, exactly as in repro. Docker containers are based ondebian:buster
.@ehuss
We have
ext4
everywhere.The text was updated successfully, but these errors were encountered: