haskell / cabal

Official upstream development repository for Cabal and cabal-install
https://haskell.org/cabal
Other
1.61k stars 690 forks source link

Improve documentation for `custom-setup` & `setup-depends` #4538

Open hvr opened 7 years ago

hvr commented 7 years ago

The documentation at http://cabal.readthedocs.io/en/latest/developing-packages.html#custom-setup-scripts is rather terse.

Users are sometimes confused about the semantics in case of a missing custom-setup and whether you can add a custom-setup stanza even w/o saying cabal-version:>=1.24. (See e.g. hvr/multi-ghc-travis#81 for an example).

Consequently, we should flesh out the documentation for custom-setup, and document at least the following aspects:

andreasabel commented 3 years ago

Yes, these question are still terribly interesting and their answers very hard to discover. Please, someone who knows the answers, have mercy on us dumb users and extend the docs.

For instance, I read in the docs that build-tools: hspec-discover needs Cabal 2.0. But it is very unclear where to place this requirement in the cabal file. (For reference, here is a failed build: https://github.com/BNFC/bnfc/runs/1594499971?check_suite_focus=true)

However, I cannot claim to have understood the logic behind that. (Even more since the build claimed to have run under Cabal/cabal-install 3.2.0.0, which shouldn't have raised the issue in the first place---see versions flab.)