-
-
Notifications
You must be signed in to change notification settings - Fork 271
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
java.lang.AssertionError: Variable used before definition #940
Comments
It's a bug inside compiler. Can you please provide stack trace, i.e. specify |
I suggest you to try with JS again. From stacktrace it turns out that issue is somewhere in coroutine support, which is know to be very unstable in Wasm BE. To improve JS debugging experience you can enable source map generation and/or disable optimizations and obfuscation. |
Thank you for your response, are these fine:
Does disabling |
No, obfuscation does not disable optimizations |
Is there a way to turn off coroutine support? |
@xupwup no, there's not. TeaVM automatically turns it on when it detects usage of threads in your code. If it was possible, TeaVM would just gracefully refuse to compile your code with list of all usages of threads. |
@xupwup Coroutines are not necessarily turned on by threads. Another example is |
Oh, that's good to know. Looking at AsyncMethodFinder it seems that you consider methods with a monitor asynchronous, right? |
@xupwup I consider methods with monitor asynchronous only when threads turned on. And I consider any method as asynchronous if it's marked with |
That makes sense, thanks. I'll go investigate why I have 60 asynchronous methods, I was expecting 0. |
Hello, thank you for TeaVM.
I'm trying to get my project compiled down to WASM after giving up on using JS.
When I try to build, I get this error:
My project is primarily built with Kotlin. I was able to get some part of the codebase working while I was using JS. Other parts just crashed without any context. Now I get the above error.
My project is a little big, and its hard to debug or edit the codebase with such debug information. Any guidance will be appreciated.
The text was updated successfully, but these errors were encountered: