summaryrefslogtreecommitdiff
path: root/Omni/Log
diff options
context:
space:
mode:
authorBen Sima <ben@bensima.com>2025-11-26 16:45:41 -0500
committerBen Sima <ben@bensima.com>2025-11-26 16:45:41 -0500
commit0fa8ed4689022cb213de9cfb88a10841c7a03935 (patch)
tree42c564d8e17e9998ebab912b0adc75a9d9867b08 /Omni/Log
parent4082065308d9e7c4c8c2286c08e475ba64ce6a03 (diff)
Unify LineManager for analyze and build phases
- Create single LineManager in move() that spans both phases - Reserve N lines upfront for N build targets - Status progression: [.] pending -> [+] analyzing -> [~] building -> [✓]/[x] done - Remove duplicate LineManager creation from analyzeAll and build - Update both SingleLine and MultiLine modes with proper symbols This fixes the issue where only one line was reserved during analysis and status lines were being duplicated instead of overwritten.
Diffstat (limited to 'Omni/Log')
-rw-r--r--Omni/Log/Concurrent.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Omni/Log/Concurrent.hs b/Omni/Log/Concurrent.hs
index 93f90c1..6dc7297 100644
--- a/Omni/Log/Concurrent.hs
+++ b/Omni/Log/Concurrent.hs
@@ -124,7 +124,7 @@ initializeLines LineManager {..} = do
ANSI.hSetCursorColumn IO.stderr 0
ANSI.hClearLine IO.stderr
let nsText = Text.pack (Namespace.toPath ns)
- let msg = "[+] " <> nsText
+ let msg = "[.] " <> nsText -- Pending state before analysis starts
let truncated = truncateToWidth (tiWidth lmTermInfo - 1) msg
IO.hPutStrLn IO.stderr (Text.unpack truncated)
IO.hFlush IO.stderr
@@ -196,7 +196,9 @@ updateLineState ns buildState = do
let (symbol, color) = case buildState of
Success -> ("✓", green)
Failed -> ("x", red)
- _ -> ("~", white)
+ Analyzing -> ("+", white)
+ Pending -> (".", white)
+ Building -> ("~", white)
let msg = "[" <> symbol <> "] " <> nsText
let truncated = truncateToWidth (tiWidth lmTermInfo - 1) msg