Skip to content

Commit b3f62e8

Browse files
committed
Always diagnose failures in job execution
Execution of the `MultiJobExecutor` throws a `Driver.ErrorDiagnostics.emitted` if the job was not successful, ie. it assume any errors were already emitted. Make sure to emit an error in all paths of `ExecuteJobRule.executeJob` so that failures aren't hidden.
1 parent e4a9efa commit b3f62e8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Sources/SwiftDriverExecution/MultiJobExecutor.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -655,9 +655,8 @@ class ExecuteJobRule: LLBuildRule {
655655
context.cancelBuildIfNeeded(result)
656656
value = .jobExecution(success: success)
657657
} catch {
658-
if error is DiagnosticData {
659-
context.diagnosticsEngine.emit(error)
660-
}
658+
context.diagnosticsEngine.emit(error)
659+
661660
// Only inform finished job if the job has been started, otherwise the build
662661
// system may complain about malformed output
663662
if (pendingFinish) {

0 commit comments

Comments
 (0)