Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored May 21, 2023
2 parents 33c9160 + 9610438 commit 2065511
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
23 changes: 12 additions & 11 deletions cabal-install/src/Distribution/Client/ProjectPlanning.hs
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,17 @@ rebuildProjectConfig verbosity
}
cliConfig = do

progsearchpath <- liftIO $ getSystemSearchPath

let fileMonitorProjectConfig = newFileMonitor (distProjectCacheFile "config")

fileMonitorProjectConfigKey <- do
configPath <- getConfigFilePath projectConfigConfigFile
return (configPath, distProjectFile "")
return (configPath, distProjectFile "",
(projectConfigHcFlavor, projectConfigHcPath, projectConfigHcPkg),
progsearchpath,
packageConfigProgramPaths,
packageConfigProgramPathExtra)

(projectConfig, localPackages) <-
runRebuild distProjectRootDirectory
Expand Down Expand Up @@ -359,18 +367,11 @@ rebuildProjectConfig verbosity

where

ProjectConfigShared { projectConfigConfigFile } =
projectConfigShared cliConfig

ProjectConfigShared { projectConfigIgnoreProject } =
ProjectConfigShared { projectConfigHcFlavor, projectConfigHcPath, projectConfigHcPkg, projectConfigIgnoreProject, projectConfigConfigFile } =
projectConfigShared cliConfig

fileMonitorProjectConfig ::
FileMonitor
(FilePath, FilePath)
(ProjectConfig, [PackageSpecifier UnresolvedSourcePackage])
fileMonitorProjectConfig =
newFileMonitor (distProjectCacheFile "config")
PackageConfig { packageConfigProgramPaths, packageConfigProgramPathExtra } =
projectConfigLocalPackages cliConfig

-- Read the cabal.project (or implicit config) and combine it with
-- arguments from the command line
Expand Down
9 changes: 9 additions & 0 deletions changelog.d/pr-8819
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
synopsis: Use compiler flags for caching project config
packages: cabal-install
prs: #8819

description: {

This ensures that cached project configs with conditionals re-execute the conditional logic when the compiler changes.

}

0 comments on commit 2065511

Please sign in to comment.