Skip to content

Commit dc668c1

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 a891b40 commit dc668c1

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
@@ -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, 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
_ => {
@@ -1202,7 +1199,7 @@ impl<'a> Builder<'a> {
12021199
Kind::Clean => describe!(clean::CleanAll, clean::Rustc, clean::Std),
12031200
Kind::Vendor => describe!(vendor::Vendor),
12041201
// special-cased in Build::build()
1205-
Kind::Format | Kind::Suggest | Kind::Perf => vec![],
1202+
Kind::Format | Kind::Perf => vec![],
12061203
Kind::MiriTest | Kind::MiriSetup => unreachable!(),
12071204
}
12081205
}
@@ -1270,7 +1267,6 @@ impl<'a> Builder<'a> {
12701267
Subcommand::Run { .. } => (Kind::Run, &paths[..]),
12711268
Subcommand::Clean { .. } => (Kind::Clean, &paths[..]),
12721269
Subcommand::Format { .. } => (Kind::Format, &[][..]),
1273-
Subcommand::Suggest { .. } => (Kind::Suggest, &[][..]),
12741270
Subcommand::Setup { profile: ref path } => (
12751271
Kind::Setup,
12761272
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
@@ -478,13 +478,6 @@ Arguments:
478478
#[arg(value_name = "<PROFILE>|hook|editor|link")]
479479
profile: Option<PathBuf>,
480480
},
481-
/// Suggest a subset of tests to run, based on modified files
482-
#[command(long_about = "\n")]
483-
Suggest {
484-
/// run suggested tests
485-
#[arg(long)]
486-
run: bool,
487-
},
488481
/// Vendor dependencies
489482
Vendor {
490483
/// Additional `Cargo.toml` to sync and vendor
@@ -515,7 +508,6 @@ impl Subcommand {
515508
Subcommand::Install => Kind::Install,
516509
Subcommand::Run { .. } => Kind::Run,
517510
Subcommand::Setup { .. } => Kind::Setup,
518-
Subcommand::Suggest { .. } => Kind::Suggest,
519511
Subcommand::Vendor { .. } => Kind::Vendor,
520512
Subcommand::Perf { .. } => Kind::Perf,
521513
}

0 commit comments

Comments
 (0)