Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify fingerprint log messages #9026

Merged
merged 2 commits into from
Dec 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 25 additions & 13 deletions src/cargo/core/compiler/fingerprint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -817,9 +817,9 @@ impl Fingerprint {
}
if self.features != old.features {
bail!(
"features have changed: {} != {}",
self.features,
old.features
"features have changed: previously {}, now {}",
old.features,
self.features
)
}
if self.target != old.target {
Expand All @@ -833,9 +833,9 @@ impl Fingerprint {
}
if self.rustflags != old.rustflags {
bail!(
"RUSTFLAGS has changed: {:?} != {:?}",
self.rustflags,
old.rustflags
"RUSTFLAGS has changed: previously {:?}, now {:?}",
old.rustflags,
self.rustflags
)
}
if self.metadata != old.metadata {
Expand All @@ -853,15 +853,23 @@ impl Fingerprint {
match (new, old) {
(LocalFingerprint::Precalculated(a), LocalFingerprint::Precalculated(b)) => {
if a != b {
bail!("precalculated components have changed: {} != {}", a, b)
bail!(
"precalculated components have changed: previously {}, now {}",
b,
a
)
}
}
(
LocalFingerprint::CheckDepInfo { dep_info: adep },
LocalFingerprint::CheckDepInfo { dep_info: bdep },
) => {
if adep != bdep {
bail!("dep info output changed: {:?} != {:?}", adep, bdep)
bail!(
"dep info output changed: previously {:?}, now {:?}",
bdep,
adep
)
}
}
(
Expand All @@ -875,13 +883,17 @@ impl Fingerprint {
},
) => {
if aout != bout {
bail!("rerun-if-changed output changed: {:?} != {:?}", aout, bout)
bail!(
"rerun-if-changed output changed: previously {:?}, now {:?}",
bout,
aout
)
}
if apaths != bpaths {
bail!(
"rerun-if-changed output changed: {:?} != {:?}",
apaths,
"rerun-if-changed output changed: previously {:?}, now {:?}",
bpaths,
apaths,
)
}
}
Expand All @@ -896,11 +908,11 @@ impl Fingerprint {
},
) => {
if *akey != *bkey {
bail!("env vars changed: {} != {}", akey, bkey);
bail!("env vars changed: previously {}, now {}", bkey, akey);
}
if *avalue != *bvalue {
bail!(
"env var `{}` changed: previously {:?} now {:?}",
"env var `{}` changed: previously {:?}, now {:?}",
akey,
bvalue,
avalue
Expand Down