Skip to content

Commit 2dfa793

Browse files
committed
disable tests for older version of GHC
those older versions depend on ghc-heap-view which depends on ghc. this is a fundamental package whose deps cannot be upgraded as part of an install plan. unfortunately, newer contrib packages depend on a newer 'binary' package, which is one of those packages that cannot be upgraded.
1 parent 72fdeef commit 2dfa793

File tree

3 files changed

+9
-19
lines changed

3 files changed

+9
-19
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ jobs:
178178
echo "packages: $GITHUB_WORKSPACE/source/strict-containers" >> cabal.project
179179
echo "packages: $GITHUB_WORKSPACE/source/strict-containers-lens" >> cabal.project
180180
echo "packages: $GITHUB_WORKSPACE/source/strict-containers-serialise" >> cabal.project
181-
echo "packages: $GITHUB_WORKSPACE/source/strict-containers-tests" >> cabal.project
181+
if [ $((HCNUMVER >= 80600)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/strict-containers-tests" >> cabal.project ; fi
182182
cat cabal.project
183183
- name: sdist
184184
run: |
@@ -204,15 +204,15 @@ jobs:
204204
echo "packages: ${PKGDIR_strict_containers}" >> cabal.project
205205
echo "packages: ${PKGDIR_strict_containers_lens}" >> cabal.project
206206
echo "packages: ${PKGDIR_strict_containers_serialise}" >> cabal.project
207-
echo "packages: ${PKGDIR_strict_containers_tests}" >> cabal.project
207+
if [ $((HCNUMVER >= 80600)) -ne 0 ] ; then echo "packages: ${PKGDIR_strict_containers_tests}" >> cabal.project ; fi
208208
echo "package strict-containers" >> cabal.project
209209
echo " ghc-options: -Werror=missing-methods" >> cabal.project
210210
echo "package strict-containers-lens" >> cabal.project
211211
echo " ghc-options: -Werror=missing-methods" >> cabal.project
212212
echo "package strict-containers-serialise" >> cabal.project
213213
echo " ghc-options: -Werror=missing-methods" >> cabal.project
214-
echo "package strict-containers-tests" >> cabal.project
215-
echo " ghc-options: -Werror=missing-methods" >> cabal.project
214+
if [ $((HCNUMVER >= 80600)) -ne 0 ] ; then echo "package strict-containers-tests" >> cabal.project ; fi
215+
if [ $((HCNUMVER >= 80600)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
216216
cat >> cabal.project <<EOF
217217
EOF
218218
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(binary|containers|ghc-heap|strict-containers|strict-containers-lens|strict-containers-serialise|strict-containers-tests|text)$/; }' >> cabal.project.local
@@ -245,8 +245,8 @@ jobs:
245245
${CABAL} -vnormal check
246246
cd ${PKGDIR_strict_containers_serialise} || false
247247
${CABAL} -vnormal check
248-
cd ${PKGDIR_strict_containers_tests} || false
249-
${CABAL} -vnormal check
248+
if [ $((HCNUMVER >= 80600)) -ne 0 ] ; then cd ${PKGDIR_strict_containers_tests} || false ; fi
249+
if [ $((HCNUMVER >= 80600)) -ne 0 ] ; then ${CABAL} -vnormal check ; fi
250250
- name: haddock
251251
run: |
252252
$CABAL v2-haddock --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all

strict-containers-tests/StrictTests.hs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ module Main (main) where
77
import Test.Tasty (TestTree, defaultMain, testGroup)
88
import Test.Tasty.HUnit
99

10-
#if __GLASGOW_HASKELL__ >= 806
1110
import GHC.Exts.Heap
12-
#else
13-
import GHC.HeapView
14-
#endif
1511

1612
import qualified Data.Strict.HashMap as SHM
1713
import qualified Data.Strict.IntMap as SIM

strict-containers-tests/strict-containers-tests.cabal

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ Homepage: https://github.com/haskellari/strict-containers
1111
Cabal-Version: >= 1.10
1212
Build-type: Simple
1313
tested-with:
14-
GHC ==8.2.2
15-
|| ==8.4.4
16-
|| ==8.6.5
14+
GHC ==8.6.5
1715
|| ==8.8.4
1816
|| ==8.10.7
1917
|| ==9.0.2
@@ -38,13 +36,9 @@ test-suite strictness-tests
3836
, strict >= 0.4 && < 0.5
3937
, vector >= 0.13.0.0 && < 0.14
4038

41-
if impl(ghc >= 8.6)
42-
build-depends: ghc-heap
43-
else
44-
build-depends: ghc-heap-view
45-
4639
build-depends:
47-
HUnit
40+
ghc-heap
41+
, HUnit
4842
, QuickCheck >=2.7.1
4943
, tasty
5044
, tasty-hunit

0 commit comments

Comments
 (0)