From ddce939448a5a18775c67bf608c7cfd118f087ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20L=C3=A4ndle?= <969523+alaendle@users.noreply.github.com> Date: Mon, 3 Jun 2024 06:48:56 +0200 Subject: [PATCH 1/3] Allow `crypton-connection` 0.4. --- .github/workflows/ci.yml | 8 +++++++- amqp.cabal | 5 +++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d706f4a..364520f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ on: jobs: linux: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: @@ -25,6 +25,12 @@ jobs: cabal: 'latest' - ghc: '9.2' cabal: 'latest' + - ghc: '9.4' + cabal: 'latest' + - ghc: '9.6' + cabal: 'latest' + - ghc: '9.8' + cabal: 'latest' steps: - uses: actions/checkout@v2 diff --git a/amqp.cabal b/amqp.cabal index 2ffa14b..499aeee 100644 --- a/amqp.cabal +++ b/amqp.cabal @@ -28,7 +28,7 @@ Library split>=0.2, clock >= 0.4.0.1, monad-control >= 0.3, - crypton-connection >= 0.3.1 && <= 0.4, + crypton-connection >= 0.3.1 && <= 0.5, vector, stm >= 2.4.0, network-uri >= 2.6, @@ -67,6 +67,7 @@ test-suite spec ConnectionSpec ExchangeDeclareSpec ExchangeDeleteSpec + FromURISpec QueueDeclareSpec QueueDeleteSpec QueuePurgeSpec @@ -81,7 +82,7 @@ test-suite spec , clock >= 0.4.0.1 , hspec >= 1.3 , hspec-expectations >= 0.3.3 - , crypton-connection >= 0.3.1 && <= 0.4 + , crypton-connection >= 0.3.1 && <= 0.5 , vector , stm >= 2.4.0 , network-uri >= 2.6 From 4f4669a09ef999323be7e5c724bbd5a10b37bd75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20L=C3=A4ndle?= <969523+alaendle@users.noreply.github.com> Date: Mon, 3 Jun 2024 08:00:46 +0200 Subject: [PATCH 2/3] `crypton-connection` 0.4 requires new parameter. --- .github/workflows/ci.yml | 8 ++++---- Network/AMQP/Internal.hs | 5 +++-- amqp.cabal | 5 +++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 364520f..c60cdfa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,12 +32,12 @@ jobs: - ghc: '9.8' cabal: 'latest' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 # need to install older cabal/ghc versions from ppa repository - name: Install recent cabal/ghc - uses: haskell/actions/setup@v1 + uses: haskell-actions/setup@v2 with: ghc-version: ${{ matrix.versions.ghc }} cabal-version: ${{ matrix.versions.cabal }} @@ -48,7 +48,7 @@ jobs: - name: Cache cabal global package db id: cabal-global - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | ~/.cabal @@ -56,7 +56,7 @@ jobs: - name: Cache cabal work id: cabal-local - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | dist-newstyle diff --git a/Network/AMQP/Internal.hs b/Network/AMQP/Internal.hs index 3ad6254..a3c415c 100644 --- a/Network/AMQP/Internal.hs +++ b/Network/AMQP/Internal.hs @@ -11,6 +11,7 @@ import Control.Monad import Data.Binary import Data.Binary.Get import Data.Binary.Put as BPut +import Data.Default.Class import Data.Int (Int64) import Data.Maybe import Data.Text (Text) @@ -174,8 +175,8 @@ data TLSSettings = connectionTLSSettings :: TLSSettings -> Maybe Conn.TLSSettings connectionTLSSettings tlsSettings = Just $ case tlsSettings of - TLSTrusted -> Conn.TLSSettingsSimple False False False - TLSUntrusted -> Conn.TLSSettingsSimple True False False + TLSTrusted -> Conn.TLSSettingsSimple False False False def + TLSUntrusted -> Conn.TLSSettingsSimple True False False def TLSCustom x -> x -- | A 'SASLMechanism' is described by its name ('saslName'), its initial response ('saslInitialResponse'), and an optional function ('saslChallengeFunc') that diff --git a/amqp.cabal b/amqp.cabal index 499aeee..d8ea61f 100644 --- a/amqp.cabal +++ b/amqp.cabal @@ -24,11 +24,12 @@ Library containers>=0.2, bytestring>=0.9, data-binary-ieee754>=0.4.2.1, + data-default-class >= 0.1, text>=0.11.2, split>=0.2, clock >= 0.4.0.1, monad-control >= 0.3, - crypton-connection >= 0.3.1 && <= 0.5, + crypton-connection >= 0.4 && <= 0.5, vector, stm >= 2.4.0, network-uri >= 2.6, @@ -82,7 +83,7 @@ test-suite spec , clock >= 0.4.0.1 , hspec >= 1.3 , hspec-expectations >= 0.3.3 - , crypton-connection >= 0.3.1 && <= 0.5 + , crypton-connection >= 0.4 && <= 0.5 , vector , stm >= 2.4.0 , network-uri >= 2.6 From 537cfbd1715e16d2bf760b0e71da7a309cfd62c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20L=C3=A4ndle?= <969523+alaendle@users.noreply.github.com> Date: Mon, 3 Jun 2024 08:08:01 +0200 Subject: [PATCH 3/3] Also test against `ghc-9.10`. --- .github/workflows/ci.yml | 2 ++ amqp.cabal | 1 + 2 files changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c60cdfa..c9024f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,6 +31,8 @@ jobs: cabal: 'latest' - ghc: '9.8' cabal: 'latest' + - ghc: '9.10' + cabal: 'latest' steps: - uses: actions/checkout@v4 diff --git a/amqp.cabal b/amqp.cabal index d8ea61f..f4b5327 100644 --- a/amqp.cabal +++ b/amqp.cabal @@ -78,6 +78,7 @@ test-suite spec , containers>=0.2 , bytestring>=0.9 , data-binary-ieee754>=0.4.2.1 + , data-default-class >= 0.1 , text>=0.11.2 , split>=0.2 , clock >= 0.4.0.1