Skip to content

Conversation

ranger-ross
Copy link
Member

What does this PR try to resolve?

Added -Zbuild-dir-new-layout unstable feature as part of #15010

I will open a follow up PR with an initial implementation as mentioned here

r? @weihanglo

@rustbot rustbot added A-documenting-cargo-itself Area: Cargo's documentation A-unstable Area: nightly unstable support S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. A-build-execution Area: anything dealing with executing the compiler A-layout Area: target output directory layout, naming, and organization Command-clean labels Aug 17, 2025
@ranger-ross ranger-ross force-pushed the build-dir-layout-feature branch from 07836ed to c519405 Compare August 17, 2025 10:19
@ranger-ross
Copy link
Member Author

ranger-ross commented Aug 17, 2025

oops, disregard the last push. I mistakenly pushed the wip layout implementation to the wrong branch.

Reverted that commit


* Tracking Issue: [#15010](https://github.com/rust-lang/cargo/issues/15010)

Enables the new build-dir filesystem layout.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new layout won't be that useful enough to stabilize on its own, right? Anyway the layout changing itself could lead to unexpected breakages to workflow making assumption of the layout, so agree it is better having its own unstable flag.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new layout won't be that useful enough to stabilize on its own, right? Anyway the layout changing itself could lead to unexpected breakages to workflow making assumption of the layout, so agree it is better having its own unstable flag.

Yeah it seems unlikely that this alone would give users a tangible benefit, but I think there is value in allowing tool authors to test their cargo integration with the new layout.


Part of me is wondering if it would be a good idea to bundle the layout changes with moving the default build-dir location to inside of CARGO_HOME (or perhaps using XDG config #1734 ?)
My thought is that it might be easier to bundle both of these changes together to avoid churn in the default build-dir behavior.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not? I feel like they are different kinds of churn. And XDG is always a hot topic that I am afraid of touching 😆.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed that these are independent changes.

My hope was to have fine grained locking be the feature to push this to being stabilized.

@weihanglo weihanglo added this pull request to the merge queue Aug 18, 2025
Merged via the queue into rust-lang:master with commit 33cb1c2 Aug 18, 2025
46 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 18, 2025
@ranger-ross ranger-ross deleted the build-dir-layout-feature branch August 18, 2025 07:58
bors added a commit to rust-lang/rust that referenced this pull request Aug 23, 2025
Update cargo submodule

12 commits in 71eb84f21aef43c07580c6aed6f806a6299f5042..623d536836b4cde09ce38609232a024d5b25da81
2025-08-17 17:18:56 +0000 to 2025-08-22 19:05:52 +0000
- test(frontmatter): Match test updates in rustc (rust-lang/cargo#15878)
- chore: fix some typos in comment (rust-lang/cargo#15877)
- Add Arm64 Windows CI jobs (rust-lang/cargo#15790)
- suggest workspace hints for boolean dependencies (rust-lang/cargo#15507)
- make `UnitGenerator` public in cargo-as-a-library (rust-lang/cargo#15873)
- Linting system (rust-lang/cargo#15865)
- Switch to using native mdbook fragment redirects (rust-lang/cargo#15861)
- docs(profile): revert wrong statement of lto options' optimization (rust-lang/cargo#15855)
- docs: avoid ambiguity between update and fetch (rust-lang/cargo#15860)
- docs: mention how Cargo fetch git submodules (rust-lang/cargo#15853)
- feat(unstable): Added `-Zbuild-dir-new-layout` unstable feature (rust-lang/cargo#15848)
- Implement `host`-target substitution (rust-lang/cargo#15838)

r? ghost
@rustbot rustbot added this to the 1.91.0 milestone Aug 23, 2025
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Aug 24, 2025
Update cargo submodule

12 commits in 71eb84f21aef43c07580c6aed6f806a6299f5042..623d536836b4cde09ce38609232a024d5b25da81
2025-08-17 17:18:56 +0000 to 2025-08-22 19:05:52 +0000
- test(frontmatter): Match test updates in rustc (rust-lang/cargo#15878)
- chore: fix some typos in comment (rust-lang/cargo#15877)
- Add Arm64 Windows CI jobs (rust-lang/cargo#15790)
- suggest workspace hints for boolean dependencies (rust-lang/cargo#15507)
- make `UnitGenerator` public in cargo-as-a-library (rust-lang/cargo#15873)
- Linting system (rust-lang/cargo#15865)
- Switch to using native mdbook fragment redirects (rust-lang/cargo#15861)
- docs(profile): revert wrong statement of lto options' optimization (rust-lang/cargo#15855)
- docs: avoid ambiguity between update and fetch (rust-lang/cargo#15860)
- docs: mention how Cargo fetch git submodules (rust-lang/cargo#15853)
- feat(unstable): Added `-Zbuild-dir-new-layout` unstable feature (rust-lang/cargo#15848)
- Implement `host`-target substitution (rust-lang/cargo#15838)

r? ghost
github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Aug 25, 2025
Update cargo submodule

12 commits in 71eb84f21aef43c07580c6aed6f806a6299f5042..623d536836b4cde09ce38609232a024d5b25da81
2025-08-17 17:18:56 +0000 to 2025-08-22 19:05:52 +0000
- test(frontmatter): Match test updates in rustc (rust-lang/cargo#15878)
- chore: fix some typos in comment (rust-lang/cargo#15877)
- Add Arm64 Windows CI jobs (rust-lang/cargo#15790)
- suggest workspace hints for boolean dependencies (rust-lang/cargo#15507)
- make `UnitGenerator` public in cargo-as-a-library (rust-lang/cargo#15873)
- Linting system (rust-lang/cargo#15865)
- Switch to using native mdbook fragment redirects (rust-lang/cargo#15861)
- docs(profile): revert wrong statement of lto options' optimization (rust-lang/cargo#15855)
- docs: avoid ambiguity between update and fetch (rust-lang/cargo#15860)
- docs: mention how Cargo fetch git submodules (rust-lang/cargo#15853)
- feat(unstable): Added `-Zbuild-dir-new-layout` unstable feature (rust-lang/cargo#15848)
- Implement `host`-target substitution (rust-lang/cargo#15838)

r? ghost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-build-execution Area: anything dealing with executing the compiler A-documenting-cargo-itself Area: Cargo's documentation A-layout Area: target output directory layout, naming, and organization A-unstable Area: nightly unstable support Command-clean

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants