Skip to content

Commit 9b7b640

Browse files
committed
Another exiter
1 parent 5395c42 commit 9b7b640

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/Compiler/Driver/ParseAndCheckInputs.fs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -750,21 +750,14 @@ let ParseInputFiles
750750
let sourceFiles = isLastCompiland |> List.zip sourceFiles |> Array.ofList
751751

752752
if tcConfig.concurrentBuild then
753-
let mutable exitCode = 0
754-
755-
let delayedExiter =
756-
{ new Exiter with
757-
member _.Exit n =
758-
exitCode <- n
759-
raise StopProcessing
760-
}
753+
let exiter = DiagnosticsLogger.QuitProcessExiter
761754

762755
// Check input files and create delayed error loggers before we try to parallel parse.
763756
let delayedDiagnosticsLoggers =
764757
sourceFiles
765758
|> Array.map (fun (fileName, _) ->
766759
checkInputFile tcConfig fileName
767-
createDiagnosticsLogger (delayedExiter))
760+
createDiagnosticsLogger exiter)
768761

769762
let results =
770763
try
@@ -790,7 +783,7 @@ let ParseInputFiles
790783
delayedDiagnosticsLoggers
791784
|> Array.iter (fun delayedDiagnosticsLogger -> delayedDiagnosticsLogger.CommitDelayedDiagnostics diagnosticsLogger)
792785
with StopProcessing ->
793-
exiter.Exit exitCode
786+
exiter.Exit 0
794787

795788
results |> List.ofArray
796789
else

0 commit comments

Comments
 (0)