-
Notifications
You must be signed in to change notification settings - Fork 123
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
Strict globals forbid correct code #441
Comments
Update:
I am writing for Neovim which provide access to its internal stuff from Lua scripts by |
I am invoking fennel compiler from python script using this command:
When I delete |
This is actually the same underlying problem as #299; it has to do with the way that functions are emitted as locals every time rather than purely anonymously in the compiler output. It's a very difficult issue to fix since the compiler makes a lot of assumptions about chunks being statements. It doesn't really have much to do with strict globals checking, other than that turning off all checks altogether just happens coincidentally to be a workaround for the underlying issue. In the first reply you've pasted a runtime error, which isn't actually a problem in Fennel but in whatever runtime you're using. In general, the pattern you've identified as a workaround with |
I don't know if I understand what you're saying about |
I'm going to close this because we're tracking the underlying issue already in #299 but it sounds like you might have another separate issue; if so feel free to open a new issue report with a description of the problem. Thanks. |
When I try to compile next code, I get an error:
unknown identifier in strict mode: handle
however when I compile it with
--globals "*"
flag I get correct code:An alternative way is to create the variables before, but that looks ugly.
The text was updated successfully, but these errors were encountered: