1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-12 04:43:18 +03:00
juvix/app/Commands/Typecheck.hs
Jan Mas Rovira eb00fa48ba
Improve compilation progress log (#2969)
- Closes #2797 

Changes:

1. The global flag `--dev-show-thread-ids` is now properly being passed.
Before it was ignored.
3. The progress log has been refactored out of the `ParallelTemplate`
into the `Pipeline.Driver`. With the extra information available, I've
improved how we display the progress log:
1. We show `Compiling`, `Recompiling`, `Loading` to tell if the module
is compiled for the first time (the jvo is missing), or it needs to be
recompiled (with the reason displayed in parentheses), or is loaded from
a jvo file. In the latter case, the message is only showed with
`--log-level verbose|debug`.
2. The modules in other packages are displayed as dependencies with
their own progress counter.
2. When using `-N 1` and compiling a whole project we also get progress
log.

Example screencast:


https://github.com/user-attachments/assets/7cc43cd4-9b23-4ad5-a863-832abacc1b6c
2024-08-30 00:10:13 +02:00

12 lines
426 B
Haskell

module Commands.Typecheck where
import Commands.Base
import Commands.Typecheck.Options
runCommand :: (Members AppEffects r) => TypecheckOptions -> Sem r ()
runCommand localOpts = do
case localOpts ^. typecheckInputFile of
Just inputFile -> void (runPipelineNoOptions (Just inputFile) upToCoreTypecheck)
Nothing -> void (runPipelineOptions . runPipelineSetup $ processProject)
logInfo "Well done! It type checks"