Skip to content

Commit abc910b

Browse files
committedAug 10, 2023
Auto merge of #114001 - meysam81:issue-111894-fix, r=clubby789
fix(bootstrap): rename exclude flag to skip 🐛 fixes #111894
2 parents fd16988 + 0b16456 commit abc910b

File tree

17 files changed

+130
-47
lines changed

17 files changed

+130
-47
lines changed
 

‎.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ jobs:
336336
os: macos-13
337337
- name: x86_64-apple-1
338338
env:
339-
SCRIPT: "./x.py --stage 2 test --exclude tests/ui --exclude tests/rustdoc --exclude tests/run-make-fulldeps"
339+
SCRIPT: "./x.py --stage 2 test --skip tests/ui --skip tests/rustdoc --skip tests/run-make-fulldeps"
340340
RUST_CONFIGURE_ARGS: "--build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false"
341341
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
342342
MACOSX_DEPLOYMENT_TARGET: 10.8

‎src/bootstrap/builder.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -317,19 +317,17 @@ impl StepDescription {
317317
}
318318

319319
fn is_excluded(&self, builder: &Builder<'_>, pathset: &PathSet) -> bool {
320-
if builder.config.exclude.iter().any(|e| pathset.has(&e, builder.kind)) {
320+
if builder.config.skip.iter().any(|e| pathset.has(&e, builder.kind)) {
321321
if !matches!(builder.config.dry_run, DryRun::SelfCheck) {
322322
println!("Skipping {pathset:?} because it is excluded");
323323
}
324324
return true;
325325
}
326326

327-
if !builder.config.exclude.is_empty()
328-
&& !matches!(builder.config.dry_run, DryRun::SelfCheck)
329-
{
327+
if !builder.config.skip.is_empty() && !matches!(builder.config.dry_run, DryRun::SelfCheck) {
330328
builder.verbose(&format!(
331329
"{:?} not skipped for {:?} -- not in {:?}",
332-
pathset, self.name, builder.config.exclude
330+
pathset, self.name, builder.config.skip
333331
));
334332
}
335333
false
@@ -2129,7 +2127,7 @@ impl<'a> Builder<'a> {
21292127
let desc = StepDescription::from::<S>(kind);
21302128
let should_run = (desc.should_run)(ShouldRun::new(self, desc.kind));
21312129

2132-
// Avoid running steps contained in --exclude
2130+
// Avoid running steps contained in --skip
21332131
for pathset in &should_run.paths {
21342132
if desc.is_excluded(self, pathset) {
21352133
return None;

‎src/bootstrap/builder/tests.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ fn test_intersection() {
119119
#[test]
120120
fn test_exclude() {
121121
let mut config = configure("test", &["A"], &["A"]);
122-
config.exclude = vec!["src/tools/tidy".into()];
122+
config.skip = vec!["src/tools/tidy".into()];
123123
let cache = run_build(&[], config);
124124

125125
// Ensure we have really excluded tidy
@@ -137,7 +137,7 @@ fn test_exclude_kind() {
137137
// Ensure our test is valid, and `test::Rustc` would be run without the exclude.
138138
assert!(run_build(&[], config.clone()).contains::<test::CrateLibrustc>());
139139
// Ensure tests for rustc are skipped.
140-
config.exclude = vec![path.clone()];
140+
config.skip = vec![path.clone()];
141141
assert!(!run_build(&[], config.clone()).contains::<test::CrateLibrustc>());
142142
// Ensure builds for rustc are not skipped.
143143
assert!(run_build(&[], config).contains::<compile::Rustc>());

‎src/bootstrap/config.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ pub struct Config {
130130
pub sanitizers: bool,
131131
pub profiler: bool,
132132
pub omit_git_hash: bool,
133-
pub exclude: Vec<PathBuf>,
133+
pub skip: Vec<PathBuf>,
134134
pub include_default_paths: bool,
135135
pub rustc_error_format: Option<String>,
136136
pub json_output: bool,
@@ -1112,7 +1112,7 @@ impl Config {
11121112

11131113
// Set flags.
11141114
config.paths = std::mem::take(&mut flags.paths);
1115-
config.exclude = flags.exclude;
1115+
config.skip = flags.skip.into_iter().chain(flags.exclude).collect();
11161116
config.include_default_paths = flags.include_default_paths;
11171117
config.rustc_error_format = flags.rustc_error_format;
11181118
config.json_output = flags.json_output;

‎src/bootstrap/doc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ fn doc_std(
570570
if builder.no_std(target) == Some(true) {
571571
panic!(
572572
"building std documentation for no_std target {target} is not supported\n\
573-
Set `docs = false` in the config to disable documentation, or pass `--exclude doc::library`."
573+
Set `docs = false` in the config to disable documentation, or pass `--skip library`."
574574
);
575575
}
576576

‎src/bootstrap/flags.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ pub struct Flags {
6868

6969
#[arg(global(true), long, value_name = "PATH")]
7070
/// build paths to exclude
71-
pub exclude: Vec<PathBuf>,
71+
pub exclude: Vec<PathBuf>, // keeping for client backward compatibility
72+
#[arg(global(true), long, value_name = "PATH")]
73+
/// build paths to skip
74+
pub skip: Vec<PathBuf>,
7275
#[arg(global(true), long)]
7376
/// include default paths in addition to the provided ones
7477
pub include_default_paths: bool,
@@ -318,7 +321,7 @@ pub enum Subcommand {
318321
no_fail_fast: bool,
319322
#[arg(long, value_name = "SUBSTRING")]
320323
/// skips tests matching SUBSTRING, if supported by test tool. May be passed multiple times
321-
skip: Vec<String>,
324+
skip: Vec<PathBuf>,
322325
#[arg(long, value_name = "ARGS", allow_hyphen_values(true))]
323326
/// extra arguments to be passed for the test tool being used
324327
/// (e.g. libtest, compiletest or rustdoc)

‎src/bootstrap/mk/Makefile.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ prepare:
6363
ci-msvc-py:
6464
$(Q)$(CFG_SRC_DIR)/x.py test --stage 2 tidy
6565
ci-msvc-ps1:
66-
$(Q)$(CFG_SRC_DIR)/x.ps1 test --stage 2 --exclude tidy
66+
$(Q)$(CFG_SRC_DIR)/x.ps1 test --stage 2 --skip tidy
6767
ci-msvc: ci-msvc-py ci-msvc-ps1
6868

6969
## MingW native builders
@@ -72,7 +72,7 @@ ci-msvc: ci-msvc-py ci-msvc-ps1
7272
ci-mingw-x:
7373
$(Q)$(CFG_SRC_DIR)/x test --stage 2 tidy
7474
ci-mingw-bootstrap:
75-
$(Q)$(BOOTSTRAP) test --stage 2 --exclude tidy
75+
$(Q)$(BOOTSTRAP) test --stage 2 --skip tidy
7676
ci-mingw: ci-mingw-x ci-mingw-bootstrap
7777

7878
.PHONY: dist

‎src/bootstrap/test.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ impl Step for Linkcheck {
122122
if (hosts != targets) && !hosts.is_empty() && !targets.is_empty() {
123123
panic!(
124124
"Linkcheck currently does not support builds with different hosts and targets.
125-
You can skip linkcheck with --exclude src/tools/linkchecker"
125+
You can skip linkcheck with --skip src/tools/linkchecker"
126126
);
127127
}
128128

@@ -1104,7 +1104,7 @@ impl Step for Tidy {
11041104
error: no `rustfmt` binary found in {PATH}
11051105
info: `rust.channel` is currently set to \"{CHAN}\"
11061106
help: if you are testing a beta branch, set `rust.channel` to \"beta\" in the `config.toml` file
1107-
help: to skip test's attempt to check tidiness, pass `--exclude src/tools/tidy` to `x.py test`",
1107+
help: to skip test's attempt to check tidiness, pass `--skip src/tools/tidy` to `x.py test`",
11081108
PATH = inferred_rustfmt_dir.display(),
11091109
CHAN = builder.config.channel,
11101110
);
@@ -1650,7 +1650,7 @@ note: if you're sure you want to do this, please open an issue as to why. In the
16501650
cmd.arg("--run-clang-based-tests-with").arg(clang_exe);
16511651
}
16521652

1653-
for exclude in &builder.config.exclude {
1653+
for exclude in &builder.config.skip {
16541654
cmd.arg("--skip");
16551655
cmd.arg(&exclude);
16561656
}

‎src/ci/docker/host-x86_64/i686-gnu/Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ COPY scripts/sccache.sh /scripts/
2424
RUN sh /scripts/sccache.sh
2525

2626
ENV RUST_CONFIGURE_ARGS --build=i686-unknown-linux-gnu
27-
# Exclude some tests that are unlikely to be platform specific, to speed up
27+
# Skip some tests that are unlikely to be platform specific, to speed up
2828
# this slow job.
2929
ENV SCRIPT python3 ../x.py --stage 2 test \
30-
--exclude src/bootstrap \
31-
--exclude tests/rustdoc-js \
32-
--exclude src/tools/error_index_generator \
33-
--exclude src/tools/linkchecker
30+
--skip src/bootstrap \
31+
--skip tests/rustdoc-js \
32+
--skip src/tools/error_index_generator \
33+
--skip src/tools/linkchecker

‎src/ci/docker/host-x86_64/wasm32/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ RUN chown 10719 -R /emsdk-portable/
5959

6060
# Exclude library/alloc due to OOM in benches.
6161
ENV SCRIPT python3 ../x.py test --stage 2 --host='' --target $TARGETS \
62-
--exclude library/alloc
62+
--skip library/alloc

‎src/ci/docker/host-x86_64/x86_64-gnu-llvm-15/script.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -ex
44

55
# Only run the stage 1 tests on merges, not on PR CI jobs.
66
if [[ -z "${PR_CI_JOB}" ]]; then
7-
../x.py --stage 1 test --exclude src/tools/tidy && \
7+
../x.py --stage 1 test --skip src/tools/tidy && \
88
# Run the `mir-opt` tests again but this time for a 32-bit target.
99
# This enforces that tests using `// EMIT_MIR_FOR_EACH_BIT_WIDTH` have
1010
# both 32-bit and 64-bit outputs updated by the PR author, before
@@ -16,7 +16,7 @@ if [[ -z "${PR_CI_JOB}" ]]; then
1616
fi
1717

1818
# NOTE: intentionally uses all of `x.py`, `x`, and `x.ps1` to make sure they all work on Linux.
19-
../x.py --stage 2 test --exclude src/tools/tidy && \
19+
../x.py --stage 2 test --skip src/tools/tidy && \
2020
# Run the `mir-opt` tests again but this time for a 32-bit target.
2121
# This enforces that tests using `// EMIT_MIR_FOR_EACH_BIT_WIDTH` have
2222
# both 32-bit and 64-bit outputs updated by the PR author, before

‎src/ci/github-actions/ci.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
# step CI will fail.
1515

1616
---
17-
1817
###############################
1918
# YAML Anchors Definition #
2019
###############################
@@ -30,7 +29,6 @@
3029
# The expand-yaml-anchors tool will automatically remove this block from the
3130
# output YAML file.
3231
x--expand-yaml-anchors--remove:
33-
3432
- &shared-ci-variables
3533
CI_JOB_NAME: ${{ matrix.name }}
3634
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
@@ -520,7 +518,7 @@ jobs:
520518

521519
- name: x86_64-apple-1
522520
env: &env-x86_64-apple-tests
523-
SCRIPT: ./x.py --stage 2 test --exclude tests/ui --exclude tests/rustdoc --exclude tests/run-make-fulldeps
521+
SCRIPT: ./x.py --stage 2 test --skip tests/ui --skip tests/rustdoc --skip tests/run-make-fulldeps
524522
RUST_CONFIGURE_ARGS: --build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false
525523
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
526524
MACOSX_DEPLOYMENT_TARGET: 10.8

‎src/etc/completions/x.py.fish

+15-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ complete -c x.py -n "__fish_use_subcommand" -l build -d 'build target of the sta
44
complete -c x.py -n "__fish_use_subcommand" -l host -d 'host targets to build' -r -f
55
complete -c x.py -n "__fish_use_subcommand" -l target -d 'target targets to build' -r -f
66
complete -c x.py -n "__fish_use_subcommand" -l exclude -d 'build paths to exclude' -r -F
7+
complete -c x.py -n "__fish_use_subcommand" -l skip -d 'build paths to skip' -r -F
78
complete -c x.py -n "__fish_use_subcommand" -l rustc-error-format -r -f
89
complete -c x.py -n "__fish_use_subcommand" -l on-fail -d 'command to run on failure' -r -f -a "(__fish_complete_command)"
910
complete -c x.py -n "__fish_use_subcommand" -l stage -d 'stage to build (indicates compiler to use/test, e.g., stage 0 uses the bootstrap compiler, stage 1 the stage 0 rustc artifacts, etc.)' -r -f
@@ -47,6 +48,7 @@ complete -c x.py -n "__fish_seen_subcommand_from build" -l build -d 'build targe
4748
complete -c x.py -n "__fish_seen_subcommand_from build" -l host -d 'host targets to build' -r -f
4849
complete -c x.py -n "__fish_seen_subcommand_from build" -l target -d 'target targets to build' -r -f
4950
complete -c x.py -n "__fish_seen_subcommand_from build" -l exclude -d 'build paths to exclude' -r -F
51+
complete -c x.py -n "__fish_seen_subcommand_from build" -l skip -d 'build paths to skip' -r -F
5052
complete -c x.py -n "__fish_seen_subcommand_from build" -l rustc-error-format -r -f
5153
complete -c x.py -n "__fish_seen_subcommand_from build" -l on-fail -d 'command to run on failure' -r -f -a "(__fish_complete_command)"
5254
complete -c x.py -n "__fish_seen_subcommand_from build" -l stage -d 'stage to build (indicates compiler to use/test, e.g., stage 0 uses the bootstrap compiler, stage 1 the stage 0 rustc artifacts, etc.)' -r -f
@@ -76,6 +78,7 @@ complete -c x.py -n "__fish_seen_subcommand_from check" -l build -d 'build targe
7678
complete -c x.py -n "__fish_seen_subcommand_from check" -l host -d 'host targets to build' -r -f
7779
complete -c x.py -n "__fish_seen_subcommand_from check" -l target -d 'target targets to build' -r -f
7880
complete -c x.py -n "__fish_seen_subcommand_from check" -l exclude -d 'build paths to exclude' -r -F
81+
complete -c x.py -n "__fish_seen_subcommand_from check" -l skip -d 'build paths to skip' -r -F
7982
complete -c x.py -n "__fish_seen_subcommand_from check" -l rustc-error-format -r -f
8083
complete -c x.py -n "__fish_seen_subcommand_from check" -l on-fail -d 'command to run on failure' -r -f -a "(__fish_complete_command)"
8184
complete -c x.py -n "__fish_seen_subcommand_from check" -l stage -d 'stage to build (indicates compiler to use/test, e.g., stage 0 uses the bootstrap compiler, stage 1 the stage 0 rustc artifacts, etc.)' -r -f
@@ -110,6 +113,7 @@ complete -c x.py -n "__fish_seen_subcommand_from clippy" -l build -d 'build targ
110113
complete -c x.py -n "__fish_seen_subcommand_from clippy" -l host -d 'host targets to build' -r -f
111114
complete -c x.py -n "__fish_seen_subcommand_from clippy" -l target -d 'target targets to build' -r -f
112115
complete -c x.py -n "__fish_seen_subcommand_from clippy" -l exclude -d 'build paths to exclude' -r -F
116+
complete -c x.py -n "__fish_seen_subcommand_from clippy" -l skip -d 'build paths to skip' -r -F
113117
complete -c x.py -n "__fish_seen_subcommand_from clippy" -l rustc-error-format -r -f
114118
complete -c x.py -n "__fish_seen_subcommand_from clippy" -l on-fail -d 'command to run on failure' -r -f -a "(__fish_complete_command)"
115119
complete -c x.py -n "__fish_seen_subcommand_from clippy" -l stage -d 'stage to build (indicates compiler to use/test, e.g., stage 0 uses the bootstrap compiler, stage 1 the stage 0 rustc artifacts, etc.)' -r -f
@@ -140,6 +144,7 @@ complete -c x.py -n "__fish_seen_subcommand_from fix" -l build -d 'build target
140144
complete -c x.py -n "__fish_seen_subcommand_from fix" -l host -d 'host targets to build' -r -f
141145
complete -c x.py -n "__fish_seen_subcommand_from fix" -l target -d 'target targets to build' -r -f
142146
complete -c x.py -n "__fish_seen_subcommand_from fix" -l exclude -d 'build paths to exclude' -r -F
147+
complete -c x.py -n "__fish_seen_subcommand_from fix" -l skip -d 'build paths to skip' -r -F
143148
complete -c x.py -n "__fish_seen_subcommand_from fix" -l rustc-error-format -r -f
144149
complete -c x.py -n "__fish_seen_subcommand_from fix" -l on-fail -d 'command to run on failure' -r -f -a "(__fish_complete_command)"
145150
complete -c x.py -n "__fish_seen_subcommand_from fix" -l stage -d 'stage to build (indicates compiler to use/test, e.g., stage 0 uses the bootstrap compiler, stage 1 the stage 0 rustc artifacts, etc.)' -r -f
@@ -169,6 +174,7 @@ complete -c x.py -n "__fish_seen_subcommand_from fmt" -l build -d 'build target
169174
complete -c x.py -n "__fish_seen_subcommand_from fmt" -l host -d 'host targets to build' -r -f
170175
complete -c x.py -n "__fish_seen_subcommand_from fmt" -l target -d 'target targets to build' -r -f
171176
complete -c x.py -n "__fish_seen_subcommand_from fmt" -l exclude -d 'build paths to exclude' -r -F
177+
complete -c x.py -n "__fish_seen_subcommand_from fmt" -l skip -d 'build paths to skip' -r -F
172178
complete -c x.py -n "__fish_seen_subcommand_from fmt" -l rustc-error-format -r -f
173179
complete -c x.py -n "__fish_seen_subcommand_from fmt" -l on-fail -d 'command to run on failure' -r -f -a "(__fish_complete_command)"
174180
complete -c x.py -n "__fish_seen_subcommand_from fmt" -l stage -d 'stage to build (indicates compiler to use/test, e.g., stage 0 uses the bootstrap compiler, stage 1 the stage 0 rustc artifacts, etc.)' -r -f
@@ -199,6 +205,7 @@ complete -c x.py -n "__fish_seen_subcommand_from doc" -l build -d 'build target
199205
complete -c x.py -n "__fish_seen_subcommand_from doc" -l host -d 'host targets to build' -r -f
200206
complete -c x.py -n "__fish_seen_subcommand_from doc" -l target -d 'target targets to build' -r -f
201207
complete -c x.py -n "__fish_seen_subcommand_from doc" -l exclude -d 'build paths to exclude' -r -F
208+
complete -c x.py -n "__fish_seen_subcommand_from doc" -l skip -d 'build paths to skip' -r -F
202209
complete -c x.py -n "__fish_seen_subcommand_from doc" -l rustc-error-format -r -f
203210
complete -c x.py -n "__fish_seen_subcommand_from doc" -l on-fail -d 'command to run on failure' -r -f -a "(__fish_complete_command)"
204211
complete -c x.py -n "__fish_seen_subcommand_from doc" -l stage -d 'stage to build (indicates compiler to use/test, e.g., stage 0 uses the bootstrap compiler, stage 1 the stage 0 rustc artifacts, etc.)' -r -f
@@ -224,7 +231,7 @@ complete -c x.py -n "__fish_seen_subcommand_from doc" -l dry-run -d 'dry run; do
224231
complete -c x.py -n "__fish_seen_subcommand_from doc" -l json-output -d 'use message-format=json'
225232
complete -c x.py -n "__fish_seen_subcommand_from doc" -l llvm-profile-generate -d 'generate PGO profile with llvm built for rustc'
226233
complete -c x.py -n "__fish_seen_subcommand_from doc" -s h -l help -d 'Print help (see more with \'--help\')'
227-
complete -c x.py -n "__fish_seen_subcommand_from test" -l skip -d 'skips tests matching SUBSTRING, if supported by test tool. May be passed multiple times' -r
234+
complete -c x.py -n "__fish_seen_subcommand_from test" -l skip -d 'skips tests matching SUBSTRING, if supported by test tool. May be passed multiple times' -r -F
228235
complete -c x.py -n "__fish_seen_subcommand_from test" -l test-args -d 'extra arguments to be passed for the test tool being used (e.g. libtest, compiletest or rustdoc)' -r
229236
complete -c x.py -n "__fish_seen_subcommand_from test" -l rustc-args -d 'extra options to pass the compiler when running tests' -r
230237
complete -c x.py -n "__fish_seen_subcommand_from test" -l compare-mode -d 'mode describing what file the actual ui output will be compared to' -r
@@ -273,6 +280,7 @@ complete -c x.py -n "__fish_seen_subcommand_from bench" -l build -d 'build targe
273280
complete -c x.py -n "__fish_seen_subcommand_from bench" -l host -d 'host targets to build' -r -f
274281
complete -c x.py -n "__fish_seen_subcommand_from bench" -l target -d 'target targets to build' -r -f
275282
complete -c x.py -n "__fish_seen_subcommand_from bench" -l exclude -d 'build paths to exclude' -r -F
283+
complete -c x.py -n "__fish_seen_subcommand_from bench" -l skip -d 'build paths to skip' -r -F
276284
complete -c x.py -n "__fish_seen_subcommand_from bench" -l rustc-error-format -r -f
277285
complete -c x.py -n "__fish_seen_subcommand_from bench" -l on-fail -d 'command to run on failure' -r -f -a "(__fish_complete_command)"
278286
complete -c x.py -n "__fish_seen_subcommand_from bench" -l stage -d 'stage to build (indicates compiler to use/test, e.g., stage 0 uses the bootstrap compiler, stage 1 the stage 0 rustc artifacts, etc.)' -r -f
@@ -303,6 +311,7 @@ complete -c x.py -n "__fish_seen_subcommand_from clean" -l build -d 'build targe
303311
complete -c x.py -n "__fish_seen_subcommand_from clean" -l host -d 'host targets to build' -r -f
304312
complete -c x.py -n "__fish_seen_subcommand_from clean" -l target -d 'target targets to build' -r -f
305313
complete -c x.py -n "__fish_seen_subcommand_from clean" -l exclude -d 'build paths to exclude' -r -F
314+
complete -c x.py -n "__fish_seen_subcommand_from clean" -l skip -d 'build paths to skip' -r -F
306315
complete -c x.py -n "__fish_seen_subcommand_from clean" -l rustc-error-format -r -f
307316
complete -c x.py -n "__fish_seen_subcommand_from clean" -l on-fail -d 'command to run on failure' -r -f -a "(__fish_complete_command)"
308317
complete -c x.py -n "__fish_seen_subcommand_from clean" -l keep-stage -d 'stage(s) to keep without recompiling (pass multiple times to keep e.g., both stages 0 and 1)' -r -f
@@ -332,6 +341,7 @@ complete -c x.py -n "__fish_seen_subcommand_from dist" -l build -d 'build target
332341
complete -c x.py -n "__fish_seen_subcommand_from dist" -l host -d 'host targets to build' -r -f
333342
complete -c x.py -n "__fish_seen_subcommand_from dist" -l target -d 'target targets to build' -r -f
334343
complete -c x.py -n "__fish_seen_subcommand_from dist" -l exclude -d 'build paths to exclude' -r -F
344+
complete -c x.py -n "__fish_seen_subcommand_from dist" -l skip -d 'build paths to skip' -r -F
335345
complete -c x.py -n "__fish_seen_subcommand_from dist" -l rustc-error-format -r -f
336346
complete -c x.py -n "__fish_seen_subcommand_from dist" -l on-fail -d 'command to run on failure' -r -f -a "(__fish_complete_command)"
337347
complete -c x.py -n "__fish_seen_subcommand_from dist" -l stage -d 'stage to build (indicates compiler to use/test, e.g., stage 0 uses the bootstrap compiler, stage 1 the stage 0 rustc artifacts, etc.)' -r -f
@@ -361,6 +371,7 @@ complete -c x.py -n "__fish_seen_subcommand_from install" -l build -d 'build tar
361371
complete -c x.py -n "__fish_seen_subcommand_from install" -l host -d 'host targets to build' -r -f
362372
complete -c x.py -n "__fish_seen_subcommand_from install" -l target -d 'target targets to build' -r -f
363373
complete -c x.py -n "__fish_seen_subcommand_from install" -l exclude -d 'build paths to exclude' -r -F
374+
complete -c x.py -n "__fish_seen_subcommand_from install" -l skip -d 'build paths to skip' -r -F
364375
complete -c x.py -n "__fish_seen_subcommand_from install" -l rustc-error-format -r -f
365376
complete -c x.py -n "__fish_seen_subcommand_from install" -l on-fail -d 'command to run on failure' -r -f -a "(__fish_complete_command)"
366377
complete -c x.py -n "__fish_seen_subcommand_from install" -l stage -d 'stage to build (indicates compiler to use/test, e.g., stage 0 uses the bootstrap compiler, stage 1 the stage 0 rustc artifacts, etc.)' -r -f
@@ -391,6 +402,7 @@ complete -c x.py -n "__fish_seen_subcommand_from run" -l build -d 'build target
391402
complete -c x.py -n "__fish_seen_subcommand_from run" -l host -d 'host targets to build' -r -f
392403
complete -c x.py -n "__fish_seen_subcommand_from run" -l target -d 'target targets to build' -r -f
393404
complete -c x.py -n "__fish_seen_subcommand_from run" -l exclude -d 'build paths to exclude' -r -F
405+
complete -c x.py -n "__fish_seen_subcommand_from run" -l skip -d 'build paths to skip' -r -F
394406
complete -c x.py -n "__fish_seen_subcommand_from run" -l rustc-error-format -r -f
395407
complete -c x.py -n "__fish_seen_subcommand_from run" -l on-fail -d 'command to run on failure' -r -f -a "(__fish_complete_command)"
396408
complete -c x.py -n "__fish_seen_subcommand_from run" -l stage -d 'stage to build (indicates compiler to use/test, e.g., stage 0 uses the bootstrap compiler, stage 1 the stage 0 rustc artifacts, etc.)' -r -f
@@ -420,6 +432,7 @@ complete -c x.py -n "__fish_seen_subcommand_from setup" -l build -d 'build targe
420432
complete -c x.py -n "__fish_seen_subcommand_from setup" -l host -d 'host targets to build' -r -f
421433
complete -c x.py -n "__fish_seen_subcommand_from setup" -l target -d 'target targets to build' -r -f
422434
complete -c x.py -n "__fish_seen_subcommand_from setup" -l exclude -d 'build paths to exclude' -r -F
435+
complete -c x.py -n "__fish_seen_subcommand_from setup" -l skip -d 'build paths to skip' -r -F
423436
complete -c x.py -n "__fish_seen_subcommand_from setup" -l rustc-error-format -r -f
424437
complete -c x.py -n "__fish_seen_subcommand_from setup" -l on-fail -d 'command to run on failure' -r -f -a "(__fish_complete_command)"
425438
complete -c x.py -n "__fish_seen_subcommand_from setup" -l stage -d 'stage to build (indicates compiler to use/test, e.g., stage 0 uses the bootstrap compiler, stage 1 the stage 0 rustc artifacts, etc.)' -r -f
@@ -449,6 +462,7 @@ complete -c x.py -n "__fish_seen_subcommand_from suggest" -l build -d 'build tar
449462
complete -c x.py -n "__fish_seen_subcommand_from suggest" -l host -d 'host targets to build' -r -f
450463
complete -c x.py -n "__fish_seen_subcommand_from suggest" -l target -d 'target targets to build' -r -f
451464
complete -c x.py -n "__fish_seen_subcommand_from suggest" -l exclude -d 'build paths to exclude' -r -F
465+
complete -c x.py -n "__fish_seen_subcommand_from suggest" -l skip -d 'build paths to skip' -r -F
452466
complete -c x.py -n "__fish_seen_subcommand_from suggest" -l rustc-error-format -r -f
453467
complete -c x.py -n "__fish_seen_subcommand_from suggest" -l on-fail -d 'command to run on failure' -r -f -a "(__fish_complete_command)"
454468
complete -c x.py -n "__fish_seen_subcommand_from suggest" -l stage -d 'stage to build (indicates compiler to use/test, e.g., stage 0 uses the bootstrap compiler, stage 1 the stage 0 rustc artifacts, etc.)' -r -f

‎src/etc/completions/x.py.ps1

+14
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Register-ArgumentCompleter -Native -CommandName 'x.py' -ScriptBlock {
2727
[CompletionResult]::new('--host', 'host', [CompletionResultType]::ParameterName, 'host targets to build')
2828
[CompletionResult]::new('--target', 'target', [CompletionResultType]::ParameterName, 'target targets to build')
2929
[CompletionResult]::new('--exclude', 'exclude', [CompletionResultType]::ParameterName, 'build paths to exclude')
30+
[CompletionResult]::new('--skip', 'skip', [CompletionResultType]::ParameterName, 'build paths to skip')
3031
[CompletionResult]::new('--rustc-error-format', 'rustc-error-format', [CompletionResultType]::ParameterName, 'rustc-error-format')
3132
[CompletionResult]::new('--on-fail', 'on-fail', [CompletionResultType]::ParameterName, 'command to run on failure')
3233
[CompletionResult]::new('--stage', 'stage', [CompletionResultType]::ParameterName, 'stage to build (indicates compiler to use/test, e.g., stage 0 uses the bootstrap compiler, stage 1 the stage 0 rustc artifacts, etc.)')
@@ -77,6 +78,7 @@ Register-ArgumentCompleter -Native -CommandName 'x.py' -ScriptBlock {
7778
[CompletionResult]::new('--host', 'host', [CompletionResultType]::ParameterName, 'host targets to build')
7879
[CompletionResult]::new('--target', 'target', [CompletionResultType]::ParameterName, 'target targets to build')
7980
[CompletionResult]::new('--exclude', 'exclude', [CompletionResultType]::ParameterName, 'build paths to exclude')
81+
[CompletionResult]::new('--skip', 'skip', [CompletionResultType]::ParameterName, 'build paths to skip')
8082
[CompletionResult]::new('--rustc-error-format', 'rustc-error-format', [CompletionResultType]::ParameterName, 'rustc-error-format')
8183
[CompletionResult]::new('--on-fail', 'on-fail', [CompletionResultType]::ParameterName, 'command to run on failure')
8284
[CompletionResult]::new('--stage', 'stage', [CompletionResultType]::ParameterName, 'stage to build (indicates compiler to use/test, e.g., stage 0 uses the bootstrap compiler, stage 1 the stage 0 rustc artifacts, etc.)')
@@ -113,6 +115,7 @@ Register-ArgumentCompleter -Native -CommandName 'x.py' -ScriptBlock {
113115
[CompletionResult]::new('--host', 'host', [CompletionResultType]::ParameterName, 'host targets to build')
114116
[CompletionResult]::new('--target', 'target', [CompletionResultType]::ParameterName, 'target targets to build')
115117
[CompletionResult]::new('--exclude', 'exclude', [CompletionResultType]::ParameterName, 'build paths to exclude')
118+
[CompletionResult]::new('--skip', 'skip', [CompletionResultType]::ParameterName, 'build paths to skip')
116119
[CompletionResult]::new('--rustc-error-format', 'rustc-error-format', [CompletionResultType]::ParameterName, 'rustc-error-format')
117120
[CompletionResult]::new('--on-fail', 'on-fail', [CompletionResultType]::ParameterName, 'command to run on failure')
118121
[CompletionResult]::new('--stage', 'stage', [CompletionResultType]::ParameterName, 'stage to build (indicates compiler to use/test, e.g., stage 0 uses the bootstrap compiler, stage 1 the stage 0 rustc artifacts, etc.)')
@@ -154,6 +157,7 @@ Register-ArgumentCompleter -Native -CommandName 'x.py' -ScriptBlock {
154157
[CompletionResult]::new('--host', 'host', [CompletionResultType]::ParameterName, 'host targets to build')
155158
[CompletionResult]::new('--target', 'target', [CompletionResultType]::ParameterName, 'target targets to build')
156159
[CompletionResult]::new('--exclude', 'exclude', [CompletionResultType]::ParameterName, 'build paths to exclude')
160+
[CompletionResult]::new('--skip', 'skip', [CompletionResultType]::ParameterName, 'build paths to skip')
157161
[CompletionResult]::new('--rustc-error-format', 'rustc-error-format', [CompletionResultType]::ParameterName, 'rustc-error-format')
158162
[CompletionResult]::new('--on-fail', 'on-fail', [CompletionResultType]::ParameterName, 'command to run on failure')
159163
[CompletionResult]::new('--stage', 'stage', [CompletionResultType]::ParameterName, 'stage to build (indicates compiler to use/test, e.g., stage 0 uses the bootstrap compiler, stage 1 the stage 0 rustc artifacts, etc.)')
@@ -191,6 +195,7 @@ Register-ArgumentCompleter -Native -CommandName 'x.py' -ScriptBlock {
191195
[CompletionResult]::new('--host', 'host', [CompletionResultType]::ParameterName, 'host targets to build')
192196
[CompletionResult]::new('--target', 'target', [CompletionResultType]::ParameterName, 'target targets to build')
193197
[CompletionResult]::new('--exclude', 'exclude', [CompletionResultType]::ParameterName, 'build paths to exclude')
198+
[CompletionResult]::new('--skip', 'skip', [CompletionResultType]::ParameterName, 'build paths to skip')
194199
[CompletionResult]::new('--rustc-error-format', 'rustc-error-format', [CompletionResultType]::ParameterName, 'rustc-error-format')
195200
[CompletionResult]::new('--on-fail', 'on-fail', [CompletionResultType]::ParameterName, 'command to run on failure')
196201
[CompletionResult]::new('--stage', 'stage', [CompletionResultType]::ParameterName, 'stage to build (indicates compiler to use/test, e.g., stage 0 uses the bootstrap compiler, stage 1 the stage 0 rustc artifacts, etc.)')
@@ -227,6 +232,7 @@ Register-ArgumentCompleter -Native -CommandName 'x.py' -ScriptBlock {
227232
[CompletionResult]::new('--host', 'host', [CompletionResultType]::ParameterName, 'host targets to build')
228233
[CompletionResult]::new('--target', 'target', [CompletionResultType]::ParameterName, 'target targets to build')
229234
[CompletionResult]::new('--exclude', 'exclude', [CompletionResultType]::ParameterName, 'build paths to exclude')
235+
[CompletionResult]::new('--skip', 'skip', [CompletionResultType]::ParameterName, 'build paths to skip')
230236
[CompletionResult]::new('--rustc-error-format', 'rustc-error-format', [CompletionResultType]::ParameterName, 'rustc-error-format')
231237
[CompletionResult]::new('--on-fail', 'on-fail', [CompletionResultType]::ParameterName, 'command to run on failure')
232238
[CompletionResult]::new('--stage', 'stage', [CompletionResultType]::ParameterName, 'stage to build (indicates compiler to use/test, e.g., stage 0 uses the bootstrap compiler, stage 1 the stage 0 rustc artifacts, etc.)')
@@ -264,6 +270,7 @@ Register-ArgumentCompleter -Native -CommandName 'x.py' -ScriptBlock {
264270
[CompletionResult]::new('--host', 'host', [CompletionResultType]::ParameterName, 'host targets to build')
265271
[CompletionResult]::new('--target', 'target', [CompletionResultType]::ParameterName, 'target targets to build')
266272
[CompletionResult]::new('--exclude', 'exclude', [CompletionResultType]::ParameterName, 'build paths to exclude')
273+
[CompletionResult]::new('--skip', 'skip', [CompletionResultType]::ParameterName, 'build paths to skip')
267274
[CompletionResult]::new('--rustc-error-format', 'rustc-error-format', [CompletionResultType]::ParameterName, 'rustc-error-format')
268275
[CompletionResult]::new('--on-fail', 'on-fail', [CompletionResultType]::ParameterName, 'command to run on failure')
269276
[CompletionResult]::new('--stage', 'stage', [CompletionResultType]::ParameterName, 'stage to build (indicates compiler to use/test, e.g., stage 0 uses the bootstrap compiler, stage 1 the stage 0 rustc artifacts, etc.)')
@@ -352,6 +359,7 @@ Register-ArgumentCompleter -Native -CommandName 'x.py' -ScriptBlock {
352359
[CompletionResult]::new('--host', 'host', [CompletionResultType]::ParameterName, 'host targets to build')
353360
[CompletionResult]::new('--target', 'target', [CompletionResultType]::ParameterName, 'target targets to build')
354361
[CompletionResult]::new('--exclude', 'exclude', [CompletionResultType]::ParameterName, 'build paths to exclude')
362+
[CompletionResult]::new('--skip', 'skip', [CompletionResultType]::ParameterName, 'build paths to skip')
355363
[CompletionResult]::new('--rustc-error-format', 'rustc-error-format', [CompletionResultType]::ParameterName, 'rustc-error-format')
356364
[CompletionResult]::new('--on-fail', 'on-fail', [CompletionResultType]::ParameterName, 'command to run on failure')
357365
[CompletionResult]::new('--stage', 'stage', [CompletionResultType]::ParameterName, 'stage to build (indicates compiler to use/test, e.g., stage 0 uses the bootstrap compiler, stage 1 the stage 0 rustc artifacts, etc.)')
@@ -389,6 +397,7 @@ Register-ArgumentCompleter -Native -CommandName 'x.py' -ScriptBlock {
389397
[CompletionResult]::new('--host', 'host', [CompletionResultType]::ParameterName, 'host targets to build')
390398
[CompletionResult]::new('--target', 'target', [CompletionResultType]::ParameterName, 'target targets to build')
391399
[CompletionResult]::new('--exclude', 'exclude', [CompletionResultType]::ParameterName, 'build paths to exclude')
400+
[CompletionResult]::new('--skip', 'skip', [CompletionResultType]::ParameterName, 'build paths to skip')
392401
[CompletionResult]::new('--rustc-error-format', 'rustc-error-format', [CompletionResultType]::ParameterName, 'rustc-error-format')
393402
[CompletionResult]::new('--on-fail', 'on-fail', [CompletionResultType]::ParameterName, 'command to run on failure')
394403
[CompletionResult]::new('--keep-stage', 'keep-stage', [CompletionResultType]::ParameterName, 'stage(s) to keep without recompiling (pass multiple times to keep e.g., both stages 0 and 1)')
@@ -425,6 +434,7 @@ Register-ArgumentCompleter -Native -CommandName 'x.py' -ScriptBlock {
425434
[CompletionResult]::new('--host', 'host', [CompletionResultType]::ParameterName, 'host targets to build')
426435
[CompletionResult]::new('--target', 'target', [CompletionResultType]::ParameterName, 'target targets to build')
427436
[CompletionResult]::new('--exclude', 'exclude', [CompletionResultType]::ParameterName, 'build paths to exclude')
437+
[CompletionResult]::new('--skip', 'skip', [CompletionResultType]::ParameterName, 'build paths to skip')
428438
[CompletionResult]::new('--rustc-error-format', 'rustc-error-format', [CompletionResultType]::ParameterName, 'rustc-error-format')
429439
[CompletionResult]::new('--on-fail', 'on-fail', [CompletionResultType]::ParameterName, 'command to run on failure')
430440
[CompletionResult]::new('--stage', 'stage', [CompletionResultType]::ParameterName, 'stage to build (indicates compiler to use/test, e.g., stage 0 uses the bootstrap compiler, stage 1 the stage 0 rustc artifacts, etc.)')
@@ -461,6 +471,7 @@ Register-ArgumentCompleter -Native -CommandName 'x.py' -ScriptBlock {
461471
[CompletionResult]::new('--host', 'host', [CompletionResultType]::ParameterName, 'host targets to build')
462472
[CompletionResult]::new('--target', 'target', [CompletionResultType]::ParameterName, 'target targets to build')
463473
[CompletionResult]::new('--exclude', 'exclude', [CompletionResultType]::ParameterName, 'build paths to exclude')
474+
[CompletionResult]::new('--skip', 'skip', [CompletionResultType]::ParameterName, 'build paths to skip')
464475
[CompletionResult]::new('--rustc-error-format', 'rustc-error-format', [CompletionResultType]::ParameterName, 'rustc-error-format')
465476
[CompletionResult]::new('--on-fail', 'on-fail', [CompletionResultType]::ParameterName, 'command to run on failure')
466477
[CompletionResult]::new('--stage', 'stage', [CompletionResultType]::ParameterName, 'stage to build (indicates compiler to use/test, e.g., stage 0 uses the bootstrap compiler, stage 1 the stage 0 rustc artifacts, etc.)')
@@ -498,6 +509,7 @@ Register-ArgumentCompleter -Native -CommandName 'x.py' -ScriptBlock {
498509
[CompletionResult]::new('--host', 'host', [CompletionResultType]::ParameterName, 'host targets to build')
499510
[CompletionResult]::new('--target', 'target', [CompletionResultType]::ParameterName, 'target targets to build')
500511
[CompletionResult]::new('--exclude', 'exclude', [CompletionResultType]::ParameterName, 'build paths to exclude')
512+
[CompletionResult]::new('--skip', 'skip', [CompletionResultType]::ParameterName, 'build paths to skip')
501513
[CompletionResult]::new('--rustc-error-format', 'rustc-error-format', [CompletionResultType]::ParameterName, 'rustc-error-format')
502514
[CompletionResult]::new('--on-fail', 'on-fail', [CompletionResultType]::ParameterName, 'command to run on failure')
503515
[CompletionResult]::new('--stage', 'stage', [CompletionResultType]::ParameterName, 'stage to build (indicates compiler to use/test, e.g., stage 0 uses the bootstrap compiler, stage 1 the stage 0 rustc artifacts, etc.)')
@@ -534,6 +546,7 @@ Register-ArgumentCompleter -Native -CommandName 'x.py' -ScriptBlock {
534546
[CompletionResult]::new('--host', 'host', [CompletionResultType]::ParameterName, 'host targets to build')
535547
[CompletionResult]::new('--target', 'target', [CompletionResultType]::ParameterName, 'target targets to build')
536548
[CompletionResult]::new('--exclude', 'exclude', [CompletionResultType]::ParameterName, 'build paths to exclude')
549+
[CompletionResult]::new('--skip', 'skip', [CompletionResultType]::ParameterName, 'build paths to skip')
537550
[CompletionResult]::new('--rustc-error-format', 'rustc-error-format', [CompletionResultType]::ParameterName, 'rustc-error-format')
538551
[CompletionResult]::new('--on-fail', 'on-fail', [CompletionResultType]::ParameterName, 'command to run on failure')
539552
[CompletionResult]::new('--stage', 'stage', [CompletionResultType]::ParameterName, 'stage to build (indicates compiler to use/test, e.g., stage 0 uses the bootstrap compiler, stage 1 the stage 0 rustc artifacts, etc.)')
@@ -570,6 +583,7 @@ Register-ArgumentCompleter -Native -CommandName 'x.py' -ScriptBlock {
570583
[CompletionResult]::new('--host', 'host', [CompletionResultType]::ParameterName, 'host targets to build')
571584
[CompletionResult]::new('--target', 'target', [CompletionResultType]::ParameterName, 'target targets to build')
572585
[CompletionResult]::new('--exclude', 'exclude', [CompletionResultType]::ParameterName, 'build paths to exclude')
586+
[CompletionResult]::new('--skip', 'skip', [CompletionResultType]::ParameterName, 'build paths to skip')
573587
[CompletionResult]::new('--rustc-error-format', 'rustc-error-format', [CompletionResultType]::ParameterName, 'rustc-error-format')
574588
[CompletionResult]::new('--on-fail', 'on-fail', [CompletionResultType]::ParameterName, 'command to run on failure')
575589
[CompletionResult]::new('--stage', 'stage', [CompletionResultType]::ParameterName, 'stage to build (indicates compiler to use/test, e.g., stage 0 uses the bootstrap compiler, stage 1 the stage 0 rustc artifacts, etc.)')

‎src/etc/completions/x.py.sh

+70-14
Large diffs are not rendered by default.

‎src/tools/opt-dist/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ fn main() -> anyhow::Result<()> {
197197
"miri",
198198
"rustfmt",
199199
] {
200-
build_args.extend(["--exclude".to_string(), target.to_string()]);
200+
build_args.extend(["--skip".to_string(), target.to_string()]);
201201
}
202202
}
203203

‎src/tools/opt-dist/src/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ llvm-config = "{llvm_config}"
9696
"tests/ui",
9797
];
9898
for test_path in env.skipped_tests() {
99-
args.extend(["--exclude", test_path]);
99+
args.extend(["--skip", test_path]);
100100
}
101101
cmd(&args).env("COMPILETEST_FORCE_STAGE0", "1").run().context("Cannot execute tests")
102102
}

0 commit comments

Comments
 (0)
Please sign in to comment.