Skip to content

Commit e6ae9f7

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 a5c95d6 commit e6ae9f7

File tree

20 files changed

+9
-354
lines changed

20 files changed

+9
-354
lines changed

Cargo.lock

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

5190-
[[package]]
5191-
name = "suggest-tests"
5192-
version = "0.1.0"
5193-
dependencies = [
5194-
"build_helper",
5195-
"glob",
5196-
]
5197-
51985190
[[package]]
51995191
name = "syn"
52005192
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
@@ -516,7 +516,6 @@ bootstrap_tool!(
516516
ReplaceVersionPlaceholder, "src/tools/replace-version-placeholder", "replace-version-placeholder";
517517
CollectLicenseMetadata, "src/tools/collect-license-metadata", "collect-license-metadata";
518518
GenerateCopyright, "src/tools/generate-copyright", "generate-copyright";
519-
SuggestTests, "src/tools/suggest-tests", "suggest-tests";
520519
GenerateWindowsSys, "src/tools/generate-windows-sys", "generate-windows-sys";
521520
// rustdoc-gui-test has a crate dependency on compiletest, so it needs the same unstable features.
522521
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);
119119
}

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,6 @@ pub enum Kind {
838838
#[value(alias = "r")]
839839
Run,
840840
Setup,
841-
Suggest,
842841
Vendor,
843842
Perf,
844843
}
@@ -862,7 +861,6 @@ impl Kind {
862861
Kind::Install => "install",
863862
Kind::Run => "run",
864863
Kind::Setup => "setup",
865-
Kind::Suggest => "suggest",
866864
Kind::Vendor => "vendor",
867865
Kind::Perf => "perf",
868866
}
@@ -874,7 +872,6 @@ impl Kind {
874872
Kind::Bench => "Benchmarking",
875873
Kind::Doc => "Documenting",
876874
Kind::Run => "Running",
877-
Kind::Suggest => "Suggesting",
878875
Kind::Clippy => "Linting",
879876
Kind::Perf => "Profiling & benchmarking",
880877
_ => {
@@ -1195,7 +1192,7 @@ impl<'a> Builder<'a> {
11951192
Kind::Clean => describe!(clean::CleanAll, clean::Rustc, clean::Std),
11961193
Kind::Vendor => describe!(vendor::Vendor),
11971194
// special-cased in Build::build()
1198-
Kind::Format | Kind::Suggest | Kind::Perf => vec![],
1195+
Kind::Format | Kind::Perf => vec![],
11991196
Kind::MiriTest | Kind::MiriSetup => unreachable!(),
12001197
}
12011198
}
@@ -1263,7 +1260,6 @@ impl<'a> Builder<'a> {
12631260
Subcommand::Run { .. } => (Kind::Run, &paths[..]),
12641261
Subcommand::Clean { .. } => (Kind::Clean, &paths[..]),
12651262
Subcommand::Format { .. } => (Kind::Format, &[][..]),
1266-
Subcommand::Suggest { .. } => (Kind::Suggest, &[][..]),
12671263
Subcommand::Setup { profile: ref path } => (
12681264
Kind::Setup,
12691265
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
@@ -1047,7 +1047,6 @@ impl Config {
10471047
| Subcommand::Run { .. }
10481048
| Subcommand::Setup { .. }
10491049
| Subcommand::Format { .. }
1050-
| Subcommand::Suggest { .. }
10511050
| Subcommand::Vendor { .. } => flags_stage.unwrap_or(0),
10521051
};
10531052

@@ -1088,7 +1087,6 @@ impl Config {
10881087
| Subcommand::Run { .. }
10891088
| Subcommand::Setup { .. }
10901089
| Subcommand::Format { .. }
1091-
| Subcommand::Suggest { .. }
10921090
| Subcommand::Vendor { .. }
10931091
| Subcommand::Perf { .. } => {}
10941092
}

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -475,13 +475,6 @@ Arguments:
475475
#[arg(value_name = "<PROFILE>|hook|editor|link")]
476476
profile: Option<PathBuf>,
477477
},
478-
/// Suggest a subset of tests to run, based on modified files
479-
#[command(long_about = "\n")]
480-
Suggest {
481-
/// run suggested tests
482-
#[arg(long)]
483-
run: bool,
484-
},
485478
/// Vendor dependencies
486479
Vendor {
487480
/// Additional `Cargo.toml` to sync and vendor
@@ -512,7 +505,6 @@ impl Subcommand {
512505
Subcommand::Install => Kind::Install,
513506
Subcommand::Run { .. } => Kind::Run,
514507
Subcommand::Setup { .. } => Kind::Setup,
515-
Subcommand::Suggest { .. } => Kind::Suggest,
516508
Subcommand::Vendor { .. } => Kind::Vendor,
517509
Subcommand::Perf { .. } => Kind::Perf,
518510
}

0 commit comments

Comments
 (0)