remap-path-prefix affects dep-info #63329
Labels
A-driver
Area: rustc_driver that ties everything together into the `rustc` compiler
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The
--remap-path-prefix
flag affects paths in dep-info files. This causes some problems witth Cargo.Cargo uses these paths to detect if any source file has been modified. Since the common use case for
--remap-path-prefix
is to rewrite to some artificial path (like/rustc/$HASH
which rust distributions use), this causes them to point to non-existent paths, which Cargo cannot check.In some cases, this doesn't matter. Workspace members are built with relative paths which (usually) won't match the remap value. However, registry or vendored paths will get remapped. Cargo won't find the path, so it will always assume it needs to rebuilt, breaking it's rebuild detection.
I think dep-info paths should not be remapped. I think it keeps with the spirit of reproducible builds (the binaries aren't affected, this is just a side-channel build-system file). However, I'm not certain. I also don't know how hard this will be to implement.
Oh, and
-Z binary-dep-depinfo
doesn't seem to be affected by--remap-path-prefix
.The text was updated successfully, but these errors were encountered: