stack haddock pandoc generates error: internal error when calculating transitive package dependencies.
This may be an instance of https://github.com/haskell/cabal/issues/5423.
verbose.txt
$ stack new test --solver
$ cd test
$ stack haddock pandoc
Haddock docs for pandoc and its dependencies are generated.
What actually happened.
Preprocessing library 'attoparsec' for haddock-library-1.5.0.1..
Running Haddock on library 'attoparsec' for haddock-library-1.5.0.1..
Haddock coverage:
100% ( 24 / 24) in 'Data.Attoparsec.Combinator'
97% ( 66 / 68) in 'Data.Attoparsec.ByteString'
Missing documentation for:
Parser (vendor/attoparsec-0.13.1.0/Data/Attoparsec/ByteString/Internal.hs:95)
Result (vendor/attoparsec-0.13.1.0/Data/Attoparsec/ByteString/Internal.hs:96)
98% ( 86 / 88) in 'Data.Attoparsec.ByteString.Char8'
Missing documentation for:
Parser (vendor/attoparsec-0.13.1.0/Data/Attoparsec/ByteString/Internal.hs:95)
Result (vendor/attoparsec-0.13.1.0/Data/Attoparsec/ByteString/Internal.hs:96)
Warning: Data.Attoparsec.Combinator: could not find link destinations for:
Parser Chunk ChunkElem
Warning: Data.Attoparsec.ByteString: could not find link destinations for:
Parser Chunk
Warning: Data.Attoparsec.ByteString.Char8: could not find link destinations for:
Parser Chunk
Documentation created:
.stack-work/dist/x86_64-linux-tinfo6/Cabal-2.2.0.1/doc/html/haddock-library/index.html,
.stack-work/dist/x86_64-linux-tinfo6/Cabal-2.2.0.1/doc/html/haddock-library/haddock-library.txt
Preprocessing library for haddock-library-1.5.0.1..
Running Haddock on library for haddock-library-1.5.0.1..
Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.4: internal error when calculating
transitive package dependencies.
Debug info: []
$ stack <your command here> <args> --verbose
<output>
$ stack --version
Version 1.9.3, Git revision 40cf7b37526b86d1676da82167ea8758a854953b (6211 commits) x86_64 hpack-0.31.1
I've played around with this a little bit but I'm not sure what to make of it yet...
It's strange that cabal-install-2.4.0.0/Cabal-2.4.0.1 seemed to resolve the problem in cabal #5432 since I believe that's what stack v1.9.3 was built against:
https://github.com/commercialhaskell/stack/blob/v1.9.3/stack.yaml
resolver: lts-11.22
# docker:
# enable: true
# repo: fpco/stack-full
# image:
# containers:
# - base: "fpco/stack-base" # see ./etc/docker/stack-base/Dockerfile
# name: "fpco/stack-test"
nix:
# --nix on the command-line to enable.
packages:
- zlib
- unzip
flags:
stack:
hide-dependency-versions: true
supported-build: true
extra-deps:
- Cabal-2.4.0.1@rev:0
- cabal-install-2.4.0.0@rev:1
- resolv-0.1.1.2@rev:0
- infer-license-0.2.0@rev:0 #for hpack-0.31
- hpack-0.31.1@rev:0
- http-api-data-0.3.8.1@rev:1
- githash-0.1.3.0@rev:0
- yaml-0.10.4.0@rev:0 #for hpack-0.31
- windns-0.1.0.0@rev:0
- hackage-security-0.5.3.0@rev:2
- cabal-doctest-1.0.6@rev:2
# Avoid https://github.com/commercialhaskell/stack/issues/4125
# (triggered because later versions of persistent transitively depends
# on haskell-src-exts, which needs the 'happy' build tool)
# THIS IS FIXED AS OF STACK 1.8, but keep these here until next major
# version to maintain the ability to build stack with older versions.
- persistent-2.7.1@rev:0
- persistent-sqlite-2.6.4@rev:0
- resourcet-1.1.11@rev:0
- conduit-1.2.13.1@rev:0
- conduit-extra-1.2.3.2@rev:0
ghc-options:
"$locals": -fhide-source-paths
Thanks for reporting by the way.
Might be a duplicate or related to #3989
I have just added pandoc to my package.yaml, and i get the same issue with stack build --haddock-deps
(stack.yaml: lts-12.17)
update: I am getting no errors with lts-13.0!
That's because newer pandoc no longer uses the internal library.
It looks like https://github.com/haskell/cabal/issues/1919 is the problem, I could reproduce it with the current Stack's master in the Stack project of the internal-libraries integration test
Most helpful comment
It looks like https://github.com/haskell/cabal/issues/1919 is the problem, I could reproduce it with the current Stack's
masterin the Stack project of theinternal-librariesintegration test