Closed Rochet2 closed 5 months ago
Should we even continue supporting 5.1 realistically? I don't think I've ever seen anyone specifically use it.
It's strange don't have the same errors
@Foereaper Well, maybe not. But luajit is basically same as lua51 + some extensions. @iThorgrim Lua51 has these errors and luajit only has one error - the one you reported.
I suspect that the issue is here
#define lua_rawlen(L, idx) \
- lua_objlen(L, idx);
+ lua_objlen(L, idx)
The semicolon should be removed as its not a part of the macro we replace. The result of lua_rawlen(L, idx);
is currently probably lua_rawlen(L, idx);;
@Foereaper Well, maybe not. But luajit is basically same as lua51 + some extensions. @iThorgrim Lua51 has these errors and luajit only has one error - the one you reported.
I suspect that the issue is here
#define lua_rawlen(L, idx) \ - lua_objlen(L, idx); + lua_objlen(L, idx)
The semicolon should be removed as its not a part of the macro we replace. The result of
lua_rawlen(L, idx);
is currently probablylua_rawlen(L, idx);;
Then, in terms of "usage", LuaJit is much more widely used than Lua53 / Lua54
We can reduce the amount of lua versions we support. Currently we default to 5.2 due to backwards compatibility and ppl probably swap to jit for performance. Not sure if other versions are used.
This works with LuaJit : https://github.com/ElunaLuaEngine/Eluna/pull/480/commits/c2bf6da5025bc27384c9f4abfd1105426627b129
I don't think 5.3 and 5.4 is widely used in the Lua community in general, they don't really give us anything that is super necessary so they could probably be dropped. I think 5.2 and LuaJIT are probably the more relevant ones to support, jit for obvious reasons and 5.2 for module support.
I don't think 5.3 and 5.4 is widely used in the Lua community in general, they don't really give us anything that is super necessary so they could probably be dropped. I think 5.2 and LuaJIT are probably the more relevant ones to support, jit for obvious reasons and 5.2 for module support.
Luajit support really seems to me to be important and more "necessary" just when you see the performance there's not much to add. (https://eklausmeier.wordpress.com/2020/05/14/performance-comparison-pallene-vs-lua-5-1-5-2-5-3-5-4-vs-c/)
For Lua 5.3 and Lua 5.4 in any case, you'll need to update AIO and a lot of tools / scripts that use the bit system for example, which is now native.
I think a lot of people stuck to Lua 5.2 for their projects, since it was the "default" version of Eluna.
I tried fixing 5.1 support, and the more I fix the more is missing to fix it properly. I think we should at the very least drop 5.1 support at this point.
For now the compilation is fixed. We can disable the other versions if we want to separately.
Looks like lua51 has errors: