Open sgraf812 opened 1 week ago
It does look like a cabal bug. See the same build path occurring again and again in the following (truncated) log:
$ cabal haddock --builddir="$(pwd)/docs-dist" --haddock-for-hackage
Resolving dependencies...
Build profile: -w ghc-9.6.5 -O1
In order, the following will be built (use -v for more details):
- happy-lib-2.0 (lib:grammar) (first run)
- happy-lib-2.0 (lib:tabular) (first run)
- happy-lib-2.0 (lib:frontend) (first run)
- happy-lib-2.0 (lib:backend-lalr) (first run)
- happy-lib-2.0 (lib:backend-glr) (first run)
- happy-lib-2.0 (lib) (first run)
Configuring library 'grammar' for happy-lib-2.0..
Preprocessing library 'grammar' for happy-lib-2.0..
Building library 'grammar' for happy-lib-2.0..
...
Documentation created:
/home/jcericson/src/happy/lib/docs-dist/build/x86_64-linux/ghc-9.6.5/happy-lib-2.0/l/grammar/doc/html/happy-lib-2.0-docs/,
/home/jcericson/src/happy/lib/docs-dist/build/x86_64-linux/ghc-9.6.5/happy-lib-2.0/l/grammar/doc/html/happy-lib-2.0-docs/happy-lib.txt
Documentation tarball created:
/home/jcericson/src/happy/lib/docs-dist/happy-lib-2.0-docs.tar.gz
...
Documentation created:
/home/jcericson/src/happy/lib/docs-dist/build/x86_64-linux/ghc-9.6.5/happy-lib-2.0/l/tabular/doc/html/happy-lib-2.0-docs/,
/home/jcericson/src/happy/lib/docs-dist/build/x86_64-linux/ghc-9.6.5/happy-lib-2.0/l/tabular/doc/html/happy-lib-2.0-docs/happy-lib.txt
Documentation tarball created:
/home/jcericson/src/happy/lib/docs-dist/happy-lib-2.0-docs.tar.gz
...
Documentation created:
/home/jcericson/src/happy/lib/docs-dist/build/x86_64-linux/ghc-9.6.5/happy-lib-2.0/l/frontend/doc/html/happy-lib-2.0-docs/,
/home/jcericson/src/happy/lib/docs-dist/build/x86_64-linux/ghc-9.6.5/happy-lib-2.0/l/frontend/doc/html/happy-lib-2.0-docs/happy-lib.txt
...
Documentation tarball created:
...
Documentation created:
/home/jcericson/src/happy/lib/docs-dist/build/x86_64-linux/ghc-9.6.5/happy-lib-2.0/l/backend-glr/doc/html/happy-lib-2.0-docs/,
/home/jcericson/src/happy/lib/docs-dist/build/x86_64-linux/ghc-9.6.5/happy-lib-2.0/l/backend-glr/doc/html/happy-lib-2.0-docs/happy-lib.txt
Documentation tarball created:
/home/jcericson/src/happy/lib/docs-dist/happy-lib-2.0-docs.tar.gz
Documentation created:
/home/jcericson/src/happy/lib/docs-dist/build/x86_64-linux/ghc-9.6.5/happy-lib-2.0/l/backend-lalr/doc/html/happy-lib-2.0-docs/,
/home/jcericson/src/happy/lib/docs-dist/build/x86_64-linux/ghc-9.6.5/happy-lib-2.0/l/backend-lalr/doc/html/happy-lib-2.0-docs/happy-lib.txt
Documentation tarball created:
/home/jcericson/src/happy/lib/docs-dist/happy-lib-2.0-docs.tar.gz
This is Cabal 3.10, however.
Can you test with cabal-head (https://github.com/haskell/cabal/releases/tag/cabal-head)? We've made a number of changes to how cabal deals with sub-library haddocks in the past few months, and I don't think any of them has been released yet.
And there are a few more changes coming (which sadly won't be in 3.14), if my understanding of our currently-open tickets is correct, specifically dealing with temporary files.
It appears to reproduce with Cabal 3.15.0.0 as well (as installed through ghcup
).
(Originally reported as a haddock bug here.)
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:
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