Skip to content

Commit ca0ff93

Browse files
Rollup merge of #76107 - integer32llc:manifest-alias, r=pietroalbini
Write manifest for MAJOR.MINOR channel to enable rustup convenience This connects to rust-lang/rustup#794. It's hard to remember if there have been patch releases for old versions when you'd like to install the latest in a MAJOR.MINOR series. When we're doing a stable release, we write duplicate manifests to `stable`. With this change, only when we're doing a stable release, also write duplicate manifests to `MAJOR.MINOR` to eventually enable rustup (and any other tooling that builds Rust release URLs) to request, say, `1.45` and get `1.45.2` (assuming `1.45.2` is the latest available `1.45` and assuming that we never publish patch releases out of order). I tested the best I could; it's a bit hard to get everything set up right to be able to run the build-manifest tool. But I was able to run it with a release of "1.45.2" and in addition to the files like `channel-rust-1.45.2.toml` and `channel-rust-stable.toml` (and other manifests) that I got before this change, I now get `channel-rust-1.45.toml`. I believe this change to be safe to deploy as it does not change or remove anything about manifests, just adds more. The actions in rust-central-station that interact with manifests appear to use wildcards in such a way that it will pick up these files without any problems. There will need to be changes to `rustup` before `rustup install 1.45` will work, but we can wait for a stable release and stable patch releases to happen with this change before making the `rustup` changes, so that we're not committing to anything before we know it works.
2 parents 1118ab9 + a8fe654 commit ca0ff93

File tree

1 file changed

+4
-0
lines changed
  • src/tools/build-manifest/src

1 file changed

+4
-0
lines changed

Diff for: src/tools/build-manifest/src/main.rs

+4
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,10 @@ impl Builder {
294294
if self.versions.channel() != rust_version {
295295
self.write_channel_files(&rust_version, &manifest);
296296
}
297+
if self.versions.channel() == "stable" {
298+
let major_minor = rust_version.split('.').take(2).collect::<Vec<_>>().join(".");
299+
self.write_channel_files(&major_minor, &manifest);
300+
}
297301
}
298302

299303
/// If a tool does not pass its tests, don't ship it.

0 commit comments

Comments
 (0)