Skip to content

Commit 3edef32

Browse files
Utilize dep-info for all dependencies
Now that sysroot dependencies are encoded, we want to know about them regardless of whether the crate itself is unlikely to change contents.
1 parent 807429e commit 3edef32

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

src/cargo/core/compiler/fingerprint.rs

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,10 @@
165165
//!
166166
//! ## Special considerations
167167
//!
168-
//! Registry dependencies do not track the mtime of files. This is because
169-
//! registry dependencies are not expected to change (if a new version is
170-
//! used, the Package ID will change, causing a rebuild). Cargo currently
171-
//! partially works with Docker caching. When a Docker image is built, it has
172-
//! normal mtime information. However, when a step is cached, the nanosecond
173-
//! portions of all files is zeroed out. Currently this works, but care must
174-
//! be taken for situations like these.
168+
//! Cargo currently partially works with Docker caching. When a Docker image is
169+
//! built, it has normal mtime information. However, when a step is cached, the
170+
//! nanosecond portions of all files is zeroed out. Currently this works, but
171+
//! care must be taken for situations like these.
175172
//!
176173
//! HFS on macOS only supports 1 second timestamps. This causes a significant
177174
//! number of problems, particularly with Cargo's testsuite which does rapid
@@ -1108,13 +1105,8 @@ fn calculate_normal<'a, 'cfg>(
11081105
})
11091106
}
11101107

1111-
// We want to use the mtime for files if we're a path source, but if we're a
1112-
// git/registry source, then the mtime of files may fluctuate, but they won't
1113-
// change so long as the source itself remains constant (which is the
1114-
// responsibility of the source)
11151108
fn use_dep_info(unit: &Unit<'_>) -> bool {
1116-
let path = unit.pkg.summary().source_id().is_path();
1117-
!unit.mode.is_doc() && path
1109+
!unit.mode.is_doc()
11181110
}
11191111

11201112
/// Calculate a fingerprint for an "execute a build script" unit. This is an

0 commit comments

Comments
 (0)