diff --git a/cabal-install/src/Distribution/Client/ProjectConfig/Legacy.hs b/cabal-install/src/Distribution/Client/ProjectConfig/Legacy.hs index 78622d53be6..c6f7d411cf1 100644 --- a/cabal-install/src/Distribution/Client/ProjectConfig/Legacy.hs +++ b/cabal-install/src/Distribution/Client/ProjectConfig/Legacy.hs @@ -641,7 +641,7 @@ convertLegacyProjectConfig configBuildOnly = convertLegacyBuildOnlyFlags globalFlags - configShFlags + (configFlags <> configShFlags) installSharedFlags clientInstallFlags haddockFlags @@ -758,7 +758,8 @@ convertLegacyPerPackageFlags PackageConfig{..} where ConfigFlags - { configProgramPaths + { configCommonFlags = commonFlags + , configProgramPaths , configProgramArgs , configProgramPathExtra = packageConfigProgramPathExtra , configVanillaLib = packageConfigVanillaLib @@ -801,6 +802,10 @@ convertLegacyPerPackageFlags packageConfigCoverage = coverage <> libcoverage -- TODO: defer this merging to the resolve phase + CommonSetupFlags + { setupKeepTempFiles = packageConfigKeepTempFiles + } = commonFlags + InstallFlags { installDocumentation = packageConfigDocumentation , installRunTests = packageConfigRunTests @@ -1042,7 +1047,8 @@ convertToLegacySharedConfig convertToLegacyAllPackageConfig :: ProjectConfig -> LegacyPackageConfig convertToLegacyAllPackageConfig ProjectConfig - { projectConfigShared = ProjectConfigShared{..} + { projectConfigBuildOnly = ProjectConfigBuildOnly{..} + , projectConfigShared = ProjectConfigShared{..} } = LegacyPackageConfig { legacyConfigureFlags = configFlags @@ -1054,6 +1060,9 @@ convertToLegacyAllPackageConfig where commonFlags = mempty + { -- { setupVerbosity = projectConfigVerbosity + setupKeepTempFiles = projectConfigKeepTempFiles + } configFlags = ConfigFlags @@ -1131,6 +1140,8 @@ convertToLegacyPerPackageConfig PackageConfig{..} = where commonFlags = mempty + { setupKeepTempFiles = packageConfigKeepTempFiles + } configFlags = ConfigFlags { configCommonFlags = commonFlags diff --git a/cabal-install/src/Distribution/Client/ProjectConfig/Types.hs b/cabal-install/src/Distribution/Client/ProjectConfig/Types.hs index 4c2555c472c..e27187c7ff5 100644 --- a/cabal-install/src/Distribution/Client/ProjectConfig/Types.hs +++ b/cabal-install/src/Distribution/Client/ProjectConfig/Types.hs @@ -290,8 +290,9 @@ data PackageConfig = PackageConfig , packageConfigDumpBuildInfo :: Flag DumpBuildInfo , packageConfigRunTests :: Flag Bool -- TODO: [required eventually] use this , packageConfigDocumentation :: Flag Bool -- TODO: [required eventually] use this - -- Haddock options - , packageConfigHaddockHoogle :: Flag Bool -- TODO: [required eventually] use this + , packageConfigKeepTempFiles :: Flag Bool + , -- Haddock options + packageConfigHaddockHoogle :: Flag Bool -- TODO: [required eventually] use this , packageConfigHaddockHtml :: Flag Bool -- TODO: [required eventually] use this , packageConfigHaddockHtmlLocation :: Flag String -- TODO: [required eventually] use this , packageConfigHaddockForeignLibs :: Flag Bool -- TODO: [required eventually] use this diff --git a/cabal-install/tests/UnitTests/Distribution/Client/ProjectConfig.hs b/cabal-install/tests/UnitTests/Distribution/Client/ProjectConfig.hs index 1996dab1a1d..b078c4ebc63 100644 --- a/cabal-install/tests/UnitTests/Distribution/Client/ProjectConfig.hs +++ b/cabal-install/tests/UnitTests/Distribution/Client/ProjectConfig.hs @@ -748,6 +748,7 @@ instance Arbitrary PackageConfig where <*> arbitrary <*> arbitrary <*> arbitrary + <*> arbitrary <*> arbitraryFlag arbitraryShortToken <*> arbitrary <*> arbitrary @@ -819,6 +820,7 @@ instance Arbitrary PackageConfig where , packageConfigDumpBuildInfo = x27_1 , packageConfigRunTests = x28 , packageConfigDocumentation = x29 + , packageConfigkeepTempFiles = x59 , packageConfigHaddockHoogle = x30 , packageConfigHaddockHtml = x31 , packageConfigHaddockHtmlLocation = x32 @@ -884,6 +886,7 @@ instance Arbitrary PackageConfig where , packageConfigDumpBuildInfo = x27_1' , packageConfigRunTests = x28' , packageConfigDocumentation = x29' + , packageConfigKeepTempFiles = x59' , packageConfigHaddockHoogle = x30' , packageConfigHaddockHtml = x31' , packageConfigHaddockHtmlLocation = x32' @@ -918,7 +921,7 @@ instance Arbitrary PackageConfig where , (x15', x16', x53', x17', x18', x19') ) , ( (x20', x20_1', x21', x22', x23', x24') - , (x25', x26', x27', x27_1', x28', x29') + , (x25', x26', x27', x27_1', x28', x29', x59') , (x30', x31', x32', (x33', x33_1'), x34') , (x35', x36', x37', x38', x43', x39') , (x40', x41') @@ -944,7 +947,7 @@ instance Arbitrary PackageConfig where ) , ( (x20, x20_1, x21, x22, x23, x24) - , (x25, x26, x27, x27_1, x28, x29) + , (x25, x26, x27, x27_1, x28, x29, x59) , (x30, x31, x32, (x33, x33_1), x34) , (x35, x36, fmap NonEmpty x37, x38, x43, fmap NonEmpty x39) , (x40, x41) diff --git a/cabal.project b/cabal.project index e368c280c99..ee8f46021fd 100644 --- a/cabal.project +++ b/cabal.project @@ -4,3 +4,8 @@ import: project-cabal/pkgs.config import: project-cabal/constraints.config tests: True + +source-repository-package + type: git + location: git@github.com:9999years/tree-diff.git + tag: f2c15b2d78bd7435ccdc5ce346c08bd808dd1e74