Skip to content

Commit 562c92c

Browse files
committed
v1.3.1.2: drop conditionals for GHC 7, allow newer containers
1 parent 3c0469c commit 562c92c

File tree

11 files changed

+86
-81
lines changed

11 files changed

+86
-81
lines changed

.appveyor.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ environment:
77
matrix:
88
- GHCVER: "8.2.2"
99
- GHCVER: "8.0.2.2"
10-
- GHCVER: "7.10.3.2"
1110

1211
cache:
1312
- "C:\\SR"

.github/workflows/haskell-ci.yml

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
#
77
# haskell-ci regenerate
88
#
9-
# For more information, see https://github.com/andreasabel/haskell-ci
9+
# For more information, see https://github.com/haskell-CI/haskell-ci
1010
#
11-
# version: 0.19.20240703
11+
# version: 0.19.20250216
1212
#
13-
# REGENDATA ("0.19.20240703",["github","hslogger.cabal"])
13+
# REGENDATA ("0.19.20250216",["github","hslogger.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -23,7 +23,7 @@ on:
2323
jobs:
2424
linux:
2525
name: Haskell-CI - Linux - ${{ matrix.compiler }}
26-
runs-on: ubuntu-20.04
26+
runs-on: ubuntu-24.04
2727
timeout-minutes:
2828
60
2929
container:
@@ -32,14 +32,19 @@ jobs:
3232
strategy:
3333
matrix:
3434
include:
35+
- compiler: ghc-9.12.1
36+
compilerKind: ghc
37+
compilerVersion: 9.12.1
38+
setup-method: ghcup
39+
allow-failure: false
3540
- compiler: ghc-9.10.1
3641
compilerKind: ghc
3742
compilerVersion: 9.10.1
3843
setup-method: ghcup
3944
allow-failure: false
40-
- compiler: ghc-9.8.2
45+
- compiler: ghc-9.8.4
4146
compilerKind: ghc
42-
compilerVersion: 9.8.2
47+
compilerVersion: 9.8.4
4348
setup-method: ghcup
4449
allow-failure: false
4550
- compiler: ghc-9.6.6
@@ -94,15 +99,29 @@ jobs:
9499
allow-failure: false
95100
fail-fast: false
96101
steps:
97-
- name: apt
102+
- name: apt-get install
98103
run: |
99104
apt-get update
100105
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
106+
- name: Install GHCup
107+
run: |
101108
mkdir -p "$HOME/.ghcup/bin"
102-
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
109+
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
103110
chmod a+x "$HOME/.ghcup/bin/ghcup"
104-
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
111+
- name: Install cabal-install
112+
run: |
105113
"$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"
115+
- name: Install GHC (GHCup)
116+
if: matrix.setup-method == 'ghcup'
117+
run: |
118+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
119+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
120+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
121+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
122+
echo "HC=$HC" >> "$GITHUB_ENV"
123+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
124+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
106125
env:
107126
HCKIND: ${{ matrix.compilerKind }}
108127
HCNAME: ${{ matrix.compiler }}
@@ -113,21 +132,12 @@ jobs:
113132
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
114133
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
115134
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
116-
HCDIR=/opt/$HCKIND/$HCVER
117-
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
118-
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
119-
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
120-
echo "HC=$HC" >> "$GITHUB_ENV"
121-
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
122-
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
123-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
124135
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
125136
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
126137
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
127138
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
128139
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
129140
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
130-
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
131141
env:
132142
HCKIND: ${{ matrix.compilerKind }}
133143
HCNAME: ${{ matrix.compiler }}
@@ -204,6 +214,7 @@ jobs:
204214
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package hslogger" >> cabal.project ; fi
205215
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
206216
cat >> cabal.project <<EOF
217+
allow-newer: containers
207218
EOF
208219
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(hslogger)$/; }' >> cabal.project.local
209220
cat cabal.project
@@ -242,9 +253,19 @@ jobs:
242253
run: |
243254
rm -f cabal.project.local
244255
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
256+
- name: prepare for constraint sets
257+
run: |
258+
rm -f cabal.project.local
259+
- name: constraint set containers-0.8
260+
run: |
261+
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers ^>= 0.8' all --dry-run ; fi
262+
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then cabal-plan topo | sort ; fi
263+
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers ^>= 0.8' --dependencies-only -j2 all ; fi
264+
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers ^>= 0.8' all ; fi
265+
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers ^>= 0.8' all ; fi
245266
- name: save cache
246-
uses: actions/cache/save@v4
247267
if: always()
268+
uses: actions/cache/save@v4
248269
with:
249270
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
250271
path: ~/.cabal/store

.github/workflows/stack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- resolver: 'nightly'
2626
- resolver: 'lts'
2727
- ghc: '9.6.6'
28-
resolver: 'lts-22.34'
28+
resolver: 'lts-22.43'
2929
- ghc: '9.4.8'
3030
resolver: 'lts-21.25'
3131
- ghc: '9.2.8'

CHANGELOG.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,28 @@
1-
See also https://pvp.haskell.org/faq
1+
#### 1.3.1.2
22

3-
#### 1.3.1.1 *(patch)*
3+
_2025-03-11, Andreas Abel_
4+
5+
- Thoroughly drop support for GHC 7
6+
- Allow newer `containers`
7+
- Tested with GHC 8.0 - 9.12.1
8+
9+
#### 1.3.1.1
10+
11+
_2024-04-15, Andreas Abel_
412

513
- Drop support for GHC 7
614
- Tested with GHC 8.0 - 9.10
715

