Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

amazonka-core fails to compile with aeson-2.0.0.0 #670

Closed
phadej opened this issue Oct 9, 2021 · 2 comments
Closed

amazonka-core fails to compile with aeson-2.0.0.0 #670

phadej opened this issue Oct 9, 2021 · 2 comments

Comments

@phadej
Copy link
Contributor

phadej commented Oct 9, 2021

[ 5 of 33] Compiling Network.AWS.Data.JSON ( src/Network/AWS/Data/JSON.hs, /codetmp/amazonka-core-1.6.1/dist-newstyle/build/x86_64-linux/ghc-8.6.5/amazonka-core-1.6.1/build/Network/AWS/Data/JSON.o )

src/Network/AWS/Data/JSON.hs:54:23: error:
    • Couldn't match type ‘Data.Aeson.KeyMap.KeyMap Value’
                     with ‘Map.HashMap Text Value’
      Expected type: Map.HashMap Text Value
        Actual type: Object
    • In the second argument of ‘Map.lookup’, namely ‘o’
      In the expression: Map.lookup k o
      In the expression:
        case Map.lookup k o of
          Nothing -> Left $ "key " ++ show k ++ " not present"
          Just v -> parseEither parseJSON v
   |
54 |     case Map.lookup k o of
   |                       ^

src/Network/AWS/Data/JSON.hs:60:23: error:
    • Couldn't match type ‘Data.Aeson.KeyMap.KeyMap Value’
                     with ‘Map.HashMap Text Value’
      Expected type: Map.HashMap Text Value
        Actual type: Object
    • In the second argument of ‘Map.lookup’, namely ‘o’
      In the expression: Map.lookup k o
      In the expression:
        case Map.lookup k o of
          Nothing -> Right Nothing
          Just v -> parseEither parseJSON v
   |
60 |     case Map.lookup k o of
   |  

EDIT: I made revision for amazonka-core-1.6.1 and 1.6.0 (e.g. https://hackage.haskell.org/package/amazonka-core-1.6.1/revisions/). I'll check older next.

@brendanhay
Copy link
Owner

Thanks for the headsup, @phadej.

@endgame
Copy link
Collaborator

endgame commented Oct 10, 2021

This and other similar issues should be caught when we do a check for outdated packages #660 .

Since amazonka-core doesn't exist any more, the metadata revisions are the only fix that makes sense. I'll make a note to check that amazonka itself works with aeson-2.

@endgame endgame closed this as completed Oct 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants