cabal new-build is confused by "tests: True" in global config file
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
I tried building the test project at https://gist.github.com/peti/2c5a5e712b95792aac0d631037710cee with `cabal new-build` using 986500f92358b5b144d217bbecfbbc37ef648837 of Cabal/cabal-install. That build failed with the following error message:
~~~
Failed to build distributive-0.5.3. The failure occurred during the configure step.
[...]
Configuring distributive-0.5.3...
setup: Encountered missing dependencies:
doctest >=0.11.1 && <0.15,
generic-deriving >=1.11 && <2,
hspec ==2.*
cabal: Failed to build distributive-0.5.3 (which is required by exe:test from
test-0.1.0.0). See the build log above for details.
~~~
What happened is that my `~/.cabal/config` file sets `tests: True` and clearly cabal-install tried to compile the dependency `distribute` with its test suite enabled because of that -- but while computing the build plan for that dependency cabal-install did not take the additional dependencies into account that distributive's test suite requires.
The build succeeds after I remove `tests: True` from my global config file.
Contributor guide
Assessment
This issue has not been assessed yet.