Skip to content

Commit

Permalink
AUGH
Browse files Browse the repository at this point in the history
  • Loading branch information
9999years committed Sep 3, 2024
1 parent eff868d commit d3b3883
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 7 deletions.
17 changes: 14 additions & 3 deletions cabal-install/src/Distribution/Client/ProjectConfig/Legacy.hs
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ convertLegacyProjectConfig
configBuildOnly =
convertLegacyBuildOnlyFlags
globalFlags
configShFlags
(configFlags <> configShFlags)
installSharedFlags
clientInstallFlags
haddockFlags
Expand Down Expand Up @@ -758,7 +758,8 @@ convertLegacyPerPackageFlags
PackageConfig{..}
where
ConfigFlags
{ configProgramPaths
{ configCommonFlags = commonFlags
, configProgramPaths
, configProgramArgs
, configProgramPathExtra = packageConfigProgramPathExtra
, configVanillaLib = packageConfigVanillaLib
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -1042,7 +1047,8 @@ convertToLegacySharedConfig
convertToLegacyAllPackageConfig :: ProjectConfig -> LegacyPackageConfig
convertToLegacyAllPackageConfig
ProjectConfig
{ projectConfigShared = ProjectConfigShared{..}
{ projectConfigBuildOnly = ProjectConfigBuildOnly{..}
, projectConfigShared = ProjectConfigShared{..}
} =
LegacyPackageConfig
{ legacyConfigureFlags = configFlags
Expand All @@ -1054,6 +1060,9 @@ convertToLegacyAllPackageConfig
where
commonFlags =
mempty
{ -- { setupVerbosity = projectConfigVerbosity
setupKeepTempFiles = projectConfigKeepTempFiles
}

configFlags =
ConfigFlags
Expand Down Expand Up @@ -1131,6 +1140,8 @@ convertToLegacyPerPackageConfig PackageConfig{..} =
where
commonFlags =
mempty
{ setupKeepTempFiles = packageConfigKeepTempFiles
}
configFlags =
ConfigFlags
{ configCommonFlags = commonFlags
Expand Down
5 changes: 3 additions & 2 deletions cabal-install/src/Distribution/Client/ProjectConfig/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,7 @@ instance Arbitrary PackageConfig where
<*> arbitrary
<*> arbitrary
<*> arbitrary
<*> arbitrary
<*> arbitraryFlag arbitraryShortToken
<*> arbitrary
<*> arbitrary
Expand Down Expand Up @@ -819,6 +820,7 @@ instance Arbitrary PackageConfig where
, packageConfigDumpBuildInfo = x27_1
, packageConfigRunTests = x28
, packageConfigDocumentation = x29
, packageConfigkeepTempFiles = x59
, packageConfigHaddockHoogle = x30
, packageConfigHaddockHtml = x31
, packageConfigHaddockHtmlLocation = x32
Expand Down Expand Up @@ -884,6 +886,7 @@ instance Arbitrary PackageConfig where
, packageConfigDumpBuildInfo = x27_1'
, packageConfigRunTests = x28'
, packageConfigDocumentation = x29'
, packageConfigKeepTempFiles = x59'
, packageConfigHaddockHoogle = x30'
, packageConfigHaddockHtml = x31'
, packageConfigHaddockHtmlLocation = x32'
Expand Down Expand Up @@ -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')
Expand All @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ import: project-cabal/pkgs.config
import: project-cabal/constraints.config

tests: True

source-repository-package
type: git
location: [email protected]:9999years/tree-diff.git
tag: f2c15b2d78bd7435ccdc5ce346c08bd808dd1e74

0 comments on commit d3b3883

Please sign in to comment.