From 214c13a88550cc981b59dd45f564390f2b965940 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Fri, 14 Nov 2025 15:35:03 -0500 Subject: Fix blank lines in parallel build output - Remove initial blank line before build starts - Remove trailing blank line after build completes - Remove newlines from status indicators in releaseLine - Status lines now stay on their reserved lines without extra spacing --- Omni/Log/Concurrent.hs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'Omni/Log') diff --git a/Omni/Log/Concurrent.hs b/Omni/Log/Concurrent.hs index 47e9404..4ed8f42 100644 --- a/Omni/Log/Concurrent.hs +++ b/Omni/Log/Concurrent.hs @@ -71,7 +71,6 @@ withLineManager maxLines action = do writeIORef namespaceLines Map.empty pure result else do - IO.hPutStrLn IO.stderr "" replicateM_ maxLines (IO.hPutStrLn IO.stderr "") ANSI.hCursorUp IO.stderr maxLines @@ -90,7 +89,6 @@ withLineManager maxLines action = do result <- action mgr ANSI.hCursorDown IO.stderr maxLines - IO.hPutStrLn IO.stderr "" writeIORef currentLineManager Nothing writeIORef namespaceLines Map.empty pure result @@ -189,11 +187,11 @@ releaseLine LineManager {..} mLineNum ns buildState = let nsText = Text.pack (Namespace.toPath ns) case buildState of Success -> - Rainbow.hPutChunks IO.stderr [fore green <| chunk <| "[✓] " <> nsText <> "\n"] + Rainbow.hPutChunks IO.stderr [fore green <| chunk <| "[✓] " <> nsText] Failed -> - Rainbow.hPutChunks IO.stderr [fore red <| chunk <| "[x] " <> nsText <> "\n"] + Rainbow.hPutChunks IO.stderr [fore red <| chunk <| "[x] " <> nsText] Building -> - IO.hPutStr IO.stderr (Text.unpack <| "[~] " <> nsText <> "\n") + IO.hPutStr IO.stderr (Text.unpack <| "[~] " <> nsText) IO.hFlush IO.stderr ANSI.hRestoreCursor IO.stderr -- cgit v1.2.3