Skip to content

Commit 1085cea

Browse files
jkeuhlenclaude
andcommitted
ci: constrain megaparsec < 9.8 across all GHCs
Broaden the previous GHC < 9.10 constraint to the whole matrix. megaparsec-9.8.0 breaks the build two different ways: * GHC < 9.10: fails to compile ("Variable not in scope: foldl'"), relying on foldl' being re-exported from Prelude (base-4.20 / GHC 9.10). * GHC >= 9.10: compiles, but changes parse-error rendering (the `^` caret under the offending token), breaking the expected strings in Database.Persist.Quasi's test suite (3 failures in QuasiSpec). The earlier conditional only fixed the compile error; pin unconditionally so every job uses the pre-9.8 error format the tests expect. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent ac31991 commit 1085cea

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

cabal.project

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,15 @@ allow-newer:
2020
, bytestring-lexing:base
2121
, postgresql-simple-interval:persistent
2222

23-
-- megaparsec 9.8.0 uses an unqualified `foldl'`, which is only re-exported from
24-
-- Prelude as of base-4.20 (GHC 9.10). On older GHCs it fails to compile with
25-
-- "Variable not in scope: foldl'". Pin to < 9.8 there; newer GHCs build it fine.
26-
if impl(ghc < 9.10)
27-
constraints: megaparsec < 9.8
23+
-- megaparsec 9.8.0 breaks the build in two ways:
24+
-- * On GHC < 9.10 it fails to compile ("Variable not in scope: foldl'"),
25+
-- because it relies on `foldl'` being re-exported from Prelude, which only
26+
-- happens as of base-4.20 (GHC 9.10).
27+
-- * On GHC >= 9.10 it compiles but changes how parse errors are rendered
28+
-- (the `^` caret under the offending token), which breaks the expected
29+
-- strings in Database.Persist.Quasi's test suite.
30+
-- Pin to < 9.8 across the whole matrix until the suite is updated upstream.
31+
constraints: megaparsec < 9.8
2832

2933
source-repository-package
3034
type: git

0 commit comments

Comments
 (0)