Reexporting from private library components discards documentation of all but one component
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
(Originally reported as a haddock bug [here](https://gitlab.haskell.org/ghc/ghc/-/issues/25270).)
## Summary
`cabal haddock` does not appear to merge the reexported documentation from multiple private library components and instead arbitrarily picks exactly one component to reexport.
## Steps to reproduce
Paste the following into your shell:
```
git clone https://github.com/haskell/happy
cd happy/lib
git checkout ddfb7bb933a0c2d61333fe5851e7dbf8136f0818
cabal haddock --builddir="$(pwd)/docs-dist" --haddock-for-hackage
cd docs-dist
tar xvf happy-lib-2.0-docs.tar.gz
cd happy-lib-2.0-docs
ls -l
```
Now realise that it only packaged up the documentation for one private library component (either the LALR or the GLR backend).
## Expected behavior
It should have documentation for all reexported modules
## System information
- Cabal 3.10.2.1
Contributor guide
Research direction
Reproduce the issue with the provided happy checkout and `cabal haddock --haddock-for-hackage` command, then inspect how documentation for reexported modules is packaged under `docs-dist`. Done means the generated `happy-lib-2.0-docs.tar.gz` includes documentation for modules from both the LALR and GLR private components.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- build-system, documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100