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/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 12754f9..346932e 100644 --- a/postgresql-simple.cabal +++ b/postgresql-simple.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 name: postgresql-simple -version: 0.7.0.1 +version: 0.7.0.2 synopsis: Mid-Level PostgreSQL client library description: Mid-Level PostgreSQL client library, forked from mysql-simple. @@ -31,8 +31,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 +79,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 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