Zsolt Dollenstein
Zsolt Dollenstein
Hmmm, I can't reproduce this with the release build. The debug build does throw a stack overflow, but that's kinda expected.
Alright I can repro with 5000 `+` operators :) We need this to not crash, but it'd be nice to handle arbitrarily nested expressions. (BTW the original parser works fine...
Looking at the core file, the bottleneck is not the parsing (strictly speaking), but the cloning of the excessively nested datastructure causing ~3500 stack frames. There are two things which...
#632 should help with any real world use cases. There's https://github.com/kevinmehall/rust-peg/issues/282 open to address this in the parser framework. I'll see if I can hack something up in the meanwhile.
I've seen a similar thing happen with _really_ long import statements as well. I haven't looked at the root cause yet, so I don't really understand where the recursion happens
@dependabot ignore this minor version
This is because of https://github.com/Instagram/LibCST/issues/530
Looks like this works with the new rust-based parser, so I likely won't fix it in the current one: ``` git checkout parser cd native printf 'from foo import (bar\n...
#566 contains the new parser that works with this input. After merging that, you'll need to set the following environment variable `LIBCST_PARSER_TYPE=native` in whatever process that runs libcst to turn...
I'm aiming for a month or two. The parser is fairly stable at this point, and it's used to parse hundreds of millions of lines of Python at Meta. It's...