On Tue, Oct 12, 2010 at 3:23 PM, Alexander Gladysh <[email protected]> wrote:
>> Actually, let's make it simple - it shall be a simple string. Then you
>> can put arbitrary stuff in a multi-line string and do your own
>> validation.
>
> I would have to duplicate rockspec data hierarchy inside metadata
> then. Not very interesting.

Ah, I see. So we need an exception in the type checker which will
allow any structured Lua data inside the meta field

BTW, it is not difficult to use LR itself as a library to read
rockspecs; I can give you some tips.  (Maybe it's time for a 'hacking
LuaRocks' article for LuaNova.)   There is e.g. general code for
expanding per-platform overrides - this works like system-dependent
macro expansion.

> Or by a dozen other ways.
>
> The point is to make LR itself more versatile. IMO, path-based mode of
> operation is more generic than pwd-based and should be implemented
> first for any tool. :-)

It is what one expects, e.g. -d for make etc.

I will push some changes up to my clone of LR in the next few days.

Another useful change is for the situation that Gunnar found himself
in, that the exact location of a external header depends on the
system. This enables you to write

external_dependencies = {
   FOO = {
      header = "foo.h;foo/foo.h"
  }
}

and LR checks these locations in turn and updates FOO_INCDIR
appropriately.  The type checker cannot understand the idea that 'this
field is either a string or a table of strings' so I've used
semi-colons.  (Providing some optional absolute paths in this list
could be useful as well)

steve d.

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

Reply via email to