gtk2hs / webkit-javascriptcore

webkit javascriptcore library FFI
Other
15 stars 5 forks source link

Haddock generation fails for webkit2gtk3-javascriptcore #6

Open sevanspowell opened 2 years ago

sevanspowell commented 2 years ago

Issue

Haddock fails to generate documentation for the webkit2gtk3-javascriptcore library.

This creates a difficult to debug error for projects using this dependency, especially when running haskell.nix projects that pull in this project:

Setup: Graphics/UI/Gtk/WebKit/JavaScriptCore/JSValueRef.chi not found in:
/nix/store/a2xpbp9v6qlkq9zh2bcsbfslb5nvc0rd-ghc-8.10.7/lib/ghc-8.10.7/base-4.14.3.0
dist/build
.

Reproduction

On master (b092a700f04b1001f7f7b58c2f90392a3da5c410 at the time of writing) reproduce with:

nix-shell --command "cabal haddock"
sevanspowell commented 2 years ago

Workaround

A workaround is to disable Haddock generation for the webkit2gtk3-javascriptcore library.

In a haskell.nix project this can be done with:

  pkgs.haskell-nix.project {

    modules = [
      { packages.webkit2gtk3-javascriptcore.doHaddock = false; }
    ];

    ...
  }

I still think this issue is worth resolving because it's difficult for those less-experienced with haskell.nix to debug.

See this IRC chat from 2021-05-22 that was never resolved: https://logs.nix.samueldr.com/haskell.nix/2021-05-22.