cabal ignores the 'cabal-version' field when solving for setup dependencies
Open
cabal-install: cmd/check
Cabal: stanza/custom-setup
type: enhancement
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
This can cause the build to fail when the `setup-depends` range for Cabal is less restrictive than the `cabal-version` for a given package. See https://github.com/haskell/cabal/pull/3723#issuecomment-243337073.
The current behavior is technically correct, because it is possible for a setup script to depend on one version of Cabal and implement the command interface from a different version. I think it would be better to prevent build failures in the more common case, though.
One solution is to update the `setup-depends` constraint on Cabal to reflect `cabal-version` before dependency solving.
Contributor guide
Assessment
This issue has not been assessed yet.