mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
fix(fingerprint): explicit reason than "stale; unknown reason"
This was discovered during playing with rmeta reuse between cargo-check and cargo-build
This commit is contained in:
parent
64a1246070
commit
c6f5f3fcae
@ -1167,15 +1167,12 @@ impl Fingerprint {
|
|||||||
// minimum mtime as it's the one we'll be comparing to inputs and
|
// minimum mtime as it's the one we'll be comparing to inputs and
|
||||||
// dependencies.
|
// dependencies.
|
||||||
for output in self.outputs.iter() {
|
for output in self.outputs.iter() {
|
||||||
let mtime = match paths::mtime(output) {
|
let Ok(mtime) = paths::mtime(output) else {
|
||||||
Ok(mtime) => mtime,
|
|
||||||
|
|
||||||
// This path failed to report its `mtime`. It probably doesn't
|
// This path failed to report its `mtime`. It probably doesn't
|
||||||
// exists, so leave ourselves as stale and bail out.
|
// exists, so leave ourselves as stale and bail out.
|
||||||
Err(e) => {
|
let item = StaleItem::FailedToReadMetadata(output.clone());
|
||||||
debug!("failed to get mtime of {:?}: {}", output, e);
|
self.fs_status = FsStatus::StaleItem(item);
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
|
||||||
};
|
};
|
||||||
assert!(mtimes.insert(output.clone(), mtime).is_none());
|
assert!(mtimes.insert(output.clone(), mtime).is_none());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user