Yes, it was a bug. I just pushed a fix:
https://github.com/keplerproject/luarocks/commit/0b8605f5d53a9fef54ca17bf5447132327b0ae6e
Please let me know (preferably in the bug tracker) if there are any problems with this fix. Thank you!
题
Is it normal for LuaRocks to ignore the module name in a rockspec, using the filename instead?
build = {
type = "builtin",
modules = {
apricot = "src/apricot.lua",
["apricot.stuff"] = "src/apricot/seeds.lua",
-- `apricot.stuff` is renamed to `apricot.seeds`
-- when installed as a rock.
}
}
(Lua 5.1, LuaRocks 2.1.0)
解决方案
Yes, it was a bug. I just pushed a fix:
https://github.com/keplerproject/luarocks/commit/0b8605f5d53a9fef54ca17bf5447132327b0ae6e
Please let me know (preferably in the bug tracker) if there are any problems with this fix. Thank you!