Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: GHC >= 9.0 boot libraries *.conf files: problem with the haddock-html paths #9000

Open
mpilgrem opened this issue Jun 4, 2023 · 0 comments

Comments

@mpilgrem
Copy link
Collaborator

mpilgrem commented Jun 4, 2023

This is not a bug in Cabal (the library) but a bug in GHC >= 9.0 (up to, at least, GHC 9.6.2) that Cabal may wish to accommodate with a work-around. See GHC issue: https://gitlab.haskell.org/ghc/ghc/-/issues/23476 and (because it affects Hoogle too) my Hoogle pull request that suggests that Hoogle accommodate the GHC error: ndmitchell/hoogle#405.

Stack is built on top of Cabal (the library) and I was receiving output like this below with stack build --haddock (on Windows) (extracts only) :

foo> haddock
Warning: The documentation for the following packages are not installed. No
links will be generated to these packages: base-4.16.4.0, ghc-bignum-1.2,
ghc-prim-0.8.0
Running Haddock on library for foo-0.1.0.0..
  50% (  1 /  2) in 'Lib'
  Missing documentation for:
    Module header
Warning: Lib: could not find link destinations for:

        - GHC.Types.IO

Note that the 'Warning: ...' (which is via Cabal) is complaining that no documentation is installed for GHC boot libraries, including base-4.16.4.0. It turns out that is because the base-4.16.4.0.conf file shipped with GHC 9.2.7 contains an error - the haddock-html field is not pointing to the correct location where the Haddock HTML is to be found, but to a directory that does not exist.

Proof of this is that if you manually edit the *.conf file to point to the correct location, the Cabal warning goes away (eg just for base):

foo> haddock
Warning: The documentation for the following packages are not installed. No
links will be generated to these packages: ghc-bignum-1.2, ghc-prim-0.8.0
Running Haddock on library for foo-0.1.0.0..
  50% (  1 /  2) in 'Lib'
  Missing documentation for:
    Module header

One might argue that the proper approach is for users of GHC >= 9.0 on Windows to patch the *.conf files. However, having the tools that rely on the output of ghc-pkg dump catch this may be the path of least resistence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants