I’ve started to create library documentation using jbuilder/odoc and hit a weird issue when I have a library ML file. Thus, given the following simple package:
A private module src/priv_module.ml
:
(** Private module *)
(** Some private function doc *)
let privfun () = ()
The public module src/pub_module.ml
:
(** Public module *)
(** Some public function doc *)
let pubfun () = ()
A library ML file to only export the public module, src/testlb.ml
:
module Pub_module = Pub_module
And the following jbuild file:
(jbuild_version 1)
(library
((name testlib)
(public_name testlib)
))
Compilation works fine but when I generate the documentation with jbuilder build @doc
the testlib/Testlib/index.html file has links to testlib/Testlib/index.html#module-Pub_module
and not the module documentation.
Changing src/testlib.ml
to:
module Pub_module = Testlib__Pub_module
Fixes the issue but with larger libraries with multiple exported modules I get the following error during compilation:
Warning 49: no cmi file was found in path for module ...
for each of the exported modules. Is this me, odoc or jbuilder(dune)?
EDIT.
Using topkg doc gives the same results