lua-users home
lua-l archive

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


On 27 March 2013 09:01, Laurent Faillie <l_faillie@yahoo.com> wrote:
> I second also the suggestion to add something in luarocks for automatic
> checking.
> It's easier for users and wide spread in all packages management system.

Checking for available updates shouldn't be hard (as others mentioned
already), so yes, it would be a nice feature for LuaRocks.

However, I am wary of coding a more automagic command such as
`luarocks update-all` because it would be very unlikely that it would
do 'the right thing' all the time:

* Rock X has a new version 2.0, which is incompatible with previous
version 1.5. Rock Y depended on rock X, but it didn't specify a
version (or it was optimistic and asked for "X >= 1.0"). Rock Y
doesn't have an updated version yet which is compatible with X 2.0.
Now rock Y is broken.
* Even with the fact that LuaRocks can keep multiple versions in the
repository, one can only make use of that if the dependencies
information is correct (see above example) and when the
luarocks.loader package loader is used. Nowadays the normal use of
LuaRocks is without the custom loader, so most users could be affected
by situations like that.
* Users may have their own scripts which are not in LuaRocks, but
which use modules installed by LuaRocks. The same dependency issues
apply, and there is no explicit information about which version of X
the user's script wants. Cue "my script was working before `luarocks
update-all`, now it's broken".

`luarocks available-updates`, which shows newer versions of installed
rocks, so that the user can request installation of whatever they
want, is a much safer approach. How does that sound?

-- Hisham
http://hisham.hm/