Initial ignoreUpgradeableCore

This commit is contained in:
Michael Snoyman 2014-03-13 08:13:05 +02:00
parent f534e42252
commit d95f3d0661
5 changed files with 20 additions and 1 deletions

View File

@ -125,6 +125,9 @@ defaultExpectedFailures ghcVer = execWriter $ do
-- Test suite is currently failing regularly, needs to be worked out still.
add "lens"
-- Requires too old a version of test-framework
add "time"
-- No code included any more, therefore Haddock fails
mapM_ add $ words =<<
[ "comonad-transformers comonads-fd groupoids"
@ -342,6 +345,11 @@ defaultStablePackages ghcVer = unPackageMap $ execWriter $ do
-- Version 0.15.3 requires a newer template-haskell
addRange "FP Complete <michael@fpcomplete.com>" "language-ecmascript" "< 0.15.3"
-- Temporary upper bounds while getting things sorted with upstream...
addRange "Michael Snoyman" "dlist" "< 0.6"
addRange "Michael Snoyman" "unix" "< 2.7"
addRange "Michael Snoyman" "array" "< 0.5"
where
add maintainer package = addRange maintainer package "-any"
addRange maintainer package range =

View File

@ -47,7 +47,11 @@ getInstallInfo settings = do
Map.union (stablePackages settings) $ identsToRanges (hplibs hp)
_ -> stablePackages settings
allPackages = dropExcluded settings allPackages'
let totalCore = extraCore settings `Set.union` Set.map (\(PackageIdentifier p _) -> p) core
let totalCore
| ignoreUpgradeableCore settings =
Set.fromList $ map PackageName $ words "base containers template-haskell"
| otherwise =
extraCore settings `Set.union` Set.map (\(PackageIdentifier p _) -> p) core
putStrLn "Loading package database"
pdb <- loadPackageDB settings coreMap totalCore allPackages

View File

@ -25,6 +25,7 @@ defaultSelectSettings version = SelectSettings
, stablePackages = defaultStablePackages version
, haskellPlatformDir = "hp"
, requireHaskellPlatform = True
, ignoreUpgradeableCore = False
, excludedPackages = empty
, flags = \coreMap ->
Set.fromList (words "blaze_html_0_5 small_base") `Set.union`

View File

@ -98,6 +98,8 @@ data SelectSettings = SelectSettings
, disabledFlags :: Set String
-- ^ Compile flags which should always be disabled.
, extraCore :: Set PackageName
, ignoreUpgradeableCore :: Bool
-- ^ Do not pin down the versions of upgradeable core packages.
, requireHaskellPlatform :: Bool
, allowedPackage :: GenericPackageDescription -> Either String ()
-- ^ Checks if a package is allowed into the distribution. By default, we

View File

@ -16,6 +16,7 @@ import System.IO (hFlush, stdout)
data SelectArgs = SelectArgs
{ excluded :: [String]
, noPlatform :: Bool
, ignoreUpgradeable :: Bool
, onlyPermissive :: Bool
, allowed :: [String]
, buildPlanDest :: FilePath
@ -27,6 +28,7 @@ parseSelectArgs =
loop SelectArgs
{ excluded = []
, noPlatform = False
, ignoreUpgradeable = False
, onlyPermissive = False
, allowed = []
, buildPlanDest = defaultBuildPlan
@ -36,6 +38,7 @@ parseSelectArgs =
loop x [] = return x
loop x ("--exclude":y:rest) = loop x { excluded = y : excluded x } rest
loop x ("--no-platform":rest) = loop x { noPlatform = True } rest
loop x ("--ignore-upgradeable":rest) = loop x { ignoreUpgradeable = True } rest
loop x ("--only-permissive":rest) = loop x { onlyPermissive = True } rest
loop x ("--allow":y:rest) = loop x { allowed = y : allowed x } rest
loop x ("--build-plan":y:rest) = loop x { buildPlanDest = y } rest
@ -95,6 +98,7 @@ main = do
(defaultSelectSettings ghcVersion)
{ excludedPackages = fromList $ map PackageName excluded
, requireHaskellPlatform = not noPlatform
, ignoreUpgradeableCore = ignoreUpgradeable
, allowedPackage =
if onlyPermissive
then allowPermissive allowed