You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This causes extremely bizzare incorrect paths to show up in target/spirv-unknown-unknown/release/example_shader.d, for example, /home/khyperia/me/rust-gpu/target/release/debug/deps/librustc_codegen_spirv.so (note the release/debug)
I believe this is because when serializing, the root is taken from cx.bcx.ws.target_dir().into_path_unlocked(), which is the simple target dir.
I think the only reason this hasn't been noticed before is that before rust-lang/rust#77565, absolute paths converted to relative paths never went through the TargetRootRelative codepath, it was always kept as absolute paths. Maybe? I don't know.
I would submit a PR to fix this, but I don't know which path is correct to use here.
The text was updated successfully, but these errors were encountered:
Oh dear, thanks for the report and investigation here though! I believe the intention was to be relative to target itself, so anything that's actually relative to target/{debug,release} is a bug!
Originally found in EmbarkStudios/rust-gpu#120, I'll use paths from my debugging there
On this line of code, serializing the dep file,
target_root
==/home/khyperia/me/rust-gpu/target
cargo/src/cargo/core/compiler/fingerprint.rs
Lines 1834 to 1835 in 358ee54
On this line of code, parsing the dep file,
target_root
==/home/khyperia/me/rust-gpu/target/release
cargo/src/cargo/core/compiler/fingerprint.rs
Line 1669 in 358ee54
This causes extremely bizzare incorrect paths to show up in
target/spirv-unknown-unknown/release/example_shader.d
, for example,/home/khyperia/me/rust-gpu/target/release/debug/deps/librustc_codegen_spirv.so
(note therelease/debug
)I believe this is because when serializing, the root is taken from
cx.bcx.ws.target_dir().into_path_unlocked()
, which is the simpletarget
dir.cargo/src/cargo/core/compiler/mod.rs
Line 221 in 358ee54
But when parsing the dep file, the root is taken from
cx.files().host_root()
, which is the specific target directorytarget/release
.cargo/src/cargo/core/compiler/output_depinfo.rs
Line 66 in 358ee54
I think the only reason this hasn't been noticed before is that before rust-lang/rust#77565, absolute paths converted to relative paths never went through the
TargetRootRelative
codepath, it was always kept as absolute paths. Maybe? I don't know.I would submit a PR to fix this, but I don't know which path is correct to use here.
The text was updated successfully, but these errors were encountered: