diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 4e109ba..9e32bd4 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -1,6 +1,6 @@ # This GitHub workflow config has been generated by a script via # -# haskell-ci 'github' 'cabal.project' +# haskell-ci 'github' 'cabal.project.ci' # # To regenerate the script (for example after adjusting tested-with) run # @@ -10,7 +10,7 @@ # # version: 0.19.20240421 # -# REGENDATA ("0.19.20240421",["github","cabal.project"]) +# REGENDATA ("0.19.20240421",["github","cabal.project.ci"]) # name: Haskell-CI on: @@ -28,6 +28,11 @@ jobs: strategy: matrix: include: + - compiler: ghc-9.8.2 + compilerKind: ghc + compilerVersion: 9.8.2 + setup-method: ghcup + allow-failure: false - compiler: ghc-9.6.4 compilerKind: ghc compilerVersion: 9.6.4 @@ -158,6 +163,17 @@ jobs: echo "package example-pkg-B" >> cabal.project echo " ghc-options: -Werror=missing-methods" >> cabal.project cat >> cabal.project <> cabal.project.local cat cabal.project diff --git a/trace-foreign-calls/cabal.haskell-ci b/cabal.haskell-ci similarity index 100% rename from trace-foreign-calls/cabal.haskell-ci rename to cabal.haskell-ci diff --git a/cabal.project.ci b/cabal.project.ci new file mode 100644 index 0000000..f3e8a08 --- /dev/null +++ b/cabal.project.ci @@ -0,0 +1,13 @@ +packages: trace-foreign-calls, example-pkg-A, example-pkg-B + +package trace-foreign-calls + tests: True + ghc-options: -Werror + +package example-pkg-A + tests: True + ghc-options: -Werror + +package example-pkg-B + tests: True + ghc-options: -Werror diff --git a/cabal.project.plugin b/cabal.project.plugin-9.6.4 similarity index 100% rename from cabal.project.plugin rename to cabal.project.plugin-9.6.4 diff --git a/cabal.project.plugin-9.8.2 b/cabal.project.plugin-9.8.2 new file mode 100644 index 0000000..f42d482 --- /dev/null +++ b/cabal.project.plugin-9.8.2 @@ -0,0 +1,10 @@ +import: cabal.project + +package * + ghc-options: + -package-db=/tmp/cabal-plugin-store/ghc-9.8.2/package.db + -fplugin-trustworthy + -plugin-package=trace-foreign-calls + -fplugin=Plugin.TraceForeignCalls + +store-dir: /tmp/cabal-plugin-store diff --git a/example-pkg-A/example-pkg-A.cabal b/example-pkg-A/example-pkg-A.cabal index 748d74b..58cc146 100644 --- a/example-pkg-A/example-pkg-A.cabal +++ b/example-pkg-A/example-pkg-A.cabal @@ -13,12 +13,13 @@ build-type: Simple extra-source-files: cbits/cbits.h cbits/cbits.c tested-with: GHC ==9.6.4 + GHC ==9.8.2 common lang ghc-options: -Wall build-depends: - base >= 4.18 && < 4.19 + base >= 4.18 && < 4.20 default-language: GHC2021 diff --git a/example-pkg-B/example-pkg-B.cabal b/example-pkg-B/example-pkg-B.cabal index efbf3a2..7ba6417 100644 --- a/example-pkg-B/example-pkg-B.cabal +++ b/example-pkg-B/example-pkg-B.cabal @@ -13,12 +13,13 @@ maintainer: edsko@well-typed.com category: Development build-type: Simple tested-with: GHC ==9.6.4 + GHC ==9.8.2 common lang ghc-options: -Wall build-depends: - base >= 4.18 && < 4.19 + base >= 4.18 && < 4.20 default-language: GHC2021 diff --git a/trace-foreign-calls/cabal.project.ci b/trace-foreign-calls/cabal.project.ci deleted file mode 100644 index 00dcf71..0000000 --- a/trace-foreign-calls/cabal.project.ci +++ /dev/null @@ -1,5 +0,0 @@ -packages: . - -package trace-foreign-calls - tests: True - ghc-options: -Werror diff --git a/trace-foreign-calls/src/Plugin/TraceForeignCalls.hs b/trace-foreign-calls/src/Plugin/TraceForeignCalls.hs index e9fd526..51fcd7c 100644 --- a/trace-foreign-calls/src/Plugin/TraceForeignCalls.hs +++ b/trace-foreign-calls/src/Plugin/TraceForeignCalls.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} module Plugin.TraceForeignCalls (plugin) where @@ -198,7 +199,12 @@ mkWrapper rfi@ReplacedForeignImport { fun_ext = mkNameSet [unLoc rfiSuffixedName] -- TODO: what is this? , fun_id = rfiOriginalName , fun_matches = MG { +#if __GLASGOW_HASKELL__ == 906 mg_ext = Generated +#endif +#if __GLASGOW_HASKELL__ >= 908 + mg_ext = Generated SkipPmc +#endif , mg_alts = noLocA . map noLocA $ [ Match { m_ext = EpAnnNotUsed diff --git a/trace-foreign-calls/trace-foreign-calls.cabal b/trace-foreign-calls/trace-foreign-calls.cabal index 83290bf..1eb7cbb 100644 --- a/trace-foreign-calls/trace-foreign-calls.cabal +++ b/trace-foreign-calls/trace-foreign-calls.cabal @@ -18,6 +18,7 @@ extra-doc-files: CHANGELOG.md extra-source-files: test-cbits/test_cbits.h test-cbits/test_cbits.c tested-with: GHC ==9.6.4 + GHC ==9.8.2 source-repository head type: git @@ -25,7 +26,7 @@ source-repository head common lang build-depends: - base >= 4.18 && < 4.19 + base >= 4.18 && < 4.20 default-language: GHC2021 ghc-options: @@ -49,7 +50,7 @@ library build-depends: -- dependencies intentionally kept at a minimum -- (we want to be able to build the boot libs with this plugin) - , ghc >= 9.6 && < 9.7 + , ghc >= 9.6 && < 9.9 test-suite test-trace-foreign-calls import: