On Tue, Feb 12, 2013 at 5:59 PM, Reuben Thomas <r...@sc3d.org> wrote: > I just noticed that there's a backport of Lua 5.2's bit32 library to > Lua 5.1. That's nice, as it could simplify e.g. luaposix: no need to > require a different library depending on the version of Lua. > > It would be even better if LuaRocks knew that Lua 5.2 included bit32, > so that if Lua 5.2 is used, LuaRocks thinks that bit32 is already > installed. > > The only problem is that I can't currently think of any other > circumstance in which this would be useful.
I've thought about that before. It could also assume that luabitop is already installed if LuaJIT is used. I remember once I brainstormed about that (thinking also about LuaJIT FFI vs Lua+LuaFFI) and ended up with a complicated "feature matrix" approach to detect things (a la auto-tools, which follows the approach of detecting features and not program versions) and in the end I didn't implement anything. It wouldn't be hard to hack in a simple test like this: --- a/src/luarocks/deps.lua +++ b/src/luarocks/deps.lua @@ -318,6 +318,8 @@ local function match_dep(dep, blacklist, deps_mode) local versions if dep.name == "lua" then versions = { cfg.lua_version } + elseif dep.name == "bit32" and cfg.lua_version == "5.2" then + versions = { cfg.lua_version } else versions = manif_core.get_versions(dep.name, deps_mode) end ...but would that break compatibilty? (Or just cause Lua 5.2 installs using older LR versions to install a useless extra dependency?) -- Hisham http://hisham.hm/ ------------------------------------------------------------------------------ The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials, tech docs, whitepapers, evaluation guides, and opinion stories. Check out the most recent posts - join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Luarocks-developers mailing list Luarocks-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/luarocks-developers