Skip to content

Commit b4def51

Browse files
committed
v0.2.0.3: drop support for GHC 7
1 parent 0dfad72 commit b4def51

File tree

6 files changed

+88
-48
lines changed

6 files changed

+88
-48
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 52 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#
99
# For more information, see https://github.com/haskell-CI/haskell-ci
1010
#
11-
# version: 0.19.20250216
11+
# version: 0.19.20250821
1212
#
13-
# REGENDATA ("0.19.20250216",["github","resolv.cabal"])
13+
# REGENDATA ("0.19.20250821",["github","resolv.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -32,24 +32,29 @@ jobs:
3232
strategy:
3333
matrix:
3434
include:
35-
- compiler: ghc-9.12.1
35+
- compiler: ghc-9.14.0.20250819
3636
compilerKind: ghc
37-
compilerVersion: 9.12.1
37+
compilerVersion: 9.14.0.20250819
38+
setup-method: ghcup-prerelease
39+
allow-failure: false
40+
- compiler: ghc-9.12.2
41+
compilerKind: ghc
42+
compilerVersion: 9.12.2
3843
setup-method: ghcup
3944
allow-failure: false
40-
- compiler: ghc-9.10.1
45+
- compiler: ghc-9.10.2
4146
compilerKind: ghc
42-
compilerVersion: 9.10.1
47+
compilerVersion: 9.10.2
4348
setup-method: ghcup
4449
allow-failure: false
4550
- compiler: ghc-9.8.4
4651
compilerKind: ghc
4752
compilerVersion: 9.8.4
4853
setup-method: ghcup
4954
allow-failure: false
50-
- compiler: ghc-9.6.6
55+
- compiler: ghc-9.6.7
5156
compilerKind: ghc
52-
compilerVersion: 9.6.6
57+
compilerVersion: 9.6.7
5358
setup-method: ghcup
5459
allow-failure: false
5560
- compiler: ghc-9.4.8
@@ -106,12 +111,12 @@ jobs:
106111
- name: Install GHCup
107112
run: |
108113
mkdir -p "$HOME/.ghcup/bin"
109-
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
114+
curl -sL https://downloads.haskell.org/ghcup/0.1.50.1/x86_64-linux-ghcup-0.1.50.1 > "$HOME/.ghcup/bin/ghcup"
110115
chmod a+x "$HOME/.ghcup/bin/ghcup"
111116
- name: Install cabal-install
112117
run: |
113-
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
114-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
118+
"$HOME/.ghcup/bin/ghcup" install cabal 3.16.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
119+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.16.0.0 -vnormal+nowrap" >> "$GITHUB_ENV"
115120
- name: Install GHC (GHCup)
116121
if: matrix.setup-method == 'ghcup'
117122
run: |
@@ -126,6 +131,21 @@ jobs:
126131
HCKIND: ${{ matrix.compilerKind }}
127132
HCNAME: ${{ matrix.compiler }}
128133
HCVER: ${{ matrix.compilerVersion }}
134+
- name: Install GHC (GHCup prerelease)
135+
if: matrix.setup-method == 'ghcup-prerelease'
136+
run: |
137+
"$HOME/.ghcup/bin/ghcup" config add-release-channel prereleases
138+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
139+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
140+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
141+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
142+
echo "HC=$HC" >> "$GITHUB_ENV"
143+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
144+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
145+
env:
146+
HCKIND: ${{ matrix.compilerKind }}
147+
HCNAME: ${{ matrix.compiler }}
148+
HCVER: ${{ matrix.compilerVersion }}
129149
- name: Set PATH and environment variables
130150
run: |
131151
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
@@ -136,7 +156,7 @@ jobs:
136156
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
137157
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
138158
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
139-
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
159+
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi
140160
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
141161
env:
142162
HCKIND: ${{ matrix.compilerKind }}
@@ -164,6 +184,18 @@ jobs:
164184
repository hackage.haskell.org
165185
url: http://hackage.haskell.org/
166186
EOF
187+
if $HEADHACKAGE; then
188+
cat >> $CABAL_CONFIG <<EOF
189+
repository head.hackage.ghc.haskell.org
190+
url: https://ghc.gitlab.haskell.org/head.hackage/
191+
secure: True
192+
root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
193+
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
194+
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
195+
key-threshold: 3
196+
active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
197+
EOF
198+
fi
167199
cat >> $CABAL_CONFIG <<EOF
168200
program-default-options
169201
ghc-options: $GHCJOBS +RTS -M3G -RTS
@@ -215,9 +247,16 @@ jobs:
215247
touch cabal.project.local
216248
echo "packages: ${PKGDIR_resolv}" >> cabal.project
217249
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package resolv" >> cabal.project ; fi
218-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
250+
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project ; fi
251+
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package resolv" >> cabal.project ; fi
252+
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi
253+
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package resolv" >> cabal.project ; fi
254+
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
219255
cat >> cabal.project <<EOF
220256
EOF
257+
if $HEADHACKAGE; then
258+
echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
259+
fi
221260
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(resolv)$/; }' >> cabal.project.local
222261
cat cabal.project
223262
cat cabal.project.local

ChangeLog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ See also http://pvp.haskell.org/faq
22

33
# Revision history for `resolv`
44

5+
## 0.2.0.3
6+
7+
_2025-08-31, Andreas Abel_
8+
9+
* Drop support for GHC 7
10+
* Tested with GHC 8.0 - 9.14 alpha1
11+
512
## 0.2.0.2
613

714
_2023-06-12, Alexey Radkov and Andreas Abel_

haskell-ci.patch

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
--- .github/workflows/haskell-ci.yml 2022-08-12 15:15:50.000000000 +0200
22
+++ .github/workflows/haskell-ci.yml-patched 2022-08-12 15:14:23.000000000 +0200
3-
@@ -25,7 +25,7 @@
4-
jobs:
5-
linux:
6-
name: Haskell-CI - Linux - ${{ matrix.compiler }}
7-
- runs-on: ubuntu-20.04
8-
+ runs-on: ubuntu-22.04
9-
timeout-minutes:
10-
60
11-
container:
123
@@ -170,6 +170,9 @@
134
touch cabal.project
145
echo "packages: $GITHUB_WORKSPACE/source/." >> cabal.project

resolv.cabal

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
cabal-version: 2.2
22

33
name: resolv
4-
version: 0.2.0.2
5-
x-revision: 5
4+
version: 0.2.0.3
65

76
synopsis: Domain Name Service (DNS) lookup via the libresolv standard library routines
87
description: {
@@ -36,7 +35,7 @@ provides a compatible subset of this package's API.
3635
license: GPL-2.0-or-later
3736
license-files: LICENSE LICENSE.GPLv2 LICENSE.GPLv3
3837
author: Herbert Valerio Riedel
39-
maintainer: Alexey Radkov
38+
maintainer: Alexey Radkov, Andreas Abel
4039
category: Network
4140
build-type: Configure
4241
bug-reports: https://github.com/haskell-hvr/resolv/issues
@@ -56,10 +55,11 @@ extra-tmp-files: autom4te.cache
5655
cbits/hs_resolv_config.h
5756

5857
tested-with:
59-
GHC == 9.12.1
60-
GHC == 9.10.1
58+
GHC == 9.14.1
59+
GHC == 9.12.2
60+
GHC == 9.10.2
6161
GHC == 9.8.4
62-
GHC == 9.6.6
62+
GHC == 9.6.7
6363
GHC == 9.4.8
6464
GHC == 9.2.8
6565
GHC == 9.0.2
@@ -89,23 +89,25 @@ library
8989
Trustworthy
9090

9191
hs-source-dirs: src
92+
include-dirs: cbits
93+
9294
exposed-modules: Network.DNS
9395
other-modules: Network.DNS.Message
9496
Network.DNS.FFI
9597
Compat
9698

97-
build-depends: base >= 4.6 && < 5
98-
-- bytestring-0.10.0.0 was shipped with GHC 7.6 (base-4.6)
99-
, base16-bytestring >= 0.1 && < 1.1
100-
, binary ^>= 0.7.3 || ^>= 0.8
101-
-- we need binary-0.7.3 for isolate
102-
, bytestring >= 0.10.0.0 && < 0.13
103-
-- instance IsString ByteString exists in its form since bytestring-0.10.0.0
104-
-- see https://github.com/haskell-hvr/resolv/pull/13#issuecomment-1213876161
105-
, containers >= 0.4.2.1 && < 0.9
106-
107-
ghc-options: -Wall
108-
include-dirs: cbits
99+
-- Lower bounds take from GHC 8.0 shipped libraries and Stackage LTS 7.0
100+
build-depends: base >= 4.9 && < 5
101+
, base16-bytestring >= 0.1.1.6 && < 1.1
102+
, binary >= 0.8.3 && < 0.9
103+
, bytestring >= 0.10.8.0 && < 0.13
104+
, containers >= 0.5.7.1 && < 0.9
105+
106+
ghc-options:
107+
-Wall
108+
-Wcompat
109+
-Wunused-packages
110+
-Wincomplete-patterns
109111

110112
test-suite resolv.
111113
default-language: Haskell2010
@@ -119,7 +121,7 @@ test-suite resolv.
119121
, bytestring
120122

121123
-- additional dependencies not inherited
122-
build-depends: tasty >= 1.2.3 && < 1.6
124+
build-depends: tasty >= 1.2.3 && < 1.6
123125
, tasty-hunit ^>= 0.10.0
124-
, directory ^>= 1.1.0 || ^>= 1.2.0 || ^>= 1.3.0
125-
, filepath >= 1.3 && < 1.6
126+
, directory >= 1.2.6.2 && < 1.4
127+
, filepath >= 1.4.1.0 && < 1.6

src-test/Tests1.hs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
{-# LANGUAGE CPP #-}
12
{-# LANGUAGE OverloadedStrings #-}
23

4+
#if __GLASGOW_HASKELL__ >= 900
5+
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
6+
#endif
7+
38
module Main where
49

510
import Control.Applicative as A
@@ -87,5 +92,3 @@ assertEqShow onFail ref cur
8792
onFail
8893
T.assertFailure ("expected: " ++ show ref ++ "\n but got: " ++ show cur)
8994
| otherwise = A.pure ()
90-
91-

src/Network/DNS.hs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{-# LANGUAGE CApiFFI #-}
2-
{-# LANGUAGE DeriveDataTypeable #-}
32
{-# LANGUAGE OverloadedStrings #-}
43
{-# LANGUAGE RecordWildCards #-}
54
{-# LANGUAGE Trustworthy #-}
@@ -84,7 +83,6 @@ module Network.DNS
8483

8584
import Control.Exception
8685
import Data.Bits (unsafeShiftR, (.&.))
87-
import Data.Typeable (Typeable)
8886
import Foreign.C
8987
import Foreign.Marshal.Alloc
9088
import Numeric (showInt)
@@ -120,7 +118,7 @@ data DnsException
120118
-- ^ No such domain (non-authoritative) or SERVERFAIL
121119
--
122120
-- @since 0.2.0.0
123-
deriving (Eq, Show, Typeable)
121+
deriving (Eq, Show)
124122

125123
instance Exception DnsException
126124

0 commit comments

Comments
 (0)