lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Mon, May 23, 2016 at 12:02 AM, Dhaval Kapil <> wrote:
> Recently, I was working in lua and needed to switch between different
> versions frequently. This caused me various issues, like reinstalling
> versions of lua, reinstalling luarocks to with the new lua versions, etc. I
> even messed up with my installation somehow. To help deal with these
> problems and being inspired by the usefulness of 'nvm'(Node Version Manager)
> and 'rvm'(Ruby Version Manager) I decided to develop 'luavm'.

This looks great! Unfortunately it doesn't set LUA_PATH and LUA_CPATH
and it also doesn't add directory where LuaRocks puts scripts to PATH,
but that can be fixed by running 'eval `luarocks path --bin`' after switching to
a new environment.

hererocks ( was mentioned here
but it's not really a version manager, more of an installation script that
takes care of environment isolation. Personally I use it to install various
version combination into ~/lua51, ~/lj2, ~/lua53-nocompat, etc, then
add a default
like ~/lua53/bin to PATH in .bashrc and use other environments directly
when I need to, e.g. run ~/lua51/bin/lua or ~/lj2/bin/busted.

Perhaps luavm could use hererocks for build step to avoid having
to run 'eval `luarocks path --bin`' and to exploit some of its options,
like choosing compat flags, building without readline, etc.