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

Port from codec-argonaut to codec-json #690

Merged
merged 3 commits into from
Jun 8, 2024
Merged

Port from codec-argonaut to codec-json #690

merged 3 commits into from
Jun 8, 2024

Conversation

f-f
Copy link
Member

@f-f f-f commented Jun 7, 2024

Not sure if we are tracking this in this repo, but we talked about doing this in the past, and we need it for purescript/spago#1090

Maybe the most important detail here is that we are propagating the errors from the parsers into the DecodeErrors, so that they get through to the user when parsing things like PackageNames that are too long.

@f-f f-f requested a review from thomashoneyman June 7, 2024 21:08
@thomashoneyman
Copy link
Member

At a glance this all looks like a straightforward, mechanical change. I guess we don’t have much in the way of error tests; what does the new error output look like when for example a JSON payload contains an invalid package name?

@f-f
Copy link
Member Author

f-f commented Jun 8, 2024

@thomashoneyman good point - I added a test to exercise the new errors!

Copy link
Member

@thomashoneyman thomashoneyman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Other than the formatter issue — looks good!)

@f-f
Copy link
Member Author

f-f commented Jun 8, 2024

Ah yeah, autoformatter didn't run for some reason

@f-f f-f merged commit be0d7ff into master Jun 8, 2024
16 checks passed
@f-f f-f deleted the move-to-core-json branch June 8, 2024 17:42
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.

2 participants