Skip to content

Commit 1205e6c

Browse files
committed
Use the top-level Kind to determine whether Steps are excluded
Previously, this would use the `Kind` passed to `--exclude` (and not do any filtering at all if no kind was passed). That meant that `x test linkchecker --exclude std` would fail - you had to explicitly say `--exclude test::std`. Change bootstrap to use the top-level Kind instead, which does the right thing automatically. Note that this breaks things like `x test --exclude doc::std`, but I'm not sure why you'd ever want to do that.
1 parent dcf3571 commit 1205e6c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/bootstrap/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1818
- `x.py fmt` now formats only files modified between the merge-base of HEAD and the last commit in the master branch of the rust-lang repository and the current working directory. To restore old behaviour, use `x.py fmt .`. The check mode is not affected by this change. [#105702](https://github.com/rust-lang/rust/pull/105702)
1919
- The `llvm.version-check` config option has been removed. Older versions were never supported. If you still need to support older versions (e.g. you are applying custom patches), patch `check_llvm_version` in bootstrap to change the minimum version. [#108619](https://github.com/rust-lang/rust/pull/108619)
2020
- The `rust.ignore-git` option has been renamed to `rust.omit-git-hash`. [#110059](https://github.com/rust-lang/rust/pull/110059)
21+
- `--exclude` no longer accepts a `Kind` as part of a Step; instead it uses the top-level Kind of the subcommand. If this matches how you were already using --exclude (e.g. `x test --exclude test::std`), simply remove the kind: `--exclude std`. If you were using a kind that did not match the top-level subcommand, please open an issue explaining why you wanted this feature.
2122

2223
### Non-breaking changes
2324

src/bootstrap/builder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ impl StepDescription {
307307
}
308308

309309
fn is_excluded(&self, builder: &Builder<'_>, pathset: &PathSet) -> bool {
310-
if builder.config.exclude.iter().any(|e| pathset.has(&e.path, e.kind)) {
310+
if builder.config.exclude.iter().any(|e| pathset.has(&e.path, Some(builder.kind))) {
311311
println!("Skipping {:?} because it is excluded", pathset);
312312
return true;
313313
}

0 commit comments

Comments
 (0)