-
Notifications
You must be signed in to change notification settings - Fork 32
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
Address boundary handling issues in non-blocking raw text reader, and its blocking wrapper #488
Address boundary handling issues in non-blocking raw text reader, and its blocking wrapper #488
Conversation
4b27705
to
50640bb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This diff looks good, could you add 1+ unit tests showing it's fixed?
Absolutely, porting them over from my other branch now. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #488 +/- ##
==========================================
+ Coverage 89.47% 89.52% +0.04%
==========================================
Files 76 76
Lines 13704 13747 +43
==========================================
+ Hits 12262 12307 +45
+ Misses 1442 1440 -2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
Added a unit test which currently validates the I'll make sure to include that in the format agnostic PR if no one minds its absence here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Can you address the clippy
warnings before merging?
tyvm! Added commit for clippy issues. |
Issue #, if available: n/a
Description of changes:
Previous implementation of the non-blocking reader, and its blocking wrapper, had two bugs when handling incomplete errors, and continuing after an incomplete error.
The non-blocking reader did not take into account the
step_out
nesting when unsetting theneed_continue
. When stepping out of a container that contained a container that had not yet been read, this would result in the reader stepping out beyond the target depth.The blocking reader did not properly mark the stream as complete when stepping out of a container. If a
step_out
caused the last remaining data from the stream to be read (completing the stream) root level values at the end of the stream could be ambiguous and continue to cause incomplete data errors, until the stream had been marked complete.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.