8-
### 1.3.1.0 *(minor)*
16+
### 1.3.1.0
17+
18+
_2019-10-07, Herbert Valerio Riedel_
919

1020
- Evaluate message before taking lock in simple handler ([#49](https://github.com/haskell-hvr/hslogger/pull/49))
1121
- Define `Typeable`, `Data`, `Generic` and `NFData` instances for `System.Log.Priority` ([#43](https://github.com/haskell-hvr/hslogger/pull/43))
1222

13-
## 1.3.0.0 *(major)*
23+
## 1.3.0.0
24+
25+
_2019-04-15, Herbert Valerio Riedel_
1426

1527
- **[semantic change]** Messages are encoded as UTF-8 (previously the encoding was locale dependent) for the Syslog and Growl backends
1628
- Add support for `network-3.0`; remove redundant dependency on `directory` and `process`

Setup.hs

Lines changed: 0 additions & 5 deletions
This file was deleted.

cabal.haskell-ci

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
branches: master
2+
3+
constraint-set containers-0.8
4+
ghc: >= 8.2
5+
constraints: containers ^>= 0.8
6+
tests: True
7+
run-tests: True
28

3-
-- constraint-set network-3.2
4-
-- ghc: >= 8.0
5-
-- constraints: network ^>= 3.2.0.0
6-
-- tests: True
7-
-- run-tests: True
8-
--
9-
-- raw-project
10-
-- allow-newer: network
9+
raw-project
10+
allow-newer: containers

hslogger.cabal

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cabal-version: 1.12
22
build-type: Simple
33
name: hslogger
4-
version: 1.3.1.1
4+
version: 1.3.1.2
55

66
maintainer: https://github.com/haskell-hvr/hslogger
77
author: John Goerzen
@@ -35,8 +35,9 @@ extra-source-files:
3535
testsrc/runtests.hs
3636

3737
tested-with:
38+
GHC == 9.12.1
3839
GHC == 9.10.1
39-
GHC == 9.8.2
40+
GHC == 9.8.4
4041
GHC == 9.6.6
4142
GHC == 9.4.8
4243
GHC == 9.2.8
@@ -75,21 +76,22 @@ library
7576
other-extensions: CPP ExistentialQuantification DeriveDataTypeable
7677

7778
build-depends:
78-
base >= 4.9 && < 5
79-
, bytestring >= 0.9 && < 0.13
80-
, containers >= 0.4 && < 0.8
81-
, deepseq >= 1.1 && < 1.6
82-
, time >= 1.2 && < 1.15
83-
, old-locale >= 1.0 && < 1.1
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
8486

8587
if flag(network--GT-3_0_0)
8688
build-depends: network-bsd >= 2.8.1 && <2.9,
8789
network >= 3.0 && <3.3
8890
else
89-
build-depends: network >= 2.6 && <2.9
91+
build-depends: network >= 2.6.3.1 && <2.9
9092

9193
if !os(windows)
92-
Build-Depends: unix >= 2.4.2 && < 2.9
94+
Build-Depends: unix >= 2.7.2.0 && < 2.9
9395

9496
test-suite runtests
9597
type: exitcode-stdio-1.0

src/System/Log.hs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
{-# LANGUAGE CPP #-}
22
{-# LANGUAGE DeriveDataTypeable #-}
3-
4-
#if __GLASGOW_HASKELL__ >= 702
53
{-# LANGUAGE DeriveGeneric #-}
6-
#endif
74

85
{- |
96
Module : System.Log
@@ -34,9 +31,7 @@ module System.Log(-- * Types
3431

3532
import Control.DeepSeq (NFData(rnf))
3633
import Data.Data (Data, Typeable)
37-
#if __GLASGOW_HASKELL__ >= 702
3834
import GHC.Generics (Generic)
39-
#endif
4035

4136
{- | Priorities are used to define how important a log message is.
4237
Users can filter log messages based on priorities.
@@ -55,11 +50,7 @@ data Priority =
5550
| CRITICAL -- ^ Severe situations
5651
| ALERT -- ^ Take immediate action
5752
| EMERGENCY -- ^ System is unusable
58-
#if __GLASGOW_HASKELL__ >= 702
5953
deriving (Eq, Ord, Enum, Bounded, Show, Read, Data, Typeable, Generic)
60-
#else
61-
deriving (Eq, Ord, Enum, Bounded, Show, Read, Data, Typeable)
62-
#endif
6354

6455
-- | @since 1.3.1.0
6556
instance NFData Priority where rnf = (`seq` ())

src/System/Log/Formatter.hs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,7 @@ import Control.Concurrent (myThreadId)
3030
import System.Posix.Process (getProcessID)
3131
#endif
3232

33-
#if MIN_VERSION_time(1,5,0)
3433
import Data.Time.Format (defaultTimeLocale)
35-
#else
36-
import System.Locale (defaultTimeLocale)
37-
#endif
3834
import Data.Time (getZonedTime,getCurrentTime,formatTime)
3935

4036
import System.Log

src/System/Log/Handler/Log4jXML.hs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,7 @@ module System.Log.Handler.Log4jXML (
107107
import Control.Concurrent (myThreadId) -- myThreadId is GHC only!
108108
import Data.List (isPrefixOf)
109109
import System.IO
110-
#if MIN_VERSION_time(1,5,0)
111110
import Data.Time.Format (defaultTimeLocale)
112-
#else
113-
import System.Locale (defaultTimeLocale)
114-
#endif
115111
import Data.Time
116112
import System.Log
117113
import System.Log.Handler

0 commit comments

Comments
 (0)