Dear LuaRocks developers,

LuaRocks appears to hard-code the LUA_PATH to the package.path of the
interpreter configured during installation. When luarocks is installed
with one interpreter (lua5.1), but then used with another compatible
interpreter (luajit), the LUA_PATH set via `luarocks path` does not
match the running interpreter.

# luajit
> require("jit.v")
stdin:1: module 'jit.v' not found:
…

# luarocks path
export 
LUA_PATH='/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/home/peter/.luarocks/share/lua/5.1/?.lua;/home/peter/.luarocks/share/lua/5.1/?/init.lua;/usr/share/lua/5.1//?.lua;/usr/share/lua/5.1//?/init.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/home/peter/.luarocks/share/lua/5.1/?.lua;/home/peter/.luarocks/share/lua/5.1/?/init.lua;/usr/share/lua/5.1//?.lua;/usr/share/lua/5.1//?/init.lua;./?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/lib/lua/5.1/?.lua;/usr/local/lib/lua/5.1/?/init.lua;/usr/share/lua/5.1/?.lua;/usr/share/lua/5.1/?/init.lua'
export 
LUA_CPATH='/usr/local/lib/lua/5.1/?.so;/home/peter/.luarocks/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/?.so;/home/peter/.luarocks/lib/lua/5.1/?.so;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/lib/x86_64-linux-gnu/lua/5.1/?.so;/usr/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so'


Could `luarocks path` be changed to respect the standard paths of the
running interpreter? If I am not mistaken, the recommended way is
to end LUA_PATH and LUA_CPATH with ';;'.

This would, e.g., allow using LuaJIT with a luarocks installation
that is configured for standard Lua, which is the case with at least
one major GNU/Linux distribution (Debian).

Thanks,
Peter

------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Luarocks-developers mailing list
Luarocks-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to