Open hvr opened 7 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)
cabal-version: >=2.0
wasn't necessary and also not suggested by the discussion at https://github.com/haskell-CI/haskell-ci/issues/81Cabal >= 2.0
in the build-depends
of the goal that uses build-tools: hspec-discover
? (Didn't try that.)Cabal >= 2.0
in the custom-setup setup-depends
section, that fixed the build failure (see https://github.com/BNFC/bnfc/runs/1594774308?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.)
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 acustom-setup
stanza even w/o sayingcabal-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:setup-depends
are implied with recentexe:cabal
versions for a missingcustom-setup
cabal
versions react if you add acustom-setup
(which those version didn't support yet),lib:Cabal
version andexe:cabal
versions relate to each other in the context of (non)existence ofcustom-setup
cabal-version:>=1.24
when usingcustom-setup