Odoc: valid module name clashes cause issues
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 1.9k
- Forks
- 500
- Avg merge
- 15h 21m
- Merged PRs (30d)
- 277
Description
It's perfectly valid to have a dune project containing sub-libraries that have unwrapped modules with the same name. For example:
one/names.ml
two/names.ml
Where the public-name for these is e.g. repro.one and repro.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:
Multiple rules generated for _build/default/_doc/_html/repro/Names/index.html:
- <internal location>
- <internal location>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the example with one/names.ml and two/names.ml in separate sub-libraries, using public names such as repro.one and repro.two. Inspect how odoc and dune generate _build/default/_doc/_html/repro/Names/index.html for both modules. Done means the documentation builds with both valid modules present without duplicate HTML rules.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- build-system, documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100