Enabling tests via cabal config triggers internal error when building them
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
**Describe the bug**
cabal crashes attempting to build tests when tests are enabled via cabal config, but not when enabled with the `--enable-tests` CLI flag.
**To Reproduce**
Steps to reproduce the behavior:
```
$ git clone https://github.com/well-typed/ixset-typed.git
$ echo 'tests: True' >> ~/.cabal/config
$ cabal run tests
Resolving dependencies...
componentAvailableTargetStatus: impossible; cname=test:test-ixset-typed
CallStack (from HasCallStack):
error, called at src/Distribution/Client/ProjectPlanning.hs:3028:15 in cabal-install-3.12.1.0-inplace:Distribution.Client.ProjectPlanning
```
**Expected behavior**
The tests should be built and run successfully, as they are with `cabal run tests --enable-tests`.
**System information**
- Gentoo 6.6.62
- `cabal` 3.12.1.0
- `ghc` 9.8.2
Contributor guide
Assessment
This issue has not been assessed yet.