Repository navigation
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
This was referenced Nov 14, 2026
Use fixed diagnostics for enum names, numeric ranges, scalar container shapes and registered extensions. Preserve strict standalone parsing, lenient field behavior and checked 128-bit narrowing. Cover owned and reflective decoding, container boundaries and arbitrary-precision JSON values.
vanderbr
force-pushed
the
reallyme/enum-json-diagnostics
branch
from
November 18, 2026 02:03
4ba99c9 to
374e370
Compare
This branch has not been deployed
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.
Generated enum deserializers can expose an unrecognized name or number in a JSON error. Logging that error can disclose rejected input.
Use fixed diagnostics for standalone enum decoding, enum fields and collection boundaries, registered enum extensions, and reflection. Preserve strict standalone parsing, lenient field filtering, accepted JSON values, and null handling. Integer callbacks use checked narrowing: in-range 128-bit callbacks follow the existing enum conversions, while wider values fail without their contents. Registered extension errors retain their field-number context.
Regenerate bindings with the matching generator to update standalone enum deserialization. Checked-in descriptor bindings are regenerated. MSRV remains Rust 1.75.
Validation: 4,343 workspace tests, strict all-target/all-feature Clippy, formatting, rustdoc, Rust 1.75 checks and WASM checks passed. Focused regressions cover owned and reflective decoding, strict and lenient modes, signed/unsigned widths, malformed collection shapes, and actual arbitrary-precision JSON values.
Related to #822. #832 extends this change to other ProtoJSON conversions and wrong-kind diagnostics.