diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 8c4da52..94f303f 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -8,9 +8,9 @@ # # For more information, see https://github.com/haskell-CI/haskell-ci # -# version: 0.19.20250216 +# version: 0.19.20250821 # -# REGENDATA ("0.19.20250216",["github","resolv.cabal"]) +# REGENDATA ("0.19.20250821",["github","resolv.cabal"]) # name: Haskell-CI on: @@ -32,14 +32,19 @@ jobs: strategy: matrix: include: - - compiler: ghc-9.12.1 + - compiler: ghc-9.14.0.20250819 compilerKind: ghc - compilerVersion: 9.12.1 + compilerVersion: 9.14.0.20250819 + setup-method: ghcup-prerelease + allow-failure: false + - compiler: ghc-9.12.2 + compilerKind: ghc + compilerVersion: 9.12.2 setup-method: ghcup allow-failure: false - - compiler: ghc-9.10.1 + - compiler: ghc-9.10.2 compilerKind: ghc - compilerVersion: 9.10.1 + compilerVersion: 9.10.2 setup-method: ghcup allow-failure: false - compiler: ghc-9.8.4 @@ -47,9 +52,9 @@ jobs: compilerVersion: 9.8.4 setup-method: ghcup allow-failure: false - - compiler: ghc-9.6.6 + - compiler: ghc-9.6.7 compilerKind: ghc - compilerVersion: 9.6.6 + compilerVersion: 9.6.7 setup-method: ghcup allow-failure: false - compiler: ghc-9.4.8 @@ -106,12 +111,12 @@ jobs: - name: Install GHCup run: | mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup" + curl -sL https://downloads.haskell.org/ghcup/0.1.50.1/x86_64-linux-ghcup-0.1.50.1 > "$HOME/.ghcup/bin/ghcup" chmod a+x "$HOME/.ghcup/bin/ghcup" - name: Install cabal-install run: | - "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) - echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" + "$HOME/.ghcup/bin/ghcup" install cabal 3.16.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false) + echo "CABAL=$HOME/.ghcup/bin/cabal-3.16.0.0 -vnormal+nowrap" >> "$GITHUB_ENV" - name: Install GHC (GHCup) if: matrix.setup-method == 'ghcup' run: | @@ -126,6 +131,21 @@ jobs: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} HCVER: ${{ matrix.compilerVersion }} + - name: Install GHC (GHCup prerelease) + if: matrix.setup-method == 'ghcup-prerelease' + run: | + "$HOME/.ghcup/bin/ghcup" config add-release-channel prereleases + "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) + 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=$HCPKG" >> "$GITHUB_ENV" + echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV" + env: + HCKIND: ${{ matrix.compilerKind }} + HCNAME: ${{ matrix.compiler }} + HCVER: ${{ matrix.compilerVersion }} - name: Set PATH and environment variables run: | echo "$HOME/.cabal/bin" >> $GITHUB_PATH @@ -136,7 +156,7 @@ jobs: echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV" echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" - echo "HEADHACKAGE=false" >> "$GITHUB_ENV" + if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV" env: HCKIND: ${{ matrix.compilerKind }} @@ -164,6 +184,18 @@ jobs: repository hackage.haskell.org url: http://hackage.haskell.org/ EOF + if $HEADHACKAGE; then + cat >> $CABAL_CONFIG <> $CABAL_CONFIG <> cabal.project if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package resolv" >> cabal.project ; fi - if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi + if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project ; fi + if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package resolv" >> cabal.project ; fi + if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi + if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package resolv" >> cabal.project ; fi + if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi cat >> cabal.project <> cabal.project + fi $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(resolv)$/; }' >> cabal.project.local cat cabal.project cat cabal.project.local diff --git a/ChangeLog.md b/ChangeLog.md index 7e07c3f..f4bd726 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -2,6 +2,13 @@ See also http://pvp.haskell.org/faq # Revision history for `resolv` +## 0.2.0.3 + +_2025-08-31, Andreas Abel_ + +* Drop support for GHC 7 +* Tested with GHC 8.0 - 9.14 alpha1 + ## 0.2.0.2 _2023-06-12, Alexey Radkov and Andreas Abel_ diff --git a/haskell-ci.patch b/haskell-ci.patch index fbb352f..0ab1565 100644 --- a/haskell-ci.patch +++ b/haskell-ci.patch @@ -1,14 +1,5 @@ --- .github/workflows/haskell-ci.yml 2022-08-12 15:15:50.000000000 +0200 +++ .github/workflows/haskell-ci.yml-patched 2022-08-12 15:14:23.000000000 +0200 -@@ -25,7 +25,7 @@ - jobs: - linux: - name: Haskell-CI - Linux - ${{ matrix.compiler }} -- runs-on: ubuntu-20.04 -+ runs-on: ubuntu-22.04 - timeout-minutes: - 60 - container: @@ -170,6 +170,9 @@ touch cabal.project echo "packages: $GITHUB_WORKSPACE/source/." >> cabal.project diff --git a/resolv.cabal b/resolv.cabal index 6fd51ce..b118f53 100644 --- a/resolv.cabal +++ b/resolv.cabal @@ -1,8 +1,7 @@ cabal-version: 2.2 name: resolv -version: 0.2.0.2 -x-revision: 5 +version: 0.2.0.3 synopsis: Domain Name Service (DNS) lookup via the libresolv standard library routines description: { @@ -36,7 +35,7 @@ provides a compatible subset of this package's API. license: GPL-2.0-or-later license-files: LICENSE LICENSE.GPLv2 LICENSE.GPLv3 author: Herbert Valerio Riedel -maintainer: Alexey Radkov +maintainer: Alexey Radkov, Andreas Abel category: Network build-type: Configure bug-reports: https://github.com/haskell-hvr/resolv/issues @@ -56,10 +55,11 @@ extra-tmp-files: autom4te.cache cbits/hs_resolv_config.h tested-with: - GHC == 9.12.1 - GHC == 9.10.1 + GHC == 9.14.1 + GHC == 9.12.2 + GHC == 9.10.2 GHC == 9.8.4 - GHC == 9.6.6 + GHC == 9.6.7 GHC == 9.4.8 GHC == 9.2.8 GHC == 9.0.2 @@ -89,23 +89,25 @@ library Trustworthy hs-source-dirs: src + include-dirs: cbits + exposed-modules: Network.DNS other-modules: Network.DNS.Message Network.DNS.FFI Compat - build-depends: base >= 4.6 && < 5 - -- bytestring-0.10.0.0 was shipped with GHC 7.6 (base-4.6) - , base16-bytestring >= 0.1 && < 1.1 - , binary ^>= 0.7.3 || ^>= 0.8 - -- we need binary-0.7.3 for isolate - , bytestring >= 0.10.0.0 && < 0.13 - -- instance IsString ByteString exists in its form since bytestring-0.10.0.0 - -- see https://github.com/haskell-hvr/resolv/pull/13#issuecomment-1213876161 - , containers >= 0.4.2.1 && < 0.9 - - ghc-options: -Wall - include-dirs: cbits + -- Lower bounds take from GHC 8.0 shipped libraries and Stackage LTS 7.0 + build-depends: base >= 4.9 && < 5 + , base16-bytestring >= 0.1.1.6 && < 1.1 + , binary >= 0.8.3 && < 0.9 + , bytestring >= 0.10.8.0 && < 0.13 + , containers >= 0.5.7.1 && < 0.9 + + ghc-options: + -Wall + -Wcompat + -Wunused-packages + -Wincomplete-patterns test-suite resolv. default-language: Haskell2010 @@ -119,7 +121,7 @@ test-suite resolv. , bytestring -- additional dependencies not inherited - build-depends: tasty >= 1.2.3 && < 1.6 + build-depends: tasty >= 1.2.3 && < 1.6 , tasty-hunit ^>= 0.10.0 - , directory ^>= 1.1.0 || ^>= 1.2.0 || ^>= 1.3.0 - , filepath >= 1.3 && < 1.6 + , directory >= 1.2.6.2 && < 1.4 + , filepath >= 1.4.1.0 && < 1.6 diff --git a/src-test/Tests1.hs b/src-test/Tests1.hs index 20d995a..b680cd1 100644 --- a/src-test/Tests1.hs +++ b/src-test/Tests1.hs @@ -1,5 +1,10 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} +#if __GLASGOW_HASKELL__ >= 900 +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} +#endif + module Main where import Control.Applicative as A @@ -87,5 +92,3 @@ assertEqShow onFail ref cur onFail T.assertFailure ("expected: " ++ show ref ++ "\n but got: " ++ show cur) | otherwise = A.pure () - - diff --git a/src/Network/DNS.hs b/src/Network/DNS.hs index c3ca25b..4cc1d43 100644 --- a/src/Network/DNS.hs +++ b/src/Network/DNS.hs @@ -1,5 +1,4 @@ {-# LANGUAGE CApiFFI #-} -{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE Trustworthy #-} @@ -84,7 +83,6 @@ module Network.DNS import Control.Exception import Data.Bits (unsafeShiftR, (.&.)) -import Data.Typeable (Typeable) import Foreign.C import Foreign.Marshal.Alloc import Numeric (showInt) @@ -120,7 +118,7 @@ data DnsException -- ^ No such domain (non-authoritative) or SERVERFAIL -- -- @since 0.2.0.0 - deriving (Eq, Show, Typeable) + deriving (Eq, Show) instance Exception DnsException