Cargo stores the source code of downloaded crates in $HOME/.cargo/registry/src
(or the appropriate $CARGO_HOME
directory). I get that each unique registry I use will create a separate directory, presumably to prevent conflicts.
What I don't understand is why the same repository would create multiple directories:
$ ls -ld ~/.cargo/registry/src/github.com-*
drwxr-xr-x 473 shep staff 16082 Dec 27 2015 ~/.cargo/registry/src/github.com-0a35038f75765ae4
drwxr-xr-x 1187 shep staff 40358 Feb 8 19:10 ~/.cargo/registry/src/github.com-1ecc6299db9ec823
drwxr-xr-x 380 shep staff 12920 Sep 11 12:16 ~/.cargo/registry/src/github.com-88ac128001ac3a9a
Presumably the hash that is appended to the end plays some role in this. What causes Cargo to create one of these directories? Will it ever go back to a previous directory and continue using it?
cargo-update
also report that the newest one sometimes is not the one used bycargo
. – набиячлэвэли