Building ghc-lib-parser
with resolver ghc-9.0.1 fails (the package is known to build with cabal / ghc-9.0).
#!/usr/bin/env bash set -euo pipefail # This version of ghc-lib-parser is known to build with cabal/ghc-9.0. ghc_lib_parser=ghc-lib-parser-9.0.1.20210207 curl -o ${ghc_lib_parser}.tar.gz https://hackage.haskell.org/package/${ghc_lib_parser}/${ghc_lib_parser}.tar.gz gunzip ${ghc_lib_parser}.tar.gz && tar xvf ${ghc_lib_parser}.tar cd ${ghc_lib_parser} # Select ghc-9.0.1 for the build compiler. cat > stack.yaml <<EOF resolver: ghc-9.0.1 packages: - . extra-deps: - alex-3.2.6 - happy-1.20.0 EOF # Try to build; observe errors. stack build --verbosity=debugExpected
The build succeeds.
ActualAfter successfully compiling all the modules in the package an exception is raised.
....
2021-02-07 01:31:58.020433: [info] [264 of 264] Compiling GHC.Driver.Hooks
2021-02-07 01:32:02.694253: [debug] Process finished in 377998ms: /Users/shayne/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_3.4.0.0_ghc-9.0.1 --builddir=.stack-work/dist/x86_64-osx/Cabal-3.4.0.0 build lib:ghc-lib-parser --ghc-options " -fdiagnostics-color=always"
2021-02-07 01:32:02.694375: [debug] Start: getPackageFiles /Users/shayne/tmp/tt/ghc-lib-parser-9.0.1.20210207/ghc-lib-parser.cabal
2021-02-07 01:32:03.373370: [debug] Failed to decode module interface:
/Users/shayne/tmp/tt/ghc-lib-parser-9.0.1.20210207/.stack-work/dist/x86_64-osx/Cabal-3.4.0.0/build/GHC/BaseDir.hi
Decoding failure: not enough bytes
...
2021-02-07 01:32:03.380782: [debug] Finished with exception in 686ms: getPackageFiles /Users/shayne/tmp/tt/ghc-lib-parser-9.0.1.20210207/ghc-lib-parser.cabal
Exception thrown: Prelude.chr: bad argument: 251658397
2021-02-07 01:32:03.381224: [error] Prelude.chr: bad argument: 251658397
Stack version
$ stack --version
Version 2.5.1, Git revision d6ab861544918185236cf826cb2028abb266d6d5 x86_64 hpack-0.33.0
Method of installation
asr, andreasabel, LaurentRDC and gergoerdi
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4