summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/core/base/private/instance_deps.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/xmake/core/base/private/instance_deps.lua b/xmake/core/base/private/instance_deps.lua
index 2c9c1a7e2..dbe37a307 100644
--- a/xmake/core/base/private/instance_deps.lua
+++ b/xmake/core/base/private/instance_deps.lua
@@ -81,8 +81,8 @@ end
-- sort the given instance with deps
function instance_deps._sort_instance(instance, instances, orderinstances, instancerefs, depspath)
- if not instancerefs[instance:name()] then
- instancerefs[instance:name()] = true
+ if not instancerefs[instance:fullname()] then
+ instancerefs[instance:fullname()] = true
for _, depname in ipairs(table.wrap(instance:get("deps"))) do
local depinst = instances[depname]
if depinst == nil and instance.namespace then
@@ -101,7 +101,7 @@ function instance_deps._sort_instance(instance, instances, orderinstances, insta
os.raise("circular dependency(%s) detected!", table.concat(circular_deps, ", "))
end
end
- depspath_sub = table.join(depspath, depname)
+ depspath_sub = table.join(depspath, depinst:fullname())
end
instance_deps._sort_instance(depinst, instances, orderinstances, instancerefs, depspath_sub)
end
@@ -123,7 +123,7 @@ function instance_deps.sort(instances)
local refs = {}
local orderinstances = {}
for _, instance in table.orderpairs(instances) do
- instance_deps._sort_instance(instance, instances, orderinstances, refs, {instance:name()})
+ instance_deps._sort_instance(instance, instances, orderinstances, refs, {instance:fullname()})
end
return orderinstances
end