haskell / haskell/cabal

cabal new-haddock does not work for autogenerated gi-* bindings

Open
#5,823 7 comments 0 reactions 0 assignees View on GitHub
cabal-install: cmd/haddock type: bug
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

Hello,

I am having some trouble trying to generate docs for the `gi-*` set of libraries I maintain (autogenerated bindings for `gtk` and friends) using `cabal new-haddock`.

The bindings all use `build-type: Custom`, and generate the list of modules to be compiled when configuring the package using a `confHook` (see [here](https://github.com/haskell-gi/haskell-gi/blob/master/lib/Data/GI/CodeGen/CabalHooks.hs)), using a custom `Setup.hs` script. The list of modules to be compiled depends on the system compiling the library, and cannot be known in advance, hence the weird build system.

Despite the somewhat involved `Setup.hs` logic, both `cabal new-build` and `cabal old-haddock` have been working well in practice so far.

But `cabal new-haddock` seems to do nothing:
```
$ git clone https://github.com/haskell-gi/haskell-gi.git
$ cd haskell-gi
$ cabal new-haddock --haddock-for-hackage gi-glib
Build profile: -w ghc-8.6.1 -O1
In order, the following will be built (use -v for more details):
- gi-glib-2.0.18 (file /home/inaki/cvs/haskell-gi/dist-newstyle/build/x86_64-linux/ghc-8.6.1/haskell-gi-0.21.5/cache/build changed)
```
Any advice? I would like to switch to the new workflow, but this issue has been stopping me from doing so.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.