diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 3bafbee..ebf050e 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' '--config=cabal.haskell-ci' 'ghc-tags.cabal' +# haskell-ci 'github' '--config=cabal.haskell-ci' 'cabal.project' # # To regenerate the script (for example after adjusting tested-with) run # @@ -8,9 +8,9 @@ # # For more information, see https://github.com/haskell-CI/haskell-ci # -# version: 0.16.3 +# version: 0.17.20231110 # -# REGENDATA ("0.16.3",["github","--config=cabal.haskell-ci","ghc-tags.cabal"]) +# REGENDATA ("0.17.20231110",["github","--config=cabal.haskell-ci","cabal.project"]) # name: Haskell-CI on: @@ -32,19 +32,19 @@ jobs: strategy: matrix: include: - - compiler: ghc-9.6.2 + - compiler: ghc-9.8.1 compilerKind: ghc - compilerVersion: 9.6.2 + compilerVersion: 9.8.1 setup-method: ghcup allow-failure: false - - compiler: ghc-9.4.5 + - compiler: ghc-9.6.3 compilerKind: ghc - compilerVersion: 9.4.5 + compilerVersion: 9.6.3 setup-method: ghcup allow-failure: false - - compiler: ghc-9.2.8 + - compiler: ghc-9.4.8 compilerKind: ghc - compilerVersion: 9.2.8 + compilerVersion: 9.4.8 setup-method: ghcup allow-failure: false fail-fast: false @@ -54,10 +54,10 @@ jobs: apt-get update apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup" + curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" chmod a+x "$HOME/.ghcup/bin/ghcup" "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) - "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) + "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) env: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} @@ -69,11 +69,13 @@ jobs: echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" HCDIR=/opt/$HCKIND/$HCVER - HC=$HOME/.ghcup/bin/$HCKIND-$HCVER + HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") + HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') + HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV" - echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" + echo "HCPKG=$HCPKG" >> "$GITHUB_ENV" + echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV" + echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))') echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV" echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" @@ -158,7 +160,6 @@ jobs: echo " ghc-options: -Werror=missing-methods" >> cabal.project cat >> cabal.project <> cabal.project.local cat cabal.project cat cabal.project.local - name: dump install plan diff --git a/CHANGELOG.md b/CHANGELOG.md index d0ad8ce..eb8bfcd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# ghc-tags-1.8 (????-??-??) +* Add support for GHC 9.8 and drop support for GHC 9.2. + # ghc-tags-1.7 (2023-06-29) * Add support for GHC 9.6 and drop support for GHC 9.0. diff --git a/cabal.haskell-ci b/cabal.haskell-ci index 97c2eb5..fa9cd0a 100644 --- a/cabal.haskell-ci +++ b/cabal.haskell-ci @@ -2,3 +2,5 @@ branches: master doctest: False tests: True jobs-selection: any + +installed: -all diff --git a/cabal.project b/cabal.project new file mode 100644 index 0000000..e6fdbad --- /dev/null +++ b/cabal.project @@ -0,0 +1 @@ +packages: . diff --git a/ghc-tags.cabal b/ghc-tags.cabal index b454d8c..a445a0b 100644 --- a/ghc-tags.cabal +++ b/ghc-tags.cabal @@ -1,6 +1,6 @@ cabal-version: 2.4 name: ghc-tags -version: 1.7 +version: 1.8 synopsis: Utility for generating ctags and etags with GHC API. description: Utility for generating etags (Emacs) and ctags (Vim and other editors) with GHC API for efficient project navigation. @@ -14,7 +14,7 @@ extra-source-files: CHANGELOG.md README.md homepage: https://github.com/arybczak/ghc-tags bug-reports: https://github.com/arybczak/ghc-tags/issues -tested-with: GHC ==9.2.8 || ==9.4.5 || ==9.6.2 +tested-with: GHC ==9.4.8 || ==9.6.3 || ==9.8.1 source-repository head type: git @@ -28,12 +28,12 @@ flag ghc-lib executable ghc-tags ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-A4m - if !flag(ghc-lib) && impl(ghc == 9.6.*) + if !flag(ghc-lib) && impl(ghc == 9.8.*) build-depends: ghc, ghc-boot else - build-depends: ghc-lib == 9.6.* + build-depends: ghc-lib == 9.8.* - build-depends: base >=4.16 && <4.19 + build-depends: base >=4.17 && <4.20 , aeson >= 2.0.0.0 , async , attoparsec diff --git a/src/GhcTags/Ghc.hs b/src/GhcTags/Ghc.hs index c016d02..5289db5 100644 --- a/src/GhcTags/Ghc.hs +++ b/src/GhcTags/Ghc.hs @@ -47,9 +47,9 @@ data GhcTagKind | GtkTypeClass | GtkTypeClassMember (HsWildCardBndrs GhcPs (LHsSigType GhcPs)) | GtkTypeClassInstance (HsType GhcPs) - | GtkTypeFamily (Maybe ([HsTyVarBndr () GhcPs], Either (HsKind GhcPs) (HsTyVarBndr () GhcPs))) + | GtkTypeFamily (Maybe ([HsTyVarBndr (HsBndrVis GhcPs) GhcPs], Either (HsKind GhcPs) (HsTyVarBndr () GhcPs))) | GtkTypeFamilyInstance (TyFamInstDecl GhcPs) - | GtkDataTypeFamily (Maybe ([HsTyVarBndr () GhcPs], Either (HsKind GhcPs) (HsTyVarBndr () GhcPs))) + | GtkDataTypeFamily (Maybe ([HsTyVarBndr (HsBndrVis GhcPs) GhcPs], Either (HsKind GhcPs) (HsTyVarBndr () GhcPs))) | GtkDataTypeFamilyInstance (Maybe (HsKind GhcPs)) | GtkForeignImport | GtkForeignExport @@ -66,7 +66,7 @@ data GhcTag = GhcTag { -- ^ tag's kind , gtIsExported :: Bool -- ^ 'True' iff the term is exported - , gtFFI :: Maybe String + , gtFFI :: Maybe ByteString -- ^ @ffi@ import } @@ -347,7 +347,7 @@ hsDeclsToGhcTags mies = foldr go [] case sourceText of NoSourceText -> tag -- TODO: add header information from '_mheader' - SourceText s -> tag { gtFFI = Just s } + SourceText s -> tag { gtFFI = Just $ bytesFS s } : tags where tag = mkGhcTag' decLoc fd_name GtkForeignImport diff --git a/src/GhcTags/GhcCompat.hs b/src/GhcTags/GhcCompat.hs index 5aab8f7..237514a 100644 --- a/src/GhcTags/GhcCompat.hs +++ b/src/GhcTags/GhcCompat.hs @@ -107,7 +107,6 @@ compatInitSettings top_dir = do getToolSetting :: String -> IO String getToolSetting key = expandToolDir useInplaceMinGW mtool_dir <$> getSetting key - myExtraGccViaCFlags <- getSetting "GCC extra via C opts" -- On Windows, mingw is distributed with GHC, -- so we look in TopDir/../mingw/bin, -- as well as TopDir/../../mingw/bin for hadrian. @@ -229,7 +228,7 @@ compatInitSettings top_dir = do , toolSettings_opt_lc = [] , toolSettings_opt_i = [] - , toolSettings_extraGccViaCFlags = words myExtraGccViaCFlags + , toolSettings_extraGccViaCFlags = [] } , sTargetPlatform = platform diff --git a/src/GhcTags/Tag.hs b/src/GhcTags/Tag.hs index c715d20..976fddc 100644 --- a/src/GhcTags/Tag.hs +++ b/src/GhcTags/Tag.hs @@ -386,7 +386,7 @@ ghcTagToTag sing dynFlags GhcTag { gtSrcSpan, gtTag, gtKind, gtIsExported, gtFFI TagFields $ case gtFFI of Nothing -> mempty - Just ffi -> [TagField "ffi" $ Text.pack ffi] + Just ffi -> [TagField "ffi" $ Text.decodeUtf8 ffi] -- 'TagFields' from 'GhcTagKind'