about summary refs log tree commit diff
path: root/src/bootstrap/config.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-06-10 15:24:42 +0200
committerGitHub <noreply@github.com>2023-06-10 15:24:42 +0200
commit04e41dda8395879c2adcc841517d7fa3cdce0d82 (patch)
tree29fc11fe97aeba26a4cd73a0a22bfb995bc30854 /src/bootstrap/config.rs
parent4b71d79c972a605959b0a7c82b323fbd8562f070 (diff)
parentc73c5dd35fa8171ba1634bf9111073706ccf993a (diff)
Rollup merge of #112297 - jyn514:remove-exclude-kind, r=Mark-Simulacrum
bootstrap: Disallow `--exclude test::std`

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.

There's a lot of churn here, but the 1-line change in the first commit is the actual behavior change, the rest is just cleanup.

Fixes https://github.com/rust-lang/rust/issues/103201. Note that this effectively reverts most of https://github.com/rust-lang/rust/pull/91965.

cc `@pietroalbini`
Diffstat (limited to 'src/bootstrap/config.rs')
-rw-r--r--src/bootstrap/config.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
index 2bc8441759f..c59df7eecf6 100644
--- a/src/bootstrap/config.rs
+++ b/src/bootstrap/config.rs
@@ -17,7 +17,6 @@ use std::path::{Path, PathBuf};
 use std::process::Command;
 use std::str::FromStr;
 
-use crate::builder::TaskPath;
 use crate::cache::{Interned, INTERNER};
 use crate::cc_detect::{ndk_compiler, Language};
 use crate::channel::{self, GitInfo};
@@ -80,7 +79,7 @@ pub struct Config {
     pub sanitizers: bool,
     pub profiler: bool,
     pub omit_git_hash: bool,
-    pub exclude: Vec<TaskPath>,
+    pub exclude: Vec<PathBuf>,
     pub include_default_paths: bool,
     pub rustc_error_format: Option<String>,
     pub json_output: bool,
@@ -957,7 +956,7 @@ impl Config {
 
         // Set flags.
         config.paths = std::mem::take(&mut flags.paths);
-        config.exclude = flags.exclude.into_iter().map(|path| TaskPath::parse(path)).collect();
+        config.exclude = flags.exclude;
         config.include_default_paths = flags.include_default_paths;
         config.rustc_error_format = flags.rustc_error_format;
         config.json_output = flags.json_output;