Revert name change
This commit is contained in:
parent
cd359538b0
commit
987d437a99
|
@ -166,7 +166,7 @@ let run ?(dir=Path.root) ?stdout_to ?env ?(extra_targets=[]) prog args =
|
|||
|
||||
module Shexp = struct
|
||||
open Future
|
||||
open User_action.Mini_shexp
|
||||
open Action.Mini_shexp
|
||||
|
||||
let run ~dir ~env ~env_extra ~stdout_to ~tail prog args =
|
||||
let stdout_to : Future.stdout_to =
|
||||
|
@ -247,9 +247,9 @@ module Shexp = struct
|
|||
exec t ~dir ~env ~env_extra:String_map.empty ~stdout_to:None ~tail:true
|
||||
end
|
||||
|
||||
let user_action action ~dir ~env ~targets =
|
||||
let action action ~dir ~env ~targets =
|
||||
prim ~targets (fun () ->
|
||||
match (action : _ User_action.t) with
|
||||
match (action : _ Action.t) with
|
||||
| Bash cmd ->
|
||||
Future.run Strict ~dir:(Path.to_string dir) ~env
|
||||
"/bin/bash" ["-e"; "-u"; "-o"; "pipefail"; "-c"; cmd]
|
||||
|
|
|
@ -64,8 +64,8 @@ val run
|
|||
-> 'a Arg_spec.t list
|
||||
-> ('a, unit) t
|
||||
|
||||
val user_action
|
||||
: string User_action.t
|
||||
val action
|
||||
: string Action.t
|
||||
-> dir:Path.t
|
||||
-> env:string array
|
||||
-> targets:Path.t list
|
||||
|
|
|
@ -1293,16 +1293,16 @@ module Gen(P : Params) = struct
|
|||
| User actions |
|
||||
+-----------------------------------------------------------------+ *)
|
||||
|
||||
module User_action_interpret : sig
|
||||
module Action_interpret : sig
|
||||
val run
|
||||
: User_action.Unexpanded.t
|
||||
: Action.Unexpanded.t
|
||||
-> dir:Path.t
|
||||
-> dep_kind:Build.lib_dep_kind
|
||||
-> targets:Path.t list
|
||||
-> deps:Dep_conf.t list
|
||||
-> (unit, unit) Build.t
|
||||
end = struct
|
||||
module U = User_action.Unexpanded
|
||||
module U = Action.Unexpanded
|
||||
|
||||
type resolved_forms =
|
||||
{ (* Mapping from ${...} forms to their resolutions *)
|
||||
|
@ -1380,7 +1380,7 @@ module Gen(P : Params) = struct
|
|||
in
|
||||
let forms = extract_artifacts ~dir t in
|
||||
let t =
|
||||
User_action.Unexpanded.expand dir t
|
||||
Action.Unexpanded.expand dir t
|
||||
~f:(expand_string_with_vars ~artifacts:forms.artifacts ~targets ~deps)
|
||||
in
|
||||
let build =
|
||||
|
@ -1390,7 +1390,7 @@ module Gen(P : Params) = struct
|
|||
>>>
|
||||
Build.paths (String_map.values forms.artifacts)
|
||||
>>>
|
||||
Build.user_action t ~dir ~env:ctx.env ~targets
|
||||
Build.action t ~dir ~env:ctx.env ~targets
|
||||
in
|
||||
match forms.failures with
|
||||
| [] -> build
|
||||
|
@ -1406,7 +1406,7 @@ module Gen(P : Params) = struct
|
|||
add_rule
|
||||
(Dep_conf_interpret.dep_of_list ~dir rule.deps
|
||||
>>>
|
||||
User_action_interpret.run
|
||||
Action_interpret.run
|
||||
rule.action
|
||||
~dir
|
||||
~dep_kind:Required
|
||||
|
@ -1420,7 +1420,7 @@ module Gen(P : Params) = struct
|
|||
let action =
|
||||
match alias_conf.action with
|
||||
| None -> Sexp.Atom "none"
|
||||
| Some a -> List [Atom "some" ; User_action.Unexpanded.sexp_of_t a] in
|
||||
| Some a -> List [Atom "some" ; Action.Unexpanded.sexp_of_t a] in
|
||||
Sexp.List [deps ; action]
|
||||
|> Sexp.to_string
|
||||
|> Digest.string
|
||||
|
@ -1435,7 +1435,7 @@ module Gen(P : Params) = struct
|
|||
| None -> deps
|
||||
| Some action ->
|
||||
deps
|
||||
>>> User_action_interpret.run
|
||||
>>> Action_interpret.run
|
||||
action
|
||||
~dir
|
||||
~dep_kind:Required
|
||||
|
|
|
@ -546,13 +546,13 @@ module Rule = struct
|
|||
type t =
|
||||
{ targets : string list (** List of files in the current directory *)
|
||||
; deps : Dep_conf.t list
|
||||
; action : User_action.Unexpanded.t
|
||||
; action : Action.Unexpanded.t
|
||||
}
|
||||
|
||||
let common =
|
||||
field "targets" (list file_in_current_dir) >>= fun targets ->
|
||||
field "deps" (list Dep_conf.t) ~default:[] >>= fun deps ->
|
||||
field "action" User_action.Unexpanded.t >>= fun action ->
|
||||
field "action" Action.Unexpanded.t >>= fun action ->
|
||||
return { targets; deps; action }
|
||||
|
||||
let v1 = record common
|
||||
|
@ -660,13 +660,13 @@ module Alias_conf = struct
|
|||
type t =
|
||||
{ name : string
|
||||
; deps : Dep_conf.t list
|
||||
; action : User_action.Unexpanded.t option
|
||||
; action : Action.Unexpanded.t option
|
||||
}
|
||||
|
||||
let common =
|
||||
field "name" string >>= fun name ->
|
||||
field "deps" (list Dep_conf.t) ~default:[] >>= fun deps ->
|
||||
field_o "action" User_action.Unexpanded.t >>= fun action ->
|
||||
field_o "action" Action.Unexpanded.t >>= fun action ->
|
||||
return
|
||||
{ name
|
||||
; deps
|
||||
|
|
Loading…
Reference in New Issue