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

Aeson incompatibility compile error #207

Closed
jonathanlking opened this issue Feb 6, 2023 · 6 comments
Closed

Aeson incompatibility compile error #207

jonathanlking opened this issue Feb 6, 2023 · 6 comments

Comments

@jonathanlking
Copy link

I think there is a regression introduced in yaml-0.11.9.0 which causes a compile error with aeson-2.1.1.0.
The yaml.cabal has aeson >=0.11, so I think it's meant to work with aeson-2.1.1.0?

The error is:

src/Data/Yaml/Pretty.hs:98:108: error:
Error:     • Couldn't match expected type ‘Key’ with actual type ‘Text’
    • In the first argument of ‘Key’, namely ‘(toText k)’
      In the first argument of ‘(:)’, namely ‘Key (toText k)’
      In the first argument of ‘go’, namely ‘(Key (toText k) : ps)’
   |
98 |                         in mapping (sort $ fmap (first toText) $ HM.toList $ HM.mapWithKey (\k -> go (Key (toText k): ps)) $ select o)
   |                                                                                                            ^^^^^^^^
Error: Process completed with exit code 1.

I got this from using Cabal, but it also appears to be happening on the Stackage nightly CI build.

@jonathanlking
Copy link
Author

I'm very happy to take a look at a fix now (hopefully shouldn't be too taxing!) if a PR would be welcomed?

@treeowl
Copy link

treeowl commented Feb 7, 2023

I just ran headlong into this one too. This is the second major breakage I've seen in an important public package today.

@4eUeP
Copy link

4eUeP commented Feb 7, 2023

Me too. BTW, should we make sure the CI passes before releasing to the hackage?

@snoyberg
Copy link
Owner

snoyberg commented Feb 7, 2023

Looks like the CI matrix wasn't using a recent enough snapshot to catch aeson 2 changes. I've reverted the change (#206) that caused the breakage and added LTS 20 in #208.

@jonathanlking if you're interested in trying to fix the PR that caused the breakage, that sounds great, but I'm also fine leaving the new feature out.

@Boarders
Copy link
Contributor

Boarders commented Feb 7, 2023

#209 - PR here hopefully fixing this issue

@jonathanlking
Copy link
Author

@snoyberg I was mostly concerned about the package not being broken, rather than the new functionality, so your revert has solved my problem.
It looks like I've been beaten to it by @Boarders anyway — thank you! 😄

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

5 participants