lua-users home
lua-l archive

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

> a dynamic language. LuaRocks works in a way that rpm/deb/etc. can't:
> it resolves dependency versions at require() time, and is designed to
> allow multiple coexisting versions of packages transparently.

In addition to this, LuaRocks works very well as "embedded" package
repository that an application can use to manage plugins.  That is, my
application can set up its own _private_ LuaRocks repository that it
doesn't have to share with anyone. The repository is neither
system-wide nor local, but belongs to the application.  It's all
contained in a single directory, and if you later decide to "unstall"
my app, all you need to do is delete the directory.  For an
application extension language, this seems like a great feature.

Additionally, LR makes it practical to break up an application into a
bunch of small plugins, minimizing the dependencies for the "basic" install.
Sputnik [1] is not a large project, but some of the functionality that
people have wanted requires installing things like database bindings,
etc.  We handle this by breaking Sputnik up into two dozen rocks.
Most of those rocks provide optional functionality that most users
won't need.  Most of them are also tiny (a couple hundred lines of
code), but they pull in dependencies.  This lets us avoid installing
those dependencies by default.  For instance, the basic sputnik
installation does not require luasql.  However, if you want to store
your data in a database, say MySQL, then you can do so by just running
"luarocks install versium-mysql" which will take care of the
dependencies.  This in theory can be replicated with platform-specific
package managers, but it would require breaking things up into smaller
packages than seems to be customary with those systems.  At least,
I remember this coming up as an issue when we discussed packaging
Sputnik for debian.

That said, it would be great to have more (optional) integration with
platform-specific package managers.  For instance, it would be good to
be able to specify dependencies on packages installed with apt-get,

- yuri