Skip to content

Commit e9b4758

Browse files
committed
refactor(fingerprint): Hash dependencies at the end
1 parent 7a396f0 commit e9b4758

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/cargo/core/compiler/build_runner/compilation_files.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -609,14 +609,6 @@ fn compute_metadata(
609609
// when changing feature sets each lib is separately cached.
610610
unit.features.hash(&mut hasher);
611611

612-
// Mix in the target-metadata of all the dependencies of this target.
613-
let mut dep_hashes = deps_metadata
614-
.iter()
615-
.map(|m| m.meta_hash)
616-
.collect::<Vec<_>>();
617-
dep_hashes.sort();
618-
dep_hashes.hash(&mut hasher);
619-
620612
// Throw in the profile we're compiling with. This helps caching
621613
// `panic=abort` and `panic=unwind` artifacts, additionally with various
622614
// settings like debuginfo and whatnot.
@@ -685,6 +677,14 @@ fn compute_metadata(
685677
target_configs_are_different.hash(&mut hasher);
686678
}
687679

680+
// Mix in the target-metadata of all the dependencies of this target.
681+
let mut dep_hashes = deps_metadata
682+
.iter()
683+
.map(|m| m.meta_hash)
684+
.collect::<Vec<_>>();
685+
dep_hashes.sort();
686+
dep_hashes.hash(&mut hasher);
687+
688688
Metadata {
689689
meta_hash: UnitHash(hasher.finish()),
690690
use_extra_filename: use_extra_filename(bcx, unit),

0 commit comments

Comments
 (0)