Fix haddock interface and HTML paths for sub-libraries#11476
Conversation
60e17d6 to
4ae957b
Compare
ulysses4ever
left a comment
There was a problem hiding this comment.
Looks great to me, thanks!
We have long had an issue with missing links to reexports on the Hackage page: https://hackage.haskell.org/package/Cabal (e.g. Distribution.Backpack, which is reexported from Cabal-syntax, isn't linked). I wonder if a similar patch would be required to fix that (a patch for hackage-server, presumably, as it generates the package pages on its own AFAIR).
Sub-libraries now use a subdirectory named after the sub-library for their haddock interface files and HTML documentation paths. Previously, both main and sub-libraries shared the same paths, which caused haddock to emit "could not find link destinations" warnings when using `--haddock-all` with internal sub-libraries. Adds a test case verifying `cabal haddock --haddock-all` works correctly with an internal sub-library.
|
Yes! This seems to have been broken since 9.6, I'm not sure what changed. |
Previously the test passed before the change was applied.
mpickering
left a comment
There was a problem hiding this comment.
Thanks for taking the time to look into this issue @Tritlo.
I've left two comments, fixes for the comments are on this branch - https://github.com/haskell/cabal/tree/wip/haddock-internal-library
|
Merged! |
|
CI seems stuck. Let me try to restart it... |
|
Success! Restarting has been enough to make it green. Thank you for the PR! |
Merge Queue StatusRule:
This pull request spent 11 minutes 31 seconds in the queue, with no time running CI. Required conditions to merge
|
* Fix haddock interface and HTML paths for sub-libraries Sub-libraries now use a subdirectory named after the sub-library for their haddock interface files and HTML documentation paths. Previously, both main and sub-libraries shared the same paths, which caused haddock to emit "could not find link destinations" warnings when using `--haddock-all` with internal sub-libraries. Adds a test case verifying `cabal haddock --haddock-all` works correctly with an internal sub-library. * Assert that the test output doesn't contain an error Previously the test passed before the change was applied. * Use library function for computing the haddock directory --------- Co-authored-by: Matthew Pickering <matthewtpickering@gmail.com>
* Fix haddock interface and HTML paths for sub-libraries Sub-libraries now use a subdirectory named after the sub-library for their haddock interface files and HTML documentation paths. Previously, both main and sub-libraries shared the same paths, which caused haddock to emit "could not find link destinations" warnings when using `--haddock-all` with internal sub-libraries. Adds a test case verifying `cabal haddock --haddock-all` works correctly with an internal sub-library. * Assert that the test output doesn't contain an error Previously the test passed before the change was applied. * Use library function for computing the haddock directory --------- Co-authored-by: Matthew Pickering <matthewtpickering@gmail.com>

Fixes #11475
Summary
haddockInterfacesandhaddockHTMLspaths ingeneralInstalledPackageInfoto include the sub-library name subdirectory for internal librariescabal haddock --haddock-allcan't find the.haddockinterface file for internal sub-libraries, causing "could not find link destinations" warnings and missing documentationChecklist
significance: significantin the changelog file.QA Notes
cabal haddock --haddock-all