package b0
Install
Dune Dependency
Authors
Maintainers
Sources
sha512=00a6868b4dfa34565d0141b335622a81a0e8d5b9e3c6dfad025dabfa3df2db2a1302b492953bbbce30c3a4406c324fcec25250a00b38f6d18a69e15605e3b07e
doc/b0_b00_kit/B00_ocaml/Mod/Src/Deps/index.html
Module Src.Deps
Source dependencies.
As found by Tool.ocamldep
.
val write :
?src_root:B0_std.Fpath.t ->
B00.Memo.t ->
srcs:B0_std.Fpath.t list ->
o:B0_std.Fpath.t ->
unit
write m ~src_root ~srcs ~o
writes the module dependencies of each file in srcs
in file o
. If src_root
if specified it is used as the cwd
for the operation and assumed to be a prefix of every file in srcs
, this allows the output not to the depend on absolute paths.
UPSTREAM FIXME. We don't actually do what is mentioned about src_root
. The problem is that the path of parse errors end up being wrongly reported. It would be nice to add an option for output prefix trimming to the tool and/or control on the whole toolchain for how errors are reported. This means that for now we cannot cache these operations across machines.
val read :
?src_root:B0_std.Fpath.t ->
B00.Memo.t ->
B0_std.Fpath.t ->
Name.Set.t B0_std.Fpath.Map.t B0_std.Fut.t
read ~src_root file
reads dependencies produced by write
as a map from absolute file paths to their dependencies. Relative file paths are made absolute relative to src_root
if specified.