You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #662 made the parser recursion limit apply to every case recursion was used (hopefully i didn’t miss any). In same cases (nested selection set, nested values, arguably nested list types) recursion does make parsing significantly easier. But as of this writing recursion is also used in many case to parse repetition, where it could be easily replaced with a loop.
This issue is fixed if the test added by #662 still passes after uncommenting this assertion:
…662)
The limit was only tracked for nested selection sets, but the parser turns out
to use recursion in other cases too. Issue #666 tracks reducing them.
Stack overflow was observed with little more than 2000
nesting levels or repetitions in the new test.
Defaulting to a quarter of that leaves a comfortable margin.
PR #662 made the parser recursion limit apply to every case recursion was used (hopefully i didn’t miss any). In same cases (nested selection set, nested values, arguably nested list types) recursion does make parsing significantly easier. But as of this writing recursion is also used in many case to parse repetition, where it could be easily replaced with a loop.
This issue is fixed if the test added by #662 still passes after uncommenting this assertion:
apollo-rs/crates/apollo-parser/src/parser/mod.rs
Line 636 in 865be96
The text was updated successfully, but these errors were encountered: