Only hash OutputTypes keys in non-crate-hash mode

This effectively turns OutputTypes into a hybrid where keys (OutputType)
are TRACKED and the values (optional paths) are TRACKED_NO_CRATE_HASH.
This commit is contained in:
Aaron Hill 2021-06-19 19:22:14 -05:00 committed by Jeremy Fitzhardinge
parent f1f7f2f508
commit 99f652ff22
3 changed files with 77 additions and 37 deletions

View file

@ -160,9 +160,9 @@ fn test_output_types_tracking_hash_different_paths() {
v2.output_types = OutputTypes::new(&[(OutputType::Exe, Some(PathBuf::from("/some/thing")))]);
v3.output_types = OutputTypes::new(&[(OutputType::Exe, None)]);
assert_same_hash(&v1, &v2);
assert_same_hash(&v1, &v3);
assert_same_hash(&v2, &v3);
assert_non_crate_hash_different(&v1, &v2);
assert_non_crate_hash_different(&v1, &v3);
assert_non_crate_hash_different(&v2, &v3);
}
#[test]