Open jonludlam opened 5 years ago
Hmm yh, I believe it's because odoc works with packages rather than libraries. I don't know how we can fix this in Dune :/
I've updated the description to make it clear that this is for sub-libraries (repro.one and repro.two)
This is related to ocaml/odoc#148
Indeed only workaround so far is to wrap one of the libs and set -open Lib
in the corresponding Dune flags.
I'm still seeing this in ocamllabs/ocaml-ctypes#588 with odoc 1.4.0, need to investigate more:
$ dune build @doc
Error: Conflicting implementations for virtual library "ctypes-foreign":
- "ctypes-foreign.threaded" in _build/default/src/ctypes-foreign-threaded
- "ctypes-foreign.unthreaded" in _build/default/src/ctypes-foreign-unthreaded
Multiple rules generated for _build/default/_doc/_html/ctypes-foreign/Foreign/index.html:
- <internal location>
- <internal location>
@jonludlam is there a corresponding odoc bug? I don't think this can be fixed until odoc addresses this.
@avsm which version of dune are you using? This ought to be addressed by https://github.com/ocaml/dune/pull/2141
@rgrinberg there's no issue on the odoc repo yet. I'll make one when I've got a moment.
@jonludlam twas with the released dune 1.9.3 -- I'll try with the master branch shortly
Facing this issue and found https://github.com/ocaml/odoc/issues/148 has been resolved. Is there any chance to relook into this?
Is it correct to say that this is (at least partially) fixed by the @doc-new
rule?
ping @jonludlam for this question (though I wouldn't close issues fixed by doc-new until we know how these new rules are going to be enabled)
Yes, doc-new
should not have this problem. See the test cases for doc rules and doc-new rules
It's perfectly valid to have a dune project containing sub-libraries that have unwrapped modules with the same name. For example:
Where the public-name for these is e.g.
repro.one
andrepro.two
. These libraries can't be linked together, but the documentation should be able to coexist. Currently this is not possible as odoc is producing the same html filename for both modules: