@@ -88,12 +88,13 @@ data BuildConstraints = BuildConstraints
90data PackageConstraints = PackageConstraints
90data PackageConstraints = PackageConstraints
91− { pcVersionRange :: VersionRange
91+ { pcVersionRange :: VersionRange
92− , pcMaintainer :: Maybe Maintainer
92+ , pcMaintainer :: Maybe Maintainer
93− , pcTests :: TestState
93+ , pcTests :: TestState
94− , pcHaddocks :: TestState
94+ , pcHaddocks :: TestState
95− , pcBuildBenchmarks :: Bool
95+ , pcBuildBenchmarks :: Bool
96− , pcFlagOverrides :: Map FlagName Bool
96+ , pcFlagOverrides :: Map FlagName Bool
97+ , pcEnableLibProfile :: Bool
98 deriving (Show, Eq)
99 deriving (Show, Eq)
99instance ToJSON PackageConstraints where
100instance ToJSON PackageConstraints where
@@ -115,6 +116,7 @@ instance FromJSON PackageConstraints where
115 pcBuildBenchmarks <- o .: "build-benchmarks"
116 pcBuildBenchmarks <- o .: "build-benchmarks"
116 pcFlagOverrides <- Map.mapKeysWith const mkFlagName <$> o .: "flags"
117 pcFlagOverrides <- Map.mapKeysWith const mkFlagName <$> o .: "flags"
117 pcMaintainer <- o .:? "maintainer"
118 pcMaintainer <- o .:? "maintainer"
119+ pcEnableLibProfile <- fmap (fromMaybe False) (o .:? "library-profiling")
118 return PackageConstraints {..}
120 return PackageConstraints {..}
120-- | The proposed plan from the requirements provided by contributors.
122-- | The proposed plan from the requirements provided by contributors.
@@ -152,6 +154,7 @@ data ConstraintFile = ConstraintFile
152 , cfSkippedBenchmarks :: Set PackageName
154 , cfSkippedBenchmarks :: Set PackageName
153 , cfPackages :: Map Maintainer (Vector Dependency)
155 , cfPackages :: Map Maintainer (Vector Dependency)
154 , cfGithubUsers :: Map Text (Set Text)
156 , cfGithubUsers :: Map Text (Set Text)
157+ , cfSkippedLibProfiling :: Set PackageName
157instance FromJSON ConstraintFile where
160instance FromJSON ConstraintFile where
@@ -162,6 +165,7 @@ instance FromJSON ConstraintFile where
162 cfExpectedTestFailures <- getPackages o "expected-test-failures"
165 cfExpectedTestFailures <- getPackages o "expected-test-failures"
163 cfExpectedHaddockFailures <- getPackages o "expected-haddock-failures"
166 cfExpectedHaddockFailures <- getPackages o "expected-haddock-failures"
164 cfSkippedBenchmarks <- getPackages o "skipped-benchmarks"
167 cfSkippedBenchmarks <- getPackages o "skipped-benchmarks"
168+ cfSkippedLibProfiling <- getPackages o "skipped-profiling"
165 cfPackages <- o .: "packages"
169 cfPackages <- o .: "packages"
166 >>= mapM (mapM toDep)
170 >>= mapM (mapM toDep)
167 . Map.mapKeysWith const Maintainer
171 . Map.mapKeysWith const Maintainer
@@ -196,6 +200,7 @@ toBC ConstraintFile {..} = do
196 mpair = lookup name revmap
200 mpair = lookup name revmap
197 pcMaintainer = fmap fst mpair
201 pcMaintainer = fmap fst mpair
198 pcVersionRange = maybe anyVersion snd mpair
202 pcVersionRange = maybe anyVersion snd mpair
203+ pcEnableLibProfile = not (name `member` cfSkippedLibProfiling)
200 | name `member` cfSkippedTests = Don'tBuild
205 | name `member` cfSkippedTests = Don'tBuild
201 | name `member` cfExpectedTestFailures = ExpectFailure
206 | name `member` cfExpectedTestFailures = ExpectFailure