@@ -1172,10 +1172,14 @@ struct OutputOptions {
1172
1172
/// of empty files are not created. If this is None, the output will not
1173
1173
/// be cached (such as when replaying cached messages).
1174
1174
cache_cell : Option < ( PathBuf , LazyCell < File > ) > ,
1175
- /// If `true`, display any recorded warning messages.
1176
- /// Other types of messages are processed regardless
1177
- /// of the value of this flag
1178
- show_warnings : bool ,
1175
+ /// If `true`, display any diagnostics.
1176
+ /// Other types of JSON messages are processed regardless
1177
+ /// of the value of this flag.
1178
+ ///
1179
+ /// This is used primarily for cache replay. If you build with `-vv`, the
1180
+ /// cache will be filled with diagnostics from dependencies. When the
1181
+ /// cache is replayed without `-vv`, we don't want to show them.
1182
+ show_diagnostics : bool ,
1179
1183
warnings_seen : usize ,
1180
1184
errors_seen : usize ,
1181
1185
}
@@ -1193,7 +1197,7 @@ impl OutputOptions {
1193
1197
look_for_metadata_directive,
1194
1198
color,
1195
1199
cache_cell,
1196
- show_warnings : true ,
1200
+ show_diagnostics : true ,
1197
1201
warnings_seen : 0 ,
1198
1202
errors_seen : 0 ,
1199
1203
}
@@ -1319,7 +1323,7 @@ fn on_stderr_line_inner(
1319
1323
. map ( |v| String :: from_utf8 ( v) . expect ( "utf8" ) )
1320
1324
. expect ( "strip should never fail" )
1321
1325
} ;
1322
- if options. show_warnings {
1326
+ if options. show_diagnostics {
1323
1327
count_diagnostic ( & msg. level , options) ;
1324
1328
state. emit_diag ( msg. level , rendered) ?;
1325
1329
}
@@ -1404,7 +1408,7 @@ fn on_stderr_line_inner(
1404
1408
// from the compiler, so wrap it in an external Cargo JSON message
1405
1409
// indicating which package it came from and then emit it.
1406
1410
1407
- if !options. show_warnings {
1411
+ if !options. show_diagnostics {
1408
1412
return Ok ( true ) ;
1409
1413
}
1410
1414
@@ -1438,15 +1442,15 @@ fn replay_output_cache(
1438
1442
path : PathBuf ,
1439
1443
format : MessageFormat ,
1440
1444
color : bool ,
1441
- show_warnings : bool ,
1445
+ show_diagnostics : bool ,
1442
1446
) -> Work {
1443
1447
let target = target. clone ( ) ;
1444
1448
let mut options = OutputOptions {
1445
1449
format,
1446
1450
look_for_metadata_directive : true ,
1447
1451
color,
1448
1452
cache_cell : None ,
1449
- show_warnings ,
1453
+ show_diagnostics ,
1450
1454
warnings_seen : 0 ,
1451
1455
errors_seen : 0 ,
1452
1456
} ;
0 commit comments