Open Kleidukos opened 1 year ago
I was thinking about a progress bar like that for cabal update
: it’s killing me how it just freezes for a minute not saying anything! Build at least shows something… But yeah, that would be nice to have for build too.
Ah yeah I understand the frustration. :)
Just thinking: we probably want to show progress through packages and also progress within a package. I think that's not too bad as you can just subdivide the progress bar for each package and then subdivide those for each module (say). That should work with parallelism also.
An alternative to a progress bar is a display of job counts <completed>/<in-progress>/<todo>
, which also has the advantage of showing how many jobs are in progress, which can be nice to see. This probably fails for single-package progress, though.
I have been asked for some time now if
cabal build
could display loading indicators like other project managers do.The ideal would be to have such a result:
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) which we can easily vendor since it's quite stable and very small.