Cargo fetches submodules of git dependencies each time you run cargo update
#10278
Labels
C-bug
Category: bug
cargo update
#10278
Problem
Cargo updates submodules much more frequently than it needs to; I think it's cloning the submodule fresh, when it could just reuse the submodule from the last update.
Steps
cargo new cargo-submodule-weirdness && cd cargo-submodule-weirdness
cargo update -p boring --precise 44426292e061ec7030b4e049528c876bba26deba
cargo update -p boring --precise c85bf0940e13e92e085816718c6ae97fda8ca1aa
Note that cargo clones
https://github.com/google/boringssl.git
anew each time, even though it doesn't need to.Possible Solution(s)
Reuse the cloned submodule between commits.
Notes
Log output for a
--precise
hash that cargo hasn't seen before:and for a cached hash:
Version
The text was updated successfully, but these errors were encountered: