-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
From the “Cargo Home” docs page (live, source), referring to what
directories should be cached in CI:
It should be sufficient to only cache the following directories across builds:
bin/
registry/index/
registry/cache/
git/db/
This doesn’t seem to be sufficient when the job runs cargo install
to
install tools, like Cargo subcommands (e.g., cargo-raze
). If a job
installs a binary and only caches these directories, a re-run of the job
will fail at cargo install
time with
error: binary `cargo-raze` already exists in destination
Add --force to overwrite
because the binary exists but Cargo has no record that it has been
installed. Sample failure:
https://github.com/tensorflow/tensorboard/runs/1367174061
It sufficed for me to also cache .crates.toml
and .crates2.json
.
Maybe only the former is needed; I included the latter to be safe.
Especially since these are dotfiles, it would be nice to document that
they, too, should be cached.
I would submit a patch, but I don’t know exactly what the right
recommendation is.
cargo version 1.47.0 on Linux (Debian/Ubuntu)
Activity
wchargin commentedon Nov 8, 2020
@rustbot modify labels: A-documenting-cargo-itself
rustbot commentedon Nov 8, 2020
Error: The feature
relabel
is not enabled in this repository.To enable it add its section in the
triagebot.toml
in the root of the repository.Please let
@rust-lang/release
know if you're having trouble with this bot.Auto merge of #11498 - dtolnay-contrib:relabel, r=ehuss
weihanglo commentedon Oct 11, 2024
This has been fixed by #11592