Canonicalize src path for fingerprint #7078
Labels
A-rebuild-detection
Area: rebuild detection and fingerprinting
C-enhancement
Category: enhancement
S-needs-team-input
Status: Needs input from team on whether/how to proceed.
Describe the problem you are trying to solve
When cargo registers information used later on to figure out whether or not to recompile a unit, the path to the source is tracked in the fingerprint:
cargo/src/cargo/core/compiler/mod.rs
Lines 684 to 697 in 83d086d
However this path is not canonicalized, meaning that e.g. symlinks aren't resolved before the source paths are added to the fingerprint.
This causes two kinds of issues:
Describe the solution you'd like
The paths can be canonicalized before being returned:
One drawback is that cache miss info (with
CARGO_LOG=cargo::core::compiler::fingerprint=trace
) may confuse the user in the presence of symlinks.The text was updated successfully, but these errors were encountered: