Different RUSTFLAGS
between cargo build
and cargo clippy
invalidate "core" crate when using build-std
#14551
Labels
A-rebuild-detection
Area: rebuild detection and fingerprinting
A-rustflags
Area: rustflags
C-bug
Category: bug
Command-clippy
S-triage
Status: This issue is waiting on initial triage.
Z-build-std
Nightly: build-std
Problem
Normally, I pass the flag
-W missing_docs
tocargo clippy
but notcargo build
this does not affect the other's build. However, when using-Z build-std
, I've noticed that adding-W missing_docs
to mycargo clippy
command will cause my thecargo build
command to re-build thecore
crate, which in turn re-builds most dependent crates.Steps
This was reproduced on with the following environment:
cargo new --bin buildstdtest
cd buildstdtest
cargo clippy
with-Z build-std
and setRUSTFLAGS="-W missing_docs"
cargo build
with -Z build-stdand no
RUSTFLAGS` setcargo clippy
again. I expect nothing rebuilds since no inputs have changed.core
crate re-builds due to a change in rustflags.Possible Solution(s)
No response
Notes
I enabled tracing on fingerprinting via the following command:
The output shows that the
core
crate did have a change in rustflags.So the question to figure out is, why do the
build-std
crates pick up on theRUSTFLAGS
change, but when I remove-Z build-std
cargo build
andcargo clippy
can run side by side without affecting eachother's build fingerprints.Version
The text was updated successfully, but these errors were encountered: