Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

haddock: internal error: ..Cabal.../share/doc/html/doc-index.json: openBinaryFile: does not exist #1582

Closed
hasufell opened this issue Feb 24, 2023 · 10 comments

Comments

@hasufell
Copy link
Member

Upon executing cabal v2-haddock --builddir=dist-docs.TTPG5l --haddock-for-hackage --enable-doc in ghcup-hs repository with ghc-9.2.6 and cabal 3.8.1.0, I get:

haddock: internal error: /home/hasufell/.cabal/store/ghc-9.2.6/Cabal-3.6.3.0-694a87f40315650fbba1948b50f641d2839f3ae8b3cdaca746ac1c0a4650d8b2/share/doc/html/doc-index.json: openBinaryFile: does not exist (No such file or directory)
Error: cabal: Failed to build documentation for ghcup-0.1.19.2.
@hasufell
Copy link
Member Author

@hasufell
Copy link
Member Author

haskell/cabal#8104

@hasufell
Copy link
Member Author

The --haddock-options=--quickjump workaround from the cabal ticket doesn't work for me.

@pasqu4le
Copy link

I also bumped into this error on cabal 3.10.1.0 and the --haddock-options=--quickjump workaround from haskell/cabal#8104 also didn't work for me.

I ended up switching back to cabal 3.6.2.0 (which is still the version recommended by ghcup), where the workaround above still works.

@ulysses4ever
Copy link
Contributor

@pasqu4le are you using GHC 9.2 or earlier? 9.2 series is at the end of life and the Haddock-side fix (#1488) has never been ported to it, unfortunately. SO, you either stick to Cabal 3.6 on GHC 9.2 or you can elect to upgrade both the compiler and the build tool: GHC 9.4+ and Cabal 3.8+ don't seem to suffer from this issue.

Some discussion: haskell/cabal#9060 (comment)

@pasqu4le
Copy link

Ah, yes, I'm indeed still using an older version of GHC.

@ulysses4ever thank you for answering and for the additional context 👍

@ulysses4ever
Copy link
Contributor

@pasqu4le good news is that this problem will probably be fixed in the coming real soon now Cabal 3.10.2.

@jtdaugherty
Copy link

I'm running into this issue now with brick-2.1. Hackage isn't building the docs for that release, and when I try to do it locally in order to upload to Hackage, I get the error that resulted in this ticket. I'm using GHC 9.2.7 and cabal-install 3.10.2.0 (Cabal 3.10.2.1). Any recommendations for what I can do to resolve this in my situation?

@ulysses4ever
Copy link
Contributor

@hasufell
Copy link
Member Author

hasufell commented Nov 9, 2023

@jtdaugherty yeah, you can upgrade to GHC 9.4 and then deal with all the clang fallout on windows.

liskin added a commit to xmonad/X11 that referenced this issue Nov 12, 2023
Cabal 3.10.2.0 exposes a bug in Haddock shipped with GHC 9.0 and 9.2, so
we need to work around it by bumping the version of GHC/Haddock we use
for building/uploading docs to Hackage, and to prevent build failures we
don't ever try to build haddocks for Hackage with older versions of
GHC/Haddock.

Related: haskell/haddock#1582 (comment)
Related: haskell/cabal#8326
Related: haskell/cabal#9060
Related: haskell/cabal#9073
Related: haskell/cabal#9049
liskin added a commit to xmonad/X11-xft that referenced this issue Nov 12, 2023
Cabal 3.10.2.0 exposes a bug in Haddock shipped with GHC 9.0 and 9.2, so
we need to work around it by bumping the version of GHC/Haddock we use
for building/uploading docs to Hackage, and to prevent build failures we
don't ever try to build haddocks for Hackage with older versions of
GHC/Haddock.

Related: haskell/haddock#1582 (comment)
Related: haskell/cabal#8326
Related: haskell/cabal#9060
Related: haskell/cabal#9073
Related: haskell/cabal#9049
liskin added a commit to xmonad/xmonad that referenced this issue Nov 12, 2023
Cabal 3.10.2.0 exposes a bug in Haddock shipped with GHC 9.0 and 9.2, so
we need to work around it by bumping the version of GHC/Haddock we use
for building/uploading docs to Hackage, and to prevent build failures we
don't ever try to build haddocks for Hackage with older versions of
GHC/Haddock.

Related: haskell/haddock#1582 (comment)
Related: haskell/cabal#8326
Related: haskell/cabal#9060
Related: haskell/cabal#9073
Related: haskell/cabal#9049
liskin added a commit to xmonad/xmonad-contrib that referenced this issue Nov 12, 2023
Cabal 3.10.2.0 exposes a bug in Haddock shipped with GHC 9.0 and 9.2, so
we need to work around it by bumping the version of GHC/Haddock we use
for building/uploading docs to Hackage, and to prevent build failures we
don't ever try to build haddocks for Hackage with older versions of
GHC/Haddock.

Related: haskell/haddock#1582 (comment)
Related: haskell/cabal#8326
Related: haskell/cabal#9060
Related: haskell/cabal#9073
Related: haskell/cabal#9049
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants