Don't hash FileTime
value in PathSource::fingerprint
#6835
Labels
A-rebuild-detection
Area: rebuild detection and fingerprinting
C-cleanup
Category: cleanup within the codebase
S-triage
Status: This issue is waiting on initial triage.
Currently here in Cargo we will insert the
FileTime
value, stringified, into aFingerprint
for a package. This is only ever used for build scripts which do not mentionrerun-if-*
directives.Hashing
FileTime
is particularly brittle because filesystems are weird. The primary use case today is that Docker will rewrite file times to zero out the nanosecond field. This means that the hash for a build script changes between docker, even though nothing actually changed.We should instead thread through the set of files considered input to a build script to the
Fingerprint
. These files would then be stored in theFingerprint
(and deterministically hashed) where we would later determine at runtime what theFileTime
modification time is for each file for recompilation purposes.I'm spawning this off of #6832 for a separable unit of work. We'll know this is fixed when this test has its branch on
already_zero
removed, because we should always consider everything fresh.The text was updated successfully, but these errors were encountered: