Skip to content

Commit b24083b

Browse files
committed
Add new change-id option in bootstrap.example.toml and update the change-id description references
1 parent 0244432 commit b24083b

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

bootstrap.example.toml

+3-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@
2828
# - A new option
2929
# - A change in the default values
3030
#
31-
# If `change-id` does not match the version that is currently running,
32-
# `x.py` will inform you about the changes made on bootstrap.
31+
# If the change-id does not match the version currently in use, x.py will
32+
# display the changes made to the bootstrap.
33+
# To suppress these warnings, you can set change-id = "ignore".
3334
#change-id = <latest change id in src/bootstrap/src/utils/change_tracker.rs>
3435

3536
# =============================================================================

src/bootstrap/src/bin/main.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ fn check_version(config: &Config) -> Option<String> {
163163
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");
164164
msg.push_str("NOTE: to silence this warning, ");
165165
msg.push_str(&format!(
166-
"add `change-id = {latest_change_id}` at the top of `bootstrap.toml`"
166+
"add `change-id = {latest_change_id}` or change-id = \"ignore\" at the top of `bootstrap.toml`"
167167
));
168168
return Some(msg);
169169
}
@@ -195,7 +195,7 @@ fn check_version(config: &Config) -> Option<String> {
195195

196196
msg.push_str("NOTE: to silence this warning, ");
197197
msg.push_str(&format!(
198-
"update `bootstrap.toml` to use `change-id = {latest_change_id}` instead"
198+
"update `bootstrap.toml` to use `change-id = {latest_change_id}` or change-id = \"ignore\" instead"
199199
));
200200

201201
if io::stdout().is_terminal() {

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

+5-1
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,11 @@ fn deserialize_change_id<'de, D: Deserializer<'de>>(
724724
Ok(match value {
725725
toml::Value::String(s) if s == "ignore" => Some(ChangeId::Ignore),
726726
toml::Value::Integer(i) => Some(ChangeId::Id(i as usize)),
727-
_ => return Err(serde::de::Error::custom("expected \"ignore\" or an integer")),
727+
_ => {
728+
return Err(serde::de::Error::custom(
729+
"expected \"ignore\" or an integer for change-id",
730+
));
731+
}
728732
})
729733
}
730734

src/bootstrap/src/utils/change_tracker.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,6 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
393393
ChangeInfo {
394394
change_id: 138986,
395395
severity: ChangeSeverity::Info,
396-
summary: "You can now use `change_id = \"ignore\"` to suppress `change_id` warnings in the console.",
396+
summary: "You can now use `change-id = \"ignore\"` to suppress `change-id ` warnings in the console.",
397397
},
398398
];

0 commit comments

Comments
 (0)