Auto merge of #9026 - kassens:master, r=Eh2406

Clarify fingerprint log messages

I had to look up the source to figure out which side was the old value for a RUSTFLAGS fingerprint mismatch.

Making the logs a bit more explicit about which value is old and new would've helped me.
This commit is contained in:
bors 2020-12-29 17:55:07 +00:00
commit cf8800a150

View File

@ -817,9 +817,9 @@ impl Fingerprint {
} }
if self.features != old.features { if self.features != old.features {
bail!( bail!(
"features have changed: {} != {}", "features have changed: previously {}, now {}",
self.features, old.features,
old.features self.features
) )
} }
if self.target != old.target { if self.target != old.target {
@ -833,9 +833,9 @@ impl Fingerprint {
} }
if self.rustflags != old.rustflags { if self.rustflags != old.rustflags {
bail!( bail!(
"RUSTFLAGS has changed: {:?} != {:?}", "RUSTFLAGS has changed: previously {:?}, now {:?}",
self.rustflags, old.rustflags,
old.rustflags self.rustflags
) )
} }
if self.metadata != old.metadata { if self.metadata != old.metadata {
@ -853,7 +853,11 @@ impl Fingerprint {
match (new, old) { match (new, old) {
(LocalFingerprint::Precalculated(a), LocalFingerprint::Precalculated(b)) => { (LocalFingerprint::Precalculated(a), LocalFingerprint::Precalculated(b)) => {
if a != b { if a != b {
bail!("precalculated components have changed: {} != {}", a, b) bail!(
"precalculated components have changed: previously {}, now {}",
b,
a
)
} }
} }
( (
@ -861,7 +865,11 @@ impl Fingerprint {
LocalFingerprint::CheckDepInfo { dep_info: bdep }, LocalFingerprint::CheckDepInfo { dep_info: bdep },
) => { ) => {
if adep != bdep { if adep != bdep {
bail!("dep info output changed: {:?} != {:?}", adep, bdep) bail!(
"dep info output changed: previously {:?}, now {:?}",
bdep,
adep
)
} }
} }
( (
@ -875,13 +883,17 @@ impl Fingerprint {
}, },
) => { ) => {
if aout != bout { if aout != bout {
bail!("rerun-if-changed output changed: {:?} != {:?}", aout, bout) bail!(
"rerun-if-changed output changed: previously {:?}, now {:?}",
bout,
aout
)
} }
if apaths != bpaths { if apaths != bpaths {
bail!( bail!(
"rerun-if-changed output changed: {:?} != {:?}", "rerun-if-changed output changed: previously {:?}, now {:?}",
apaths,
bpaths, bpaths,
apaths,
) )
} }
} }
@ -896,11 +908,11 @@ impl Fingerprint {
}, },
) => { ) => {
if *akey != *bkey { if *akey != *bkey {
bail!("env vars changed: {} != {}", akey, bkey); bail!("env vars changed: previously {}, now {}", bkey, akey);
} }
if *avalue != *bvalue { if *avalue != *bvalue {
bail!( bail!(
"env var `{}` changed: previously {:?} now {:?}", "env var `{}` changed: previously {:?}, now {:?}",
akey, akey,
bvalue, bvalue,
avalue avalue