summaryrefslogtreecommitdiff
path: root/hadrian/src/CommandLine.hs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-07-28 16:37:33 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-08-02 04:17:26 -0400
commit20ef67a3776e3d2737dc385f67cb89c90199b20f (patch)
treed4986d3359567893fb31c53f1b94ed4de7787cde /hadrian/src/CommandLine.hs
parent8631ccf2ad221dfc04b66d1ad137bf4057dd2c06 (diff)
downloadhaskell-20ef67a3776e3d2737dc385f67cb89c90199b20f.tar.gz
hadrian: Drop --configure support
Hadrian's `--configure` support has long been a point of contention. While it's convenient, it also introduces a fair bit of implementation complexity and quite a few non-trivial failure modes (see #19804, 17883, and #15948). Moreover, the feature is actively misleading to the user: `./configure` is the primary means for the user to inform the build system about the system environment and in general will require input from the user. This commits removes the feature, replacing the flag with a stub message informing the user of the deprecation. Closes #20167.
Diffstat (limited to 'hadrian/src/CommandLine.hs')
-rw-r--r--hadrian/src/CommandLine.hs9
1 files changed, 3 insertions, 6 deletions
diff --git a/hadrian/src/CommandLine.hs b/hadrian/src/CommandLine.hs
index c08eb6a2f4..2c5b90c499 100644
--- a/hadrian/src/CommandLine.hs
+++ b/hadrian/src/CommandLine.hs
@@ -1,6 +1,6 @@
module CommandLine (
optDescrs, cmdLineArgsMap, cmdFlavour, lookupFreeze1, lookupFreeze2, lookupSkipDepends,
- cmdBignum, cmdBignumCheck, cmdProgressInfo, cmdConfigure, cmdCompleteSetting,
+ cmdBignum, cmdBignumCheck, cmdProgressInfo, cmdCompleteSetting,
cmdDocsArgs, lookupBuildRoot, TestArgs(..), TestSpeed(..), defaultTestArgs,
cmdPrefix
) where
@@ -95,7 +95,7 @@ defaultTestArgs = TestArgs
, testAccept = False }
readConfigure :: Either String (CommandLineArgs -> CommandLineArgs)
-readConfigure = Right $ \flags -> flags { configure = True }
+readConfigure = Left "hadrian --configure has been deprecated (see #20167). Please run ./boot; ./configure manually"
readFlavour :: Maybe String -> Either String (CommandLineArgs -> CommandLineArgs)
readFlavour ms = Right $ \flags -> flags { flavour = lower <$> ms }
@@ -250,7 +250,7 @@ readDocsArg ms = maybe (Left "Cannot parse docs argument") (Right . set) (go =<<
optDescrs :: [OptDescr (Either String (CommandLineArgs -> CommandLineArgs))]
optDescrs =
[ Option ['c'] ["configure"] (NoArg readConfigure)
- "Run the boot and configure scripts (if you do not want to run them manually)."
+ "Deprecated: Run the boot and configure scripts."
, Option ['o'] ["build-root"] (OptArg readBuildRoot "BUILD_ROOT")
"Where to store build artifacts. (Default _build)."
, Option [] ["flavour"] (OptArg readFlavour "FLAVOUR")
@@ -345,9 +345,6 @@ cmdLineArgsMap = do
cmdLineArgs :: Action CommandLineArgs
cmdLineArgs = userSetting defaultCommandLineArgs
-cmdConfigure :: Action Bool
-cmdConfigure = configure <$> cmdLineArgs
-
cmdFlavour :: Action (Maybe String)
cmdFlavour = flavour <$> cmdLineArgs