summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-10-09 11:07:39 +0800
committerruki <[email protected]>2021-10-09 11:07:39 +0800
commit59498b047190411a144f821a5cc40174faeaaa9a (patch)
tree5b08d62ec3344517ef2dbde66f6fab48f882a782
parentf00a152d2cd5238a74699394e0f396654cbf421e (diff)
improve interpreter
-rw-r--r--xmake/core/base/interpreter.lua13
1 files changed, 8 insertions, 5 deletions
diff --git a/xmake/core/base/interpreter.lua b/xmake/core/base/interpreter.lua
index 9a0416c52..32602c4c4 100644
--- a/xmake/core/base/interpreter.lua
+++ b/xmake/core/base/interpreter.lua
@@ -491,16 +491,19 @@ function interpreter:_handle(scope, remove_repeat, enable_filter)
local results = {}
for name, values in pairs(scope) do
- -- remove repeat first for each slice with deleted item (__del_xxx)
- if remove_repeat and not table.is_dictionary(values) then
- values = table.unique(values, function (v) return type(v) == "string" and v:startswith("__del_") end)
- end
-
-- filter values
+ --
+ -- @note we need do filter before removing repeat values
+ -- https://github.com/xmake-io/xmake/issues/1732
if enable_filter then
values = self:_filter(values)
end
+ -- remove repeat first for each slice with deleted item (__del_xxx)
+ if remove_repeat and not table.is_dictionary(values) then
+ values = table.unique(values, function (v) return type(v) == "string" and v:startswith("__del_") end)
+ end
+
-- unwrap it if be only one
values = table.unwrap(values)