Skip to content

Commit f03a56f

Browse files
Rollup merge of #143630 - jieyouxu:drop-suggest, r=Mark-Simulacrum
Drop `./x suggest` This PR removes the current `./x suggest` implementation (#109933, #106249) and associated docs for several reasons: 1. Primarily, `./x suggest` is another "flow" in bootstrap that incurs extra complexity and more invariants that bootstrap has to maintain. This causes more friction when trying to investigate and fix staging problems. As far as I know, this flow has not been actively maintained in quite a while, and I'm not aware of interest in maintaining it. Bootstrap really could use less implementation complexity with a very limited maintenance bandwidth. 2. The current `./x suggest` implementation "bypasses" the usual stage defaults for the various check/build/test/etc. flows, and it's not really possible to have a stage default because `./x suggest --run` produces a *sequence* of suggestions like [`./x check`, `./x test library/std`, ..] and then tries to run all of them in sequence, based on which files are modified. 3. We've not seen a lot of interest both in using it or extending static/dynamic test suggestions. Last extensions were #117961 and #120763. I'm not convinced the extra implementation complexity is worth it. This was discussed in: - [#t-infra/bootstrap > Dropping the current `./x suggest` flow implementation](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Dropping.20the.20current.20.60.2E.2Fx.20suggest.60.20flow.20implementation/with/527456699) - [#t-compiler > Dropping current `./x suggest` implementation](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Dropping.20current.20.60.2E.2Fx.20suggest.60.20implementation/with/527528696) Closes #109933 (the current implementation is being removed). Closes #143569 (by removing `./x suggest` altogether).
2 parents 4e72ed7 + 0a899e0 commit f03a56f

34 files changed

+17
-1073
lines changed

Cargo.lock

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5069,14 +5069,6 @@ dependencies = [
50695069
"syn 1.0.109",
50705070
]
50715071

5072-
[[package]]
5073-
name = "suggest-tests"
5074-
version = "0.1.0"
5075-
dependencies = [
5076-
"build_helper",
5077-
"glob",
5078-
]
5079-
50805072
[[package]]
50815073
name = "syn"
50825074
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)