Hi, On Tue, Aug 31, 2021 at 04:35:26PM +0100, Edd Barrett wrote: > On Tue, Aug 24, 2021 at 03:06:02PM +0100, Laurence Tratt wrote: > In case anyone is wondering why we don't just build Neovim with LuaJIT: > > - LuaJIT isn't as portable, although we could use it only for certain > arches. > > - We'd have to add a LuaJIT FLAVOR to every Lua dependency. I looked at > that in the past when I was first porting Neovim and it looked > non-trivial. I don't really have the motivation for it, but I won't > object if someone else wants to try.
I've just had a long conversation with the neovim devs and, oh boy does the plot thicken. In short: - LuaJIT only "kind of" implements the functionality of a formal reference lua version. It's close to a mix of 5.1 and 5.2. - LuaJIT language semantics could change from commit to commit. - LuaJIT does not make formal releases. - Portability may also change from commit to commit. - LuaJIT is designed to be embedded. Each project requiring LuaJIT typically chooses a git commit to target and statically embeds it. Users of the consumer then target the language semantics and platforms of LuaJIT at the time of that commit. - Therefore, Neovim upstream uses a hard-coded LuaJIT commit and statically embeds. Neovim plugins then typcially assume that this version of LuaJIT is in use (not a reference Lua implementation, like 5.1 or 5.2). Laurie has already encountered plugins that don't work properly with the reference Lua 5.1 implementation that our Neovim package currently uses. - Platforms lacking LuaJIT support are out of luck WRT plugins. What I take away from this is that: in order to give the "expected" Neovim experience, we are going to need to embed the right version of LuaJIT into Neovim going forward. I'll start looking at this when I find some time (and motivation!). (I thank the Neovim devs for their patience with my bewildered questioning.) -- Best Regards Edd Barrett https://www.theunixzoo.co.uk