Skip to content

Conversation

@jyn514
Copy link
Member

@jyn514 jyn514 commented Oct 28, 2025

The original motivation for adding this path.starts_with check was to allow things like --skip=src/etc: #133492. But it affects quite a lot more things than just --skip; bootstrap is really not designed for the case when multiple Steps match the same filter (#134919 (comment)). For example, x test src does ... something! Not sure what, but something!

This has already caused several issues; see #135022, #135022, probably others I am forgetting.

Change starts_with to only affect --skip, not anything else.

The immediate motivation for this change was to prevent x doc --open src/doc from opening a dozen different pages (see was_explicitly_invoked for how this is related).

r? bootstrap cc @marcoieni @onur-ozkan @jieyouxu @Zalathar

@rustbot rustbot added 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 Oct 28, 2025
@rust-log-analyzer

This comment has been minimized.

… flag

The original motivation for adding this `path.starts_with` check was to
allow things like `--skip=src/etc`. But it affects quite a lot more
things than just `--skip`; bootstrap is really not designed for the case
when multiple Steps match the same filter. For example, `x test src`
does ... something! Not sure what, but something!

Change `starts_with` to only affect `--skip`, not anything else.

The original motivation for this was to make it so that `x doc src/doc
--open` doesn't open a dozen different books, but I expect it to fix
various other steps in bootstrap as well.
@jyn514
Copy link
Member Author

jyn514 commented Oct 28, 2025

the failure is because the path("compiler/rustc_codegen_*") in all the codegen backends is now being ignored. that seems ok, actually? I wouldn't expect x test --stage 2 compiler to test codegen backends given the current should_run.

I've added a manual .path("compiler") to each of the backends, restoring the old behavior as a one-off for those specific steps.

As an aside, I'm not sure the snapshot test is testing what it intends to ... I don't think it realizes that the stage 2 compiler is only built as a dependency of the codegen backends.

@rustbot rustbot added the A-testsuite Area: The testsuite used to check the correctness of rustc label Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants