Skip to content

Conversation

Zalathar
Copy link
Contributor

@Zalathar Zalathar commented Sep 23, 2025

The new compiletest output-capture system became the default in #146574, and no problems have been reported since.

This PR therefore removes the old output-capture implementation from compiletest, and adjusts bootstrap to always build and test compiletest as a stage0 bootstrap tool.

In other words, compiletest no longer relies on any unstable features (such as libtest or internal_output_capture), and is now written entirely in stable Rust!

The compiletest self-tests still need access to an in-tree rustc, in order to obtain information via rustc --print, so we interpret --stage as indicating the stage of that secondary compiler, but always use the stage0 compiler to build compiletest itself.

r? Kobzol

@rustbot
Copy link
Collaborator

rustbot commented Sep 23, 2025

This PR modifies src/bootstrap/src/core/config.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

Some changes occurred in src/tools/compiletest

cc @jieyouxu

@rustbot rustbot added A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Sep 23, 2025
Copy link
Member

@Kobzol Kobzol left a comment

Choose a reason for hiding this comment

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

This looks really great, thank you for working on it! I'd wait maybe a few couple of days or until next week, but then I'm fine with merging this. jieyouxu will probably also want to take a look.

View changes since this review

@jieyouxu jieyouxu self-assigned this Sep 23, 2025
@jieyouxu
Copy link
Member

I would time this approx. next Monday, also we should wait for the bootstrap compiler bump next doors in #146636

@jieyouxu
Copy link
Member

@rustbot blocked (until next Monday)

@rustbot rustbot added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 27, 2025
@bors
Copy link
Collaborator

bors commented Sep 28, 2025

☔ The latest upstream changes (presumably #147104) made this pull request unmergeable. Please resolve the merge conflicts.

@rustbot
Copy link
Collaborator

rustbot commented Sep 28, 2025

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@jieyouxu jieyouxu added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Sep 29, 2025
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

@jieyouxu
Copy link
Member

@bors r=Kobzol,jieyouxu rollup

@bors
Copy link
Collaborator

bors commented Sep 29, 2025

📌 Commit 8b18798 has been approved by Kobzol,jieyouxu

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 29, 2025
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Sep 29, 2025
bors added a commit that referenced this pull request Sep 29, 2025
Rollup of 7 pull requests

Successful merges:

 - #133477 (Detect tuple structs that are unconstructable due to re-export)
 - #146929 (compiletest: Remove old-output-capture and become a stage0 bootstrap tool)
 - #146979 (constify Default on Nanoseconds)
 - #147092 (Do not compute optimized MIR if code does not type-check.)
 - #147112 (all 48 keywords in just 300 characters)
 - #147122 (Fix some crash-test directives)
 - #147127 (Add a leading dash to linker plugin arguments in the gcc codegen)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3ea1bab into rust-lang:master Sep 29, 2025
10 checks passed
@rustbot rustbot added this to the 1.92.0 milestone Sep 29, 2025
rust-timer added a commit that referenced this pull request Sep 29, 2025
Rollup merge of #146929 - Zalathar:capture, r=Kobzol,jieyouxu

compiletest: Remove old-output-capture and become a stage0 bootstrap tool

The new compiletest output-capture system became the default in #146574, and no problems have been reported since.

This PR therefore removes the old output-capture implementation from compiletest, and adjusts bootstrap to always build and test compiletest as a stage0 bootstrap tool.

In other words, compiletest no longer relies on any unstable features (such as `libtest` or `internal_output_capture`), and is now written entirely in stable Rust!

The compiletest self-tests still need access to an in-tree rustc, in order to obtain information via `rustc --print`, so we interpret `--stage` as indicating the stage of that secondary compiler, but always use the stage0 compiler to build compiletest itself.

r? Kobzol
@Zalathar Zalathar deleted the capture branch September 29, 2025 08:53
Zalathar added a commit to Zalathar/rust that referenced this pull request Oct 1, 2025
… r=Zalathar,jieyouxu

Remove usage of `compiletest-use-stage0-libtest` from CI

It shouldn't be needed anymore after rust-lang#146929.

r? `@Zalathar`
rust-timer added a commit that referenced this pull request Oct 1, 2025
Rollup merge of #147188 - Kobzol:remove-compiletest-stage-1, r=Zalathar,jieyouxu

Remove usage of `compiletest-use-stage0-libtest` from CI

It shouldn't be needed anymore after #146929.

r? `@Zalathar`
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Oct 9, 2025
Rollup of 7 pull requests

Successful merges:

 - rust-lang#133477 (Detect tuple structs that are unconstructable due to re-export)
 - rust-lang#146929 (compiletest: Remove old-output-capture and become a stage0 bootstrap tool)
 - rust-lang#146979 (constify Default on Nanoseconds)
 - rust-lang#147092 (Do not compute optimized MIR if code does not type-check.)
 - rust-lang#147112 (all 48 keywords in just 300 characters)
 - rust-lang#147122 (Fix some crash-test directives)
 - rust-lang#147127 (Add a leading dash to linker plugin arguments in the gcc codegen)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants