Commit a59f269b authored by Duncan Coutts's avatar Duncan Coutts Committed by Edward Z. Yang
Browse files

Rename pkgConfigProgramDb/CompilerProgs to clarify purpose

The ProgramDb in the ElaboratedSharedConfig actually only ever contains
the programs configured by the compiler, and this is the way it will
remain, so rename to clarify that usage.

Config for other non-compiler programs will be handled differently. This
makes sense because the compiler (and programs) have to be shared
between all packages, while for non-compiler programs it's possible in
principle to use different versions for different packages within a
project. Thus it's not possible to have a single shared ProgramDb for
all programs for all packages (other than for the compiler).
parent d3f5f783
......@@ -946,9 +946,9 @@ buildAndInstallUnpackedPackage verbosity
}
installLock cacheLock
pkgshared@ElaboratedSharedConfig {
pkgConfigCompiler = compiler,
pkgConfigPlatform = platform,
pkgConfigProgramDb = progdb
pkgConfigPlatform = platform,
pkgConfigCompiler = compiler,
pkgConfigCompilerProgs = progdb
}
rpkg@(ReadyPackage pkg)
srcdir builddir = do
......@@ -1103,8 +1103,8 @@ buildInplaceUnpackedPackage verbosity
BuildTimeSettings{buildSettingNumJobs}
cacheLock
pkgshared@ElaboratedSharedConfig {
pkgConfigCompiler = compiler,
pkgConfigProgramDb = progdb
pkgConfigCompiler = compiler,
pkgConfigCompilerProgs = progdb
}
rpkg@(ReadyPackage pkg)
buildStatus
......
......@@ -205,7 +205,7 @@ data ElaboratedSharedConfig
pkgConfigPlatform :: Platform,
pkgConfigCompiler :: Compiler, --TODO: [code cleanup] replace with CompilerInfo
pkgConfigProgramDb :: ProgramDb --TODO: [code cleanup] no Eq instance
pkgConfigCompilerProgs :: ProgramDb --TODO: [code cleanup] no Eq instance
--TODO: [code cleanup] binary instance does not preserve the prog paths
-- perhaps should keep the configured progs separately
}
......@@ -703,9 +703,9 @@ rebuildInstallPlan verbosity
storeDirectory = cabalStoreDirectory (compilerId compiler)
storePackageDb = cabalStorePackageDB (compilerId compiler)
ElaboratedSharedConfig {
pkgConfigCompiler = compiler,
pkgConfigPlatform = platform,
pkgConfigProgramDb = progdb
pkgConfigPlatform = platform,
pkgConfigCompiler = compiler,
pkgConfigCompilerProgs = progdb
} = elaboratedShared
......@@ -1009,7 +1009,7 @@ elaborateInstallPlan
-> PackageConfig
-> Map PackageName PackageConfig
-> (ElaboratedInstallPlan, ElaboratedSharedConfig)
elaborateInstallPlan platform compiler progdb
elaborateInstallPlan platform compiler compilerprogdb
DistDirLayout{..}
cabalDirLayout@CabalDirLayout{cabalStorePackageDB}
solverPlan pkgsImplicitSetupDeps localPackages
......@@ -1022,9 +1022,9 @@ elaborateInstallPlan platform compiler progdb
where
elaboratedSharedConfig =
ElaboratedSharedConfig {
pkgConfigPlatform = platform,
pkgConfigCompiler = compiler,
pkgConfigProgramDb = progdb
pkgConfigPlatform = platform,
pkgConfigCompiler = compiler,
pkgConfigCompilerProgs = compilerprogdb
}
elaboratedInstallPlan =
......@@ -1922,7 +1922,7 @@ setupHsScriptOptions (ReadyPackage ElaboratedConfiguredPackage{..})
| ConfiguredId srcid uid <- CD.setupDeps pkgDependencies ],
useDependenciesExclusive = True,
useVersionMacros = pkgSetupScriptStyle == SetupCustomExplicitDeps,
useProgramConfig = pkgConfigProgramDb,
useProgramConfig = pkgConfigCompilerProgs,
useDistPref = builddir,
useLoggingHandle = Nothing, -- this gets set later
useWorkingDir = Just srcdir,
......@@ -1990,9 +1990,9 @@ setupHsConfigureFlags (ReadyPackage
configIPID = toFlag (display (installedUnitId pkg))
configProgramPaths = programDbProgramPaths pkgConfigProgramDb
configProgramArgs = programDbProgramArgs pkgConfigProgramDb
configProgramPathExtra = programDbPathExtra pkgConfigProgramDb
configProgramPaths = programDbProgramPaths pkgConfigCompilerProgs
configProgramArgs = programDbProgramArgs pkgConfigCompilerProgs
configProgramPathExtra = programDbPathExtra pkgConfigCompilerProgs
configHcFlavor = toFlag (compilerFlavor pkgConfigCompiler)
configHcPath = mempty -- use configProgramPaths instead
configHcPkg = mempty -- use configProgramPaths instead
......
Supports Markdown
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