Skip to content

Commit 0ef1a7e

Browse files
committed
Remove the expand-yaml-anchors tool
1 parent b3f6553 commit 0ef1a7e

File tree

11 files changed

+2
-309
lines changed

11 files changed

+2
-309
lines changed

Cargo.lock

-34
Original file line numberDiff line numberDiff line change
@@ -1256,14 +1256,6 @@ dependencies = [
12561256
"mdbook",
12571257
]
12581258

1259-
[[package]]
1260-
name = "expand-yaml-anchors"
1261-
version = "0.1.0"
1262-
dependencies = [
1263-
"yaml-merge-keys",
1264-
"yaml-rust",
1265-
]
1266-
12671259
[[package]]
12681260
name = "expect-test"
12691261
version = "1.5.0"
@@ -2244,12 +2236,6 @@ dependencies = [
22442236
"regex",
22452237
]
22462238

2247-
[[package]]
2248-
name = "linked-hash-map"
2249-
version = "0.5.6"
2250-
source = "registry+https://github.com./rust-lang/crates.io-index"
2251-
checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
2252-
22532239
[[package]]
22542240
name = "lint-docs"
22552241
version = "0.1.0"
@@ -6553,26 +6539,6 @@ dependencies = [
65536539
"lzma-sys",
65546540
]
65556541

6556-
[[package]]
6557-
name = "yaml-merge-keys"
6558-
version = "0.4.1"
6559-
source = "registry+https://github.com./rust-lang/crates.io-index"
6560-
checksum = "fd236a7dc9bb598f349fe4a8754f49181fee50284daa15cd1ba652d722280004"
6561-
dependencies = [
6562-
"lazy_static",
6563-
"thiserror",
6564-
"yaml-rust",
6565-
]
6566-
6567-
[[package]]
6568-
name = "yaml-rust"
6569-
version = "0.4.5"
6570-
source = "registry+https://github.com./rust-lang/crates.io-index"
6571-
checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85"
6572-
dependencies = [
6573-
"linked-hash-map",
6574-
]
6575-
65766542
[[package]]
65776543
name = "yansi-term"
65786544
version = "0.1.2"

Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ members = [
3131
"src/tools/miri/cargo-miri",
3232
"src/tools/rustdoc-themes",
3333
"src/tools/unicode-table-generator",
34-
"src/tools/expand-yaml-anchors",
3534
"src/tools/jsondocck",
3635
"src/tools/jsondoclint",
3736
"src/tools/llvm-bitcode-linker",

src/bootstrap/src/core/build_steps/run.rs

-26
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,6 @@ use crate::core::config::TargetSelection;
1010
use crate::utils::helpers::output;
1111
use crate::Mode;
1212

13-
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
14-
pub struct ExpandYamlAnchors;
15-
16-
impl Step for ExpandYamlAnchors {
17-
type Output = ();
18-
19-
/// Runs the `expand-yaml_anchors` tool.
20-
///
21-
/// This tool in `src/tools` reads the CI configuration files written in YAML and expands the
22-
/// anchors in them, since GitHub Actions doesn't support them.
23-
fn run(self, builder: &Builder<'_>) {
24-
builder.info("Expanding YAML anchors in the GitHub Actions configuration");
25-
builder.run_delaying_failure(
26-
builder.tool_cmd(Tool::ExpandYamlAnchors).arg("generate").arg(&builder.src),
27-
);
28-
}
29-
30-
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
31-
run.path("src/tools/expand-yaml-anchors")
32-
}
33-
34-
fn make_run(run: RunConfig<'_>) {
35-
run.builder.ensure(ExpandYamlAnchors);
36-
}
37-
}
38-
3913
#[derive(Debug, PartialOrd, Ord, Clone, Hash, PartialEq, Eq)]
4014
pub struct BuildManifest;
4115

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

-35
Original file line numberDiff line numberDiff line change
@@ -1146,8 +1146,6 @@ HELP: to skip test's attempt to check tidiness, pass `--skip src/tools/tidy` to
11461146
builder.info("tidy check");
11471147
builder.run_delaying_failure(&mut cmd);
11481148

1149-
builder.ensure(ExpandYamlAnchors);
1150-
11511149
builder.info("x.py completions check");
11521150
let [bash, zsh, fish, powershell] = ["x.py.sh", "x.py.zsh", "x.py.fish", "x.py.ps1"]
11531151
.map(|filename| builder.src.join("src/etc/completions").join(filename));
@@ -1175,39 +1173,6 @@ HELP: to skip test's attempt to check tidiness, pass `--skip src/tools/tidy` to
11751173
}
11761174
}
11771175

