Repository navigation
Katip + Aeson 2.0.0.0 Compatibility - #131
Merged
Merged
Conversation
MichaelXavier
approved these changes
Nov 5, 2021
MichaelXavier
left a comment
Collaborator
There was a problem hiding this comment.
This looks great! Thank you!
Contributor
Author
|
Excellent, thank you for the quick turn-around! Would you like a second PR for |
Collaborator
|
Sure, if you're feeling up to it! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
The motivation for this PR is #128, to add
aeson-2compatibility. To sum up, the plan was:For the projects that can be upgraded (
katip,katip-datadog,katip-logzio):aeson 1/2compatibility.aeson-2.0.1.0.Changes
This PR completes
1for all projects and2+3forkatip.I have
2+3for the other projects implemented on another branch (you can see the diff here) because I figured it might make sense to merge them separately sincekatip-datadogandkatip-logziowill have to pin the newkatip-0.8.7.0too.The changes are pretty mechanical, simply (un)wrapping
KeytoText. The relevant newaesonmodules areData.Aeson.KeyMapandData.Aeson.Key.Tests
You'll notice I had to add new golden files for the tests (see
katip/test/Katip/Tests/Scribes/Handle.hs).diff Handle-text.golden Handle-text-aeson2.goldenhighlights the last two lines. Note that the order of the last few keys (sub,text,num,float) has changed:I'm not very familiar with how
katiporders these last few keys, but I'm guessing this ordering implicitly comes from aeson, hence the change. Let me know if this is a problem.The json file,
Handle-text.golden, also had the order changed, but the json is structurally identical. I whipped up this gist you can use to verify they're the same.Let me know if you have any questions, requests, etc. Thanks!