summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
authorruki <[email protected]>2024-12-04 22:41:35 +0800
committerruki <[email protected]>2024-12-04 22:41:35 +0800
commit720cf65b54d50394a5a4110dff364734f6e54f0e (patch)
tree6f20bb63067ba21f9fa05256e16698014795f9b7 /xmake/modules
parent34ee1cb9ceeec762cf986dc23a68d466e100e6e2 (diff)
impl sync_requires_to_deps
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/private/action/require/impl/package.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/xmake/modules/private/action/require/impl/package.lua b/xmake/modules/private/action/require/impl/package.lua
index e3700af9d..30c571592 100644
--- a/xmake/modules/private/action/require/impl/package.lua
+++ b/xmake/modules/private/action/require/impl/package.lua
@@ -1211,6 +1211,11 @@ function _get_requirepaths(package)
table.insert(requirepaths, requirepath .. "." .. package:name())
end
end
+ -- we also need to resolve requires conflict in toplevel, if `package.sync_requires_to_deps` policy is enabled.
+ -- @see https://github.com/xmake-io/xmake/issues/5745#issuecomment-2513951471
+ if project.policy("package.sync_requires_to_deps") then
+ table.insert(requirepaths, package:name())
+ end
else
table.insert(requirepaths, package:name())
end