diff options
| author | Arthur LAURENT <[email protected]> | 2024-10-07 16:37:37 +0200 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2024-10-08 13:47:46 +0200 |
| commit | d8b4280e5b43bbeeed8c4ddf67ad1dd08fbc70a5 (patch) | |
| tree | fbfc9471499f672f64fa50fa385df735bd9fba9f /xmake/rules/c++/modules/modules_support/builder.lua | |
| parent | fb842c9e4208fcba3052239088a9299759761d9e (diff) | |
don't convert hashset to table and some cleanup for module builders
Diffstat (limited to 'xmake/rules/c++/modules/modules_support/builder.lua')
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/builder.lua | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/xmake/rules/c++/modules/modules_support/builder.lua b/xmake/rules/c++/modules/modules_support/builder.lua index 9133bad60..7e51ad6f8 100644 --- a/xmake/rules/c++/modules/modules_support/builder.lua +++ b/xmake/rules/c++/modules/modules_support/builder.lua @@ -465,21 +465,18 @@ end function is_dependencies_changed(target, module) local cachekey = target:name() .. module.name - local requires + local requires = hashset.new() for required, _ in table.orderpairs(module.requires) do - requires = requires or hashset.new() requires:insert(required) end local oldrequires = compiler_support.memcache():get2(cachekey, "oldrequires") - local changed = false - if oldrequires and requires then - oldrequires = hashset.from(oldrequires) - if oldrequires:size() ~= requires:size() then + if oldrequires then + if oldrequires ~= requires:size() then requires_changed = true else - for required in requires:keys() do + for _, required in requires:keys() do if not oldrequires:has(required) then requires_changed = true break @@ -488,5 +485,5 @@ function is_dependencies_changed(target, module) end end - return requires:to_array(), changed + return requires, changed end |
