Skip to content

Changed build script run output dir to stdout in new build-dir layout#16644

Merged
weihanglo merged 2 commits intorust-lang:masterfrom
ranger-ross:rename-output-to-stdout
Feb 14, 2026
Merged

Changed build script run output dir to stdout in new build-dir layout#16644
weihanglo merged 2 commits intorust-lang:masterfrom
ranger-ross:rename-output-to-stdout

Conversation

@ranger-ross
Copy link
Member

@ranger-ross ranger-ross commented Feb 14, 2026

What does this PR try to resolve?

Another build-dir layout change that was spawned out of discussion in this comment thread #16502 (comment)

This PR changes <build-dir>/<profile>/build/<pkgname>/[HASH]/run/output to <build-dir>/<profile>/build/<pkgname>/[HASH]/run/stdout for the new build-dir layout.

The motivation here is to change is to:

  1. Better communicate what this file is used for. (it only contains stdout of a build script run)
    • Reduce the overloading of "output" as a term.
  2. Match the corresponding stderr file

cc: #15010

How to test and review this PR?

See the test changes

r? @epage

This commit changes the directory name of the `output` file to `stdout` in
order to match the naming of `stderr` and better represent the contents
it contains.
@rustbot rustbot added A-build-scripts Area: build.rs scripts S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 14, 2026
@ranger-ross ranger-ross changed the title refactor: Move build script run files to a dedicated struct Changed build script run 'output' dir to 'stdout' in new build-dir layout Feb 14, 2026
@ranger-ross ranger-ross changed the title Changed build script run 'output' dir to 'stdout' in new build-dir layout Changed build script run output dir to stdout in new build-dir layout Feb 14, 2026
Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

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

Thanks. I love the refactor!

View changes since this review

@weihanglo weihanglo enabled auto-merge February 14, 2026 09:28
@weihanglo weihanglo added this pull request to the merge queue Feb 14, 2026
Merged via the queue into rust-lang:master with commit 78ca56f Feb 14, 2026
29 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 14, 2026
@ranger-ross ranger-ross deleted the rename-output-to-stdout branch February 14, 2026 11:54
github-merge-queue bot pushed a commit that referenced this pull request Feb 14, 2026
### What does this PR try to resolve?

Follow up on #16644

Sorry, I realized I had confused the path that this file tracks

We write the `script_out_dir` not the `script_run_dir`

https://github.com/rust-lang/cargo/blob/78ca56f39202efa78d522594cfe1ffa5d1720e0d/src/cargo/core/compiler/custom_build.rs#L674

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

Labels

A-build-scripts Area: build.rs scripts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants