Module B00.Guard
Build operations guards.
A guard ensure that a build operation is allowed to proceed. This means either that:
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
val create : ?feedback:(feedback -> unit) -> unit -> t
create ~feedback ()
is a new guard, usingfeedback
to report inconsistencies (default is a nop.).
val set_file_ready : t -> B0_std.Fpath.t -> unit
set_file_ready g f
indicates tog
that filef
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 tog
that filef
will never become ready.
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 ing
.
val never_files : t -> B0_std.Fpath.Set.t
never_files g
are the files that never got ready ing
.
val undecided_files : t -> B0_std.Fpath.Set.t
undecided_files g
are the files that are neither got ready nor never got ready ing
.
val root_undecided_files : t -> B0_std.Fpath.Set.t
root_undecided_file g
is likeundecided_files
but has only the files that are not written by aguarded_op
ofg
. If a build is stuck these are files that are not undecided as the result of a guarded operation.