diff options
| author | ruki <[email protected]> | 2023-06-16 23:53:15 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-06-16 17:21:58 +0800 |
| commit | ff6d29ac8742fd494054d49ff049d35acd0e86f7 (patch) | |
| tree | f10836f7fb39459282e75c1a41f5e791b863023e | |
| parent | 68153d06e61342aa2be927116c9b7d4e40125945 (diff) | |
improve to check readonly value for package
| -rw-r--r-- | xmake/modules/private/action/require/impl/package.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/modules/private/action/require/impl/package.lua b/xmake/modules/private/action/require/impl/package.lua index a64e9f565..f42ea495c 100644 --- a/xmake/modules/private/action/require/impl/package.lua +++ b/xmake/modules/private/action/require/impl/package.lua @@ -515,8 +515,10 @@ function _finish_requireinfo(requireinfo, package) end -- we need ensure readonly configs for _, name in ipairs(table.keys(requireinfo.configs)) do - if package:extraconf("configs", name, "readonly") then - wprint("configs.%s is readonly in package(%s), it's always %s", name, package:name(), package:extraconf("configs", name, "default")) + local current = requireinfo.configs[name] + local default = package:extraconf("configs", name, "default") + if package:extraconf("configs", name, "readonly") and current ~= default then + wprint("configs.%s is readonly in package(%s), it's always %s", name, package:name(), default) -- package:config() will use default value after loading package requireinfo.configs[name] = nil end |
