Commit 46d1b0c2 authored by Mikhail Glushenkov's avatar Mikhail Glushenkov
Browse files

new-configure: Select the same plan subset as new-build.

Before:

$ cabal new-configure
Resolving dependencies...
In order, the following would be built (use -v for more details):
 - Crypto-4.2.5.1 (exe:SymmetricTest) (requires build)
 - Crypto-4.2.5.1 (exe:WordListTest) (requires build)
 - Crypto-4.2.5.1 (exe:SHA1Test) (requires build)
 - Crypto-4.2.5.1 (exe:QuickTest) (requires build)
 - Crypto-4.2.5.1 (exe:RSATest) (requires build)
 - Crypto-4.2.5.1 (exe:HMACTest) (requires build)
 - HaXml-1.25.3 (exe:Xtract) (requires build)
 - HaXml-1.25.3 (exe:Validate) (requires build)
 - HaXml-1.25.3 (exe:MkOneOf) (requires build)
 - HaXml-1.25.3 (exe:CanonicaliseLazy) (requires build)
 - HaXml-1.25.3 (exe:Canonicalise) (requires build)
 - HaXml-1.25.3 (exe:XsdToHaskell) (requires build)
 - HaXml-1.25.3 (exe:DtdToHaskell) (requires build)
 - HaXml-1.25.3 (exe:FpMLToHaskell) (requires build)
 - aeson-pretty-0.8.1 (exe:aeson-pretty) (requires build)
 - cpphs-1.20.2 (exe:cpphs) (requires build)
 - hS3-0.5.9 (exe:hs3) (requires build)
 - yaml-0.8.18 (exe:json2yaml) (requires build)
 - yaml-0.8.18 (exe:yaml2json) (requires build)

$ cabal new-build
Resolving dependencies...
Up to date

After:

$ cabal new-configure
Resolving dependencies...
Up to date

$ cabal new-build
Resolving dependencies...
Up to date
parent a078b55e
......@@ -7,6 +7,8 @@ module Distribution.Client.CmdConfigure (
import Distribution.Client.ProjectOrchestration
import Distribution.Client.ProjectConfig
import Distribution.Client.ProjectPlanning
( PackageTarget(..) )
import Distribution.Client.Setup
( GlobalFlags, ConfigFlags(..), ConfigExFlags, InstallFlags )
......@@ -65,7 +67,18 @@ configureAction (configFlags, configExFlags, installFlags, haddockFlags)
-- planning phase.
writeProjectLocalExtraConfig rootDir cliConfig,
hookSelectPlanSubset = \_ -> return
hookSelectPlanSubset = \buildSettings' elaboratedPlan -> do
-- Select the same subset of targets as 'CmdBuild' would
-- pick (ignoring, for example, executables in libraries
-- we depend on).
selectTargets
verbosity
BuildDefaultComponents
BuildSpecificComponent
[]
(buildSettingOnlyDeps buildSettings')
elaboratedPlan
}
let buildCtx' = buildCtx {
......
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