Reworked how we enable the new build-dir layout on nightly - #17272
Merged
Conversation
This is primarily to make running the Cargo tests in rust-lang/rust work without resorting to lots of hacks.
ranger-ross
force-pushed
the
make-ci-happy
branch
from
July 29, 2026 15:33
73c9cf8 to
45cd577
Compare
weihanglo
approved these changes
Jul 29, 2026
rust-bors Bot
pushed a commit
to rust-lang/rust
that referenced
this pull request
Jul 29, 2026
Update cargo submodule ## src/tools/cargo 23 commits in 3efb1f477e99b42974b982d939fd100303cdf7db..7c83d4cc0953b81d823e47d640c64da9b8bd4fac 2026-07-17 23:53:19 +0000 to 2026-07-29 21:34:53 +0000 - fix: Pass rustdoc flags to final CCI merge step (rust-lang/cargo#17269) - Reworked how we enable the new build-dir layout on nightly (rust-lang/cargo#17272) - Allow setting `-Zembed-metadata` value from the config (rust-lang/cargo#17266) - fix(cli): don't panic during completions when rustup is unavailable (rust-lang/cargo#17263) - docs(workspace): add recommended structure to members field (rust-lang/cargo#17166) - Update cargo-fetch.md to remove cargo-prefetch reference (rust-lang/cargo#16568) - chore: bump to `libgit2-sys@0.18.7+1.9.6` (rust-lang/cargo#17259) - Enable build-dir layout v2 on nightly by default (rust-lang/cargo#17258) - fix(path): clarify error message when path dependency has wrong package (rust-lang/cargo#16927) - fix(toml): warn on hyphenated lint names and duplicates (rust-lang/cargo#17051) - fix(test): gate trim-paths tests on split debuginfo support (rust-lang/cargo#17256) - test(git): Explicitly test for git injection attacks (rust-lang/cargo#17253) - fix(git): Suggest libgit2 if git-cli fails (rust-lang/cargo#17252) - fix(diag): bound transitive unused dependency traversal (rust-lang/cargo#17251) - fix(git): Hide git fetch output without progress (rust-lang/cargo#17243) - revert(lint): Remove `new_implicit_minimum_version_req` (rust-lang/cargo#16321) (rust-lang/cargo#17249) - fix: Add haiku's dylib path (rust-lang/cargo#17248) - Zsh completion: Add `-p` and `--package` flags for `cargo add` (rust-lang/cargo#17247) - refactor(source): Clarify the name of the remote git registry (rust-lang/cargo#17240) - fix(timings): only report units the job queue actually ran (rust-lang/cargo#17238) - Do not include proc-macro deps in rustc search path args (rust-lang/cargo#17236) - chore(deps): update cargo-semver-checks to v0.49.0 (rust-lang/cargo#17237) - rustdoc: rename the doc parts metadata params (rust-lang/cargo#17234) ## src/tools/rustc-perf 12 commits in 0508bdcd37152b28c39b6752828683cdd3f128b5..74ecbcdf88411937a6e39baf2779948565dfd388 2026-07-15 10:20:27 +0000 to 2026-07-27 15:02:48 +0000 - feat: support `@argfile` for rustc-fake (rust-lang/rustc-perf#2509) - Download Clippy when a Clippy profile is requested (rust-lang/rustc-perf#2508) - Add early check for missing rustdoc/clippy in a toolchain (rust-lang/rustc-perf#2507) - Add 2026-07-21 triage (rust-lang/rustc-perf#2506) - use stable extract_if: since 1.87 (rust-lang/rustc-perf#2191) - Update GitHub Actions (rust-lang/rustc-perf#2460) - Update dependency @types/msgpack-lite to v0.1.12 (rust-lang/rustc-perf#2439) - Add 30 day history link to artifact size tab on the compare page (rust-lang/rustc-perf#2505) - Fix selecting color for the bootstrap chart on the toolchain page (rust-lang/rustc-perf#2504) - Add artifact size history chart to toolchain page (rust-lang/rustc-perf#2501) - Parallel frontend compiler support (perf backend only) (rust-lang/rustc-perf#2491) - Run benchmark smoke test for all profiles on Windows on CI (rust-lang/rustc-perf#2503)
rust-bors Bot
pushed a commit
to rust-lang/rust
that referenced
this pull request
Jul 30, 2026
Update cargo submodule ## src/tools/cargo 23 commits in 3efb1f477e99b42974b982d939fd100303cdf7db..7c83d4cc0953b81d823e47d640c64da9b8bd4fac 2026-07-17 23:53:19 +0000 to 2026-07-29 21:34:53 +0000 - fix: Pass rustdoc flags to final CCI merge step (rust-lang/cargo#17269) - Reworked how we enable the new build-dir layout on nightly (rust-lang/cargo#17272) - Allow setting `-Zembed-metadata` value from the config (rust-lang/cargo#17266) - fix(cli): don't panic during completions when rustup is unavailable (rust-lang/cargo#17263) - docs(workspace): add recommended structure to members field (rust-lang/cargo#17166) - Update cargo-fetch.md to remove cargo-prefetch reference (rust-lang/cargo#16568) - chore: bump to `libgit2-sys@0.18.7+1.9.6` (rust-lang/cargo#17259) - Enable build-dir layout v2 on nightly by default (rust-lang/cargo#17258) - fix(path): clarify error message when path dependency has wrong package (rust-lang/cargo#16927) - fix(toml): warn on hyphenated lint names and duplicates (rust-lang/cargo#17051) - fix(test): gate trim-paths tests on split debuginfo support (rust-lang/cargo#17256) - test(git): Explicitly test for git injection attacks (rust-lang/cargo#17253) - fix(git): Suggest libgit2 if git-cli fails (rust-lang/cargo#17252) - fix(diag): bound transitive unused dependency traversal (rust-lang/cargo#17251) - fix(git): Hide git fetch output without progress (rust-lang/cargo#17243) - revert(lint): Remove `new_implicit_minimum_version_req` (rust-lang/cargo#16321) (rust-lang/cargo#17249) - fix: Add haiku's dylib path (rust-lang/cargo#17248) - Zsh completion: Add `-p` and `--package` flags for `cargo add` (rust-lang/cargo#17247) - refactor(source): Clarify the name of the remote git registry (rust-lang/cargo#17240) - fix(timings): only report units the job queue actually ran (rust-lang/cargo#17238) - Do not include proc-macro deps in rustc search path args (rust-lang/cargo#17236) - chore(deps): update cargo-semver-checks to v0.49.0 (rust-lang/cargo#17237) - rustdoc: rename the doc parts metadata params (rust-lang/cargo#17234) ## src/tools/rustc-perf 12 commits in 0508bdcd37152b28c39b6752828683cdd3f128b5..74ecbcdf88411937a6e39baf2779948565dfd388 2026-07-15 10:20:27 +0000 to 2026-07-27 15:02:48 +0000 - feat: support `@argfile` for rustc-fake (rust-lang/rustc-perf#2509) - Download Clippy when a Clippy profile is requested (rust-lang/rustc-perf#2508) - Add early check for missing rustdoc/clippy in a toolchain (rust-lang/rustc-perf#2507) - Add 2026-07-21 triage (rust-lang/rustc-perf#2506) - use stable extract_if: since 1.87 (rust-lang/rustc-perf#2191) - Update GitHub Actions (rust-lang/rustc-perf#2460) - Update dependency @types/msgpack-lite to v0.1.12 (rust-lang/rustc-perf#2439) - Add 30 day history link to artifact size tab on the compare page (rust-lang/rustc-perf#2505) - Fix selecting color for the bootstrap chart on the toolchain page (rust-lang/rustc-perf#2504) - Add artifact size history chart to toolchain page (rust-lang/rustc-perf#2501) - Parallel frontend compiler support (perf backend only) (rust-lang/rustc-perf#2491) - Run benchmark smoke test for all profiles on Windows on CI (rust-lang/rustc-perf#2503)
ltratt
added a commit
to ltratt/yk
that referenced
this pull request
Jul 31, 2026
This was changed in rust-lang/cargo#17272. This might change back for all I know, but at least for now this unbreaks things.
|
This has affected https://github.com/ykjit/yk because we rely on knowing where a cdylib is placed in one crate so we can pick it up in another (to run tests). Previously we'd end up with [I'm not saying that how we used this was pretty; and perhaps not even the least worst way of doing it! I'm very open to suggestions for how to improve things.] |
Pavel-Durov
added a commit
to Pavel-Durov/yk-fork
that referenced
this pull request
Aug 2, 2026
Cargo has changed the layout on nightly (rust-lang/cargo#17272), so counting path components back from `OUT_DIR` no longer lands on the profile directory, and may change again in the future.
Pavel-Durov
added a commit
to Pavel-Durov/yk-fork
that referenced
this pull request
Aug 2, 2026
Cargo has changed the layout on nightly (rust-lang/cargo#17272), so counting path components back from `OUT_DIR` no longer lands on the profile directory, and may change again in the future. In this change we ask `cargo metadata` where the target directory is: the profile is then the first component of `OUT_DIR` beneath it.
Pavel-Durov
added a commit
to Pavel-Durov/yk-fork
that referenced
this pull request
Aug 2, 2026
Cargo has changed the layout on nightly (rust-lang/cargo#17272), so counting path components back from `OUT_DIR` no longer lands on the profile directory, and may change again in the future. In this change we ask `cargo metadata` where the target directory is, and profile is then the first component of `OUT_DIR`.
Pavel-Durov
added a commit
to Pavel-Durov/yk-fork
that referenced
this pull request
Aug 2, 2026
Cargo has changed the layout on nightly (rust-lang/cargo#17272), so counting path components back from `OUT_DIR` no longer lands on the profile directory, and may change again in the future. In this change we ask `cargo metadata` where the target directory is, and profile is then the first component of `OUT_DIR`.
svasista-ms
pushed a commit
to svasista-ms/windows-drivers-rs
that referenced
this pull request
Aug 4, 2026
…2 in nightly runs (microsoft#707) ## Summary The new build-dir v2 layout was added in Rust nightly by this pr rust-lang/rust#159857 which breaks tooling in our cargo-wdk and pipeline. This PR sets the opt out environment variable in the build and test workflows to continue using the v1 build-dir layout until `cargo-wdk` can be updated to support the build-dir layout v2. reference PR's: - rust-lang/cargo#17258 - rust-lang/cargo#17272 info on the new build directory layout: - https://blog.rust-lang.org/2026/03/13/call-for-testing-build-dir-layout-v2/ GitHub Issue Link: microsoft#709 --------- Signed-off-by: Alan632 <aln.noda7@gmail.com> Co-authored-by: Alan Ngo <ngoalan@microsoft.com> Co-authored-by: Melvin Wang <melvin.mc.wang@gmail.com>
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.
What does this PR try to resolve?
This reworks how the new build-dir layout is enabled on nightly by default as suggested in rust-lang/rust#159857 (comment)
The motivation is to fix the CI issue in rust-lang/rust and unblock the submodule update.
How to test and review this PR?
I did a
cargo testand tested passed.r? @weihanglo