brendanhay / amazonka

A comprehensive Amazon Web Services SDK for Haskell.
https://amazonka.brendanhay.nz
Other
599 stars 227 forks source link

[amazonka-sso] Duplicate record field ‘accountId’ in export list #986

Closed sir4ur0n closed 4 months ago

sir4ur0n commented 4 months ago

Hello,

We are trying to upgrade our Haskell project from GHC 9.6.4 to GHC 9.8.2 and we are currently facing this error:

gen/Amazonka/SSO/Types.hs:42:5: error: [GHC-97219]
    Duplicate record field ‘accountId’ in export list:
       ‘RoleInfo(..)’ exports the field ‘accountId’
       belonging to the constructor ‘RoleInfo'’
         imported from ‘Amazonka.SSO.Types.RoleInfo’ at gen/Amazonka/SSO/Types.hs:54:1-34
         (and originally defined
            at gen/Amazonka/SSO/Types/RoleInfo.hs:32:5-13)
       ‘AccountInfo(..)’ exports the field ‘accountId’
       belonging to the constructor ‘AccountInfo'’
         imported from ‘Amazonka.SSO.Types.AccountInfo’ at gen/Amazonka/SSO/Types.hs:52:1-37
         (and originally defined
            at gen/Amazonka/SSO/Types/AccountInfo.hs:32:5-13)
    Suggested fix: Perhaps you intended to use DuplicateRecordFields
   |
42 |     RoleInfo (..),
   |     ^^^^^^^^^^^^^

I have tested both with amazonka versions 2.0 and the current master (85e0289f8dc23c54b00f7f1a09845be7e032a1eb).

I have found https://github.com/brendanhay/amazonka/issues/969 which may or may not be related. In doubt, I preferred creating another issue.

In case it is relevant:

endgame commented 4 months ago

Thank you for your report. Yes, this is a duplicate of #969 - GHC 9.8 changed where you have to put the {-# LANGUAGE DuplicateRecordFields #-} pragmas. PR #973 has a regeneration of all services which does not have this problem. I haven't yet got to merging it because I have to revise the upper bounds on all currently release packages on Hackage first.

sir4ur0n commented 4 months ago

Thank you, I have pointed to the branch of #973 and it seems to compile now :+1:

I can't wait for this PR to be merged :crossed_fingers: