Skip to content

Commit 91d064b

Browse files
committed
Remove current implementation of ./x suggest
This is quite a bit of implementation complexity, yet it is quite broken, and we don't have the maintenance bandwidth to address. Remove the current implementation if only to reduce bootstrap's implementation complexity; the `suggest` flow comes with its own set of hacks.
1 parent 904273c commit 91d064b

File tree

20 files changed

+10
-348
lines changed

20 files changed

+10
-348
lines changed

Cargo.lock

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5188,14 +5188,6 @@ dependencies = [
51885188
"syn 1.0.109",
51895189
]
51905190

5191-
[[package]]
5192-
name = "suggest-tests"
5193-
version = "0.1.0"
5194-
dependencies = [
5195-
"build_helper",
5196-
"glob",
5197-
]
5198-
51995191
[[package]]
52005192
name = "syn"
52015193
version = "1.0.109"

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ members = [
3939
"src/tools/rustdoc-gui-test",
4040
"src/tools/rustdoc-themes",
4141
"src/tools/rustfmt",
42-
"src/tools/suggest-tests",
4342
"src/tools/test-float-parse",
4443
"src/tools/tidy",
4544
"src/tools/tier-check",

src/bootstrap/src/core/build_steps/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ pub(crate) mod llvm;
1111
pub(crate) mod perf;
1212
pub(crate) mod run;
1313
pub(crate) mod setup;
14-
pub(crate) mod suggest;
1514
pub(crate) mod synthetic_targets;
1615
pub(crate) mod test;
1716
pub(crate) mod tool;

src/bootstrap/src/core/build_steps/suggest.rs

Lines changed: 0 additions & 68 deletions
This file was deleted.

src/bootstrap/src/core/build_steps/test.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,11 @@ impl Step for CrateBootstrap {
4747
const DEFAULT: bool = true;
4848

4949
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
50-
// This step is responsible for several different tool paths. By default
51-
// it will test all of them, but requesting specific tools on the
52-
// command-line (e.g. `./x test suggest-tests`) will test only the
53-
// specified tools.
50+
// This step is responsible for several different tool paths.
51+
//
52+
// By default, it will test all of them, but requesting specific tools on the command-line
53+
// (e.g. `./x test src/tools/coverage-dump`) will test only the specified tools.
5454
run.path("src/tools/jsondoclint")
55-
.path("src/tools/suggest-tests")
5655
.path("src/tools/replace-version-placeholder")
5756
.path("src/tools/coverage-dump")
5857
// We want `./x test tidy` to _run_ the tidy tool, not its tests.

src/bootstrap/src/core/build_steps/tool.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,6 @@ bootstrap_tool!(
517517
ReplaceVersionPlaceholder, "src/tools/replace-version-placeholder", "replace-version-placeholder";
518518
CollectLicenseMetadata, "src/tools/collect-license-metadata", "collect-license-metadata";
519519
GenerateCopyright, "src/tools/generate-copyright", "generate-copyright";
520-
SuggestTests, "src/tools/suggest-tests", "suggest-tests";
521520
GenerateWindowsSys, "src/tools/generate-windows-sys", "generate-windows-sys";
522521
// rustdoc-gui-test has a crate dependency on compiletest, so it needs the same unstable features.
523522
RustdocGUITest, "src/tools/rustdoc-gui-test", "rustdoc-gui-test", is_unstable_tool = true, allow_features = COMPILETEST_ALLOW_FEATURES;

src/bootstrap/src/core/builder/cargo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ impl Cargo {
113113

114114
match cmd_kind {
115115
// No need to configure the target linker for these command types.
116-
Kind::Clean | Kind::Check | Kind::Suggest | Kind::Format | Kind::Setup => {}
116+
Kind::Clean | Kind::Check | Kind::Format | Kind::Setup => {}
117117
_ => {
118118
cargo.configure_linker(builder, mode);
119119
}

src/bootstrap/src/core/builder/mod.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,6 @@ pub enum Kind {
845845
#[value(alias = "r")]
846846
Run,
847847
Setup,
848-
Suggest,
849848
Vendor,
850849
Perf,
851850
}
@@ -869,7 +868,6 @@ impl Kind {
869868
Kind::Install => "install",
870869
Kind::Run => "run",
871870
Kind::Setup => "setup",
872-
Kind::Suggest => "suggest",
873871
Kind::Vendor => "vendor",
874872
Kind::Perf => "perf",
875873
}
@@ -881,7 +879,6 @@ impl Kind {
881879
Kind::Bench => "Benchmarking",
882880
Kind::Doc => "Documenting",
883881
Kind::Run => "Running",
884-
Kind::Suggest => "Suggesting",
885882
Kind::Clippy => "Linting",
886883
Kind::Perf => "Profiling & benchmarking",
887884
_ => {
@@ -1201,7 +1198,7 @@ impl<'a> Builder<'a> {
12011198
Kind::Clean => describe!(clean::CleanAll, clean::Rustc, clean::Std),
12021199
Kind::Vendor => describe!(vendor::Vendor),
12031200
// special-cased in Build::build()
1204-
Kind::Format | Kind::Suggest | Kind::Perf => vec![],
1201+
Kind::Format | Kind::Perf => vec![],
12051202
Kind::MiriTest | Kind::MiriSetup => unreachable!(),
12061203
}
12071204
}
@@ -1269,7 +1266,6 @@ impl<'a> Builder<'a> {
12691266
Subcommand::Run { .. } => (Kind::Run, &paths[..]),
12701267
Subcommand::Clean { .. } => (Kind::Clean, &paths[..]),
12711268
Subcommand::Format { .. } => (Kind::Format, &[][..]),
1272-
Subcommand::Suggest { .. } => (Kind::Suggest, &[][..]),
12731269
Subcommand::Setup { profile: ref path } => (
12741270
Kind::Setup,
12751271
path.as_ref().map_or([].as_slice(), |path| std::slice::from_ref(path)),

src/bootstrap/src/core/config/config.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,6 @@ impl Config {
10501050
| Subcommand::Run { .. }
10511051
| Subcommand::Setup { .. }
10521052
| Subcommand::Format { .. }
1053-
| Subcommand::Suggest { .. }
10541053
| Subcommand::Vendor { .. } => flags_stage.unwrap_or(0),
10551054
};
10561055

@@ -1098,7 +1097,6 @@ impl Config {
10981097
| Subcommand::Run { .. }
10991098
| Subcommand::Setup { .. }
11001099
| Subcommand::Format { .. }
1101-
| Subcommand::Suggest { .. }
11021100
| Subcommand::Vendor { .. }
11031101
| Subcommand::Perf { .. } => {}
11041102
}

src/bootstrap/src/core/config/flags.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -481,13 +481,6 @@ Arguments:
481481
#[arg(value_name = "<PROFILE>|hook|editor|link")]
482482
profile: Option<PathBuf>,
483483
},
484-
/// Suggest a subset of tests to run, based on modified files
485-
#[command(long_about = "\n")]
486-
Suggest {
487-
/// run suggested tests
488-
#[arg(long)]
489-
run: bool,
490-
},
491484
/// Vendor dependencies
492485
Vendor {
493486
/// Additional `Cargo.toml` to sync and vendor
@@ -518,7 +511,6 @@ impl Subcommand {
518511
Subcommand::Install => Kind::Install,
519512
Subcommand::Run { .. } => Kind::Run,
520513
Subcommand::Setup { .. } => Kind::Setup,
521-
Subcommand::Suggest { .. } => Kind::Suggest,
522514
Subcommand::Vendor { .. } => Kind::Vendor,
523515
Subcommand::Perf { .. } => Kind::Perf,
524516
}

0 commit comments

Comments
 (0)