Skip to content

Enable Cargo's new build-dir layout in tests+ci#6879

Open
ranger-ross wants to merge 2 commits intorust-lang:mainfrom
ranger-ross:build-with-cargo-build-dir-new-layout
Open

Enable Cargo's new build-dir layout in tests+ci#6879
ranger-ross wants to merge 2 commits intorust-lang:mainfrom
ranger-ross:build-with-cargo-build-dir-new-layout

Conversation

@ranger-ross
Copy link
Copy Markdown
Member

Split out of rust-lang/rust#155439 which enables Cargo's new build-dir layout in tests and CI.

Background

Cargo is planning to stabilize a rework to the build-dir file layout tracked in rust-lang/cargo#15010. (Stabilization PR is currently in FPC rust-lang/cargo#16807)
Our last remaining blocker to merging is preparing rust-lang/rust to work with the new layout so the Cargo submodule can be merged after stabilization.

The build-dirs file system layout is considered an implementation detail of Cargo is subject to changes. Note that this is different than artifact-dir which is stable. (Together these are usually referred to as the target-dir)

Changes

This PR has 2 commits:

  1. Add backwards compatible changes to the rustfmt tests to properly handle the new layout
  2. Enable the new layout in CI using CARGO_UNSTABLE_BUILD_DIR_NEW_LAYOUT

cc: @ytmimi

@rustbot rustbot added A-CI Area: CI S-waiting-on-review Status: awaiting review from the assignee but also interested parties. labels Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: CI S-waiting-on-review Status: awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants