lua-users home
lua-l archive

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

On Sun, Apr 24, 2016 at 9:24 PM, Tim Caswell <> wrote:
> Is the `lit install ... creationix/uv ...` redundant? I don't need that if I LuaRocks installed "luv" correct? This was just for the example.

Actually, it's not redundant, as the article describes later on:

> The deps/uv.lua shim is literally nothing more than `return require 'luv'` that redirects any requires to the luarocks version

In luvi based apps (luvit and lit), the luv module is required as "uv", but in the luarocks land, it's "luv".  Most modules published to lit assume the "uv" spelling.  So this shim makes them continue to work even though we're using the luarocks version.

OK it was not clear to me from the article, but this explanation makes perfect sense. 

> Also why did we need LuaBitOpts installed. It is not used in any of the examples? If it is a dependency for luv why not include that in your LuaRocks dependency list?

Again most luvit modules are written for luvit, which means luajit where the bit library is a built-in.  But in this example we were using plain lua so we needed to add the bitop library manually on the luarocks side so that it would be compatible.  It's not listed as a dependency since it's part of luajit normally.

Hum I wish this could be automatic in LuaRocks. Does it hurt LuaJit to have LuaBitOpts installed? If not, I suggest adding it to the LuaRocks this way it will work always. This is just my personal forgetful selfs opinion, but the framework looks so good I want everyone to have success.

Maybe when you post the bootstrap launcher script to LuaRocks you could add all those dependencies to that script. Just a thought.

Again thanks for answering the questions and for LUV. I hope to try it out soon.