-
Duncan Coutts authored
A new option in SetupScriptOptions to specify exactly what version of the Cabal spec we believe we're using when we're talking to the Setup.hs. Currently the version of cabal to use is guessed by the SetupWrapper code based on the useCabalVersion version range and what versions are installed in the ambient package environment, and cached state of whatever an existing compiled Setup used. When an explicit useCabalSpecVersion is given, all of these heuristics are short cut and we use exactly the version we're told to use. In this case it's the responsibility of the caller to useDependencies with a suitable Cabal lib version, or otherwise know that we'll be using the self or internal setup methods. This approach goes along with the idea of deciding up front (and in a deterministic way) what setup deps to use (using defaults if needed), rather than deciding based on what's currently in the user environment. In the current code paths, useCabalSpecVersion is Nothing, so no change in behaviour yet.
5b854abb