Edd Barrett <e...@theunixzoo.co.uk> writes: > Hi, > > (CCing some people who have worked on lang/lua, hoping one of them knows > the answer to my question below).
I don't consider I have much experience with lua, but I recently found myself untangling the versioning mess we had in the ports tree. Some additional details after Stuart's mail. > This is (yet another) neovim dependency. libmpack (not to be confused > with libmsgpack): > > ---8<--- > libmpack is a small binary serialization/RPC library that implements both the > msgpack and msgpack-rpc specifications. > --->8--- > > This isn't quite ready as it requires some thought. Neovim (on some > arches) will use this via LuaJIT, not plain Lua. We don't have to do > anything special to build against LuaJIT as plain Lua extensions are > binary compatible with LuaJIT [1]. LuaJIT is not portable. ONLY_FOR_ARCHS = powerpc i386 amd64 IMHO this is the kind of fragile software you'd better avoid if you can. > What I don't think will work is mixing Lua versions. So how do we guard > against the case where (e.g.) the default Lua is bumped to target a > newer Lua than LuaJIT? This means the library will not be found by > LuaJIT. > > Although I could explicitly set the Lua version used in this port, > setting it to anything other than the default version seems wrong too, > since then regular Lua users won't have access. lang/lua doesn't add FLAVORS automatically any more. If you want to use a port with lua52 or lua53, you have to test and set FLAVORS explicitely anyway. > Do we need (versioned) lua flavors, e.g. -lua51, -lua52? Please try to support as many versions as supported by upstream. If you find out that only 5.1 is supported, then setting MODLUA_VERSION to 5.1 makes sense to save other people's time (at least, that's the current pattern I see). > We could just use plain Lua across the board, but that would be a shame. If you can selectively use LuaJIT on *some* platforms, well, go for it. But I doubt that using LuaJIT will make an actual difference regarding speed... > One of the attractions of neovim is to use a higher performance (and > a less "argh, my eyes, they burn") scripting language than vimscript. > > Any ideas, or other comments? Regarding the port: better use "lua-mpack" or "lua-libmpack" as PKGNAME-lua, for consistency and because the lang/lua module uses this to provide automatic support for multiple versions. > [1] http://luajit.org/extensions.html -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE