Open mrkkrp opened 1 year ago
cabal haddock
for crypto-api
errors with:
haddock: internal error: /home/f/.local/state/cabal/store/ghc-9.2.8/entropy-0.4.1.10-fd9c3ea180d740ecc8140c198284179cb3cf896d39d0ffa0dc35962213abb815/share/doc/html/doc-index.json: openBinaryFile: does not exist (No such file or directory)
Error: cabal: Failed to build documentation for crypto-api-0.13.3.
ls
insg that folder:
doc-index.html entropy.haddock haddock-bundle.min.js index.html linuwial.css meta.json quick-jump.css synopsis.png System-Entropy.html
See #8326.
From Haddock #1488, ~it seems it shold have been fixed and backported in GHC ≥ 9.2.4, so I wonder what is happening.~
Is there a workaround?
@mrkkrp there's a delicate relationship between versions inside the ghc-cabal-haddock triad. It appears that the bug disappears on GHC 9.2 + Cabal 3.8 (but you already knew it) and on GHC 9.4+ (including 9.6) + Cabal 3.10.
@coot you contributed the original fix for this issue I believe. Do you understand why GHC 9.2 with latest patches (e.g. 9.2.8) still suffers from it but only with Cabal 3.10? And more importantly, is there anything we could do (especially on the Cabal end) to make Cabal 3.10.x work with GHC 9.2? As it stands, this issue blocks the recommended
badge in ghcup; we almost agreed to put it on the upcoming 3.10.2, but not anymore after we found out that the combination of 3.10 and 9.2 is still broken...
I just checked the haddock branches and the ghc-9.2 branch doesn't have the fix from https://github.com/haskell/haddock/pull/1488 ghc-9.4 (and on, i assume) does have it. @ffaf1 where did you get the info about it being
backported in GHC ≥ 9.2.4
? (Btw, thanks a lot for looking up https://github.com/haskell/haddock/pull/1488!)
The only mystery remaining is why Cabal <3.10 works...
backported in GHC ≥ 9.2.4
I don’t know what I was reading, sorry for spreading misinfo.
Depending on GHCup choices, this might be something quite important.
I used GHC 9.2.5 and crypto-api
to bisect it down to https://github.com/haskell/cabal/commit/6d8adf13101c4d28fef14bdec55d485feec356fd
@coot do you think we could do something to work around this issue on Cabal's side so that soon-to-be-released Cabal 3.10.2 could work well with GHC 9.2? Otherwise, people keep bumping into it as 9.2 is very popular.
In particular, this change:
, [ "--quickjump" | isVersion 2 19
- , fromFlag . argQuickJump $ args ]
+ , _ <- flagToList . argQuickJump $ args ]
In particular, it looks like that if we change
, [ "--quickjump" | isVersion 2 19
- , _ <- flagToList . argQuickJump $ args ]
+ , True <- flagToList . argQuickJump $ args ]
just like you did in the --hyperlinked-source
option going next, then crypto-api
does not fail anymore. Does it sound plausible to you, @coot?
I submitted a fix as described above: https://github.com/haskell/cabal/pull/9072 #9049 beats me to it.
Hopefully, we could squeeze it into 3.10.2.
@mrkkrp do you want to check yourself that the bug is fixed on master
? We have the cabal-head
rolling prerelease with binaries for x64 and the 3 major systems. If you use ghcup
, you could get one of the binaries using
ghcup install cabal -u https://github.com/haskell/cabal/releases/download/cabal-head/cabal-head-Linux-x86_64.tar.gz head
(replace Linux with macOS or Windows as appropriate).
just like you did in the --hyperlinked-source option going next, then crypto-api does not fail anymore. Does it sound plausible to you, @coot?
Yes it makes sense.
Describe the bug Haddock for crypto-api-0.13.3 fails to build with Cabal 3.10.1.0. It appears to work with older versions of Cabal, namely with 3.8.1.0.
First observed here: https://github.com/mrkkrp/req/actions/runs/5349288540/jobs/9700788692?pr=150#step:10:356
To Reproduce
I was able to reproduce by clonning
crypto-api
and runningcabal haddock
from the root of the repo (not entirely sure that it is the same failure as on CI (see link above) but it fails as well).Expected behavior
cabal haddock
should succeed and generate Haddocks.System information
cabal
,ghc
versions: