-
Notifications
You must be signed in to change notification settings - Fork 847
Description
The fix to haskell/cabal#1725 is in Cabal >= 1.24. This means that configure doesn't always need to take as many deps (for buildable: false). In #2475 , this came up as issues with the solver, because the solver thinks some things aren't deps, that stack thinks are necessary deps.
Currently, the Cabal version in use is something selected by the user not the project, and this can be a source of non-determinism. Currently build plan resolution is independent of Cabal version, and we'd prefer to keep it that way. Why? Because then we have better hope for consistent results for users. Lets say we do vary build-plan based on installed Cabal version. Then, a stack.yaml for Cabal-1.24 could easily break for a user of Cabal-1.22.
How do we solve this? I think I prefer the following approach:
-
Add a
require-cabal-versionfield, similar torequire-stack-version. Check installed Cabal version on build. -
When the version range excludes
< 1.24, instead use the build plans with fewer deps. This way we can force consistency. -
Relevant to
stack init --resolver ghc-7.10.3creates incomplete stack file #2475, forstack init, this would mean that when the user hascabal-install >= 1.24, it will output astack.yamlwithrequire-cabal-version: ">= 1.24". If the user is using an earlier version, then a warning will be omitted and norequire-cabal-versionadded.