Skip to content

Commit

Permalink
refactor: move Dune_util.Value (#7585)
Browse files Browse the repository at this point in the history
Move the [Value] module to [Dune_lang]. Logically this represents values
that may be expanded by our percent forms so it belongs to the frontend.

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
  • Loading branch information
rgrinberg authored Apr 19, 2023
1 parent 4c83fce commit a04e838
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion boot/libs.ml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ let local_libraries =
; ("otherlibs/dune-glob/src", Some "Dune_glob", false, None)
; ("otherlibs/xdg", Some "Xdg", false, None)
; ("otherlibs/dune-rpc/private", Some "Dune_rpc_private", false, None)
; ("src/dune_lang", Some "Dune_lang", false, None)
; ("vendor/build_path_prefix_map/src", Some "Build_path_prefix_map", false,
None)
; ("src/dune_config", Some "Dune_config", false, None)
; ("src/dune_util", Some "Dune_util", false, None)
; ("src/dune_lang", Some "Dune_lang", false, None)
; ("src/fiber_util", Some "Fiber_util", false, None)
; ("src/dune_cache_storage", Some "Dune_cache_storage", false, None)
; ("src/dune_cache", Some "Dune_cache", false, None)
Expand Down
1 change: 0 additions & 1 deletion src/dune_lang/dune
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
stdune
dune_glob
dune_rpc_private
dune_util
memo
ocaml
ordering
Expand Down
1 change: 1 addition & 0 deletions src/dune_lang/dune_lang.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ module String_with_vars = String_with_vars
module Pform = Pform
module Action = Action
module Dune_file_script = Dune_file_script
module Value = Value
1 change: 0 additions & 1 deletion src/dune_lang/string_with_vars.ml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
open Stdune
open Dune_sexp
open Dune_util

type part =
| Text of string
Expand Down
1 change: 0 additions & 1 deletion src/dune_lang/string_with_vars.mli
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

open Stdune
open Dune_sexp
open Dune_util

(** A sequence of text and variables. *)
type t
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions src/dune_rules/dep_conf_eval.ml
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ and named_paths_builder ~expander l =
Pform.Map.set bindings (Var (User_var name))
(Expander.Deps.Without
(let+ paths = Memo.Lazy.force x in
Dune_util.Value.L.paths (List.concat paths)))
Value.L.paths (List.concat paths)))
in
let x =
let open Action_builder.O in
Expand All @@ -247,7 +247,7 @@ and named_paths_builder ~expander l =
Pform.Map.set bindings (Var (User_var name))
(Expander.Deps.With
(let+ paths = x in
Dune_util.Value.L.paths paths))
Value.L.paths paths))
in
(x :: builders, bindings)))
in
Expand All @@ -261,7 +261,7 @@ let named ~expander l =
let builder, bindings = named_paths_builder ~expander l in
let builder =
let+ paths = builder in
Dune_util.Value.L.paths paths
Value.L.paths paths
in
let builder =
Action_builder.memoize ~cutoff:(List.equal Value.equal) "deps" builder
Expand Down
2 changes: 1 addition & 1 deletion src/dune_rules/import.ml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ module Log = Log
module Persistent = Persistent
module Stringlike = Stringlike
module Stringlike_intf = Stringlike_intf
module Value = Value
include Dune_config_file

include struct
Expand Down Expand Up @@ -51,4 +50,5 @@ module Glob = Dune_lang.Glob
module Diff = Dune_lang.Action.Diff
module Outputs = Dune_lang.Action.Outputs
module Syntax = Dune_sexp.Syntax
module Value = Dune_lang.Value
include Dune_engine.No_io
1 change: 0 additions & 1 deletion src/dune_util/dune_util.ml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ module Persistent = Persistent
module Report_error = Report_error
module Stringlike = Stringlike
module Stringlike_intf = Stringlike_intf
module Value = Value
module Build_path_prefix_map = Build_path_prefix_map0
module Flock = Flock
module Global_lock = Global_lock
Expand Down

0 comments on commit a04e838

Please sign in to comment.