diff options
Diffstat (limited to 'Omni/Bild.hs')
| -rwxr-xr-x | Omni/Bild.hs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Omni/Bild.hs b/Omni/Bild.hs index 704a47d..90f6cd6 100755 --- a/Omni/Bild.hs +++ b/Omni/Bild.hs @@ -955,13 +955,14 @@ build :: Bool -> Bool -> Int -> Int -> Analysis -> IO [Exit.ExitCode] build andTest loud jobs cpus analysis = do root <- Env.getEnv "CODEROOT" let targets = Map.elems analysis - LogC.withLineManager jobs <| \lineMgr -> do - results <- mapConcurrentlyBounded jobs (buildTarget lineMgr root) targets + let namespaces = map (\Target {..} -> namespace) targets + LogC.withLineManager namespaces <| \lineMgr -> do + LogC.initializeLines lineMgr + results <- mapConcurrentlyBounded jobs (buildTarget root) targets pure (map fst results) where - buildTarget :: LogC.LineManager -> FilePath -> Target -> IO (Exit.ExitCode, ByteString) - buildTarget lineMgr root target@Target {..} = do - _ <- LogC.reserveLine lineMgr namespace + buildTarget :: FilePath -> Target -> IO (Exit.ExitCode, ByteString) + buildTarget root target@Target {..} = do result <- case compiler of CPython -> case out of Just _ -> @@ -1011,7 +1012,7 @@ build andTest loud jobs cpus analysis = do nixBuild loud jobs cpus target Sbcl -> proc loud namespace (toNixFlag compiler) compilerFlags - LogC.releaseCurrentLine namespace (isSuccess (fst result) ?: (LogC.Success, LogC.Failed)) + LogC.updateLineState namespace (isSuccess (fst result) ?: (LogC.Success, LogC.Failed)) pure result data Proc = Proc @@ -1096,7 +1097,7 @@ logs ns src = .> decodeUtf8 .> Text.take (columns - 1) .> (<> "…") - .> LogC.updateCurrentLine ns + .> LogC.updateLine ns .> liftIO ) .| Conduit.foldC |
