cargo install
always re-installs sccache
even if the newest version is already present
#8513
Labels
cargo install
always re-installs sccache
even if the newest version is already present
#8513
Problem
Running
cargo install sccache --no-default-features
twice compilessccache
twice.However, given that the first install installs the most recent version I would expect the second install to be a no-op, since no update is required.
Steps
cargo install sccache --no-default-features
cargo install sccache --no-default-features
againPossible Solution(s)
I instrumented the version f84f3f8 with some
dbg!
statements to pinpoint the problem.As best as I can tell, the problem is that
exe_names
insrc/cargo/ops/common_for_install_and_uninstall.rs
does not take into account feature flags.By default only the
sccache
binary will be installed, but thesccache
crate can also installsccache-dist
when given the correct feature flags (Linescommon_for_install_and_uninstall.rs:498
).This leads the check in
common_for_install_and_uninstall.rs:218
to fail, which markssccache
as dirty.Here is the debug output:
Notes
Output of
cargo version
:Revision f84f3f8, cargo 1.46.0
also reproduces on stable cargo 1.45.0 (744bd1f 2020-06-15)
The text was updated successfully, but these errors were encountered: