Skip to content

Commit 6297d52

Browse files
committed
v1.3.2.0: Drop flag network--GT-3_0_0 and support for network < 3
1 parent 562c92c commit 6297d52

File tree

5 files changed

+85
-47
lines changed

5 files changed

+85
-47
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","hslogger.cabal"])
13+
# REGENDATA ("0.19.20250821",["github","hslogger.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
@@ -212,10 +244,17 @@ jobs:
212244
touch cabal.project.local
213245
echo "packages: ${PKGDIR_hslogger}" >> cabal.project
214246
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package hslogger" >> cabal.project ; fi
215-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
247+
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project ; fi
248+
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package hslogger" >> cabal.project ; fi
249+
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi
250+
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package hslogger" >> cabal.project ; fi
251+
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
216252
cat >> cabal.project <<EOF
217253
allow-newer: containers
218254
EOF
255+
if $HEADHACKAGE; then
256+
echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
257+
fi
219258
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(hslogger)$/; }' >> cabal.project.local
220259
cat cabal.project
221260
cat cabal.project.local

.github/workflows/stack.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ jobs:
2424
plan:
2525
- resolver: 'nightly'
2626
- resolver: 'lts'
27-
- ghc: '9.6.6'
28-
resolver: 'lts-22.43'
27+
- ghc: '9.8.4'
28+
resolver: 'lts-23.28'
29+
- ghc: '9.6.7'
30+
resolver: 'lts-22.44'
2931
- ghc: '9.4.8'
3032
resolver: 'lts-21.25'
3133
- ghc: '9.2.8'
@@ -36,13 +38,8 @@ jobs:
3638
resolver: 'lts-18.28'
3739
- ghc: '8.8.4'
3840
resolver: 'lts-16.31'
39-
- ghc: '8.6.5'
40-
resolver: 'lts-14.27'
41-
- ghc: '8.4.4'
42-
resolver: 'lts-12.26'
4341
# It ends here, because:
44-
# LTSs older than 11 don't work with latest hslogger.
45-
# Stack dropped support for Cabal 2.0 (GHC 8.2)
42+
# LTSs older than 15 do not have network >= 3.
4643

4744
include:
4845
- os: windows-latest
@@ -64,7 +61,7 @@ jobs:
6461
STACK: stack --no-terminal --system-ghc --resolver ${{ matrix.plan.resolver }}
6562

6663
steps:
67-
- uses: actions/checkout@v4
64+
- uses: actions/checkout@v5
6865

6966
# 2024-09-20: On Windows and macOS, Stack is no longer preinstalled
7067
- uses: haskell-actions/setup@v2

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
### 1.3.2.0
2+
3+
_2025-08-30, Andreas Abel_
4+
5+
- Drop flag `network--GT-3_0_0` and support for `network < 3`
6+
- Allow newer `time`
7+
- Tested with GHC 8.0 - 9.14 alpha1
8+
19
#### 1.3.1.2
210

311
_2025-03-11, Andreas Abel_

hslogger.cabal

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
cabal-version: 1.12
1+
cabal-version: 1.18
22
build-type: Simple
33
name: hslogger
4-
version: 1.3.1.2
4+
version: 1.3.2.0
55

66
maintainer: https://github.com/haskell-hvr/hslogger
77
author: John Goerzen
@@ -22,9 +22,11 @@ description:
2222
or filter messages based on the priority and source. @hslogger@ also
2323
has a [Syslog](https://tools.ietf.org/html/rfc5424) handler built in.
2424

25-
extra-source-files:
25+
extra-doc-files:
2626
LICENSE
2727
CHANGELOG.md
28+
29+
extra-source-files:
2830
contrib/java/build.xml
2931
contrib/java/hslogger4j.jar
3032
contrib/java/hslogger4j-plugins.xml
@@ -35,10 +37,11 @@ extra-source-files:
3537
testsrc/runtests.hs
3638

3739
tested-with:
38-
GHC == 9.12.1
39-
GHC == 9.10.1
40+
GHC == 9.14.1
41+
GHC == 9.12.2
42+
GHC == 9.10.2
4043
GHC == 9.8.4
41-
GHC == 9.6.6
44+
GHC == 9.6.7
4245
GHC == 9.4.8
4346
GHC == 9.2.8
4447
GHC == 9.0.2
@@ -53,11 +56,6 @@ source-repository head
5356
type: git
5457
location: http://github.com/haskell-hvr/hslogger.git
5558

56-
flag network--GT-3_0_0
57-
description: [network](http://hackage.haskell.org/package/network) ≥ 3.0.0
58-
default: True
59-
manual: False
60-
6159
library
6260
hs-source-dirs: src
6361
exposed-modules:
@@ -76,19 +74,14 @@ library
7674
other-extensions: CPP ExistentialQuantification DeriveDataTypeable
7775

7876
build-depends:
79-
-- Lower bounds are chosen from LTS 7.24 (GHC 8.0.1)
80-
base >= 4.9 && < 5
81-
, bytestring >= 0.10.8.1 && < 0.13
82-
, containers >= 0.5.7.1 && < 1
83-
, deepseq >= 1.4.2.0 && < 1.6
84-
, time >= 1.6.0.1 && < 1.15
85-
, old-locale >= 1.0.0.7 && < 1.1
86-
87-
if flag(network--GT-3_0_0)
88-
build-depends: network-bsd >= 2.8.1 && <2.9,
89-
network >= 3.0 && <3.3
90-
else
91-
build-depends: network >= 2.6.3.1 && <2.9
77+
-- Lower bounds are at least the ones from LTS 7.24 (GHC 8.0.1)
78+
base >= 4.9 && < 5
79+
, bytestring >= 0.10.8.1 && < 0.13
80+
, containers >= 0.5.7.1 && < 1
81+
, deepseq >= 1.4.2.0 && < 1.6
82+
, time >= 1.6.0.1 && < 2
83+
, network-bsd >= 2.8.1 && <2.9
84+
, network >= 3.0 && <3.3
9285

9386
if !os(windows)
9487
Build-Depends: unix >= 2.7.2.0 && < 2.9
@@ -103,5 +96,5 @@ test-suite runtests
10396
default-language: Haskell2010
10497
build-depends:
10598
base
106-
, HUnit == 1.3.* || == 1.6.*
99+
, HUnit == 1.6.*
107100
, hslogger

src/System/Log/Handler/Syslog.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ instance LogHandler SyslogHandler where
266266
sent <- case sock_type sh of
267267
S.Datagram -> sendTo (logsocket sh) omsg (address sh)
268268
S.Stream -> send (logsocket sh) omsg
269+
_ -> undefined
269270
sendstr (genericDrop sent omsg)
270271
toSyslogFormat msg' pidPart =
271272
"<" ++ code ++ ">" ++ identity' ++ pidPart ++ ": " ++ msg' ++ "\0"

0 commit comments

Comments
 (0)