Skip to content

Remove rockspec:type() == "rockspec" assertion #14

@goldenstein64

Description

@goldenstein64

I get this warning whenever I install CC:Tweaked

Warning: The function rockspec.type() is no longer necessary and is now deprecated. Please update your plugin to remove calls to this function.

diff --git a/src/luarocks/build/lls-addon.lua b/src/luarocks/build/lls-addon.lua
index f0491dd..093c1bd 100644
--- a/src/luarocks/build/lls-addon.lua
+++ b/src/luarocks/build/lls-addon.lua
@@ -375,8 +375,6 @@ M.installAddon = installAddon
 ---@param noInstall boolean
 ---@return boolean, string?
 function M.run(rockspec, noInstall)
-       assert(rockspec:type() == "rockspec", "argument is not a rockspec")
-
        local env = {
                ABSPATH = cfg.variables["LLSADDON_ABSPATH"],
                LUARCPATH = cfg.variables["LLSADDON_LUARCPATH"],

The only reason I wouldn't patch it now is because there are likely still users of older LuaRocks installations, which don't have this warning and might still need the assertion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions