From 8cf905148d89ed4c97e95d5e9f25b4f48660e08d Mon Sep 17 00:00:00 2001 From: Christof Schramm Date: Thu, 1 Oct 2026 10:25:25 +0200 Subject: [PATCH 1/3] Support GHC-9.14 --- .github/workflows/haskell-ci.yml | 13 +++++++++---- .github/workflows/simple.yml | 2 +- postgresql-simple.cabal | 12 +++++++----- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index da26178..48d4d61 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -43,14 +43,19 @@ jobs: strategy: matrix: include: - - compiler: ghc-9.12.2 + - compiler: ghc-9.14.1 compilerKind: ghc - compilerVersion: 9.12.2 + compilerVersion: 9.14.1 setup-method: ghcup allow-failure: false - - compiler: ghc-9.10.2 + - compiler: ghc-9.12.4 compilerKind: ghc - compilerVersion: 9.10.2 + compilerVersion: 9.12.4 + setup-method: ghcup + allow-failure: false + - compiler: ghc-9.10.3 + compilerKind: ghc + compilerVersion: 9.10.3 setup-method: ghcup allow-failure: false - compiler: ghc-9.8.4 diff --git a/.github/workflows/simple.yml b/.github/workflows/simple.yml index 17c2c61..55af1b6 100644 --- a/.github/workflows/simple.yml +++ b/.github/workflows/simple.yml @@ -15,7 +15,7 @@ jobs: matrix: os: [macos-latest, windows-latest] # Older GHCs need LLVM on macos-latest (ARM) - ghc: ['9.4.8','9.6.6','9.8.2','9.10.2'] + ghc: ['9.4.8','9.6.6','9.8.2','9.10.2','9.14.1'] fail-fast: false timeout-minutes: 60 diff --git a/postgresql-simple.cabal b/postgresql-simple.cabal index 12754f9..dfabcb8 100644 --- a/postgresql-simple.cabal +++ b/postgresql-simple.cabal @@ -1,6 +1,7 @@ cabal-version: 1.12 name: postgresql-simple version: 0.7.0.1 +x-revision: 1 synopsis: Mid-Level PostgreSQL client library description: Mid-Level PostgreSQL client library, forked from mysql-simple. @@ -31,8 +32,9 @@ tested-with: || ==9.4.8 || ==9.6.7 || ==9.8.4 - || ==9.10.2 - || ==9.12.2 + || ==9.10.3 + || ==9.12.4 + || ==9.14.1 library default-language: Haskell2010 @@ -78,10 +80,10 @@ library -- GHC bundled libs build-depends: - base >=4.12.0.0 && <4.22 + base >=4.12.0.0 && <4.23 , bytestring >=0.10.8.2 && <0.13 - , containers >=0.6.0.1 && <0.8 - , template-haskell >=2.14.0.0 && <2.24 + , containers >=0.6.0.1 && <0.9 + , template-haskell >=2.14.0.0 && <2.25 , text >=1.2.3.0 && <1.3 || >=2.0 && <2.2 , time-compat >=1.9.5 && <1.12 , transformers >=0.5.6.2 && <0.7 From 0cbe0560efcc0b53133017eb64b7c044cac1109b Mon Sep 17 00:00:00 2001 From: Christof Schramm Date: Thu, 1 Oct 2026 11:15:56 +0200 Subject: [PATCH 2/3] Run tests sequentially All test cases share a single Connection, and libpq allows only one command in flight per connection at a time. tasty's default NumThreads runs independent top-level tests concurrently, which was corrupting that shared connection's transaction/cursor state and cascading into unrelated test failures. Force NumThreads 1. --- test/Main.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/Main.hs b/test/Main.hs index 32eb230..ebd6232 100644 --- a/test/Main.hs +++ b/test/Main.hs @@ -51,6 +51,7 @@ import System.Environment (getEnvironment) import Test.Tasty import Test.Tasty.Golden +import Test.Tasty.Runners (NumThreads(..)) import Notify import Serializable import Time @@ -623,7 +624,12 @@ withTestEnv connstr cb = main :: IO () main = withConnstring $ \connstring -> do - withTestEnv connstring (defaultMain . tests) + -- All tests share a single 'Connection' (see 'TestEnv'), and libpq + -- only ever allows one command in flight per connection. tasty's + -- default 'NumThreads' runs independent top-level tests concurrently, + -- which corrupts that shared connection's protocol/transaction state, + -- so force sequential execution here. + withTestEnv connstring (defaultMain . localOption (NumThreads 1) . tests) withConnstring :: (BS8.ByteString -> IO ()) -> IO () withConnstring kont = do From 2fc3d4934f630261f3ac4801e316a1976220368d Mon Sep 17 00:00:00 2001 From: Christof Schramm Date: Thu, 1 Oct 2026 12:26:20 +0200 Subject: [PATCH 3/3] Bump version to 0.7.0.2 --- CHANGES.md | 9 +++++++++ postgresql-simple.cabal | 3 +-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index b7b3511..72fc2a7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,12 @@ +### Version 0.7.0.2 (2026-10-01) + + * Support GHC-9.14.1. Widen `base`, `template-haskell` and `containers` + upper bounds accordingly. + * Fix test suite flakiness: all tests shared a single `Connection`, and + `tasty`'s default of running tests concurrently (one thread per core) + could interleave queries from different tests on that connection, + which libpq does not support. Tests now run sequentially. + ### Version 0.7.0.0 (2023-07-31) * Remove Eq Null instance. (Future `base` may break it, we remove it profilacticly). diff --git a/postgresql-simple.cabal b/postgresql-simple.cabal index dfabcb8..346932e 100644 --- a/postgresql-simple.cabal +++ b/postgresql-simple.cabal @@ -1,7 +1,6 @@ cabal-version: 1.12 name: postgresql-simple -version: 0.7.0.1 -x-revision: 1 +version: 0.7.0.2 synopsis: Mid-Level PostgreSQL client library description: Mid-Level PostgreSQL client library, forked from mysql-simple.