@@ -14,7 +14,6 @@ use std::time::{Duration, Instant};
14
14
15
15
use build_helper:: { output, t} ;
16
16
use lazy_static:: lazy_static;
17
- use termcolor:: { ColorSpec , WriteColor } ;
18
17
19
18
use crate :: cache:: { Cache , Interned , INTERNER } ;
20
19
use crate :: check;
@@ -1568,7 +1567,6 @@ impl<'a> Builder<'a> {
1568
1567
1569
1568
let ( out, dur) = {
1570
1569
let instructions = ReplicationStep {
1571
- color : self . build . config . color ,
1572
1570
cmd : self . kind ,
1573
1571
name : step. name ( ) ,
1574
1572
path : step. path ( self ) ,
@@ -1610,7 +1608,6 @@ impl<'a> Builder<'a> {
1610
1608
}
1611
1609
1612
1610
struct ReplicationStep {
1613
- color : Color ,
1614
1611
cmd : Kind ,
1615
1612
name : & ' static str ,
1616
1613
path : PathBuf ,
@@ -1623,34 +1620,20 @@ lazy_static! {
1623
1620
}
1624
1621
1625
1622
pub ( crate ) extern "C" fn print_replication_steps ( ) {
1626
- use std:: io:: Write ;
1627
1623
if let Some ( step) = CURRENT_INSTRUCTIONS . lock ( ) . expect ( "mutex guard is dropped on panic" ) . take ( )
1628
1624
{
1629
- let mut stdout = termcolor:: StandardStream :: stdout ( step. color . into ( ) ) ;
1630
1625
// ignore errors; we're exiting anyway
1631
- let mut yellow = ColorSpec :: new ( ) ;
1632
- yellow. set_fg ( Some ( termcolor:: Color :: Yellow ) ) ;
1633
- let _ = stdout. set_color ( & yellow) ;
1634
- let _ = write ! ( stdout, "note" ) ;
1635
- let _ = stdout. reset ( ) ;
1636
- let _ = writeln ! ( stdout, ": failed while building {}" , step. name) ;
1637
-
1638
- let mut blue = ColorSpec :: new ( ) ;
1639
- blue. set_fg ( Some ( termcolor:: Color :: Blue ) ) ;
1640
- let _ = stdout. set_color ( & blue) ;
1641
- let _ = write ! ( stdout, "help" ) ;
1642
- let _ = stdout. reset ( ) ;
1643
- let _ = write ! (
1644
- stdout,
1645
- ": to replicate this failure, run `./x.py {} {} --stage {}" ,
1626
+ println ! ( "note: failed while building {}" , step. name) ;
1627
+ print ! (
1628
+ "help: to replicate this failure, run `./x.py {} {} --stage {}" ,
1646
1629
step. cmd,
1647
1630
step. path. display( ) ,
1648
1631
step. stage,
1649
1632
) ;
1650
1633
for arg in step. test_args {
1651
- let _ = write ! ( stdout , " --test-args \" {}\" " , arg) ;
1634
+ print ! ( " --test-args \" {}\" " , arg) ;
1652
1635
}
1653
- let _ = writeln ! ( stdout , "`" ) ;
1636
+ println ! ( "`" ) ;
1654
1637
}
1655
1638
}
1656
1639
0 commit comments