On Tue, May 3, 2011 at 7:04 AM, steve donovan <[email protected]> wrote:
> Hi all,
>
> Although much information can be extracted by capturing and parsing
> the output of various LuaRocks commands such as search, list, show,
> etc it would sometimes be very convenient if a Lua application could
> query LuaRocks directly.  Then it would be straightforward to build
> custom tools to manage LR directly.
>
> I'm not (at this point) thinking about something that is directly part
> of LR, rather something that can be itself delivered as a rock. That
> would speed up development and testing without having to interfere
> with LR's release schedule.
>
> Now before I wander off and knock something together, the question is:
> what information should be exposed?
>
> Initially I was thinking of exposing the information returned by the
> 'show' command.  A use case for this:
>
>  -  if an application wants to ship extra information, data, etc with
> a rock; this API would allow it to find that stuff in the rocks tree.
>
> For instance, my Orbiter framework relies on modules being able to
> find their resources (images, style sheets, etc). Currently it naively
> assumes that the resources directory is bundled in the same directory
> as the module, which isn't a good idea in general.
>
> (BTW, if there is an existing mechanism for doing this in LR I'd be
> happy to know about it)

Hi,

No, there is no such mechanism currently, but an external API seems to
be a common wishlist item. If you want to go for it, I'd be happy to
add it as part of LR. LuaDist has an API, it could serve as a
model/inspiration. The major problem is that LR was never designed to
do that, so it uses some globals (local to each module, such as
configuration in luarocks.cfg the table of loaded manifests in
luarocks.manif_core). The API might need to create a context/state
object so that multiple instances could exist independently in an
application.

-- 
-- Hisham
http://hisham.hm/

_______________________________________________
Luarocks-developers mailing list
[email protected]
http://lists.luaforge.net/cgi-bin/mailman/listinfo/luarocks-developers

Reply via email to