Skip to content

Commit b9aca89

Browse files
gbazBodigrim
andauthored
relax upper bounds revision check (#1214)
* relax upper bounds revision check * Update src/Distribution/Server/Util/CabalRevisions.hs Co-authored-by: ˌbodʲɪˈɡrʲim <andrew.lelechenko@gmail.com> --------- Co-authored-by: ˌbodʲɪˈɡrʲim <andrew.lelechenko@gmail.com>
1 parent eef8343 commit b9aca89

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Distribution/Server/Util/CabalRevisions.hs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,12 @@ checkCabalFileRevision checkXRevision old new = do
179179
checkPackageChecks :: Check GenericPackageDescription
180180
checkPackageChecks pkg pkg' =
181181
let checks = checkPackage pkg Nothing
182-
checks' = checkPackage pkg' Nothing
182+
checks' = filter notUpperBounds $ checkPackage pkg' Nothing
183+
-- if multiple upper bounds are missing, then the simple set subtraction might detect a change to
184+
-- just one, and fail. Ideally we'd perform a set subtraction directly on just the missing bounds
185+
-- warning contents. A simple second best is to discard this check for now.
186+
notUpperBounds (PackageDistSuspiciousWarn (MissingUpperBounds _)) = False
187+
notUpperBounds _ = True
183188
in case checks' \\ checks of
184189
[] -> return ()
185190
newchecks -> fail $ unlines (map ppPackageCheck newchecks)

0 commit comments

Comments
 (0)