Repository navigation
Conversation
Author
|
Hi! Can we expect this fix to get merged? |
Author
|
@maxbrunsfeld seriously, can you take a look sometime? thank you. |
Author
|
screw it. clearly unmaintained. |
|
No reason to not leave it open |
verhovsky
reviewed
Jul 17, 2023
Comment on lines
-363
to
-367
| nodeText: { | ||
| get() { | ||
| return this.tree.getText(this) | ||
| } | ||
| } |
verhovsky
reviewed
Jul 17, 2023
| c.text = tree.getText(node); | ||
| return c; | ||
| }); | ||
| } No newline at end of file |
verhovsky
reviewed
Jul 17, 2023
| const jsParser = new Parser(); | ||
| `) | ||
| const output = code.rootNode.toString() | ||
| console.log(output); No newline at end of file |
Contributor
|
@cellog Could you please fix the PR so it can get merged? |
Author
|
I am not a maintainer of tree-sitter, and do not have the time or energy to update this PR. You're welcome to re-create it if you need it. |
|
Any update here? We encounter the same issue. Thank you. |
Merged
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.
Fix #53
This fixes the illegal invocation. Basically, the problem described in https://stackoverflow.com/questions/9677985/uncaught-typeerror-illegal-invocation-in-chrome is what is happening here, but it appears to be a race condition.
When we re-load the context in the same process (which happens with Jest's worker pool), the getter is triggered, for no apparent reason, BEFORE the native extension has had a chance to load.
thisis actually the user-land object, with no knowledge of the native prototype yet. Just by changing the name of the extension's getters, it fixes this race condition.I've added Jest and 3 simple jest tests, all of which failed before the change (you're welcome to try them against master to see what I mean)