Skip to content

Commit

Permalink
Rollup merge of #123711 - onur-ozkan:drop-changelog-seen, r=albertlar…
Browse files Browse the repository at this point in the history
…san68

drop `changelog-seen`

It's been 7 months since we deprecated this. It should be fine to remove it now.
  • Loading branch information
matthiaskrgr authored Apr 16, 2024
2 parents dc40da8 + cce21be commit 0aa7235
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 19 deletions.
4 changes: 0 additions & 4 deletions src/bootstrap/src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@ fn main() {
fn check_version(config: &Config) -> Option<String> {
let mut msg = String::new();

if config.changelog_seen.is_some() {
msg.push_str("WARNING: The use of `changelog-seen` is deprecated. Please refer to `change-id` option in `config.example.toml` instead.\n");
}

let latest_change_id = CONFIG_CHANGE_HISTORY.last().unwrap().change_id;
let warned_id_path = config.out.join("bootstrap").join(".last-warned-change-id");

Expand Down
16 changes: 1 addition & 15 deletions src/bootstrap/src/core/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ impl LldMode {
/// `config.example.toml`.
#[derive(Default, Clone)]
pub struct Config {
pub changelog_seen: Option<usize>, // FIXME: Deprecated field. Remove it at 2024.
pub change_id: Option<usize>,
pub bypass_bootstrap_lock: bool,
pub ccache: Option<String>,
Expand Down Expand Up @@ -605,7 +604,6 @@ impl Target {
#[derive(Deserialize, Default)]
#[serde(deny_unknown_fields, rename_all = "kebab-case")]
pub(crate) struct TomlConfig {
changelog_seen: Option<usize>, // FIXME: Deprecated field. Remove it at 2024.
#[serde(flatten)]
change_id: ChangeIdWrapper,
build: Option<Build>,
Expand Down Expand Up @@ -645,17 +643,7 @@ trait Merge {
impl Merge for TomlConfig {
fn merge(
&mut self,
TomlConfig {
build,
install,
llvm,
rust,
dist,
target,
profile: _,
changelog_seen,
change_id,
}: Self,
TomlConfig { build, install, llvm, rust, dist, target, profile: _, change_id }: Self,
replace: ReplaceOpt,
) {
fn do_merge<T: Merge>(x: &mut Option<T>, y: Option<T>, replace: ReplaceOpt) {
Expand All @@ -667,7 +655,6 @@ impl Merge for TomlConfig {
}
}
}
self.changelog_seen.merge(changelog_seen, replace);
self.change_id.inner.merge(change_id.inner, replace);
do_merge(&mut self.build, build, replace);
do_merge(&mut self.install, install, replace);
Expand Down Expand Up @@ -1400,7 +1387,6 @@ impl Config {
}
toml.merge(override_toml, ReplaceOpt::Override);

config.changelog_seen = toml.changelog_seen;
config.change_id = toml.change_id.inner;

let Build {
Expand Down
5 changes: 5 additions & 0 deletions src/bootstrap/src/utils/change_tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
severity: ChangeSeverity::Warning,
summary: "`rust.split-debuginfo` has been moved to `target.<triple>.split-debuginfo` and its default value is determined for each target individually.",
},
ChangeInfo {
change_id: 123711,
severity: ChangeSeverity::Warning,
summary: "The deprecated field `changelog-seen` has been removed. Using that field in `config.toml` from now on will result in breakage.",
},
];

0 comments on commit 0aa7235

Please sign in to comment.