Repository navigation
馃悰 Fix RecursionError on long runs of consecutive newlines - #601
Merged
Merged
Conversation
MiWeiss
force-pushed
the
fix/splitter-recursion
branch
3 times, most recently
from
September 2, 2026 20:00
0b65dcb to
6459e48
Compare
`Splitter._next_mark` skipped newline marks by calling itself
recursively, burning one stack frame per consecutive newline. Files with
~1000 or more consecutive lines containing none of `{`, `}`, `"`, `,`,
`=` therefore raised a `RecursionError` instead of parsing (or, inside a
braced value, aborted parsing with a "please report this bug" message).
Newlines are now skipped in an iterative loop, keeping the line counting,
char-index and EOF bookkeeping unchanged.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
MiWeiss
force-pushed
the
fix/splitter-recursion
branch
from
September 2, 2026 20:03
6459e48 to
56b7f7a
Compare
MiWeiss
commented
Sep 2, 2026
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Collaborator
Author
|
lgtm |
MiWeiss
force-pushed
the
fix/splitter-recursion
branch
from
September 2, 2026 20:38
6ede972 to
d79afd3
Compare
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.
Splitter._next_markskips newline marks by recursing, one stack frame per newline.Hits any file with ~1000+ consecutive lines free of
{ } " , =. Inside a braced value the error escapes to the caller instead of becoming a failed block.Fix: loop instead of recurse. Line counting and EOF handling unchanged.
Tests: 6 cases at 3000 newlines, all fail before. Suite 2582 passed, from 2576.
馃 Generated with Claude Code