@@ -183,7 +183,33 @@ val target :
183183 ?on_success_activate : user_target list ->
184184 ?tags : string list ->
185185 string -> user_target
186- (* * Create a new target. *)
186+ (* * Construct a new target, the node of a workflow graph. The main
187+ argument (the [string]) is its name, then all optional arguments mean:
188+
189+ - [?active]: whether this target should be started by the engine or
190+ wait to be ativated by a dependency machanism or alike (default:
191+ [false]). Usual workflows should not set this value since
192+ the function {!Ketrew.Cliean.submit} will activate the toplevel
193+ target automatically.
194+ - [?depends_on]: list of dependencies of the target.
195+ - [?make]: the build-process used to “build” the target; where the
196+ computation happens.
197+ - [?done_when]: the condition that the target ensures (checked
198+ before potentially running and after running).
199+ - [?metadata]: arbitrary metadata to attach to the target.
200+ - [?product]: the {!user_artifact} that the target embeds (returned
201+ by the [#product] method of the target).
202+ - [?equivalence]: how to tell if two targets are equivalent (and
203+ then will be merged by the engine). The default is
204+ [`Same_active_condition] which means that if two targets have the
205+ same non-[None] [?done_when] argument they will be considered
206+ equivalent (i.e. they try to “ensure the same condition”).
207+ - [?on_failure_activate]: targets to activate when this target fails.
208+ - [?on_success_activate]: targets to activate when this target succeeds.
209+ - [?tags]: arbitrary tags to add to the target (e.g. for
210+ search/filter in the UI)
211+
212+ *)
187213
188214val file_target :
189215 ?depends_on : user_target list ->
@@ -197,7 +223,16 @@ val file_target:
197223 ?tags : string list ->
198224 string ->
199225 user_target
200- (* * Create a file {!user_artifact} and the {!user_target} that produces it. *)
226+ (* * Create a file {!user_artifact} and the {!user_target} that produces it.
227+
228+ The [?product] of the target will be the file on the given [?host]
229+ (default: localhost using ["/tmp"]).
230+
231+ The [?done_when] condition will be the existence of that file.
232+
233+ This can be seen as a classical [make]-like file-producing target,
234+ but on any arbitrary host.
235+ *)
201236
202237val daemonize :
203238 ?starting_timeout : float ->
0 commit comments