-
Simple Docker file:
Build downloaded
Q1. Since when SILE 0.14.x bundles or requires its own version of Lua? Up to recently, SILE was using the system's default , and I had understood that the switch to LuaJIT would come in 0.15 (along with other rusty stuff)... Sounds weird to see it in 0.14.13, 'cause it breaks my workflow, it seems... and the release notes said nought about such a drastic change... Well let's go any way and add at the end of this Dockerfile:
Aha, there are installed for 5.4 indeed and are not found. Let's add
Q2. Probably some issues with luarocks itself? Can't say, that's a bit frightening but let's cross fingers, I never tried (regular) 5.1 before... Next step is to check if it works... Let's alias running this docker image too Using the
Yay! Worked (though I don't get the discussion there at all, then: it seems this SILE with LuaJit finds 5.1 module...). Using the example from https://mastodon.social/@omikhleia/111518778130369008
Wow, seem I'll have to investigate even 3rd party code. Which I didn't expect in 0.14 and won't be able to do quickly. Getting SILE right for 3rd party devs is hard. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
The SILE provided Docker images that build SILE from source using Arch system dependencies still use Lua 5.4 (until v0.15.0 comes out). You can build Docker images using that as a base if you like. The Arch Linux system package switched from Lua 5.4 to LuaJIT here. You can read which version of Lua you should install modules for, then install them like so: $ sile -q -e 'print(SILE.lua_version); os.exit()' | read lua_version
$ luarocks --lua-version $lua_version install resilient.sile Yes, LuaJIT uses modules in the same format as Lua 5.1 builds them. We've been building and testing SILE against 4 versions of Lua for years now so that downstream distros and users can use whatever suits them best. If you want to write modules that work across the broader ecosystem you should at least be testing 5.1 since that has the most limiting API. The vast majority of 3rd party Lua code (such as on LuaRocks) is 5.1 compatible for just this reason. The most likely culprit for the error you show there last is probably trying to concatenate a Nil. You have to cast |
Beta Was this translation helpful? Give feedback.
-
Also just a pointer, you can install some of your packages from the AUR such as silex. The PKGBUILDs for those show how to do a system installation matching Arc Linux's SILE package Lua expectations. |
Beta Was this translation helpful? Give feedback.
-
Also as a side note, Arch doesn't really have a "default" lua. It has completely parallel packaging for 5 Lua versions and users can use any of them (or even all of them). A few project depend on specific versions and packaging reflects that, others don't care. For those that don't care Arch packagers pick one: usually either the newest (Lua 5.4) or fastest (LuaJIT) depending on the project. This is actually pretty common for Lua, most distros handle Lua similarly. As the Arch Linux packager for SILE I made the decision to switch from the newest available Lua (which wasn't providing any benefit to SILE over any other version) to the much faster LuaJIT. Other packagers have made similar choices (for example NeoVIM or MPV being built against LuaJIT). Some other distros have made similar choices when possible, others not of course. This will be slightly more complicated for SILE v0.15.0 as we'll also be shipping a Lua interpreter while still having optional compatibility for that being any of 6 different versions of 3 different upstream "Lua" fork projects. |
Beta Was this translation helpful? Give feedback.
Also as a side note, Arch doesn't really have a "default" lua. It has completely parallel packaging for 5 Lua versions and users can use any of them (or even all of them). A few project depend on specific versions and packaging reflects that, others don't care. For those that don't care Arch packagers pick one: usually either the newest (Lua 5.4) or fastest (LuaJIT) depending on the project.
This is actually pretty common for Lua, most distros handle Lua similarly. As the Arch Linux packager for SILE I made the decision to switch from the newest available Lua (which wasn't providing any benefit to SILE over any other version) to the much faster LuaJIT. Other packagers have made similar ch…