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
Lua 5.2 compatibility needs improvement #357
Comments
I'm not sure what you expect for this item: you either need to run ZBS using 5.2 or use LuaJIT with Lua5.2 compatibility turned on. It's also possible to disable compilation step before running/debugging an application by setting
This can be improved; the current version inherits the environment set for ZBS itself, which is partially invalid for Lua 5.2. There are several changes needed:
|
I was thinking of something like external compilers, or more precisely, interpreter-specific compiler functions. (so for example moonscript could have a compiler function that compiles to Lua on the same thread and stuff, and someone could write a 5.2 compiler in Lua, etc -- if this makes any sense) |
Yes, it should be possible, but it's not much different from using |
@SoniEx2, pushed several changes to lua52compat branch for better compatibility. Take a look if these work for you. I'll test on my OSX/Linux tomorrow. |
I don't mean it as in running ZBS from 5.2 (I never tried that btw), I mean running 5.2 code from ZBS.
When running ZBS with stock Lua 5.1, you're unable to use 5.2 syntax (labels, goto, etc) because it tries to loadstring() the code. You need LuaJIT compiled with 5.2 compat features for this.
When running Lua 5.2, the package.cpath is inherited from ZBS, so if the ZBS interpreter has /usr/local/lib/lua/5.1/* on the cpath, Lua 5.2 will also have /usr/local/lib/lua/5.1/* on the cpath.
The text was updated successfully, but these errors were encountered: