cabal-3.2.0.0 fails to build/install several packages - assert fails
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
**Describe the bug**
Currently-released cabal-3.2.0.0 aborts at build/install of several packages, e.g., `pandoc`, upon failing assertion.
**To Reproduce**
```
$ cabal install pandoc
Warning: Parsing the index cache failed (Data.Binary.Get.runGet at position
16: Non-matching structured hashes: 0210baca00000000ec34895e00000000;
expected: a257ca064dfb5e0cb74f74e64a975b9e). Trying to regenerate the index
cache...
Resolving dependencies...
Build profile: -w ghc-8.8.3 -O1
In order, the following will be built (use -v for more details):
- HTTP-4000.3.14 (lib) (requires build)
- http-client-0.6.4.1 (lib) (requires build)
- socks-0.6.1 (lib) (requires build)
- tls-1.5.4 (lib) (requires build)
- connection-0.3.1 (lib:connection) (requires build)
- http-client-tls-0.3.5.3 (lib) (requires build)
- pandoc-2.9.2.1 (lib) (requires build)
Assertion failed
CallStack (from HasCallStack):
assert, called at ./Distribution/Client/ProjectPlanning.hs:242:5 in main:Distribution.Client.ProjectPlanning
```
**Expected behavior**
Successful build/installation, as with cabal-3.0.0.0.
**System information**
- MacOS Catalina 10.15.4, Xcode-11.4.
- `cabal-3.2.0.0`, `ghc-8.8.3`
**Additional context**
Cabal configured to build dynamic libraries and executables, profiling is disabled, documentation enabled.
Cabal installed via `$ cabal install cabal-install --overwrite-policy=always`
On a probably-unrelated note, it looks like Cabal doesn't take command-line arguments `--enable-static` and `--enable-executable-static`: when I specify those, it still seems to follow what's in `~/.cabal/config`, which says "dynamic".
Contributor guide
Research direction
Reproduce the failure with `cabal install pandoc` using cabal-3.2.0.0 and GHC 8.8.3, then inspect `Distribution/Client/ProjectPlanning.hs` around line 242 where the assertion is reported. Compare the behavior with cabal-3.0.0.0 and verify that package installation succeeds without the assertion; the reported static-linking configuration behavior is additional context.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- build-system, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100