Skip to content

serde_json's arbitrary-precision feature breaks untagged enum deserialization #3

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

Closed
Michael-J-Ward opened this issue Jan 5, 2021 · 3 comments

Comments

@Michael-J-Ward
Copy link

Michael-J-Ward commented Jan 5, 2021

I recently incorporated tracing-bunyan-formatter into a project, and found it triggered a regression error in deserializing an untagged enum with serde_json.

tracing-bunyan-formatter enables the arbitrary-precision field on serde-json, which causes the bug, as explained here: serde-rs/json#559

For what it's worth, I pulled down this crate and, and the same test fails with and without the feature (parent_properties_are_propagated).

EDIT:

Also, let me know if it's inappropriate for me to to notify you of a bug in another crate. I figured since it affects your users, you'd want to know.

@LukeMathWalker
Copy link
Owner

Interesting - thanks for raising the issue!
I am not sure there is anything we can do on our side (apart from potentially disabling the feature).

@saskenuba
Copy link

saskenuba commented Mar 10, 2021

Apparently, this crate with arbitrary-precision introduced this bug on my application, specifically on the juniper GraphQL crate, making scalars parser to break, as better described here: graphql-rust/juniper#390

Is disabling the feature too much of a trouble? Or perhaps implementing the workaround on serde-rs/json#559 (comment).

Thanks

@LukeMathWalker
Copy link
Owner

I've released a new version of tracing-bunyan-formatter with an arbitrary-precision feature.
You can disable it with

tracing-bunyan-formatter = { version = "0.2", default-features = false }

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

No branches or pull requests

3 participants