From ae8a596c609e01b21caa5825f3fd2eec0bdb7507 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 7 Jan 2025 00:40:57 +0800 Subject: support for inner namespace access --- xmake/core/base/private/instance_deps.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'xmake/core/base') diff --git a/xmake/core/base/private/instance_deps.lua b/xmake/core/base/private/instance_deps.lua index 17145ac6f..2c9c1a7e2 100644 --- a/xmake/core/base/private/instance_deps.lua +++ b/xmake/core/base/private/instance_deps.lua @@ -46,6 +46,12 @@ function instance_deps.load_deps(instance, instances, deps, orderdeps, depspath, -- @see https://github.com/xmake-io/xmake/issues/3144 local depname = plaindeps[total + 1 - idx] local depinst = instances[depname] + if depinst == nil and instance.namespace then + local namespace = instance:namespace() + if namespace then + depinst = instances[namespace .. "::" .. depname] + end + end if depinst then local continue_walk = true if walkdep then @@ -79,6 +85,12 @@ function instance_deps._sort_instance(instance, instances, orderinstances, insta instancerefs[instance:name()] = true for _, depname in ipairs(table.wrap(instance:get("deps"))) do local depinst = instances[depname] + if depinst == nil and instance.namespace then + local namespace = instance:namespace() + if namespace then + depinst = instances[namespace .. "::" .. depname] + end + end if depinst then local depspath_sub if depspath then -- cgit v1.3.1