From 5a8212b71ac4461f1cb72ce4f41c5e49eef430ba Mon Sep 17 00:00:00 2001 From: Vekhir <134215107+Vekhir@users.noreply.github.com> Date: Tue, 12 Sep 2023 17:19:17 +0200 Subject: [PATCH 1/5] Add support for aeson 2.2 --- authenticate/Web/Authenticate/BrowserId.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/authenticate/Web/Authenticate/BrowserId.hs b/authenticate/Web/Authenticate/BrowserId.hs index 9c70581..1516e55 100644 --- a/authenticate/Web/Authenticate/BrowserId.hs +++ b/authenticate/Web/Authenticate/BrowserId.hs @@ -8,7 +8,12 @@ module Web.Authenticate.BrowserId import Data.Text (Text) import Network.HTTP.Conduit (parseUrlThrow, responseBody, httpLbs, Manager, method, urlEncodedBody) +#if MIN_VERSION_aeson(2,2,0) +import Data.Aeson (Value (Object, String)) +import Data.Aeson.Parser (json) +#else import Data.Aeson (json, Value (Object, String)) +#endif import Data.Attoparsec.Lazy (parse, maybeResult) #if MIN_VERSION_aeson(2,0,0) import qualified Data.Aeson.KeyMap as Map From 464d3d9e687e03d5cf776094ea5f465bb0c61200 Mon Sep 17 00:00:00 2001 From: Vekhir <134215107+Vekhir@users.noreply.github.com> Date: Tue, 12 Sep 2023 17:21:40 +0200 Subject: [PATCH 2/5] Add support for aeson 2.2 --- authenticate/Web/Authenticate/Rpxnow.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/authenticate/Web/Authenticate/Rpxnow.hs b/authenticate/Web/Authenticate/Rpxnow.hs index 8af8ac1..fd42b53 100644 --- a/authenticate/Web/Authenticate/Rpxnow.hs +++ b/authenticate/Web/Authenticate/Rpxnow.hs @@ -22,6 +22,9 @@ module Web.Authenticate.Rpxnow ) where import Data.Aeson +#if MIN_VERSION_aeson(2,2,0) +import Data.Aeson.Parser (json) +#endif import Network.HTTP.Conduit import Control.Monad.IO.Class import Data.Maybe From b6800a37d6924af659f3195b024b0bf17836cbb0 Mon Sep 17 00:00:00 2001 From: Vekhir <134215107+Vekhir@users.noreply.github.com> Date: Tue, 12 Sep 2023 17:24:54 +0200 Subject: [PATCH 3/5] Add attoparsec-aeson as dependency --- authenticate/authenticate.cabal | 1 + 1 file changed, 1 insertion(+) diff --git a/authenticate/authenticate.cabal b/authenticate/authenticate.cabal index 474643a..433f424 100644 --- a/authenticate/authenticate.cabal +++ b/authenticate/authenticate.cabal @@ -21,6 +21,7 @@ library default-language: Haskell2010 build-depends: base >= 4.10 && < 5 , aeson >= 0.5 + , attoparsec-aeson >= 2.1 , http-conduit >= 1.5 , transformers >= 0.1 , bytestring >= 0.9 From 5eb5c377fc4e5da2f07872e4322c82c0b81a49f7 Mon Sep 17 00:00:00 2001 From: Vekhir <134215107+Vekhir@users.noreply.github.com> Date: Wed, 13 Sep 2023 15:37:52 +0200 Subject: [PATCH 4/5] Add attoparsec-aeson to stack.yaml Necessary for CI to pass --- stack.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/stack.yaml b/stack.yaml index 0ddb0de..b7fe231 100644 --- a/stack.yaml +++ b/stack.yaml @@ -6,3 +6,4 @@ packages: extra-deps: - base64-bytestring-1.2.0.0 +- attoparsec-aeson-2.1.0.0 From 8e211bf11576fe3f280cd1e4d82746d21d3da258 Mon Sep 17 00:00:00 2001 From: Vekhir <134215107+Vekhir@users.noreply.github.com> Date: Thu, 14 Sep 2023 01:17:00 +0200 Subject: [PATCH 5/5] Update base64-bytestring to 1.2.1.0 base64-bytestring needs version 1.2.1.0 to build with GHC 9.6.2, since that version supports bytestring 0.11.4 shipped with GHC 9.6.2 --- stack.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stack.yaml b/stack.yaml index b7fe231..f5cf932 100644 --- a/stack.yaml +++ b/stack.yaml @@ -5,5 +5,5 @@ packages: - authenticate-oauth/ extra-deps: -- base64-bytestring-1.2.0.0 +- base64-bytestring-1.2.1.0 - attoparsec-aeson-2.1.0.0