haskell / haskell/cabal

Default cabal.project in cabal repo fails with cabal-install older than latest release; hard to diagnose

Open
#8,133 9 comments 0 reactions 0 assignees View on GitHub
build-type: custom cabal-testsuite type: discussion type: testing
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

Our default project file is confusing to newbies with an older cabal-install installed. In particular, the file has tests enabled, but `cabal-testsuite` apparently requires cabal-install >= 3.6 to compile (Custom setup, sigh), which is not stated in any obvious place the newbie would look at and the compilation errors are opaque. I'm being told @ezyang may be the last person alive to know why the tests need a new cabal to compile and how we'd get around to simplifying their compilation.

To be fair, in README we say to use `cabal install --project-file=cabal.project.release cabal-install`. However, I think, at least another warning in the default project file would be needed or commenting out the test suite, with an explanation, or perhaps even kill the project file, though the `-fno-ignore-asserts` are useful and also a newbie with `Tests: True` in the global config file would be bitten just as before.

OTOH, if cabal devs just do `cabal build` and so the project file is supposed to be the perfect default for them, we should not make life harder for them, e.g., by disabling the testsuite. But if so, it's worth mentioning somewhere (is it?), or new cabal devs may be usure whether to follow the readme, or use the default `cabal.project`.

Contributor guide

Open the contributing guide

Research direction

Start by reading the default cabal.project, cabal.project.release, and the README instructions for building cabal-install. Then inspect cabal-testsuite and its Custom setup requirement to understand the version constraint and compare the available approaches. Done means a newcomer gets an explicit, consistent path for building with tests, including a clear warning or explanation for older cabal-install versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
build-system, developer-experience
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.