File tree Expand file tree Collapse file tree 3 files changed +17
-4
lines changed
cabal-install/src/Distribution/Client Expand file tree Collapse file tree 3 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -235,6 +235,9 @@ import System.FilePath
235
235
( (</>)
236
236
)
237
237
238
+ import System.IO (hPutStrLn , stderr )
239
+ import System.IO.Unsafe (unsafePerformIO )
240
+
238
241
globalCommand :: [Command action ] -> CommandUI GlobalFlags
239
242
globalCommand commands =
240
243
CommandUI
@@ -843,7 +846,7 @@ data ConfigExFlags = ConfigExFlags
843
846
deriving (Eq , Show , Generic )
844
847
845
848
defaultConfigExFlags :: ConfigExFlags
846
- defaultConfigExFlags = mempty {configSolver = Flag defaultSolver}
849
+ defaultConfigExFlags = mempty
847
850
848
851
configureExCommand :: CommandUI (ConfigFlags , ConfigExFlags )
849
852
configureExCommand =
@@ -928,7 +931,13 @@ configureExOptions _showOrParseArgs src =
928
931
)
929
932
(map prettyShow)
930
933
)
931
- , optionSolver configSolver (\ v flags -> flags{configSolver = v})
934
+ , optionSolver
935
+ configSolver
936
+ ( \ _ flags ->
937
+ unsafePerformIO $ do
938
+ hPutStrLn stderr " [WARNING] The --solver flag is deprecated and will be removed in a future release."
939
+ return flags
940
+ )
932
941
, option
933
942
[]
934
943
[" allow-older" ]
@@ -3422,7 +3431,7 @@ optionSolver get set =
3422
3431
option
3423
3432
[]
3424
3433
[" solver" ]
3425
- (" Select dependency solver to use (default: " ++ prettyShow defaultSolver ++ " ). Choices: " ++ allSolvers ++ " ." )
3434
+ (" [DEPRECATED] Select dependency solver to use (default: " ++ prettyShow defaultSolver ++ " ). Choices: " ++ allSolvers ++ " ." )
3426
3435
get
3427
3436
set
3428
3437
( reqArg
Original file line number Diff line number Diff line change @@ -499,7 +499,7 @@ builds with ``cabal build`` are performed with the compiler
499
499
500
500
- Any flag accepted by ``cabal configure `` beyond
501
501
``./Setup configure ``, namely ``--cabal-lib-version ``,
502
- ``--constraint ``, `` --preference `` and ``--solver. ``
502
+ ``--constraint `` and ``--preference ``.
503
503
504
504
- Any flag accepted by ``cabal install `` beyond ``./Setup configure ``.
505
505
Original file line number Diff line number Diff line change @@ -1692,6 +1692,10 @@ Most users generally won't need these.
1692
1692
1693
1693
The command line variant of this field is ``--solver=modular ``.
1694
1694
1695
+ .. warning ::
1696
+
1697
+ This CLI option has been deprecated and will be removed in a future release.
1698
+
1695
1699
.. cfg-field :: max-backjumps: nat
1696
1700
--max-backjumps=N
1697
1701
:synopsis: Maximum number of solver backjumps.
You can’t perform that action at this time.
0 commit comments