1178-
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1179-
pub struct ExpandYamlAnchors;
1180-
1181-
impl Step for ExpandYamlAnchors {
1182-
type Output = ();
1183-
const ONLY_HOSTS: bool = true;
1184-
1185-
/// Ensure the `generate-ci-config` tool was run locally.
1186-
///
1187-
/// The tool in `src/tools` reads the CI definition in `src/ci/builders.yml` and generates the
1188-
/// appropriate configuration for all our CI providers. This step ensures the tool was called
1189-
/// by the user before committing CI changes.
1190-
fn run(self, builder: &Builder<'_>) {
1191-
// NOTE: `.github/` is not included in dist-src tarballs
1192-
if !builder.src.join(".github/workflows/ci.yml").exists() {
1193-
builder.info("Skipping YAML anchors check: GitHub Actions config not found");
1194-
return;
1195-
}
1196-
builder.info("Ensuring the YAML anchors in the GitHub Actions config were expanded");
1197-
builder.run_delaying_failure(
1198-
builder.tool_cmd(Tool::ExpandYamlAnchors).arg("check").arg(&builder.src),
1199-
);
1200-
}
1201-
1202-
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
1203-
run.path("src/tools/expand-yaml-anchors")
1204-
}
1205-
1206-
fn make_run(run: RunConfig<'_>) {
1207-
run.builder.ensure(ExpandYamlAnchors);
1208-
}
1209-
}
1210-
12111176
fn testdir(builder: &Builder<'_>, host: TargetSelection) -> PathBuf {
12121177
builder.out.join(host.triple).join("test")
12131178
}

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

-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@ bootstrap_tool!(
302302
RemoteTestClient, "src/tools/remote-test-client", "remote-test-client";
303303
RustInstaller, "src/tools/rust-installer", "rust-installer";
304304
RustdocTheme, "src/tools/rustdoc-themes", "rustdoc-themes";
305-
ExpandYamlAnchors, "src/tools/expand-yaml-anchors", "expand-yaml-anchors";
306305
LintDocs, "src/tools/lint-docs", "lint-docs";
307306
JsonDocCk, "src/tools/jsondocck", "jsondocck";
308307
JsonDocLint, "src/tools/jsondoclint", "jsondoclint";

src/bootstrap/src/core/builder.rs

-2
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,6 @@ impl<'a> Builder<'a> {
767767
),
768768
Kind::Test => describe!(
769769
crate::core::build_steps::toolstate::ToolStateCheck,
770-
test::ExpandYamlAnchors,
771770
test::Tidy,
772771
test::Ui,
773772
test::Crashes,
@@ -908,7 +907,6 @@ impl<'a> Builder<'a> {
908907
install::Src,
909908
),
910909
Kind::Run => describe!(
911-
run::ExpandYamlAnchors,
912910
run::BuildManifest,
913911
run::BumpStage0,
914912
run::ReplaceVersionPlaceholder,

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ pub enum Subcommand {
420420
Arguments:
421421
This subcommand accepts a number of paths to tools to build and run. For
422422
example:
423-
./x.py run src/tools/expand-yaml-anchors
423+
./x.py run src/tools/bump-stage0
424424
At least a tool needs to be called.")]
425425
/// Run tools contained in this repository
426426
Run {

src/ci/docker/host-x86_64/mingw-check/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/
4242

4343
ENV RUN_CHECK_WITH_PARALLEL_QUERIES 1
4444

45-
ENV SCRIPT python3 ../x.py --stage 2 test src/tools/expand-yaml-anchors && \
45+
ENV SCRIPT python3 ../x.py --stage 2 \
4646
# Check library crates on all tier 1 targets.
4747
# We disable optimized compiler built-ins because that requires a C toolchain for the target.
4848
# We also skip the x86_64-unknown-linux-gnu target as it is well-tested by other jobs.

src/ci/github-actions/jobs.yml

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# This file contains definitions of CI job parameters that are loaded
22
# dynamically in CI from ci.yml.
3-
# You *do not* need to re-run `src/tools/expand-yaml-anchors` when you
4-
# modify this file.
53
runners:
64
- &base-job
75
env: { }

src/tools/expand-yaml-anchors/Cargo.toml

-8
This file was deleted.

0 commit comments

Comments
 (0)