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
Note: this is just about the implementation of the apollo-parser crate, and not relevant for end users.
There's currently an internal kind-of footgun in apollo-parser: if you are parsing something in a loop, and hit an error, and use p.err(), the parser does not advance. That means you can get into an infinite loop. This is partially addressed by having p.peek_while(), which we will have to be diligent about in reviews. But it's still something to keep in mind that is not that clear when reading a PR.
In general, it would be good to have some documented approach for the difference between p.err() and p.err_and_pop(). When should one be used over the other?
Note: this is just about the implementation of the apollo-parser crate, and not relevant for end users.
There's currently an internal kind-of footgun in apollo-parser: if you are parsing something in a loop, and hit an error, and use
p.err()
, the parser does not advance. That means you can get into an infinite loop. This is partially addressed by havingp.peek_while()
, which we will have to be diligent about in reviews. But it's still something to keep in mind that is not that clear when reading a PR.In general, it would be good to have some documented approach for the difference between
p.err()
andp.err_and_pop()
. When should one be used over the other?This is spun off from #828 (review)
The text was updated successfully, but these errors were encountered: