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

update CI #19

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
17 changes: 8 additions & 9 deletions .github/workflows/cabal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,29 @@ name: cabal

on:
push:
branches: [ master ]
branches: [ main ]
pull_request:
branches: [ '*' ]
schedule:
- cron: "00 15 * * *"

jobs:
build:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
ghc: ["8.6", "8.8", "8.10", "9.0"]
cabal: ["3.2"]
cache-version: ["2021-05-21"]
ghc: ["8.6", "8.8", "8.10", "9.0", "9.2", "9.4"]
cabal: ["3.6"]
cache-version: ["2022-10-25"]

steps:
- uses: actions/checkout@v2
- uses: haskell/actions/setup@v1
- uses: haskell/actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}

- name: Cache ~/.cabal/store
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.cabal/store
Expand Down
8 changes: 4 additions & 4 deletions haskell-stack-trace-plugin.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ license: MIT
license-file: LICENSE
author: Shinya Yamaguchi
maintainer: [email protected]
copyright: 2018-2021 Shinya Yamaguchi
copyright: 2018-2022 Shinya Yamaguchi
category: Compiler Plugin, Development, Debug
build-type: Simple
extra-source-files:
CHANGELOG.md
Readme.md

tested-with: GHC ==8.6.5 || ==8.8.4 || ==8.10.4 || ==9.0.1
tested-with: GHC ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.4 || ==9.4.2

source-repository head
type: git
Expand All @@ -32,13 +32,13 @@ flag dev
default: False

common common-opts
build-depends: base >=4.12 && <4.16
build-depends: base >=4.12 && <4.17
default-language: Haskell2010

library
import: common-opts
hs-source-dirs: src
build-depends: ghc ^>=8.6 || ^>=8.8 || ^>=8.10 || ^>=9.0
build-depends: ghc ^>=8.6 || ^>=8.8 || ^>=8.10 || ^>=9.0 || ^>=9.2 || ^>=9.4
exposed-modules: StackTrace.Plugin

if flag(dev)
Expand Down
9 changes: 7 additions & 2 deletions src/StackTrace/Plugin.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@ module StackTrace.Plugin (plugin) where

import Control.Arrow (first)
import Data.Monoid (Any(Any, getAny))
import GHC.Types.SrcLoc

#if __GLASGOW_HASKELL__ >= 900
import GHC.Plugins
#else

import GhcPlugins
#endif

#if __GLASGOW_HASKELL__ >= 810
import GHC.Hs
#endif

#if __GLASGOW_HASKELL__ < 810
import HsSyn
#endif
Expand Down Expand Up @@ -57,7 +58,11 @@ ghcStackImport =
-- This is for GHC-9 related problems. @noLoc@ causes GHC to throw warnings
-- about unused imports. Even if the import is used
-- See: https://github.com/waddlaw/haskell-stack-trace-plugin/issues/16
#if __GLASGOW_HASKELL__ >= 900
srcSpan = RealSrcSpan (realSrcLocSpan $ mkRealSrcLoc "haskell-stack-trace-plugin:very-unique-file-name-to-avoid-collision" 1 1) Nothing
#else
srcSpan = RealSrcSpan (realSrcLocSpan $ mkRealSrcLoc "haskell-stack-trace-plugin:very-unique-file-name-to-avoid-collision" 1 1)
#endif

#if __GLASGOW_HASKELL__ >= 900
updateHsModule :: HsModule -> HsModule
Expand Down