diff options
| author | Pietro Albini <pietro.albini@ferrous-systems.com> | 2022-06-30 09:54:51 +0200 |
|---|---|---|
| committer | Pietro Albini <pietro.albini@ferrous-systems.com> | 2022-07-11 10:13:35 +0200 |
| commit | b6df2a70f0ef9013bbbbfca342c29d165ea467fa (patch) | |
| tree | ac5c562094f0fe211e0501c40293bc4294520bd3 /src | |
| parent | a51fb2ba827f24ec4d676a9575a0a5e46afd302a (diff) | |
| download | rust-b6df2a70f0ef9013bbbbfca342c29d165ea467fa.tar.gz rust-b6df2a70f0ef9013bbbbfca342c29d165ea467fa.zip | |
remove the need to update bump-stage0 with new stage0 config fields
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/bump-stage0/Cargo.toml | 2 | ||||
| -rw-r--r-- | src/tools/bump-stage0/src/main.rs | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/tools/bump-stage0/Cargo.toml b/src/tools/bump-stage0/Cargo.toml index cf8840ff6ee..352a8555614 100644 --- a/src/tools/bump-stage0/Cargo.toml +++ b/src/tools/bump-stage0/Cargo.toml @@ -10,5 +10,5 @@ anyhow = "1.0.34" curl = "0.4.38" indexmap = { version = "1.7.0", features = ["serde"] } serde = { version = "1.0.125", features = ["derive"] } -serde_json = "1.0.59" +serde_json = { version = "1.0.59", features = ["preserve_order"] } toml = "0.5.7" diff --git a/src/tools/bump-stage0/src/main.rs b/src/tools/bump-stage0/src/main.rs index 1c839fdc00a..aa346daf7e5 100644 --- a/src/tools/bump-stage0/src/main.rs +++ b/src/tools/bump-stage0/src/main.rs @@ -198,9 +198,12 @@ struct Stage0 { #[derive(Debug, serde::Serialize, serde::Deserialize)] struct Config { dist_server: String, - artifacts_server: String, - artifacts_with_llvm_assertions_server: String, - git_merge_commit_email: String, + // There are other fields in the configuration, which will be read by src/bootstrap or other + // tools consuming stage0.json. To avoid the need to update bump-stage0 every time a new field + // is added, we collect all the fields in an untyped Value and serialize them back with the + // same order and structure they were deserialized in. + #[serde(flatten)] + other: serde_json::Value, } #[derive(Debug, serde::Serialize, serde::Deserialize)] |
