@@ -190,11 +190,10 @@ impl<'a> JobQueue<'a> {
190
190
// bar we'll need to probably capture the stderr of rustc and
191
191
// capture compiler error messages, but that also means
192
192
// reproducing rustc's styling of error messages which is
193
- // currently a pretty big task. This is issue #5695. Note that
194
- // when reenabling it'd also probably be good to fix #5697 while
195
- // we're at it.
193
+ // currently a pretty big task. This is issue #5695.
196
194
let mut error = None ;
197
195
let mut progress = Progress :: with_style ( "Building" , ProgressStyle :: Ratio , cx. bcx . config ) ;
196
+ let mut progress_maybe_changed = true ; // avoid flickering due to build script
198
197
if !cx. bcx . config . cli_unstable ( ) . compile_progress {
199
198
progress. disable ( ) ;
200
199
}
@@ -242,14 +241,23 @@ impl<'a> JobQueue<'a> {
242
241
// to the jobserver itself.
243
242
tokens. truncate ( self . active . len ( ) - 1 ) ;
244
243
245
- let count = total - self . queue . len ( ) ;
246
- let active_names = self . active . iter ( ) . map ( |key| match key. mode {
247
- CompileMode :: Doc { .. } => format ! ( "{}(doc)" , key. pkg. name( ) ) ,
248
- _ => key. pkg . name ( ) . to_string ( ) ,
249
- } ) . collect :: < Vec < _ > > ( ) ;
250
- drop ( progress. tick_now ( count, total, & format ! ( ": {}" , active_names. join( ", " ) ) ) ) ;
244
+ if progress_maybe_changed {
245
+ let count = total - self . queue . len ( ) ;
246
+ let active_names = self . active . iter ( ) . map ( |key| match key. mode {
247
+ CompileMode :: Doc { .. } => format ! ( "{}(doc)" , key. pkg. name( ) ) ,
248
+ _ => key. pkg . name ( ) . to_string ( ) ,
249
+ } ) . collect :: < Vec < _ > > ( ) ;
250
+ drop ( progress. tick_now ( count, total, & format ! ( ": {}" , active_names. join( ", " ) ) ) ) ;
251
+ }
251
252
let event = self . rx . recv ( ) . unwrap ( ) ;
252
- progress. clear ( ) ;
253
+
254
+ progress_maybe_changed = match event {
255
+ Message :: Stdout ( _) | Message :: Stderr ( _) => cx. bcx . config . extra_verbose ( ) ,
256
+ _ => true ,
257
+ } ;
258
+ if progress_maybe_changed {
259
+ progress. clear ( ) ;
260
+ }
253
261
254
262
match event {
255
263
Message :: Run ( cmd) => {
0 commit comments