Skip to content

Commit

Permalink
refactor: remove unused action builder functions
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>

<!-- ps-id: e083ba7a-19b2-4e49-86a9-a10b706d83c4 -->
  • Loading branch information
rgrinberg committed Dec 18, 2023
1 parent 1f9baa2 commit e0db8b8
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 23 deletions.
10 changes: 0 additions & 10 deletions src/dune_engine/action_builder.ml
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,6 @@ let paths_matching_unit ~loc g = ignore (paths_matching ~loc g)
let dyn_paths paths = dyn_deps (paths >>| fun (x, paths) -> x, Dep.Set.of_files paths)
let dyn_paths_unit paths = dyn_deps (paths >>| fun paths -> (), Dep.Set.of_files paths)

let dyn_path_set paths =
dyn_deps (paths >>| fun (x, paths) -> x, Dep.Set.of_files_set paths)
;;

let dyn_path_set_reuse paths =
dyn_deps (paths >>| fun paths -> paths, Dep.Set.of_files_set paths)
;;

let env_var s = deps (Dep.Set.singleton (Dep.env s))

let contents =
Expand Down Expand Up @@ -259,5 +251,3 @@ let progn ts =
let open With_targets.O in
With_targets.all ts >>| Action.Full.reduce
;;

let dyn_of_memo_deps t = dyn_deps (dyn_of_memo t)
6 changes: 0 additions & 6 deletions src/dune_engine/action_builder.mli
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ val dyn_memo_deps : (Dep.Set.t * 'a) Memo.t -> 'a t
val dyn_paths : ('a * Path.t list) t -> 'a t

val dyn_paths_unit : Path.t list t -> unit t
val dyn_path_set : ('a * Path.Set.t) t -> 'a t
val dyn_path_set_reuse : Path.Set.t t -> Path.Set.t t

(** [contents path] returns a description that when run will return the contents
of the file at [path]. *)
Expand Down Expand Up @@ -148,7 +146,3 @@ val create_file : ?perm:Action.File_perm.t -> Path.Build.t -> Action.Full.t With

(** Merge a list of actions accumulating the sets of their targets. *)
val progn : Action.Full.t With_targets.t list -> Action.Full.t With_targets.t

(** A version of [dyn_of_memo] that makes it convenient to declare dynamic
action dependencies. *)
val dyn_of_memo_deps : ('a * Dep.Set.t) Memo.t t -> 'a t
2 changes: 0 additions & 2 deletions src/dune_engine/action_builder0.ml
Original file line number Diff line number Diff line change
Expand Up @@ -247,5 +247,3 @@ let of_memo_join f =
t.f mode)
}
;;

let dyn_of_memo f = f >>= of_memo
5 changes: 0 additions & 5 deletions src/dune_engine/action_builder0.mli
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@ val of_memo : 'a Memo.t -> 'a t
(** Like [of_memo] but collapses the two levels of [t]. *)
val of_memo_join : 'a t Memo.t -> 'a t

(** If you're thinking of using [Process.run] here, check that: (i) you don't in
fact need [Command.run], and that (ii) [Process.run] only reads the declared
build rule dependencies. *)
val dyn_of_memo : 'a Memo.t t -> 'a t

(** {1 Execution} *)

(** Evaluation mode.
Expand Down

0 comments on commit e0db8b8

Please sign in to comment.