Katip + Aeson 2.0.0.0 Compatibility #131
Merged
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-2
compatibility. To sum up, the plan was:For the projects that can be upgraded (
katip
,katip-datadog
,katip-logzio
):aeson 1/2
compatibility.aeson-2.0.1.0
.Changes
This PR completes
1
for all projects and2+3
forkatip
.I have
2+3
for 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-datadog
andkatip-logzio
will have to pin the newkatip-0.8.7.0
too.The changes are pretty mechanical, simply (un)wrapping
Key
toText
. The relevant newaeson
modules areData.Aeson.KeyMap
andData.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.golden
highlights 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
katip
orders 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!