On 4 March 2013 21:47, Sean Conner <[email protected]> wrote: > It was thus said that the Great Hisham once stated: >> On 4 March 2013 02:20, Choonster TheMage <[email protected]> wrote: >> > Hello, >> > >> > I'm in the process of developing a library that has some slightly >> > complex dependencies. I want it to depend on Penlight (but ideally not >> > LuaFileSystem) and one of several compression libraries to be chosen >> > by the developer using the library (but ideally not all of them). >> > >> > Is there any way to represent these dependencies in a Rockspec, or is >> > it too complex for the system to handle? I'd like to have the library >> > available through LuaRocks when it's done, but it looks like I may >> > have to have users manually manage the dependencies. >> >> The current version of LuaRocks does not support that, unfortunately. >> One possible workaround is to have several rockspecs, for each variant >> (see the various flavors of lrexlib in >> http://luarocks.org/repositories/rocks/ for example). > > As an idea, right now, the dependencies are all strings: > > dependencies = > { > "lua ~> 5.1", > "lpeg", > "Lrexlib-POSIX >= 2.7.2" > } > > How hard would it be if, when scanning that list, you come across a table, > any of the listed modules in the table satisfy the dependency? > > dependencies = > { > "lua ~> 5.1", > "lpeg", > { > "Lrexlib-GNU >= 2.7.2", > "Lrexlib-oniguruma >= 2.7.2", > "Lrexlib-PCRE >= 2.7.2", > "Lrexlib-POSIX >= 2.7.2", > "Lrexlib-TRE >= 2.7.2" > } > } > > -spc (Or could that get too confusing?)
It wouldn't be hard, but I'm afraid it would be incompatible. The idea is to have no incompatible changes in the rockspec format during the 2.0 series. -- Hisham http://hisham.hm/ ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb _______________________________________________ Luarocks-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/luarocks-developers
