Cache is completely invalidated when RUSTFLAGS
is passed on the clippy command line instead
#9280
Labels
C-bug
Category: bug
Problem
Here is the full Makefile:
https://github.com/stratis-storage/stratisd/blob/develop-2.3.0/Makefile
This diff is the two different invocations in question:
stratis-storage/stratisd@b014c72
I expected the build in the minus part of the diff to not invalidate the cache. However, unless our
${DENY}
Rust flags are passed in via theRUSTFLAGS
environment variable as they are inmake build
as opposed to on the clippy command line, the cache is completely invalidated and cargo rebuilds all of the dependencies every timemake build
is run aftermake clippy
and vice versa.Steps
RUSTFLAGS="-D warning" cargo build
cargo clippy -- -D warning
Possible Solution(s)
Is there a way to detect something like
-D warning
whether it's passed into the clippy command line or throughRUSTFLAGS
?Output of
cargo version
:cargo 1.50.0
This is happening on Fedora 32 with the packaged Rust version.
The text was updated successfully, but these errors were encountered: