From 0841fc556759fd1acb4c0125333a3606dcbe85be Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 8 Apr 2025 22:31:24 +0800 Subject: fix namespace #6292 --- xmake/core/base/private/instance_deps.lua | 8 ++++---- 1 file 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 -- cgit v1.3.1