Post by Dirk LauriePost by HishamThis is a quick announcement that version 3.0.4 of LuaRocks, the Lua
package manager, has been tagged and uploaded to the usual locations.
You can find all links at https://luarocks.org — source packages for
all supported platforms and binaries for Windows and Linux x86-64 are
available.
This is not criticism, it's just a comment from a Lua user, one that
has never lamented Lua's lack of a Python-like ecosystem.
What I miss most about version 3 is a seamless transition from version
2.2. I understand that 'luarocks install luarocks' cannot work,
building from source has so far also eluded me, but a binary for Linux
x86-64 might be painless, I hoped.
I unzipped it into a directory not in $PATH, and tried
$ /usr/local/src/PACKAGES/luarocks-3.0.4-linux-x86_64/luarocks list
Rocks installed for Lua 5.3
---------------------------
$
Looking at the bright side, I'm happy that the binary did run in your
system without any library clashes. :)
Post by Dirk LaurieI.e. it does not find my 33 existing rocks.
Where are they installed? LuaRocks 3 dropped default support for
unversioned rocks trees (which caused problems for users with multiple
Lua versions), so if the path looks like /usr/lib/luarocks/rocks, it
needs to be converted to /usr/lib/luarocks/rocks-5.x (for the proper
Lua version).
Auto-converting is risky because users may have customizations in
their config files. But I think adding a warning message when an
unversion lib/luarocks/rocks dir is found would be a big improvement.
If your rocks tree lives at /usr/local/lib/luarocks/rocks or
$HOME/.luarocks/rocks, I believe simply renaming the "rocks" directory
to "rocks-5.3" should make LuaRocks 3 pick it up. Could you give that
a try? If it doesn't work, reverting will be safe and nothing will
break in your LR2 install.
Post by Dirk LaurieThere is a subtle difference (extra whitespace) in where they say the
configution file is.
This is true, but this is textual output meant for users to read, not
scripts. Scripts should use `luarocks config --system-config` to get
that information, and `luarocks config` to inspect the current active
LuaRocks configuration.
Post by Dirk LaurieLuarocks 2.2.1-2 says
System: /usr/local/etc/luarocks/config-5.3.lua (ok)
System : /usr/local/etc/luarocks/config-5.3.lua (ok)
Out of curiosity, what are the contents of
/usr/local/etc/luarocks/config-5.3.lua ?
Post by Dirk LaurieBTW the "After installation, a default config file called config.lua
will be installed at the directory defined by --sysconfdir." seems not
to apply to luarocks 3.0.4
Is this from https://github.com/luarocks/luarocks/wiki/Installation-instructions-for-Unix
? The --sysconfdir flag there refers to the configure script which is
being discussed in that section. The instructions in that page do not
apply to the prebuilt binary.
Post by Dirk Laurie$ /usr/local/src/PACKAGES/luarocks-3.0.4-linux-x86_64/luarocks --sysconfdir
Error: Invalid argument: unknown flag --sysconfdir. See --help.
I would love to add "setter" options to `luarocks config` so that
users can customize their configuration using commands, like `git
config` does. I am however, wary of rewriting user configuration files
which may contain arbitrary Lua code.
Thank you for the constructive feedback!
-- Hisham