Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ghc 9.8.2 #10

Merged
merged 1 commit into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
@@ -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
#
Expand All @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -158,6 +163,17 @@ jobs:
echo "package example-pkg-B" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
cat >> cabal.project <<EOF
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
EOF
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(example-pkg-A|example-pkg-B|trace-foreign-calls)$/; }' >> cabal.project.local
cat cabal.project
Expand Down
File renamed without changes.
13 changes: 13 additions & 0 deletions cabal.project.ci
Original file line number Diff line number Diff line change
@@ -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
File renamed without changes.
10 changes: 10 additions & 0 deletions cabal.project.plugin-9.8.2
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion example-pkg-A/example-pkg-A.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion example-pkg-B/example-pkg-B.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ maintainer: [email protected]
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

Expand Down
5 changes: 0 additions & 5 deletions trace-foreign-calls/cabal.project.ci

This file was deleted.

6 changes: 6 additions & 0 deletions trace-foreign-calls/src/Plugin/TraceForeignCalls.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}

module Plugin.TraceForeignCalls (plugin) where
Expand Down Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions trace-foreign-calls/trace-foreign-calls.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ 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
location: https://github.com/well-typed/trace-foreign-calls

common lang
build-depends:
base >= 4.18 && < 4.19
base >= 4.18 && < 4.20
default-language:
GHC2021
ghc-options:
Expand All @@ -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:
Expand Down