Fix dep-info files emitting paths relative to deps' roots#9421
Merged
bors merged 3 commits intorust-lang:masterfrom Apr 29, 2021
Merged
Fix dep-info files emitting paths relative to deps' roots#9421bors merged 3 commits intorust-lang:masterfrom
bors merged 3 commits intorust-lang:masterfrom
Conversation
Sample `shoo.d` file prior to this change is below, note the `build.rs` at the end, which was not from my package. From booping the debugger, I found this was coming from `compiler_builtins`. This is not really their bug though: if a build.rs asks for rerun-if-changed on some crate relative path, this will happen in general. So I've fixed it in Cargo and added a test to prevent it regressing. ``` target/riscv64imac-mu-shoo-elf/release/shoo: /home/jade/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/core_arch_docs.md /home/jade/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/macros.rs /home/jade/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/mod.rs /home/jade/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/simd.rs /home/jade/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/simd_llvm.rs crates/build_bits/src/lib.rs shoo/src/main.rs shoo/src/task.rs shoo/src/vectors.s build.rs ``` This change fixes it so it's like: ``` target/riscv64imac-mu-shoo-elf/release/shoo: /home/jade/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.39/build.rs /home/jade/.cargo/registry/src/github.com-1ecc6299db9ec823/log-0.4.14/build.rs /home/jade/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/core_arch_docs.md /home/jade/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/macros.rs /home/jade/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/mod.rs /home/jade/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/simd.rs /home/jade/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/simd_llvm.rs crates/build_bits/src/lib.rs shoo/src/main.rs shoo/src/task.rs shoo/src/vectors.s ```
|
r? @ehuss (rust-highfive has picked a reviewer for you, use r? to override) |
Contributor
|
Thank you for the test, but it does not seam to be passing on windows. |
Contributor
Author
Thanks for pointing that out. I see why that's happening. I'll go fix it. I don't have a Windows computer so didn't notice. |
Contributor
Author
|
@Eh2406 I've fixed the test on Windows. |
Member
|
@bors: r+ Seems reasonable to me, thanks! |
Contributor
|
📌 Commit b998364 has been approved by |
Contributor
Contributor
|
☀️ Test successful - checks-actions |
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this pull request
May 1, 2021
Update cargo 7 commits in 4369396ce7d270972955d876eaa4954bea56bcd9..f3e13226d6d17a2bc5f325303494b43a45f53b7f 2021-04-27 14:35:53 +0000 to 2021-04-30 21:50:27 +0000 - Fix problem with metrics test. (rust-lang/cargo#9440) - Show transfer rate when fetching/updating registry index (rust-lang/cargo#9395) - Fix collision doc tests randomly failing. (rust-lang/cargo#9434) - Add missing tracking issues and unstable docs. (rust-lang/cargo#9429) - Fix dep-info files emitting paths relative to deps' roots (rust-lang/cargo#9421) - Upgrade to GitHub-native Dependabot (rust-lang/cargo#9428) - Only deny the `unused_mut` lint (rust-lang/cargo#9425)
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this pull request
May 1, 2021
Update cargo 7 commits in 4369396ce7d270972955d876eaa4954bea56bcd9..f3e13226d6d17a2bc5f325303494b43a45f53b7f 2021-04-27 14:35:53 +0000 to 2021-04-30 21:50:27 +0000 - Fix problem with metrics test. (rust-lang/cargo#9440) - Show transfer rate when fetching/updating registry index (rust-lang/cargo#9395) - Fix collision doc tests randomly failing. (rust-lang/cargo#9434) - Add missing tracking issues and unstable docs. (rust-lang/cargo#9429) - Fix dep-info files emitting paths relative to deps' roots (rust-lang/cargo#9421) - Upgrade to GitHub-native Dependabot (rust-lang/cargo#9428) - Only deny the `unused_mut` lint (rust-lang/cargo#9425)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sample
shoo.dfile prior to this change is below, note thebuild.rsat the end, which was not from my package.
From booping the debugger, I found this was coming from
compiler_builtins. This is not really their bug though: if a build.rsasks for rerun-if-changed on some crate relative path, this will happen
in general. So I've fixed it in Cargo and added a test to prevent it
regressing.
This change fixes it so it's like: