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

Support Aeson 2.0 #245

Merged
merged 3 commits into from
Oct 16, 2021
Merged

Support Aeson 2.0 #245

merged 3 commits into from
Oct 16, 2021

Conversation

tfausak
Copy link
Owner

@tfausak tfausak commented Oct 16, 2021

Prompted by commercialhaskell/stackage#6217.

Obviously the surface area on my side is small, but supporting this is still a pain in the ass.

  • Super major version bump (from 1.5 to 2.0) requires clunky version ranges (like ^>= 1.5 || ^>= 2.0). If it was a normal major version bump this would be easy (>= 1.5 && < 1.7). The same thing happened back in the day with Aeson 0.11 to 1.0.
  • No migration guide was provided: Migration guide 1.5 -> 2.0 haskell/aeson#881
  • The change log doesn't highlight the severity and importance of this: https://twitter.com/ChShersh/status/1446920962528714761
  • Some things are completely missing from the change log, such as the new Key type, which is now pervasive through Aeson's API: Data.Aeson.Key haskell/aeson#868
  • Apparently no effort was made for forwards compatibility, like introducing type Key = Text or releasing a new 1.5.x version that makes migration easier.
  • Intuitively you'd think Rattletrap wouldn't have to change at all, since it doesn't care about the representation of JSON objects. And yet since unrelated changes were bundled into this release, I'm forced to deal with them using CPP (or something equivalent).

@tfausak tfausak merged commit 3eafee9 into main Oct 16, 2021
@tfausak tfausak deleted the aeson-2 branch October 16, 2021 14:07
@tfausak
Copy link
Owner Author

tfausak commented Oct 16, 2021

@tfausak tfausak mentioned this pull request Oct 20, 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

Successfully merging this pull request may close these issues.

1 participant