Skip to content

Commit 0e1cd59

Browse files
committed
Toolstate: remove redundant beta-week check.
1 parent 2b0cfa5 commit 0e1cd59

File tree

1 file changed

+9
-30
lines changed

1 file changed

+9
-30
lines changed

src/bootstrap/toolstate.rs

Lines changed: 9 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -215,13 +215,18 @@ impl Step for ToolStateCheck {
215215
tool, old_state, state
216216
);
217217
} else {
218+
// This warning only appears in the logs, which most
219+
// people won't read. It's mostly here for testing and
220+
// debugging.
218221
eprintln!(
219222
"warning: Tool `{}` is not test-pass (is `{}`), \
220223
this should be fixed before beta is branched.",
221224
tool, state
222225
);
223226
}
224227
}
228+
// publish_toolstate.py will be responsible for creating
229+
// comments/issues warning people if there is a regression.
225230
}
226231
}
227232

@@ -230,7 +235,7 @@ impl Step for ToolStateCheck {
230235
}
231236

232237
if builder.config.channel == "nightly" && env::var_os("TOOLSTATE_PUBLISH").is_some() {
233-
commit_toolstate_change(&toolstates, in_beta_week);
238+
commit_toolstate_change(&toolstates);
234239
}
235240
}
236241

@@ -373,14 +378,12 @@ fn read_old_toolstate() -> Vec<RepoState> {
373378
///
374379
/// * See <https://help.github.com/articles/about-commit-email-addresses/>
375380
/// if a private email by GitHub is wanted.
376-
fn commit_toolstate_change(current_toolstate: &ToolstateData, in_beta_week: bool) {
377-
let old_toolstate = read_old_toolstate();
378-
381+
fn commit_toolstate_change(current_toolstate: &ToolstateData) {
379382
let message = format!("({} CI update)", OS.expect("linux/windows only"));
380383
let mut success = false;
381384
for _ in 1..=5 {
382385
// Update the toolstate results (the new commit-to-toolstate mapping) in the toolstate repo.
383-
change_toolstate(&current_toolstate, &old_toolstate, in_beta_week);
386+
change_toolstate(&current_toolstate);
384387

385388
// `git commit` failing means nothing to commit.
386389
let status = t!(Command::new("git")
@@ -429,31 +432,7 @@ fn commit_toolstate_change(current_toolstate: &ToolstateData, in_beta_week: bool
429432
}
430433
}
431434

432-
fn change_toolstate(
433-
current_toolstate: &ToolstateData,
434-
old_toolstate: &[RepoState],
435-
in_beta_week: bool,
436-
) {
437-
let mut regressed = false;
438-
for repo_state in old_toolstate {
439-
let tool = &repo_state.tool;
440-
let state = repo_state.state();
441-
let new_state = current_toolstate[tool.as_str()];
442-
443-
if new_state != state {
444-
eprintln!("The state of `{}` has changed from `{}` to `{}`", tool, state, new_state);
445-
if new_state < state {
446-
if !NIGHTLY_TOOLS.iter().any(|(name, _path)| name == tool) {
447-
regressed = true;
448-
}
449-
}
450-
}
451-
}
452-
453-
if regressed && in_beta_week {
454-
std::process::exit(1);
455-
}
456-
435+
fn change_toolstate(current_toolstate: &ToolstateData) {
457436
let commit = t!(std::process::Command::new("git").arg("rev-parse").arg("HEAD").output());
458437
let commit = t!(String::from_utf8(commit.stdout));
459438

0 commit comments

Comments
 (0)