Cabal haddock-project command

A future release of cabal and haddock will let us build documentation for cabal.project. A few weeks ago, when the PR was still in review, I wrote a blog post about it.

16 Likes

Yep, that’s very likely to be included in cabal 3.10. To clarify, and please correct me if I’m wrong, cabal haddock-project builds documentation for a whole project of packages (a set of related packages specified in a cabal.project file), including cross-links among the packages, a common index, a page linking to all the package haddocks.

We are still bike-shedding the UI (commands and visual), the current one being provisional as the first iteration, so please voice your preferences. @coot, which ticket might be best for feedback?

4 Likes

that’s very likely to be included in cabal 3.10.

:tada:

Yes, you’re right. There are two flavours, either link dependencies to hackage or build a self contained directory with all the documentation.

@coot, which ticket might be best for feedback?
I’d suggest to use this ticket (which already has been used for this purpose).

3 Likes

Is there a place you’d like bug reports submitted?

In particular, I’ve given this a try and:

  1. Without passing any flag, it claims to have created some files, but the files don’t actually exist.

  2. With passing --local or --hackage, it still claims to have created files that don’t exist, but it also creates actual files (in haddocks/), but only for the current library, nothing about dependences, whether local or hackage ones.

I tested this on a minimal cabal project just created with 3.4 version and added two local git dependencies. haddock 2.28, cabal-install 3.10.1.0, ghc 9.6.2

Hey, the best place would be the cabal issue tracker. Thanks!