Closed Vekhir closed 9 months ago
The following patch was sufficient for me to build against aeson-2.2
.
diff --git a/Aws/DynamoDb/Core.hs b/Aws/DynamoDb/Core.hs
index b9a6cc4..b542ef3 100644
--- a/Aws/DynamoDb/Core.hs
+++ b/Aws/DynamoDb/Core.hs
@@ -130,6 +130,7 @@ import Data.Aeson
import qualified Data.Aeson as A
import qualified Data.Aeson.Key as AK
import qualified Data.Aeson.KeyMap as KM
+import Data.Aeson.Parser as A (json')
import Data.Aeson.Types (Pair, parseEither)
import qualified Data.Aeson.Types as A
import qualified Data.Attoparsec.ByteString as AttoB (endOfInput)
@@ -1164,7 +1165,7 @@ data QuerySelect
instance Default QuerySelect where def = SelectAll
-------------------------------------------------------------------------------
-querySelectJson :: KeyValue t => QuerySelect -> [t]
+querySelectJson :: KeyValue A.Value t => QuerySelect -> [t]
querySelectJson (SelectSpecific as) =
[ "Select" .= String "SPECIFIC_ATTRIBUTES"
, "AttributesToGet" .= as]
diff --git a/aws.cabal b/aws.cabal
index 67adbeb..64add1e 100644
--- a/aws.cabal
+++ b/aws.cabal
@@ -129,6 +129,7 @@ Library
Build-depends:
aeson >= 2.0.0.0,
+ attoparsec-aeson >= 2.1.0.0,
attoparsec >= 0.11 && < 0.15,
base >= 4.9 && < 5,
base16-bytestring >= 0.1 && < 1.1,
@bgamari that fails to build here (ghc 9.4.7)
Aws/DynamoDb/Core.hs:1168:20: error: • Expected kind ‘* -> Constraint’, but ‘KeyValue Value’ has kind ‘Constraint’ • In the type signature: querySelectJson :: KeyValue Value t => QuerySelect -> [t] | 1168 | querySelectJson :: KeyValue A.Value t => QuerySelect -> [t] | ^^^^^^^^^^^^^^^^^^
Keeping the original type signature of querySelectJson, it builds for me. What motivated the A.Value change?
Oh I see, KeyValue has changed in aeson-2.2. So this will also need to bump the aeson bounds.
Hi, when building with aeson 2.2, I get the following error:
It seems that the .json' functionality got moved into
attoparsec-aeson
: https://hackage.haskell.org/package/attoparsec-aeson-2.2.0.0/docs/Data-Aeson-Parser.htmlAs such, it is probably necessary to add attoparsec-aeson>=2.1.0.0 to
aws.cabal
.