module Action:sig..end
An action determines how to output a list of build products from a list of existing input products using a sequence of commands.
Given a notion of product identity (e.g. hash, timestamp, etc.) an action defines a pure function from its input to its outputs, it is assumed that identical inputs yield identical outputs.
In order to be productive it is important to understand the following terminology. With respect to a project:
Assemblage.Conf.root_dir
hierarchy.A build driver is an assemblage driver that given a specification of the project's products yielded by a configuration ensures that all the products exists and are up-to-date according to the project's actions.
FIXME. The following need to clarified
Assemblage.Part.file uses empty outputs and empty inputs. This allows
Assemblage.Dir which works on products regardless (i.e., input and
output) to be made aware of their existence.Assemblage.Run use build actions but they are not build per se as we
run the command inconditionally.ocamldep, gcc -MD -MP, etc.type t
val v : ?log:string ->
?ctx:Assemblage.Ctx.t ->
?inputs:Assemblage.Path.t list ->
?outputs:Assemblage.Path.t list ->
Assemblage.Acmd.t list -> tv ctx inputs outputs cmds is the action that given the
existence of inputs creates outputs using the sequence of
command cmds. ctx defaults to Ctx.empty, inputs and
outputs to the empty list. log is a high-level logging
string about the action that may be used by drivers when the
action is invoked.
Warning. To ensure determinism and parallelism correctness cmds
must ensure that it only reads from the inputs and solely writes to
outputs.
val ctx : t -> Assemblage.Ctx.tctx a is a's context.val inputs : t -> Assemblage.Path.t listinputs a is the list of products input by a's action.val outputs : t -> Assemblage.Path.t listoutputs a is the list of products output by a's action.val cmds : t -> Assemblage.Acmd.t listcmds a is a's commands to generate outputs from the inputs.val log : t -> string optionlog a is a's high-level logging string (if any).val products : t -> Assemblage.Path.t listproducts a is inputs a @ outputs a but tail recursive.val symlink : (Assemblage.Path.t -> Assemblage.Path.t -> t)
Assemblage.Conf.value
val list_inputs : t list -> Assemblage.Path.t listlist_inputs l is the list of inputs of the actions in l.
Ordered but may contain duplicates.val list_outputs : t list -> Assemblage.Path.t listlist_outputs l is the list of outputs of the actions in l.
Ordered but may contain duplicates.val list_products : t list -> Assemblage.Path.t listlist_products l is list_inputs l @ list_outputs l
but tail-recursive.