package b0
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha512=e9aa779e66c08fc763019f16d4706f465d16c05d6400b58fbd0313317ef33ddea51952e2b058db28e65f7ddb7012f328c8bf02d8f1da17bb543348541a2587f0
doc/b0.file/B0_ocaml/Modsrc/Deps/index.html
Module Modsrc.Deps
Source
Source dependencies.
As found by Tool.ocamldep
.
val write :
?src_root:B0_std.Fpath.t ->
B0_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 ->
B0_memo.t ->
B0_std.Fpath.t ->
Modname.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.