…for compiling library without dependencies (when you develop the dependencies are usually already built, you just recompile parts):
…for compiling & installing packages, usually everything.
opened 05:48PM - 08 May 23 UTC
type: RFC
I have been asked for some time now if `cabal build` could display loading indic… ators like other project managers do.
The ideal would be to have such a result:
```
❯ cabal build Cabal
Build profile: -w ghc-9.4.4 -O1
In order, the following will be built (use -v for more details):
- Cabal-syntax-3.11.0.0 (lib) (first run)
- Cabal-3.11.0.0 (lib) (first run)
Configuring library for Cabal-syntax-3.11.0.0..
Preprocessing library for Cabal-syntax-3.11.0.0..
Building library for Cabal-syntax-3.11.0.0..
[ 1 of 137] Compiling Distribution.Compat.Binary ( src/Distribution/Compat/Binary.hs, /home/hecate/Contrib/cabal/dist-newstyle/build/x86_64-linux/ghc-9.4.4/Cabal-syntax-3.11.0.0/build/Distribution/Compat/Binary.o, /home/hecate/Contrib/cabal/dist-newstyle/build/x86_64-linux/ghc-9.4.4/Cabal-syntax-3.11.0.0/build/Distribution/Compat/Binary.dyn_o )
[ 2 of 137] Compiling Distribution.Compat.Exception ( src/Distribution/Compat/Exception.hs, /home/hecate/Contrib/cabal/dist-newstyle/build/x86_64-linux/ghc-9.4.4/Cabal-syntax-3.11.0.0/build/Distribution/Compat/Exception.o, /home/hecate/Contrib/cabal/dist-newstyle/build/x86_64-linux/ghc-9.4.4/Cabal-syntax-3.11.0.0/build/Distribution/Compat/Exception.dyn_o )
[ 3 of 137] Compiling Distribution.Compat.MonadFail ( src/Distribution/Compat/MonadFail.hs, /home/hecate/Contrib/cabal/dist-newstyle/build/x86_64-linux/ghc-9.4.4/Cabal-syntax-3.11.0.0/build/Distribution/Compat/MonadFail.o, /home/hecate/Contrib/cabal/dist-newstyle/build/x86_64-linux/ghc-9.4.4/Cabal-syntax-3.11.0.0/build/Distribution/Compat/MonadFail.dyn_o )
Progress: [ 2%] [##..................................................................................................]
```
Personally I think it would be a nice breeze of fresh air, and perhaps also the opportunity to declutter the default output. The current output could be still made available if the terminal declares not to support ANSI or be "tty".
---
## Implementation
There is a library that implements such spinners ([spin](https://github.com/alexanderGugel/spin)) which we can easily vendor since it's quite stable and very small.
What do you think?
23 Likes
Is this getting accepted and will be available in releases? Excited to try this!
Here’s the implementation:
What now needs to be done is connecting it to cabal and let cabal get the events (first/next module compilation started, component completely compiled).
REQUEST FOR CONTRIBUTIONS!
=> Adding loading indicators to the build command · Issue #8943 · haskell/cabal · GitHub
1 Like
Axman6
October 31, 2026, 1:51am
5
This looks really cool. I’ve wanted a nix-output-monitor style view of building with Cabal for ages, any idea how hard that’d be? I saw in the github thread mention of GHC outputting JSON, I assume for similar reasons as nix for tools like NOM to consume.
I’d cosign something like this for cabal-install. It’s nice to have nice things.
2 Likes