-
Notifications
You must be signed in to change notification settings - Fork 322
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
1.5-2.0 compat suggestion #932
base: v1.5.6.0
Are you sure you want to change the base?
Conversation
The idea was to make |
Could you please take another look? The target of this PR is the 1.5 branch not the 2.0 branch. It is a backport of the 2.0 API to 1.5, where the EDIT: rather than "target" perhaps I should say "the aim of this PR is to be released in the 1.5 series". |
@phadej I think the point here was to do a patch release of 1.5.x with this forwards compatible shim. I have some dedicated time this weeekend, would you mind if I made a 1.5.7.0 release for this? I'll reopen this until we make a decision. |
@bergmark, I won't use my time on aeson-1.5. I'd advice people just drop aeson-1.5 support instead. (Now as Stackage nightly has updated to use it). |
@phadej that's fine! I wasn't expecting you to put any effort into this. @tomjaguarpaw I found your |
We git tag our releases. I created a |
It's great that it works! I can retarget my branch at |
44d8ec2
to
b3c51b2
Compare
OK, retargeted. This is a big change, but hopefully it makes it clear what the impact is. Do you want to take it from here @bergmark or would you still like my help with something? |
I reverted some of the breaking changes and pushed that to the
I think this has to change to HashMap to stay compatible with 1.5, and that requires a bunch of other changes to be compatible. I might take another look later see if this can be puzzled out. |
This change looks too big. It's very hard to verify there aren't accidental breaking changes. I'd suggest to not touch anything that is not required, i.e. no changes from Just add a compatibility module, and tests that they work. (I still think this is wasted work to begin with, so don't make it any more burden to maintain). |
Really wish this had gone through. Aeson 1.5 no longer compiles with GHC 9.2.2, forcing us to upgrade to 2.0. Having a compat shim would make that so much simpler. |
@m4dc4p You can easily have Aeson 1.5 compile on 9.2 with this patch: https://github.com/haskell/aeson/pull/935/files |
Here is a suggestion for an Aeson 1.5-2.0 compatibilty story. The technique is simple: take Aeson 2.0 and change the version 2 abstract types to type synonyms as below (plus chasing up the ensuing, minor, type errors).
master
. See my branch and the full diff for a much clearer view of what changes this entails.This backports the 2.0 API to 1.5, and ought to allow Aeson users to write code that works at the same time against version 1.5 and version 2.0, providing a smooth upgrade path and avoiding the need for a "big bang" switch of the entire Aeson ecosystem at once.
I don't actually use Aeson myself, so I would welcome the input of Aeson users and maintainers egarding