Commit 82e18eb4 authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

Revert "Add support for register --assume-deps-up-to-date. (#3287)"

This reverts commit 2fac2ec6.
parent 5a2b2360
......@@ -55,6 +55,7 @@ import Distribution.Types.ComponentLocalBuildInfo
import Distribution.Simple.LocalBuildInfo
import Distribution.Simple.BuildPaths
import Distribution.Simple.BuildTarget
import qualified Distribution.Simple.GHC as GHC
import qualified Distribution.Simple.GHCJS as GHCJS
......@@ -62,7 +63,6 @@ import qualified Distribution.Simple.LHC as LHC
import qualified Distribution.Simple.UHC as UHC
import qualified Distribution.Simple.HaskellSuite as HaskellSuite
import Distribution.Simple.BuildTarget
import Distribution.Simple.Compiler
import Distribution.Simple.Program
import Distribution.Simple.Program.Script
......@@ -109,20 +109,9 @@ register pkg_descr lbi flags =
| otherwise = return Nothing
where clbi = targetCLBI target
ipis <-
if fromFlag (regAssumeDepsUpToDate flags)
then
case targets of
[target] -> do
mb_ipi <- maybeGenerateOne target
case mb_ipi of
Nothing -> die "Cannot --assume-deps-up-to-date register non-library target"
Just ipi -> return [ipi]
[] -> die "In --assume-deps-up-to-date mode you must specify a target"
_ -> die "In --assume-deps-up-to-date mode you can only register a single target"
else fmap catMaybes
. traverse maybeGenerateOne
$ neededTargetsInBuildOrder' pkg_descr lbi (map nodeKey targets)
ipis <- fmap catMaybes
. traverse maybeGenerateOne
$ neededTargetsInBuildOrder' pkg_descr lbi (map nodeKey targets)
registerAll pkg_descr lbi flags ipis
return ()
where
......
......@@ -1179,9 +1179,6 @@ data RegisterFlags = RegisterFlags {
regDistPref :: Flag FilePath,
regPrintId :: Flag Bool,
regVerbosity :: Flag Verbosity,
-- | If this is true, we don't register all libraries,
-- only directly referenced library in 'regArgs'.
regAssumeDepsUpToDate :: Flag Bool,
-- Same as in 'buildArgs' and 'copyArgs'
regArgs :: [String]
}
......@@ -1195,9 +1192,8 @@ defaultRegisterFlags = RegisterFlags {
regInPlace = Flag False,
regDistPref = NoFlag,
regPrintId = Flag False,
regVerbosity = Flag normal,
regAssumeDepsUpToDate = Flag False,
regArgs = []
regArgs = [],
regVerbosity = Flag normal
}
registerCommand :: CommandUI RegisterFlags
......@@ -1228,11 +1224,6 @@ registerCommand = CommandUI
regInPlace (\v flags -> flags { regInPlace = v })
trueArg
,option "" ["assume-deps-up-to-date"]
"One-shot registration"
regAssumeDepsUpToDate (\c flags -> flags { regAssumeDepsUpToDate = c })
trueArg
,option "" ["gen-script"]
"instead of registering, generate a script to register later"
regGenScript (\v flags -> flags { regGenScript = v })
......
......@@ -2731,10 +2731,8 @@ setupHsRegisterFlags ElaboratedConfiguredPackage{..} _
_ -> toFlag False,
regPrintId = mempty, -- never use
regDistPref = toFlag builddir,
regVerbosity = toFlag verbosity,
-- Currently not used, because this is per-package.
regAssumeDepsUpToDate = toFlag False,
regArgs = []
regArgs = [],
regVerbosity = toFlag verbosity
}
setupHsHaddockFlags :: ElaboratedConfiguredPackage
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment