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-sso] Duplicate record field ‘accountId’ in export list #986

Closed
sir4ur0n opened this issue Apr 25, 2024 · 2 comments
Closed

Comments

@sir4ur0n
Copy link

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 (85e0289).

I have found #969 which may or may not be related.
In doubt, I preferred creating another issue.

In case it is relevant:

  • the build uses Nix and Cabal2nix
  • we use Nixpkgs at revision cfd6b5fc90b15709b780a5a1619695a88505a176
  • the Nix overrides to build against the master branch are:
            amazonka = pipe "${sources.amazonka}/lib/amazonka" [
              (src: hself.callCabal2nix "amazonka" src { })
              dontCheck
            ];
            amazonka-core = pipe "${sources.amazonka}/lib/amazonka-core" [
              (src: hself.callCabal2nix "amazonka" src { })
              dontCheck
            ];
            amazonka-s3 = pipe "${sources.amazonka}/lib/services/amazonka-s3" [
              (src: hself.callCabal2nix "amazonka" src { })
              dontCheck
            ];
            amazonka-sso = pipe "${sources.amazonka}/lib/services/amazonka-sso" [
              (src: hself.callCabal2nix "amazonka" src { })
              dontCheck
            ];
            amazonka-sts = pipe "${sources.amazonka}/lib/services/amazonka-sts" [
              (src: hself.callCabal2nix "amazonka" src { })
              dontCheck
            ];
@endgame
Copy link
Collaborator

endgame commented Apr 25, 2024

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.

@endgame endgame closed this as completed Apr 25, 2024
@sir4ur0n
Copy link
Author

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

I can't wait for this PR to be merged 🤞

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

2 participants