-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
WASM cannot use tree-sitter-swift for tests #8
Comments
Let me investigate it |
I need to ask the guys from the WASM toolchain but looks like we are generating a function with massive local variables and it exceeds the limit (not sure if there is an easy way of increasing it). I suppose that this is happening because you have added By the way, why are you adding that dependency for the tests? I don't get it. Cheers |
More concretely the error is being triggered in this function: Cheers |
Very interesting issue. I've been resisting for a long time, but I need a real parser for some testing. I deliberately did not add the SPM package as a dependency, to try to avoid knock-on dependency issues for consumers. I did a little investigating with what SPM was building, and it looked to me like the test target dependency was being ignored for regular usage. Is this because you run the tests as part of the WASM CI? Does this mean that some tree-sitter parsers aren't compilable by WASM, or is this a unique issue? |
So basically, such kind of C code where we have tons of variables, switches, if-else if, gotos, huge functions.... are candidates to generate WASM code that exceed the interpreter limits. https://github.com/GoodNotes/tree-sitter-rtf Cheers |
That makes total sense. And the reason the WASM compiler sees this code is because you are running the tests? Maybe we can conditionalize the dependency on os? |
Exactly, I'm running the same tests for WASM as for iOS, MacOS.... |
Ok, sounds good. I'll leave this issue open. |
Hello @fjtrujy ! The WASM tests broke again after I pulled in a tree-sitter change. It looks like there was a subtle change to how they are importing some C functions. But I'm not 100% sure I understand why what they've done is significantly difference from before. Do you have any interest in having a look? |
Ok, I will try to take a look in the next couple days |
I'm not 100% sure what the issue is, but something in CI is unhappy with the submodule I added to get access to the swift parser. @fjtrujy can I enlist some help?
The text was updated successfully, but these errors were encountered: