Skip to content

compiletest: Don't modify testpaths when creating aux contexts - #148199

Merged
bors merged 4 commits into
rust-lang:masterfrom
Zalathar:paths
Nov 2, 2025
Merged

compiletest: Don't modify testpaths when creating aux contexts#148199
bors merged 4 commits into
rust-lang:masterfrom
Zalathar:paths

Conversation

@Zalathar

Copy link
Copy Markdown
Member

Modifying TestCx::testpaths makes it vastly harder to reason about how compiletest is using test paths, and can be avoided without much trouble by simply passing explicit source-file paths into a small number of auxiliary-aware methods.


This PR was originally based on a much larger change that split TestPaths into multiple structs and multiple TestCx fields (as seen in early revisions of #148160), but after further cleanups it turned out that very few tweaks were actually needed to avoid changes to testpaths.

r? jieyouxu

There are probably plenty of tests that will check this incidentally, but it's
convenient to have a dedicated self-test.
In particular, this eliminates the cryptic `of: &TestPaths` parameters.
This method no longer returns a `TestPaths`, so the old name is no longer
appropriate.
@rustbot

Copy link
Copy Markdown
Collaborator

Some changes occurred in src/tools/compiletest

cc @jieyouxu

@rustbotrustbot 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) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 28, 2025
@Zalathar

Copy link
Copy Markdown
MemberAuthor

Something very similar to this PR already had a number of successful try jobs at #148160 (comment).

@jieyouxujieyouxu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@jieyouxu

Copy link
Copy Markdown
Member

@bors r+ rollup

@bors

bors commented Nov 1, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit 720bfff has been approved by jieyouxu

It is now in the queue for this repository.

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 1, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 1, 2025
compiletest: Don't modify `testpaths` when creating aux contexts
Modifying `TestCx::testpaths` makes it vastly harder to reason about how compiletest is using test paths, and can be avoided without much trouble by simply passing explicit source-file paths into a small number of auxiliary-aware methods.
---
This PR was originally based on a much larger change that split `TestPaths` into multiple structs and multiple `TestCx` fields (as seen in early revisions of rust-lang#148160), but after further cleanups it turned out that very few tweaks were actually needed to avoid changes to `testpaths`.
r? jieyouxu
bors added a commit that referenced this pull request Nov 1, 2025
Rollup of 8 pull requests
Successful merges:
- #147137 (Mention crate being analyzed in query description)
- #148099 (Prepare to move debugger discovery from compiletest to bootstrap)
- #148194 (compiletest: Remove `cleanup_debug_info_options`)
- #148199 (compiletest: Don't modify `testpaths` when creating aux contexts)
- #148240 (rustc_codegen: fix musttail returns for cast/indirect ABIs)
- #148247 (Remove two special cases from reachable_non_generics)
- #148290 (Do not emit solver errors that contain error types)
- #148362 (docs: makes a note about possible building `rustc 1.91.0 + host tools` for win7)
r? `@ghost`
`@rustbot` modify labels: rollup
@Zalathar

Copy link
Copy Markdown
MemberAuthor

Possibly failed in rollup: #148368 (comment)

@bors r-

@borsbors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 2, 2025
@Zalathar

Copy link
Copy Markdown
MemberAuthor

@bors try jobs=arm-android

@rust-bors

This comment has been minimized.

rust-borsBot added a commit that referenced this pull request Nov 2, 2025
compiletest: Don't modify `testpaths` when creating aux contexts
try-job: arm-android
@Zalathar

Copy link
Copy Markdown
MemberAuthor

After some investigation, I'm pretty sure the failure was from #148199, so putting this back in the queue.

@bors r=jieyouxu

@bors

bors commented Nov 2, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit 720bfff has been approved by jieyouxu

It is now in the queue for this repository.

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 2, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Nov 2, 2025
compiletest: Don't modify `testpaths` when creating aux contexts
Modifying `TestCx::testpaths` makes it vastly harder to reason about how compiletest is using test paths, and can be avoided without much trouble by simply passing explicit source-file paths into a small number of auxiliary-aware methods.
---
This PR was originally based on a much larger change that split `TestPaths` into multiple structs and multiple `TestCx` fields (as seen in early revisions of rust-lang#148160), but after further cleanups it turned out that very few tweaks were actually needed to avoid changes to `testpaths`.
r? jieyouxu
@jhprattjhpratt mentioned this pull request Nov 2, 2025
@rust-bors

rust-borsBot commented Nov 2, 2025

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 49b0cfb (49b0cfb6f25820c1a1e58471569b4eb97de54a49, parent: bd3ac0330018c23b111bbee176f32c377be7b319)

bors added a commit that referenced this pull request Nov 2, 2025
Rollup of 12 pull requests
Successful merges:
- #147137 (Mention crate being analyzed in query description)
- #147642 (Miscellaneous const-generics-related fixes)
- #147806 (Ignore test-dashboard related files)
- #147947 (Implement `strip_circumfix` lib feature)
- #148194 (compiletest: Remove `cleanup_debug_info_options`)
- #148199 (compiletest: Don't modify `testpaths` when creating aux contexts)
- #148247 (Remove two special cases from reachable_non_generics)
- #148348 (dangling ptr lint cleanup)
- #148357 (temporary-lifetime-extension.rs test works in all editions)
- #148362 (docs: makes a note about possible building `rustc 1.91.0 + host tools` for win7)
- #148367 (Use --print host-tuple to get the host)
- #148374 (miri subtree update)
r? `@ghost`
`@rustbot` modify labels: rollup
Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 2, 2025
compiletest: Don't modify `testpaths` when creating aux contexts
Modifying `TestCx::testpaths` makes it vastly harder to reason about how compiletest is using test paths, and can be avoided without much trouble by simply passing explicit source-file paths into a small number of auxiliary-aware methods.
---
This PR was originally based on a much larger change that split `TestPaths` into multiple structs and multiple `TestCx` fields (as seen in early revisions of rust-lang#148160), but after further cleanups it turned out that very few tweaks were actually needed to avoid changes to `testpaths`.
r? jieyouxu
@ZalatharZalathar mentioned this pull request Nov 2, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 2, 2025
compiletest: Don't modify `testpaths` when creating aux contexts
Modifying `TestCx::testpaths` makes it vastly harder to reason about how compiletest is using test paths, and can be avoided without much trouble by simply passing explicit source-file paths into a small number of auxiliary-aware methods.
---
This PR was originally based on a much larger change that split `TestPaths` into multiple structs and multiple `TestCx` fields (as seen in early revisions of rust-lang#148160), but after further cleanups it turned out that very few tweaks were actually needed to avoid changes to `testpaths`.
r? jieyouxu
@ZalatharZalathar mentioned this pull request Nov 2, 2025
bors added a commit that referenced this pull request Nov 2, 2025
Rollup of 9 pull requests
Successful merges:
- #147947 (Implement `strip_circumfix` lib feature)
- #148170 (split definition and use site hidden tys)
- #148194 (compiletest: Remove `cleanup_debug_info_options`)
- #148199 (compiletest: Don't modify `testpaths` when creating aux contexts)
- #148240 (rustc_codegen: fix musttail returns for cast/indirect ABIs)
- #148290 (Do not emit solver errors that contain error types)
- #148357 (temporary-lifetime-extension.rs test works in all editions)
- #148362 (docs: makes a note about possible building `rustc 1.91.0 + host tools` for win7)
- #148367 (Use --print host-tuple to get the host)
r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 2, 2025
compiletest: Don't modify `testpaths` when creating aux contexts
Modifying `TestCx::testpaths` makes it vastly harder to reason about how compiletest is using test paths, and can be avoided without much trouble by simply passing explicit source-file paths into a small number of auxiliary-aware methods.
---
This PR was originally based on a much larger change that split `TestPaths` into multiple structs and multiple `TestCx` fields (as seen in early revisions of rust-lang#148160), but after further cleanups it turned out that very few tweaks were actually needed to avoid changes to `testpaths`.
r? jieyouxu
This was referenced Nov 2, 2025
bors added a commit that referenced this pull request Nov 2, 2025
Rollup of 8 pull requests
Successful merges:
- #148170 (split definition and use site hidden tys)
- #148194 (compiletest: Remove `cleanup_debug_info_options`)
- #148199 (compiletest: Don't modify `testpaths` when creating aux contexts)
- #148290 (Do not emit solver errors that contain error types)
- #148357 (temporary-lifetime-extension.rs test works in all editions)
- #148362 (docs: makes a note about possible building `rustc 1.91.0 + host tools` for win7)
- #148367 (Use --print host-tuple to get the host)
- #148374 (miri subtree update)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit c6b9df8 into rust-lang:masterNov 2, 2025
12 checks passed
@rustbotrustbot added this to the 1.93.0 milestone Nov 2, 2025
rust-timer added a commit that referenced this pull request Nov 2, 2025
Rollup merge of #148199 - Zalathar:paths, r=jieyouxu
compiletest: Don't modify `testpaths` when creating aux contexts
Modifying `TestCx::testpaths` makes it vastly harder to reason about how compiletest is using test paths, and can be avoided without much trouble by simply passing explicit source-file paths into a small number of auxiliary-aware methods.
---
This PR was originally based on a much larger change that split `TestPaths` into multiple structs and multiple `TestCx` fields (as seen in early revisions of #148160), but after further cleanups it turned out that very few tweaks were actually needed to avoid changes to `testpaths`.
r? jieyouxu
@Zalathar
Zalathar deleted the paths branch November 2, 2025 23:55
@Zalathar

Copy link
Copy Markdown
MemberAuthor

Bors, this was already merged.

@bors r-

@borsbors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 3, 2025
github-actionsBot pushed a commit to rust-lang/miri that referenced this pull request Nov 3, 2025
Rollup of 8 pull requests
Successful merges:
- rust-lang/rust#148170 (split definition and use site hidden tys)
- rust-lang/rust#148194 (compiletest: Remove `cleanup_debug_info_options`)
- rust-lang/rust#148199 (compiletest: Don't modify `testpaths` when creating aux contexts)
- rust-lang/rust#148290 (Do not emit solver errors that contain error types)
- rust-lang/rust#148357 (temporary-lifetime-extension.rs test works in all editions)
- rust-lang/rust#148362 (docs: makes a note about possible building `rustc 1.91.0 + host tools` for win7)
- rust-lang/rust#148367 (Use --print host-tuple to get the host)
- rust-lang/rust#148374 (miri subtree update)
r? `@ghost`
`@rustbot` modify labels: rollup
github-actionsBot pushed a commit to model-checking/verify-rust-std that referenced this pull request Nov 30, 2025
…iaskrgr
Rollup of 8 pull requests
Successful merges:
- rust-lang#148170 (split definition and use site hidden tys)
- rust-lang#148194 (compiletest: Remove `cleanup_debug_info_options`)
- rust-lang#148199 (compiletest: Don't modify `testpaths` when creating aux contexts)
- rust-lang#148290 (Do not emit solver errors that contain error types)
- rust-lang#148357 (temporary-lifetime-extension.rs test works in all editions)
- rust-lang#148362 (docs: makes a note about possible building `rustc 1.91.0 + host tools` for win7)
- rust-lang#148367 (Use --print host-tuple to get the host)
- rust-lang#148374 (miri subtree update)
r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletestArea: The compiletest test runnerA-testsuiteArea: The testsuite used to check the correctness of rustcS-waiting-on-authorStatus: This is awaiting some action (such as code changes or more information) from the author.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@Zalathar@rustbot@jieyouxu@bors