summaryrefslogtreecommitdiff
path: root/Omni
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2025-11-14 15:35:03 -0500
committerBen Sima <ben@bsima.me>2025-11-14 15:35:03 -0500
commit214c13a88550cc981b59dd45f564390f2b965940 (patch)
tree97c1cb8e3d92120160bdcad7d98921a3988f124a /Omni
parent2440b88782e08f3411c7425d6fe496990d68ce9c (diff)
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
Diffstat (limited to 'Omni')
-rw-r--r--Omni/Log/Concurrent.hs8
1 files changed, 3 insertions, 5 deletions
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