@@ -134,6 +134,8 @@ import Data.List
134
134
( deleteFirstsBy )
135
135
import System.FilePath
136
136
( (</>) )
137
+ import Control.Exception
138
+ ( assert )
137
139
138
140
globalCommand :: [Command action ] -> CommandUI GlobalFlags
139
141
globalCommand commands = CommandUI {
@@ -497,16 +499,13 @@ filterConfigureFlags flags cabalLibVersion
497
499
configConstraints = []
498
500
}
499
501
500
- flags_3_11_0 = if not . null $ configPromisedDependencies flags then error $
501
- " --promised-dependencies was requested, likely through --enable-multi-repl,\n \
502
- \but some package setup-depends on Cabal " ++ prettyShow cabalLibVersion ++ " ,\n \
503
- \which is too old to support --promised-dependencies. Use the flag\n \
504
- \--constraint='setup.Cabal >= 3.11' to constrain Cabal to an appropriate\n \
505
- \version or to see which package is requiring an older version.\n \
506
- \TODO: automate the constraint, see https://github.com/haskell/cabal/issues/8954"
507
- else flags_latest {
508
- configPromisedDependencies = []
509
- }
502
+ flags_3_11_0 = flags_latest {
503
+ -- It's too late to convert configPromisedDependencies to anything
504
+ -- meaningful, so we just assert that it's empty.
505
+ -- We add a Cabal>=3.11 constraint before solving when multi-repl is
506
+ -- enabled, so this should never trigger.
507
+ configPromisedDependencies = assert (null $ configPromisedDependencies flags) []
508
+ }
510
509
511
510
flags_3_7_0 = flags_3_11_0 {
512
511
-- Cabal < 3.7 does not know about --extra-lib-dirs-static
0 commit comments