The LuaJIT recipe doesn't expose LUAJIT_ENABLE_LUA52COMPAT as a package option. This flag enables useful Lua 5.2 features like __len, __pairs, and __ipairs metamethods for tables, which are needed for proxy/reactive table patterns.
Right now, the only way to enable it as a consumer is passing -c 'luajit/*:tools.build:cflags=["-DLUAJIT_ENABLE_LUA52COMPAT"]' on every conan install invocation, which means duplicating it across Makefiles, CI workflows, etc. There's no way to set this from a consumer conanfile.py since conf is read-only in recipes.
It would be great to have something like:
options = {"shared": [True, False], "fPIC": [True, False], "lua52compat": [True, False]}
default_options = {"shared": False, "fPIC": True, "lua52compat": False}
The build-side change is straightforward — on Unix it's XCFLAGS+= -DLUAJIT_ENABLE_LUA52COMPAT in the Makefile, and on Windows it's passing lua52compat as an argument to msvcbuild.bat (which already supports it).
This would let consumers simply do:
def configure(self):
self.options["luajit"].lua52compat = True
instead of having to chase every conan install call site.
The LuaJIT recipe doesn't expose
LUAJIT_ENABLE_LUA52COMPATas a package option. This flag enables useful Lua 5.2 features like__len,__pairs, and__ipairsmetamethods for tables, which are needed for proxy/reactive table patterns.Right now, the only way to enable it as a consumer is passing
-c 'luajit/*:tools.build:cflags=["-DLUAJIT_ENABLE_LUA52COMPAT"]'on everyconan installinvocation, which means duplicating it across Makefiles, CI workflows, etc. There's no way to set this from a consumerconanfile.pysinceconfis read-only in recipes.It would be great to have something like:
The build-side change is straightforward — on Unix it's
XCFLAGS+= -DLUAJIT_ENABLE_LUA52COMPATin the Makefile, and on Windows it's passinglua52compatas an argument tomsvcbuild.bat(which already supports it).This would let consumers simply do:
instead of having to chase every
conan installcall site.