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
Maximum number of scopes exceeded #948
Comments
Ok, I was actually able to get The uglify module sometimes inlines and chains functions and Promises (with some minification options) and I have started facing this issue. Had to disable some optimizations. |
It's been hit again here: http://forum.espruino.com/conversations/332111/#comment14671765 |
Just to add, I have a workable solution to this which doesn't impose any limits. Just debugging some memory leaks and it'll be sorted |
Is there any way to increase this limit? I went too far with my async/await calls and now there is no way back 😂 |
How are you using async/await? A transpiler? You could build your own firmware with this changed I believe? Line 252 in e78f33f
|
@gfwilliams thank you a lot for this reference! Yes, I use Generally I'm transpiling TypeScript. Despite some callbacks overhead it works great. |
@gfwilliams Maybe I am missing something but it looks like this limitation should have been dropped since Mar 2019. https://github.com/espruino/Espruino/search?q=JSPARSE_MAX_SCOPES doesn't find any use of the JSPARSE_MAX_SCOPES define. |
That's a very good point - I'll remove that define. @zored looks like you're just using a really out of date firmware then? |
@gfwilliams That's right! We have a board called Iskra JS (like "Spark JS") in Russia and its firmware is based on some really outdated version of Espruino. I will try to keep it up to date. |
With callbacks hell it's actually pretty easy:
Ideally we should use a JS array for scopes to avoid the hard limit
The text was updated successfully, but these errors were encountered: