Skip to content

Commit

Permalink
detect 1 in a million changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gilescope committed May 26, 2024
1 parent 8e2581b commit a5daf56
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/cargo/core/compiler/fingerprint/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1952,6 +1952,13 @@ where
});
}

// If a few files in many have a .0ns mtime then still regard them as changed files.
if total_checked > 1 && truncated_precision_count == 1 {
return first;
} else if truncated_precision_count > 0 {
debug!("ignoring files that look changed due to mtime precision differences");
}

debug!(
"all paths up-to-date relative to {:?} mtime={}",
reference, reference_mtime
Expand Down

0 comments on commit a5daf56

Please sign in to comment.