File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,9 @@ Release notes:
6
6
7
7
* Further to the release notes for Stack 2.3.1, the ` -static ` suffix has been
8
8
removed from the statically linked Linux/x86_64 binaries.
9
+ * The build progress line gets ellipsized in order to fit one terminal line
10
+ matching cargo behavior and preventing logSticky spam on narrow
11
+ terminals and lots of dependencies building simultaneously
9
12
10
13
** Changes since v2.11.1:**
11
14
Original file line number Diff line number Diff line change @@ -785,6 +785,7 @@ executePlan' installedMap0 targets plan ee@ExecuteEnv {..} = do
785
785
let keepGoing =
786
786
fromMaybe (not (Map. null (planFinals plan))) (boptsKeepGoing eeBuildOpts)
787
787
terminal <- view terminalL
788
+ terminalWidth <- view termWidthL
788
789
errs <- liftIO $ runActions threads keepGoing actions $
789
790
\ doneVar actionsVar -> do
790
791
let total = length actions
@@ -803,10 +804,16 @@ executePlan' installedMap0 targets plan ee@ExecuteEnv {..} = do
803
804
" : "
804
805
: L. intersperse " , "
805
806
(map (fromString . packageNameString) names)
807
+ progressLine prev' total' =
808
+ " Progress " <> display prev' <> " /" <> display total' <>
809
+ nowBuilding packageNames
810
+ ellipsize n text =
811
+ if T. length text <= n
812
+ then text
813
+ else T. take (n - 1 ) text <> " …"
806
814
when terminal $ run $
807
- logSticky $
808
- " Progress " <> display prev <> " /" <> display total <>
809
- nowBuilding packageNames
815
+ logSticky $ display $ ellipsize terminalWidth $
816
+ utf8BuilderToText $ progressLine prev total
810
817
done <- atomically $ do
811
818
done <- readTVar doneVar
812
819
check $ done /= prev
You can’t perform that action at this time.
0 commit comments