about summary refs log tree commit diff
path: root/src/bootstrap/setup.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-10-02 07:41:52 +0000
committerbors <bors@rust-lang.org>2023-10-02 07:41:52 +0000
commit781ebbec8a0a2fdba7ea8113e09e21e972448d66 (patch)
treea032e307404aa3640b7b212c928df9f3d7b54dc5 /src/bootstrap/setup.rs
parent15783292e5e26336f76ddc2123d66025ec6d84b7 (diff)
parent7d3dcd918eb1f1308a1d901821ede3041d563ae9 (diff)
downloadrust-781ebbec8a0a2fdba7ea8113e09e21e972448d66.tar.gz
rust-781ebbec8a0a2fdba7ea8113e09e21e972448d66.zip
Auto merge of #115898 - onur-ozkan:config-change-tracking, r=Mark-Simulacrum
bootstrap major change detection implementation

The use of `changelog-seen` and `bootstrap/CHANGELOG.md` has not been functional in any way for many years. We often do major/breaking changes but never update the changelog file or the `changelog-seen`. This is an alternative method for tracking major or breaking changes and informing developers when such changes occur.

Example output when bootstrap detects a major change:
![image](https://github.com/rust-lang/rust/assets/39852038/ee802dfa-a02b-488b-a433-f853ce079b8a)
Diffstat (limited to 'src/bootstrap/setup.rs')
-rw-r--r--src/bootstrap/setup.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bootstrap/setup.rs b/src/bootstrap/setup.rs
index ef0234957b5..14ec33147fb 100644
--- a/src/bootstrap/setup.rs
+++ b/src/bootstrap/setup.rs
@@ -1,6 +1,6 @@
 use crate::builder::{Builder, RunConfig, ShouldRun, Step};
 use crate::Config;
-use crate::{t, VERSION};
+use crate::{t, CONFIG_CHANGE_HISTORY};
 use sha2::Digest;
 use std::env::consts::EXE_SUFFIX;
 use std::fmt::Write as _;
@@ -208,10 +208,11 @@ fn setup_config_toml(path: &PathBuf, profile: Profile, config: &Config) {
         crate::exit!(1);
     }
 
+    let latest_change_id = CONFIG_CHANGE_HISTORY.last().unwrap();
     let settings = format!(
         "# Includes one of the default files in src/bootstrap/defaults\n\
     profile = \"{profile}\"\n\
-    changelog-seen = {VERSION}\n"
+    change-id = {latest_change_id}\n"
     );
 
     t!(fs::write(path, settings));