@@ -215,13 +215,18 @@ impl Step for ToolStateCheck {
215
215
tool, old_state, state
216
216
) ;
217
217
} 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.
218
221
eprintln ! (
219
222
"warning: Tool `{}` is not test-pass (is `{}`), \
220
223
this should be fixed before beta is branched.",
221
224
tool, state
222
225
) ;
223
226
}
224
227
}
228
+ // publish_toolstate.py will be responsible for creating
229
+ // comments/issues warning people if there is a regression.
225
230
}
226
231
}
227
232
@@ -230,7 +235,7 @@ impl Step for ToolStateCheck {
230
235
}
231
236
232
237
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) ;
234
239
}
235
240
}
236
241
@@ -373,14 +378,12 @@ fn read_old_toolstate() -> Vec<RepoState> {
373
378
///
374
379
/// * See <https://help.github.com/articles/about-commit-email-addresses/>
375
380
/// 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 ) {
379
382
let message = format ! ( "({} CI update)" , OS . expect( "linux/windows only" ) ) ;
380
383
let mut success = false ;
381
384
for _ in 1 ..=5 {
382
385
// 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) ;
384
387
385
388
// `git commit` failing means nothing to commit.
386
389
let status = t ! ( Command :: new( "git" )
@@ -429,31 +432,7 @@ fn commit_toolstate_change(current_toolstate: &ToolstateData, in_beta_week: bool
429
432
}
430
433
}
431
434
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 ) {
457
436
let commit = t ! ( std:: process:: Command :: new( "git" ) . arg( "rev-parse" ) . arg( "HEAD" ) . output( ) ) ;
458
437
let commit = t ! ( String :: from_utf8( commit. stdout) ) ;
459
438
0 commit comments