Skip to content

Commit

Permalink
Merge pull request #5290 from sellout/transcript-stanza-counter
Browse files Browse the repository at this point in the history
Improve transcript runner output
  • Loading branch information
aryairani authored Sep 3, 2024
2 parents 3202e61 + 8137f57 commit e812c30
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions unison-cli/src/Unison/Codebase/Transcript/Runner.hs
Original file line number Diff line number Diff line change
Expand Up @@ -280,17 +280,24 @@ run isTest verbosity dir stanzas codebase runtime sbRuntime nRuntime ucmVersion
maybeStanza <- atomically (Q.tryDequeue inputQueue)
_ <- liftIO (writeIORef mStanza maybeStanza)
case maybeStanza of
Nothing -> do
liftIO (putStrLn "")
Nothing -> liftIO do
clearCurrentLine
putStrLn "\r✔️ Completed transcript."
pure $ Right QuitI
Just (s, idx) -> do
Just (s, midx) -> do
unless (Verbosity.isSilent verbosity) . liftIO $ do
clearCurrentLine
putStr $
"\r⚙️ Processing stanza "
++ show idx
++ " of "
++ show (length stanzas)
++ "."
maybe
"\r⏩ Skipping non-executable Markdown block."
( \idx ->
"\r⚙️ Processing stanza "
++ show idx
++ " of "
++ show (length stanzas)
++ "."
)
midx
IO.hFlush IO.stdout
either
( \node -> do
Expand Down

0 comments on commit e812c30

Please sign in to comment.