-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed as not planned
Labels
A-rebuild-detectionArea: rebuild detection and fingerprintingArea: rebuild detection and fingerprintingC-bugCategory: bugCategory: bug
Description
Today a user handled me a rar
archive (from a windows machine) with a Cargo package. When I extracted it on my linux machine, I've noticed that cargo build
always rebuilds the project, instead of doing zero builds. Looks like the problem is that extracted files miss mtime
s, so we always rebulid in here:
cargo/src/cargo/ops/cargo_rustc/fingerprint.rs
Lines 250 to 252 in f46d485
let should_rebuild = match (*on_disk_mtime, *previously_built_mtime) { | |
(None, None) => false, | |
(Some(_), None) | (None, Some(_)) => true, |
Seems like a niche use case, and I am not sure how to fix it properly (touching files seems inappropriate?), but lets log the issue anyways!
Metadata
Metadata
Assignees
Labels
A-rebuild-detectionArea: rebuild detection and fingerprintingArea: rebuild detection and fingerprintingC-bugCategory: bugCategory: bug