diff options
| -rw-r--r-- | src/bootstrap/src/bin/main.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/bootstrap/src/bin/main.rs b/src/bootstrap/src/bin/main.rs index 0a6072ae1a5..1cbe3991abf 100644 --- a/src/bootstrap/src/bin/main.rs +++ b/src/bootstrap/src/bin/main.rs @@ -109,11 +109,19 @@ fn check_version(config: &Config) -> Option<String> { } let latest_config_id = CONFIG_CHANGE_HISTORY.last().unwrap(); + let warned_id_path = config.out.join("bootstrap").join(".last-warned-change-id"); + if let Some(id) = config.change_id { if &id == latest_config_id { return None; } + if let Ok(last_warned_id) = fs::read_to_string(&warned_id_path) { + if id.to_string() == last_warned_id { + return None; + } + } + let change_links: Vec<String> = find_recent_config_change_ids(id) .iter() .map(|id| format!("https://github.com/rust-lang/rust/pull/{id}")) @@ -132,6 +140,8 @@ fn check_version(config: &Config) -> Option<String> { msg.push_str(&format!( "update `config.toml` to use `change-id = {latest_config_id}` instead" )); + + t!(fs::write(warned_id_path, id.to_string())); } } else { msg.push_str("WARNING: The `change-id` is missing in the `config.toml`. This means that you will not be able to track the major changes made to the bootstrap configurations.\n"); |
