package b0
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=dadde8cfa62be9dabd805fc190b415427b4699ffe3458c153e2f3f9cc5c9b9b4
md5=f96ac96fb0182f2b97dbe9ded452544b
doc/b0.b00/B00/Guard/index.html
Module B00.Guard
Build operations guards.
A guard ensure that a build operation is allowed to proceed. This means either that:
- It is ready and can be submitted for execution. This happens once all the files the operation reads are ready: they exist and are up-to-date.
- It is aborted. This happens if a file it needs to read never becomes ready.
Guards
type feedback = [
| `File_status_repeat of B0_std.Fpath.t
| `File_status_unstable of B0_std.Fpath.t
]
The type for guard feedbacks:
`File_status_repeat f
indicates that the file status off
was set more than once.`File_status_unstable f
indicates that the file status off
was set more than once and in an inconsistent manner
create ~feedback ()
is a new guard, using feedback
to report inconsistencies (default is a nop.).
val set_file_ready : t -> B0_std.Fpath.t -> unit
set_file_ready g f
indicates to g
that file f
is ready, i.e. that it exists and is up-to-date.
val set_file_never : t -> B0_std.Fpath.t -> unit
set_file_never g f
indicate to g
that file f
will never become ready.
allowed g
is an operation that is either ready or aborted in g
(if any). In the second case the Op.exec_status
is Op.Aborted
.
Stuck build analysis
The following functions are not efficient, only use for stuck build anaylsis or debugging.
val ready_files : t -> B0_std.Fpath.Set.t
ready_files g
are the files that got ready in g
.
val never_files : t -> B0_std.Fpath.Set.t
never_files g
are the files that never got ready in g
.
val undecided_files : t -> B0_std.Fpath.Set.t
undecided_files g
are the files that are neither got ready nor never got ready in g
.
val root_undecided_files : t -> B0_std.Fpath.Set.t
root_undecided_file g
is like undecided_files
but has only the files that are not written by a guarded_op
of g
. If a build is stuck these are files that are not undecided as the result of a guarded operation.