package b0
Install
Dune Dependency
Authors
Maintainers
Sources
sha512=00a6868b4dfa34565d0141b335622a81a0e8d5b9e3c6dfad025dabfa3df2db2a1302b492953bbbce30c3a4406c324fcec25250a00b38f6d18a69e15605e3b07e
doc/b0_b00_kit/B00_cli/Op/index.html
Module B00_cli.Op
B000.Op
interaction.
Finding dependencies
val find_needs :
?acc:B000.Op.Set.t ->
recursive:bool ->
writes:B000.Op.Set.t B0_std.Fpath.Map.t ->
B000.Op.Set.t ->
B000.Op.Set.t
find_needs ~recursive ~writes ~acc ops
add to acc
(defaults to B00.Op.Set.empty
) the set of operations in the write index writes
that need to be executed for the set of operations ops
to be able to proceed. If recursive
is false
only direct dependencies are reported.
val find_enables :
?acc:B000.Op.Set.t ->
recursive:bool ->
reads:B000.Op.Set.t B0_std.Fpath.Map.t ->
B000.Op.Set.t ->
B000.Op.Set.t
find_enables ~recursive ~writes ~acc ops
add to acc
(defaults to B00.Op.Set.empty
) the set of operations in the read index reads
that are enabled by the set of operations ops
. If recursive
is false
only direct dependencies are reported.
Operation query
The type for build operation queries. This is not simply predicate because of dependency selection.
val select :
reads:B0_std.Fpath.t list ->
writes:B0_std.Fpath.t list ->
ids:B000.Op.id list ->
hashes:B0_std.Hash.t list ->
marks:string list ->
B000.Op.t ->
bool
select ~reads ~writes ~ids ~hashes ~marks o
is true
iff o
reads a file in reads
or writes a file in writes
or has its id in ids
, or has its hash in hashes
or has its mark
in marks
or if all these selector lists are empty.
val select_deps :
needs:bool ->
enables:bool ->
recursive:bool ->
dom:B000.Op.t list ->
B000.Op.t list ->
B000.Op.t list
select_deps ~needs ~enables ~recusrive ~dom ops
select the operation needs
and/or enables
of ops
recursive
ly in dom
. This is ops
if both needs
and enables
are false
.
val filter :
revived:bool option ->
statuses:[ `Aborted | `Done | `Failed | `Waiting ] list ->
kinds:
[ `Copy
| `Delete
| `Mkdir
| `Notify
| `Read
| `Spawn
| `Wait_files
| `Write ]
list ->
B000.Op.t ->
bool
filter ~revived ~statuses ~kinds
is an operation filter for the given filters.
order ~by ops
orders ops
by by
time.
val query :
select:(B000.Op.t -> bool) ->
select_deps:(dom:B000.Op.t list -> B000.Op.t list -> B000.Op.t list) ->
filter:(B000.Op.t -> bool) ->
order:(B000.Op.t list -> B000.Op.t list) ->
query
query ~select ~select_deps ~filer ~order
is an operation query that select
s operations, their dependencies (or not) according to select_deps
, filters the result with filter
and orders them by order
.
Command line interface
val select_cli :
?docs:string ->
?marks:string list Cmdliner.Term.t ->
unit ->
(B000.Op.t -> bool) Cmdliner.Term.t
val filter_cli : ?docs:string -> unit -> (B000.Op.t -> bool) Cmdliner.Term.t
s_selection_options
is a section name for build operation selection options.
val query_cli : ?docs:string -> unit -> query Cmdliner.Term.t
query_cli ~docs ()
is a command line interface to select build operations. docs
is where the option are documented, defaults to Cmdliner.Manpage.s_options
query_man
is a manual fragment for query_cli
.