Skip to content

Commit

Permalink
Allow bytestring-0.12 and test it in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasabel committed Jul 12, 2023
1 parent 78dc537 commit 302b356
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ jobs:
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package io-streams" >> cabal.project ; fi
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
cat >> cabal.project <<EOF
allow-newer: bytestring
EOF
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(io-streams)$/; }' >> cabal.project.local
cat cabal.project
Expand Down Expand Up @@ -271,6 +272,14 @@ jobs:
run: |
rm -f cabal.project.local
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
- name: prepare for constraint sets
run: |
rm -f cabal.project.local
- name: constraint set bytestring-0.12
run: |
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring >= 0.12' --dependencies-only -j2 all ; fi
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring >= 0.12' all ; fi
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring >= 0.12' all ; fi
- name: save cache
uses: actions/cache/save@v3
if: always()
Expand Down
24 changes: 24 additions & 0 deletions cabal.haskell-ci
Original file line number Diff line number Diff line change
@@ -1 +1,25 @@
branches: master ci*

constraint-set bytestring-0.12
-- bytestring-0.12 requires base >=4.9 (GHC 8.0)
ghc: >= 8.0
constraints: bytestring >= 0.12
--
-- The following is silently ignored here:
--
-- raw-project
-- allow-newer: bytestring
--
tests: True
run-tests: True

-- The following is meant to be for constraint-set bytestring-0.12 only,
-- but there is currently no way to enable `allow-newer: bytestring`
-- just for the constraint set.
--
-- Since core library `bytestring` is constrained to `installed`,
-- it is not harmful to allow newer `bytestring` in the default runs
-- as well---it will have no effect there.
--
raw-project
allow-newer: bytestring
2 changes: 1 addition & 1 deletion io-streams.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ Library

Build-depends: base >= 4 && <5,
attoparsec >= 0.10 && <0.15,
bytestring >= 0.9 && <0.12,
bytestring >= 0.9 && <0.13,
primitive >= 0.2 && <0.9,
process >= 1.1 && <1.7,
text >=0.10 && <1.3 || >= 2.0 && <2.1,
Expand Down

0 comments on commit 302b356

Please sign in to comment.