Commit 0a7dd80c authored by Alexis Williams's avatar Alexis Williams
Browse files

Use updated program DB.

parent 6843798b
......@@ -318,7 +318,7 @@ installAction (configFlags, configExFlags, installFlags, haddockFlags)
$ defaultProgramDb
(compiler@Compiler { compilerId =
compilerId@(CompilerId compilerFlavor compilerVersion) }, platform, _) <-
compilerId@(CompilerId compilerFlavor compilerVersion) }, platform, progDb') <-
configCompilerEx hcFlavor hcPath hcPkg progDb verbosity
let
......@@ -340,7 +340,7 @@ installAction (configFlags, configExFlags, installFlags, haddockFlags)
cabalLayout = mkCabalDirLayout cabalDir mstoreDir mlogsDir
packageDbs = storePackageDBStack (cabalStoreDirLayout cabalLayout) compilerId
installedIndex <- getInstalledPackages verbosity compiler packageDbs progDb
installedIndex <- getInstalledPackages verbosity compiler packageDbs progDb'
let envSpecs = environmentFileToSpecifiers installedIndex envEntries
......@@ -408,19 +408,16 @@ installAction (configFlags, configExFlags, installFlags, haddockFlags)
$ Map.toList $ targetsMap buildCtx
runProjectPostBuildPhase verbosity baseCtx buildCtx buildOutcomes
unless supportsPkgEnvFiles $
unless supportsPkgEnvFiles $ do
warn verbosity "The current compiler doesn't support safely installing libraries. (GHC 8.0+ only)"
let
baseEntries =
GhcEnvFileClearPackageDbStack
: fmap GhcEnvFilePackageDb packageDbs
GhcEnvFileClearPackageDbStack : fmap GhcEnvFilePackageDb packageDbs
entries = baseEntries ++ entriesForLibraryComponents (targetsMap buildCtx)
createDirectoryIfMissing True (takeDirectory envFile)
when supportsPkgEnvFiles $ do
let
entries' = nub (envEntries ++ entries)
contents' = renderGhcEnvironmentFile entries'
createDirectoryIfMissing True (takeDirectory envFile)
writeFileAtomic envFile (BS.pack contents')
where
configFlags' = disableTestsBenchsByDefault configFlags
......
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