Skip to content

Commit c7d2b09

Browse files
authored
Unrolled build for rust-lang#137220
Rollup merge of rust-lang#137220 - ferrocene:pa-channel-ci, r=Kobzol Support `rust.channel = "auto-detect"` As [discussed in Zulip](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/vibe.20check.20for.20a.20few.20config.20changes), this PR adds the new `"auto-detect"` value for `rust.channel`, to load the channel name from `src/ci/channel`. Note that in a previous iteration of this PR the value was "ci" instead of "auto-detect".
2 parents 2f58193 + 1ccff0e commit c7d2b09

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

config.example.toml

+5-4
Original file line numberDiff line numberDiff line change
@@ -608,11 +608,12 @@
608608

609609
# The "channel" for the Rust build to produce. The stable/beta channels only
610610
# allow using stable features, whereas the nightly and dev channels allow using
611-
# nightly features
611+
# nightly features.
612612
#
613-
# If using tarball sources, default value for `channel` is taken from the `src/ci/channel` file;
614-
# otherwise, it's "dev".
615-
#channel = if "is a tarball source" { content of `src/ci/channel` file } else { "dev" }
613+
# You can set the channel to "auto-detect" to load the channel name from `src/ci/channel`.
614+
#
615+
# If using tarball sources, default value is "auto-detect", otherwise, it's "dev".
616+
#channel = if "is a tarball source" { "auto-detect" } else { "dev" }
616617

617618
# A descriptive string to be appended to `rustc --version` output, which is
618619
# also used in places like debuginfo `DW_AT_producer`. This may be useful for

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

+5-1
Original file line numberDiff line numberDiff line change
@@ -1777,7 +1777,11 @@ impl Config {
17771777

17781778
let is_user_configured_rust_channel =
17791779
if let Some(channel) = toml.rust.as_ref().and_then(|r| r.channel.clone()) {
1780-
config.channel = channel;
1780+
if channel == "auto-detect" {
1781+
config.channel = ci_channel.into();
1782+
} else {
1783+
config.channel = channel;
1784+
}
17811785
true
17821786
} else {
17831787
false

src/bootstrap/src/utils/change_tracker.rs

+5
Original file line numberDiff line numberDiff line change
@@ -360,4 +360,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
360360
severity: ChangeSeverity::Info,
361361
summary: "Added `build.test-stage = 2` to 'tools' profile defaults",
362362
},
363+
ChangeInfo {
364+
change_id: 137220,
365+
severity: ChangeSeverity::Info,
366+
summary: "`rust.channel` now supports \"auto-detect\" to load the channel from `src/ci/channel`",
367+
},
363368
];

0 commit comments

Comments
 (0)