diff --git a/bootstrap.example.toml b/bootstrap.example.toml index caffe1a9371..2a98821f225 100644 --- a/bootstrap.example.toml +++ b/bootstrap.example.toml @@ -28,8 +28,9 @@ # - A new option # - A change in the default values # -# If `change-id` does not match the version that is currently running, -# `x.py` will inform you about the changes made on bootstrap. +# If the change-id does not match the version currently in use, x.py will +# display the changes made to the bootstrap. +# To suppress these warnings, you can set change-id = "ignore". #change-id = # ============================================================================= diff --git a/src/bootstrap/src/bin/main.rs b/src/bootstrap/src/bin/main.rs index 5df9902a977..7ec3140c038 100644 --- a/src/bootstrap/src/bin/main.rs +++ b/src/bootstrap/src/bin/main.rs @@ -163,7 +163,7 @@ fn check_version(config: &Config) -> Option { msg.push_str("WARNING: The `change-id` is missing in the `bootstrap.toml`. This means that you will not be able to track the major changes made to the bootstrap configurations.\n"); msg.push_str("NOTE: to silence this warning, "); msg.push_str(&format!( - "add `change-id = {latest_change_id}` at the top of `bootstrap.toml`" + "add `change-id = {latest_change_id}` or change-id = \"ignore\" at the top of `bootstrap.toml`" )); return Some(msg); } @@ -195,7 +195,7 @@ fn check_version(config: &Config) -> Option { msg.push_str("NOTE: to silence this warning, "); msg.push_str(&format!( - "update `bootstrap.toml` to use `change-id = {latest_change_id}` instead" + "update `bootstrap.toml` to use `change-id = {latest_change_id}` or change-id = \"ignore\" instead" )); if io::stdout().is_terminal() { diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs index 96316d4d0fd..bbb0fbfbb93 100644 --- a/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs @@ -724,7 +724,11 @@ fn deserialize_change_id<'de, D: Deserializer<'de>>( Ok(match value { toml::Value::String(s) if s == "ignore" => Some(ChangeId::Ignore), toml::Value::Integer(i) => Some(ChangeId::Id(i as usize)), - _ => return Err(serde::de::Error::custom("expected \"ignore\" or an integer")), + _ => { + return Err(serde::de::Error::custom( + "expected \"ignore\" or an integer for change-id", + )); + } }) } diff --git a/src/bootstrap/src/utils/change_tracker.rs b/src/bootstrap/src/utils/change_tracker.rs index 78887a42a00..5314141dd1b 100644 --- a/src/bootstrap/src/utils/change_tracker.rs +++ b/src/bootstrap/src/utils/change_tracker.rs @@ -393,6 +393,6 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[ ChangeInfo { change_id: 138986, severity: ChangeSeverity::Info, - summary: "You can now use `change_id = \"ignore\"` to suppress `change_id` warnings in the console.", + summary: "You can now use `change-id = \"ignore\"` to suppress `change-id ` warnings in the console.", }, ];