Skip to content

Commit

Permalink
Add the feature flag 'lock-dev-tool'
Browse files Browse the repository at this point in the history
Signed-off-by: Alpha DIALLO <[email protected]>
  • Loading branch information
moyodiallo committed Aug 29, 2024
1 parent 2462d7b commit 0918db9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
4 changes: 3 additions & 1 deletion bin/lock_dev_tool.ml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
open Dune_config
open Import

let enabled = Config.make_toggle ~name:"lock_dev_tool" ~default:`Disabled
let enabled =
Config.make_toggle ~name:"lock_dev_tool" ~default:Dune_rules.Setup.lock_dev_tool
;;

let is_enabled =
lazy
Expand Down
7 changes: 6 additions & 1 deletion boot/configure.ml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ let out =
;;

let default_toggles : (string * [ `Disabled | `Enabled ]) list =
[ "toolchains", `Disabled; "pkg_build_progress", `Disabled ]
[ "toolchains", `Disabled; "pkg_build_progress", `Disabled; "lock_dev_tool", `Disabled ]
;;

let () =
Expand Down Expand Up @@ -87,6 +87,11 @@ let () =
, Arg.Unit (toggle "pkg_build_progress")
, " Enable the displaying of package build progress.\n\
\ This flag is experimental and shouldn't be relied on by packagers." )
; ( "--enable-lock-dev-tool"
, Arg.Unit (toggle "lock_dev_tool")
, " Enable ocamlformat dev-tool, allows 'dune fmt' to build ocamlformat and use \
it, independently from the project depenedencies .\n\
\ This flag is experimental and shouldn't be relied on by packagers." )
]
in
let anon s = bad "Don't know what to do with %s" s in
Expand Down
1 change: 1 addition & 0 deletions src/dune_rules/setup.defaults.ml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ let roots : string option Install.Roots.t =

let toolchains = `Disabled
let pkg_build_progress = `Disabled
let lock_dev_tool = `Disabled
1 change: 1 addition & 0 deletions src/dune_rules/setup.mli
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ val roots : string option Install.Roots.t

val toolchains : Dune_config.Config.Toggle.t
val pkg_build_progress : Dune_config.Config.Toggle.t
val lock_dev_tool : Dune_config.Config.Toggle.t

0 comments on commit 0918db9

Please sign in to comment.