From 1110837d0ec9eafcb523459d0a34f8970bbd8544 Mon Sep 17 00:00:00 2001 From: Jan Kassens Date: Tue, 29 Dec 2020 17:29:15 +0000 Subject: [PATCH 1/2] Clarify fingerprint log messages --- src/cargo/core/compiler/fingerprint.rs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/cargo/core/compiler/fingerprint.rs b/src/cargo/core/compiler/fingerprint.rs index a45dee17b19..7c6a26ff365 100644 --- a/src/cargo/core/compiler/fingerprint.rs +++ b/src/cargo/core/compiler/fingerprint.rs @@ -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 { @@ -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 { @@ -853,7 +853,7 @@ 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) } } ( @@ -861,7 +861,7 @@ impl Fingerprint { LocalFingerprint::CheckDepInfo { dep_info: bdep }, ) => { if adep != bdep { - bail!("dep info output changed: {:?} != {:?}", adep, bdep) + bail!("dep info output changed: previously {:?}, now {:?}", bdep, adep) } } ( @@ -875,13 +875,13 @@ 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, ) } } @@ -896,11 +896,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 From 4538ade2d55d7353cfac8a0ce320e3c4a29bc450 Mon Sep 17 00:00:00 2001 From: Jan Kassens Date: Tue, 29 Dec 2020 12:42:28 -0500 Subject: [PATCH 2/2] cargo fmt --- src/cargo/core/compiler/fingerprint.rs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/cargo/core/compiler/fingerprint.rs b/src/cargo/core/compiler/fingerprint.rs index 7c6a26ff365..5077c33645f 100644 --- a/src/cargo/core/compiler/fingerprint.rs +++ b/src/cargo/core/compiler/fingerprint.rs @@ -853,7 +853,11 @@ impl Fingerprint { match (new, old) { (LocalFingerprint::Precalculated(a), LocalFingerprint::Precalculated(b)) => { if a != b { - bail!("precalculated components have changed: previously {}, now {}", b, a) + bail!( + "precalculated components have changed: previously {}, now {}", + b, + a + ) } } ( @@ -861,7 +865,11 @@ impl Fingerprint { LocalFingerprint::CheckDepInfo { dep_info: bdep }, ) => { if adep != bdep { - bail!("dep info output changed: previously {:?}, now {:?}", bdep, adep) + bail!( + "dep info output changed: previously {:?}, now {:?}", + bdep, + adep + ) } } ( @@ -875,7 +883,11 @@ impl Fingerprint { }, ) => { if aout != bout { - bail!("rerun-if-changed output changed: previously {:?}, now {:?}", bout, aout) + bail!( + "rerun-if-changed output changed: previously {:?}, now {:?}", + bout, + aout + ) } if apaths != bpaths { bail!(