Repository navigation
Parsing hardening - #129
Merged
Merged
Conversation
Combine Unicode mixed-number components with checked multiplication and addition. Bounded capacity failures now return ParseIntError consistently in debug and release builds. Cover multiplication, addition, raw representability, zero-denominator, and unbounded backing cases, and document the CheckedAdd and CheckedMul contract.
Keep the sign on the complete value across ordinary, radix, Unicode, Juniper, and Decimal parser boundaries. Reject component-local signs for signed and unsigned backings so stored ratios retain non-negative magnitudes. Standardise GenericFraction radix errors on ParseError, validate bases from 2 through 36, report zero denominators explicitly, and make ParseError non-exhaustive for future compatibility.
Check formatting and all Clippy targets for the standalone Rust 1.70 consumer crate so its parser regression coverage cannot drift outside the stable root gates.
Validate bases before delegating to either backing integer and standardise direct dynamic-integer parsing on ParseError. Unsupported bases return UnsupportedBase while malformed and exhausted-capacity values return ParseIntError. Cover bounded, BigUint, promotion, and Rust 1.70 paths, and document the associated error migration and parser contract.
Add Criterion coverage for direct small parsing, promotion into the growing backing integer, and the composite DynaFraction path when their required features are enabled. Retain each complete parsed Result and record the signed pre/post parser revisions for layout-controlled manual comparisons without imposing a noisy CI timing threshold.
Rewrite the unreleased notes around downstream migration impact, separating source breaks from the parser defects they resolve. Align README and crate guidance with the numeric-form and Juniper contracts, and document radix grammar and errors beside the affected public implementations.
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.
No description provided.