@@ -322,10 +322,19 @@ final class LLBuildProgressTracker: LLBuildBuildSystemDelegate, SwiftCompilerOut
322
322
self . observabilityScope. emit ( . multipleProducers( output: output, commands: commands) )
323
323
}
324
324
325
- func commandProcessStarted( _ command: SPMLLBuild . Command , process: ProcessHandle ) { }
325
+ func commandProcessStarted( _ command: SPMLLBuild . Command , process: ProcessHandle ) {
326
+ self . queue. async {
327
+ self . outputStream. send ( " EXTRA VERBOSE COMMAND STARTED \( process. hashValue) for \( command. verboseDescription) \n " )
328
+ self . outputStream. flush ( )
329
+ }
330
+ }
326
331
327
332
func commandProcessHadError( _ command: SPMLLBuild . Command , process: ProcessHandle , message: String ) {
328
333
self . observabilityScope. emit ( . commandError( command: command, message: message) )
334
+ self . queue. sync {
335
+ self . outputStream. send ( " EXTRA VERBOSE PROCESS \( process. hashValue) HAD ERROR of \( message) \n " )
336
+ self . outputStream. flush ( )
337
+ }
329
338
}
330
339
331
340
func commandProcessHadOutput( _ command: SPMLLBuild . Command , process: ProcessHandle , data: [ UInt8 ] ) {
@@ -345,18 +354,17 @@ final class LLBuildProgressTracker: LLBuildBuildSystemDelegate, SwiftCompilerOut
345
354
process: ProcessHandle ,
346
355
result: CommandExtendedResult
347
356
) {
348
- // FIXME: This should really happen at the command-level and is just a stopgap measure.
349
- let shouldFilterOutput = !self . logLevel. isVerbose && command. verboseDescription. hasPrefix ( " codesign " ) && result
350
- . result != . failed
351
-
352
357
let commandName = command. name
353
358
354
359
self . queue. async {
355
- if let buffer = self . nonSwiftMessageBuffers [ commandName] , !shouldFilterOutput {
360
+ if let buffer = self . nonSwiftMessageBuffers [ commandName] {
356
361
self . progressAnimation. clear ( )
357
- self . outputStream. send ( buffer)
362
+ self . outputStream. send ( " EXTRA VERBOSE COMMAND FINISHED \( process . hashValue ) EXIT \( result . exitStatus ) for \( command . verboseDescription ) with \( buffer) \n " )
358
363
self . outputStream. flush ( )
359
364
self . nonSwiftMessageBuffers [ commandName] = nil
365
+ } else {
366
+ self . outputStream. send ( " EXTRA VERBOSE COMMAND FINISHED \( process. hashValue) EXIT \( result. exitStatus) for \( command. verboseDescription) \n " )
367
+ self . outputStream. flush ( )
360
368
}
361
369
}
362
370
@@ -474,6 +482,10 @@ final class LLBuildProgressTracker: LLBuildBuildSystemDelegate, SwiftCompilerOut
474
482
let message = ( error as? LocalizedError ) ? . errorDescription ?? error. localizedDescription
475
483
self . observabilityScope. emit ( . swiftCompilerOutputParsingError( message) )
476
484
self . hadCommandFailure ( )
485
+ self . queue. sync {
486
+ self . outputStream. send ( " EXTRA VERBOSE PARSER FAILURE for \( parser. targetName) of \( message) \n " )
487
+ self . outputStream. flush ( )
488
+ }
477
489
}
478
490
479
491
func buildStart( configuration: BuildConfiguration ) {
@@ -634,8 +646,15 @@ extension SwiftCompilerMessage {
634
646
fileprivate var verboseProgressText : String ? {
635
647
switch kind {
636
648
case . began( let info) :
637
- ( [ info. commandExecutable] + info. commandArguments) . joined ( separator: " " )
638
- case . skipped, . finished, . abnormal, . signalled, . unparsableOutput:
649
+ " EXTRA VERBOSE STARTED \( info. pid) for \( ( [ info. commandExecutable] + info. commandArguments) . joined ( separator: " " ) ) "
650
+ case . finished( let info) :
651
+ " EXTRA VERBOSE FINISHED \( info. pid) with \( info. output ?? " no output " ) "
652
+ case . abnormal( let info) ,
653
+ . signalled( let info) :
654
+ " EXTRA VERBOSE FAILED \( info. pid) with \( info. output ?? " no output " ) "
655
+ case . unparsableOutput( let output) :
656
+ " EXTRA VERBOSE UNPARSABLE with \( output) "
657
+ case . skipped:
639
658
nil
640
659
}
641
660
}
0 commit comments