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

Use Map with custom FromJSON to ignore unknown keys #1143

Closed
wants to merge 6 commits into from

Conversation

dfordivam
Copy link
Collaborator

Normally the ghcup would complain for parse failures in Platform and Architecture.
With this PR these will be ignored, and parse would succeed

[ Error ] [GHCup-00160] JSON decoding failed with: Aeson exception:
[ ...   ] Error in $.toolRequirements.GHC['unknown_version'].Darwin2: Failure in Platform (FromJSONKey)

[ Error ] [GHCup-00160] JSON decoding failed with: Aeson exception:
[ ...   ] Error in $.ghcupDownloads.GHC['8.2.2'].viArch['A_64_2']: invalid key "A_64_2", expected one of ["A_64","A_32","A_PowerPC","A_PowerPC64","A_Sparc","A_Sparc64","A_ARM","A_ARM64"]

@hasufell
Copy link
Member

hasufell commented Nov 2, 2024

can we not have instances for type aliases?

@hasufell hasufell closed this Nov 19, 2024
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

Successfully merging this pull request may close these issues.

2 participants