Skip to content

Conversation

marcoieni
Copy link
Member

Current status

Right now the way to skip steps in bootstrap is by doing --skip=<something> or --exclude=<something>, where <something> must be the end of the path of the step you want to exclude.

E.g. if I want to skip the step src/etc/test-float-parse you can pass one of these:

  • --skip=test-float-parse
  • --skip=etc/test-float-parse
  • --skip=src/etc/test-float-parse.

Change of this PR

I added the ability to skip steps that starts with a certain path.
E.g. now you can do --skip=src or --skip=src/etc/ to skip all subdirectories.

How to test

Run cargo run -- test --stage 2 --dry-run --exclude=tests/ and verify the log lines starting with "Skipping" 👍
You might also add --verbose for additional logs.

Retro-compatibility

Maintaining the precedence of ends_with should maintain retro-compatibility, as existing "skips" match first.

Warning

A breaking change in an invocation might happen if both:

  1. there was a --skip <something> that didn't match anything initially (that's an error in the script)
  2. this <something> matches the beginning of a path

Imo this is VERY rare so I'm not concerned about breakages in existing scripts.

Why I need this

In CI, I would like to split tests across multiple jobs, and having this feature allows things like --skip tests/
The alternative is specifying --skip tests/ui --skip tests/rustdoc ... and so on for every subdirectory 😵

@rustbot
Copy link
Collaborator

rustbot commented Nov 26, 2024

r? @Kobzol

rustbot has assigned @Kobzol.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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 Nov 26, 2024
@marcoieni marcoieni marked this pull request as ready for review November 26, 2024 11:03
@onur-ozkan
Copy link
Contributor

r? onur-ozkan

@rustbot rustbot assigned onur-ozkan and unassigned Kobzol Nov 28, 2024
@marcoieni marcoieni force-pushed the bootstrap-path-check branch from 2c0cf8b to 0c8c38f Compare November 28, 2024 08:03
@onur-ozkan
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Nov 29, 2024

📌 Commit 0c8c38f has been approved by onur-ozkan

It is now in the queue for this repository.

@bors bors 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 29, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 29, 2024
…onur-ozkan

bootstrap: allow skipping steps with start of path
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 29, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#132782 (improvements on initial sysroot and libdir finding logics)
 - rust-lang#133134 (Don't use a SyntheticProvider for literally every type)
 - rust-lang#133466 (Fix typos in pin.rs)
 - rust-lang#133492 (bootstrap: allow skipping steps with start of path)
 - rust-lang#133501 (support revealing defined opaque post borrowck)
 - rust-lang#133530 (Use consistent wording in docs, use is zero instead of is 0)
 - rust-lang#133538 (Better diagnostic for fn items in variadic functions)
 - rust-lang#133590 (Rename `-Zparse-only`)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 29, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#132782 (improvements on initial sysroot and libdir finding logics)
 - rust-lang#133466 (Fix typos in pin.rs)
 - rust-lang#133492 (bootstrap: allow skipping steps with start of path)
 - rust-lang#133501 (support revealing defined opaque post borrowck)
 - rust-lang#133530 (Use consistent wording in docs, use is zero instead of is 0)
 - rust-lang#133538 (Better diagnostic for fn items in variadic functions)
 - rust-lang#133590 (Rename `-Zparse-only`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 95560d6 into rust-lang:master Nov 29, 2024
6 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Nov 29, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Nov 29, 2024
Rollup merge of rust-lang#133492 - MarcoIeni:bootstrap-path-check, r=onur-ozkan

bootstrap: allow skipping steps with start of path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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