-
-
Notifications
You must be signed in to change notification settings - Fork 91
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
Prevent the extension from crashing due to unparseable Dark code #5292
Prevent the extension from crashing due to unparseable Dark code #5292
Conversation
ec377da
to
6a40f06
Compare
6a40f06
to
e1ede90
Compare
e1ede90
to
43a46c8
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.
Looks good! A few cleanups, but then good to merge.
I see there's a few places where we're returning Errors of Strings. I didn't look too closely, and suspect that those are OK -- that their contents are basically ignored, erased by an Unparseable thing, and that it's useful to keep around that string for the time when we include a Reason along with the failures. That said, worth a quick look to make sure we aren't returning a String anywhere we shouldn't
Changelog:
This PR adds :
Unparseable
type to theCliScript
type to handle unparseable code and prevent the extension from crashing.--skip-self-update
flag for the LSP to prevent running the self-update while using the extension"parse": "tree-sitter parse"
command to tree-sitter-darklangA stack overflow occurs when the number of tokens exceeds ~340, which is consistent with the List.map issue #5222
The issue lies in the
SemanticTokens.toJson
function, specifically in: