on master help sign in
Get rid of Reporting.Progress.Bar

With the new build implementation, you do not know exactly how many files you'll need to fully compile from the beginning. If an interface comes out the same as before, we can skip rebuilding all the transitive dependencies. So rather than show a bar of N work and then only have to do 1 thing, it seemed better to do a different visualization. (Counting up, so you can still see progress without promising some end number.)

commit319db32cf5e35b866f5338be3f891b7b7c39d9b8 authorEvan Czaplicki <evancz@users.noreply.github.com> dateTue 12 Feb 2019, 19:20 (8 years ago) parent3c02e30
1 file changed−43
builder/src/Reporting/Progress/Bar.hs−43
builder/src/Reporting/Progress/Bar.hsdeleted−43
@@ -1,43 +0,0 @@
1−{-# OPTIONS_GHC -Wall #-}
2−module Reporting.Progress.Bar
3− ( render
4− , clear
5− )
6− where
7−
8−
9−
10−-- PROGRESS BAR
11−
12−
13−width :: Float
14−width =
15− 50.0
16−
17−
18−render :: Int -> Int -> Int -> String
19−render successes failures total =
20− let
21− numDone =
22− successes + failures
23−
24− fraction =
25− fromIntegral numDone / fromIntegral total
26−
27− unitsDone =
28− truncate (fraction * width)
29−
30− unitsLeft =
31− truncate width - unitsDone
32− in
33− "\r["
34− ++ replicate unitsDone '='
35− ++ replicate unitsLeft ' '
36− ++ "] - "
37− ++ show numDone ++ " / " ++ show total
38−
39−
40−clear :: String
41−clear =
42− '\r' : replicate (length (render 49999 50000 99999)) ' ' ++ "\r"
43−