-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
Ensure that lua 5.3 is supported #124
Comments
Some wisdom from the internet: "In Lua 5.2, unpack was moved to table.unpack." So I guess sprinkling about some I might look into it. |
I think that wasn't it. https://www.lua.org/pil/5.2.html unpack() in this case is used to unpack "arg", I think they changed the way variable arguments work in Lua 5.3. Since "arg" on the global level is also what argv is in C, this introduces additional confusion — I've seen command line arguments show up in unexpected places. |
I think we should make sure that 5.3 doesn't introduce unexpected breakage anywhere else. |
In both 5.3 as well as 5.1 you can access the arguments via "...", but I'm not sure that still works in 5.0 (maybe we can deprecate 5.0, it's from 2003-2006) |
https://www.lua.org/manual/5.0/manual.html#2.5.8 Ctrl+F variadic Compare that to https://www.lua.org/manual/5.1/manual.html#2.5.8 Ctrl+F variadic Seems to me they replaced the implicit "arg" parameter by the new "..." form of accessing the arguments, but kept arg for compatibility reasons. |
yup, seems that way. |
https://www.lua.org/manual/5.1/manual.html#7.1 Migrations have been done to comply with new format for example b2b1755 but this is >=5.1, I think dropping support for 5.0 will make our lives easier. |
I agree we should drop support for Lua 5.0 and start requiring Lua 5.1. Even though Debian still ships |
I'm also in favour of dropping 5.0 because there is no workaround for this other than preprocessing the lua code (yikes), because using ... in 5.0 results in a syntax error. I've just checked, Lua has preview releases for 5.4, and there seems to be nothing incompatible this time: https://www.lua.org/work/doc/manual.html#8 |
Variadic functions were introduced in 5.0, but the method of accessing them changed in 5.1. This makes the code incompatible with 5.0 (it is already incompatible since at least b2b1755), which will be removed from the build system in a subsequent commit. Fixes raboof#124. See also raboof#90.
/usr/local/bin/notion: ioncore_misc.lua:77: attempt to call a nil value (global 'unpack')
It seems the unpack() function was removed. Maybe there's more.
The text was updated successfully, but these errors were encountered: