Commit 2218cb40 authored by Alexis Williams's avatar Alexis Williams
Browse files

Unbreak broken things

parent 37308a4a
......@@ -120,7 +120,6 @@ freezeAction (configFlags, configExFlags, installFlags, haddockFlags)
distDirLayout cabalDirLayout
projectConfig
localPackages
True
let freezeConfig = projectFreezeConfig elaboratedPlan
writeProjectLocalFreezeConfig distDirLayout freezeConfig
......
......@@ -74,8 +74,6 @@ import qualified Data.Map as Map
import System.Directory ( getTemporaryDirectory, makeAbsolute )
import System.FilePath ( (</>) )
import Debug.Trace
import qualified Distribution.Client.CmdBuild as CmdBuild
installCommand :: CommandUI (ConfigFlags, ConfigExFlags
......@@ -179,16 +177,14 @@ installAction (configFlags, configExFlags, installFlags, haddockFlags)
| name `elem` hackageNames -> False
_ -> True
traceShowM targetSelectors'
-- This can't fail, because all of the errors are removed (or we've given up).
targets <- either (reportTargetProblems verbosity) return $ resolveTargets
selectPackageTargets
selectComponentTarget
TargetProblemCommon
elaboratedPlan
Nothing
targetSelectors'
selectPackageTargets
selectComponentTarget
TargetProblemCommon
elaboratedPlan
Nothing
targetSelectors'
return (targets, hackageNames)
......
......@@ -163,12 +163,11 @@ import System.Posix.Signals (sigKILL, sigSEGV)
-- @cabal.project@ and all the local package @.cabal@ files.
--
data ProjectBaseContext = ProjectBaseContext {
distDirLayout :: DistDirLayout,
cabalDirLayout :: CabalDirLayout,
projectConfig :: ProjectConfig,
localPackages :: [PackageSpecifier UnresolvedSourcePackage],
buildSettings :: BuildTimeSettings,
buildLocalInplace :: Bool
distDirLayout :: DistDirLayout,
cabalDirLayout :: CabalDirLayout,
projectConfig :: ProjectConfig,
localPackages :: [PackageSpecifier UnresolvedSourcePackage],
buildSettings :: BuildTimeSettings
}
establishProjectBaseContext :: Verbosity
......@@ -206,8 +205,7 @@ establishProjectBaseContext verbosity cliConfig = do
cabalDirLayout,
projectConfig,
localPackages,
buildSettings,
buildLocalInplace = True
buildSettings
}
where
mdistDirectory = Setup.flagToMaybe projectConfigDistDir
......@@ -260,8 +258,7 @@ withInstallPlan
distDirLayout,
cabalDirLayout,
projectConfig,
localPackages,
buildLocalInplace
localPackages
}
action = do
-- Take the project configuration and make a plan for how to build
......@@ -273,7 +270,6 @@ withInstallPlan
distDirLayout cabalDirLayout
projectConfig
localPackages
buildLocalInplace
action (elaboratedPlan)
runProjectPreBuildPhase
......@@ -287,8 +283,7 @@ runProjectPreBuildPhase
distDirLayout,
cabalDirLayout,
projectConfig,
localPackages,
buildLocalInplace
localPackages
}
selectPlanSubset = do
-- Take the project configuration and make a plan for how to build
......@@ -300,7 +295,6 @@ runProjectPreBuildPhase
distDirLayout cabalDirLayout
projectConfig
localPackages
buildLocalInplace
-- The plan for what to do is represented by an 'ElaboratedInstallPlan'
......
......@@ -382,7 +382,7 @@ rebuildProjectConfig verbosity
rebuildInstallPlan :: Verbosity
-> DistDirLayout -> CabalDirLayout
-> ProjectConfig
-> [PackageSpecifier UnresolvedSourcePackage] -> Bool
-> [PackageSpecifier UnresolvedSourcePackage]
-> IO ( ElaboratedInstallPlan -- with store packages
, ElaboratedInstallPlan -- with source packages
, ElaboratedSharedConfig )
......@@ -394,7 +394,7 @@ rebuildInstallPlan verbosity
}
CabalDirLayout {
cabalStoreDirLayout
} = \projectConfig localPackages buildLocalInplace ->
} = \projectConfig localPackages ->
runRebuild distProjectRootDirectory $ do
progsearchpath <- liftIO $ getSystemSearchPath
let projectConfigMonitored = projectConfig { projectConfigBuildOnly = mempty }
......@@ -422,7 +422,6 @@ rebuildInstallPlan verbosity
compilerEtc pkgConfigDB
solverPlan
localPackages
buildLocalInplace
phaseMaintainPlanOutputs elaboratedPlan elaboratedShared
return (elaboratedPlan, elaboratedShared)
......@@ -605,7 +604,7 @@ rebuildInstallPlan verbosity
-> (Compiler, Platform, ProgramDb)
-> PkgConfigDb
-> SolverInstallPlan
-> [PackageSpecifier (SourcePackage loc)] -> Bool
-> [PackageSpecifier (SourcePackage loc)]
-> Rebuild ( ElaboratedInstallPlan
, ElaboratedSharedConfig )
phaseElaboratePlan ProjectConfig {
......@@ -616,7 +615,7 @@ rebuildInstallPlan verbosity
projectConfigBuildOnly
}
(compiler, platform, progdb) pkgConfigDB
solverPlan localPackages buildLocalInplace = do
solverPlan localPackages = do
liftIO $ debug verbosity "Elaborating the install plan..."
......@@ -635,7 +634,6 @@ rebuildInstallPlan verbosity
cabalStoreDirLayout
solverPlan
localPackages
buildLocalInplace
sourcePackageHashes
defaultInstallDirs
projectConfigShared
......@@ -1215,7 +1213,6 @@ elaborateInstallPlan
-> StoreDirLayout
-> SolverInstallPlan
-> [PackageSpecifier (SourcePackage loc)]
-> Bool
-> Map PackageId PackageSourceHash
-> InstallDirs.InstallDirTemplates
-> ProjectConfigShared
......@@ -1226,7 +1223,7 @@ elaborateInstallPlan
elaborateInstallPlan verbosity platform compiler compilerprogdb pkgConfigDB
distDirLayout@DistDirLayout{..}
storeDirLayout@StoreDirLayout{storePackageDBStack}
solverPlan localPackages buildLocalInplace
solverPlan localPackages
sourcePackageHashes
defaultInstallDirs
sharedPackageConfig
......@@ -1880,7 +1877,7 @@ elaborateInstallPlan verbosity platform compiler compilerprogdb pkgConfigDB
-- built inplace into a shared dist dir. Tarball packages that depend on
-- source dir packages will also get unpacked locally.
shouldBuildInplaceOnly :: SolverPackage loc -> Bool
shouldBuildInplaceOnly pkg = buildLocalInplace && Set.member (packageId pkg)
shouldBuildInplaceOnly pkg = Set.member (packageId pkg)
pkgsToBuildInplaceOnly
pkgsToBuildInplaceOnly :: Set PackageId
......
......@@ -1517,7 +1517,6 @@ planProject testdir cliConfig = do
distDirLayout cabalDirLayout
projectConfig
localPackages
True
return (projDetails,
elaboratedPlan,
......
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