Skip to content

Commit f5a1548

Browse files
committed
pkg: Enable pkg_build_progress by default
The feature has been tested enough by the users of the dune preview build, and it is now ready to be enabled for all users by default. This commit removes the experimental pkg-build-progress flag, and the build progress output respects the display (verbosity) flag. Signed-off-by: Puneeth Chaganti <[email protected]>
1 parent 21c3e94 commit f5a1548

File tree

10 files changed

+28
-27
lines changed

10 files changed

+28
-27
lines changed

.github/workflows/multi-repo-build.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ jobs:
3333
- ubuntu-latest
3434
- macos-latest
3535
runs-on: ${{ matrix.os }}
36-
env:
37-
# TODO: Remove
38-
DUNE_CONFIG__PKG_BUILD_PROGRESS: enabled
3936
steps:
4037
- name: Checkout Dune
4138
uses: actions/checkout@v5

boot/configure.ml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ let out =
1919

2020
let default_toggles : (string * [ `Disabled | `Enabled ]) list =
2121
[ "toolchains", `Enabled
22-
; "pkg_build_progress", `Disabled
2322
; "lock_dev_tool", `Disabled
2423
; "bin_dev_tools", `Disabled
2524
; "portable_lock_dir", `Disabled
@@ -97,10 +96,6 @@ let () =
9796
, toggle "toolchains"
9897
, " Enable the toolchains behaviour, allowing dune to install the compiler in a \
9998
user-wide directory." )
100-
; ( "--pkg-build-progress"
101-
, toggle "pkg_build_progress"
102-
, " Enable the displaying of package build progress.\n\
103-
\ This flag is experimental and shouldn't be relied on by packagers." )
10499
; ( "--lock-dev-tool"
105100
, toggle "lock_dev_tool"
106101
, " Enable ocamlformat dev-tool, allows 'dune fmt' to build ocamlformat and use \

flake.nix

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@
8282
pkg:
8383
pkg.overrideAttrs {
8484
configureFlags = [
85-
"--pkg-build-progress"
86-
"enable"
8785
"--lock-dev-tool"
8886
"enable"
8987
"--portable-lock-dir"

src/dune_rules/compile_time.ml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
open Import
22

33
let toolchains = Config.make_toggle ~name:"toolchains" ~default:Setup.toolchains
4-
5-
let pkg_build_progress =
6-
Config.make_toggle ~name:"pkg_build_progress" ~default:Setup.pkg_build_progress
7-
;;
8-
94
let lock_dev_tools = Config.make_toggle ~name:"lock_dev_tool" ~default:Setup.lock_dev_tool
105
let bin_dev_tools = Config.make_toggle ~name:"bin_dev_tools" ~default:Setup.bin_dev_tools
116

src/dune_rules/compile_time.mli

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ open Import
1414
For more detail, see src/dune_rules/pkg_toolchains.mli *)
1515
val toolchains : Config.Toggle.t Config.t
1616

17-
(** Enable or disable the displaying of package build progress.
18-
For more detail, see src/dune_rules/pkg_build_progress.mli *)
19-
val pkg_build_progress : Config.Toggle.t Config.t
20-
2117
(** Enable or disable using package management to install dev tools. *)
2218
val lock_dev_tools : Config.Toggle.t Config.t
2319

src/dune_rules/pkg_build_progress.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ module Message = struct
3636
;;
3737

3838
let display t =
39-
match Config.get Compile_time.pkg_build_progress with
40-
| `Enabled -> Console.print_user_message (user_message t)
41-
| `Disabled -> ()
39+
match !Dune_engine.Clflags.display with
40+
| Quiet -> ()
41+
| Short | Verbose -> Console.print_user_message (user_message t)
4242
;;
4343

4444
let encode { package_name; package_version; status } =

src/dune_rules/pkg_build_progress.mli

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ val format_user_message
1818
the console so users can be informed about which of their
1919
project's dependencies are currently being installed.
2020
21-
The message will only print if the
22-
DUNE_CONFIG__PKG_BUILD_PROGRESS config variable is "enabled"
23-
(it's "disabled" by default). *)
21+
The action respects the display setting and will not print anything
22+
when the display setting is quiet. *)
2423
val progress_action
2524
: Package.Name.t
2625
-> Package_version.t

src/dune_rules/setup.defaults.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ let roots : string option Install.Roots.t =
1313

1414
let prefix : string option = None
1515
let toolchains = `Enabled
16-
let pkg_build_progress = `Disabled
1716
let lock_dev_tool = `Disabled
1817
let bin_dev_tools = `Disabled
1918
let portable_lock_dir = `Disabled

src/dune_rules/setup.mli

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ val library_path : string list
1111
val roots : string option Install.Roots.t
1212

1313
val toolchains : Dune_config.Config.Toggle.t
14-
val pkg_build_progress : Dune_config.Config.Toggle.t
1514
val lock_dev_tool : Dune_config.Config.Toggle.t
1615
val bin_dev_tools : Dune_config.Config.Toggle.t
1716
val portable_lock_dir : Dune_config.Config.Toggle.t
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
This test verifies the @pkg-install alias outputs the build progress when
2+
--display is short or verbose.
3+
4+
$ . ./helpers.sh
5+
6+
Add a lock file for a fake library foo:
7+
$ make_lockdir
8+
$ make_lockpkg foo <<EOF
9+
> (version 0.0.1)
10+
> EOF
11+
12+
Verify that the build progress is displayed correctly
13+
$ dune build @pkg-install --display short
14+
Building foo.0.0.1
15+
16+
$ dune clean
17+
18+
$ dune build @pkg-install --display verbose 2>&1 | grep Building
19+
Building foo.0.0.1
20+
21+
$ dune clean
22+
23+
$ dune build @pkg-install --display quiet

0 commit comments

Comments
 (0)