summaryrefslogtreecommitdiff
path: root/xmake/modules/private/action/require/impl/utils/requirekey.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/modules/private/action/require/impl/utils/requirekey.lua')
-rw-r--r--xmake/modules/private/action/require/impl/utils/requirekey.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/xmake/modules/private/action/require/impl/utils/requirekey.lua b/xmake/modules/private/action/require/impl/utils/requirekey.lua
index cede66d30..41f64fa44 100644
--- a/xmake/modules/private/action/require/impl/utils/requirekey.lua
+++ b/xmake/modules/private/action/require/impl/utils/requirekey.lua
@@ -18,6 +18,9 @@
-- @file requirekey.lua
--
+-- imports
+import("core.base.hashset")
+
-- get require key from requireinfo
function main(requireinfo, opt)
opt = opt or {}
@@ -46,11 +49,14 @@ function main(requireinfo, opt)
if key:startswith("/") then
key = key:sub(2)
end
+ local ignored_configs = hashset.from(requireinfo.ignored_configs or {})
local configs = requireinfo.configs
if configs then
local configs_order = {}
for k, v in pairs(configs) do
- table.insert(configs_order, k .. "=" .. tostring(v))
+ if not ignored_configs:has(k) then
+ table.insert(configs_order, k .. "=" .. tostring(v))
+ end
end
table.sort(configs_order)
key = key .. ":" .. string.serialize(configs_order, true)