xmake-io / xmake

🔥 A cross-platform build utility based on Lua
https://xmake.io
Apache License 2.0
10.14k stars 782 forks source link

add_linkorders 循环依赖报错信息不够 #5228

Closed TOMO-CAT closed 4 months ago

TOMO-CAT commented 5 months ago

Xmake 版本

v2.9.2

操作系统版本和架构

Linux 720ce3a659a2 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

描述问题

add_linkorders 报 warning 提示存在循环依赖,但是从报错信息上没看出来任何信息 c0c9eff04a5711212fae2683bf4b727e

期待的结果

提示具体的循环依赖内容

工程配置

附加信息和错误日志

Issues-translate-bot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically.


Title: add_linkorders Circular dependency error message is not enough

waruqi commented 5 months ago

这不提示的很明显了么。。根据 add_links/add_packages 全局搜下对应的配置地方么。。xmake -v 或者 xmake show target 等稍微看看 不就能定位了么。

Issues-translate-bot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically.


Isn't this very obvious? . Search the corresponding configuration place globally according to add_links/add_packages. . You can locate it by using xmake -v or xmake show target and wait for a while.

TOMO-CAT commented 5 months ago

这不提示的很明显了么。。根据 add_links/add_packages 全局搜下对应的配置地方么。。xmake -v 或者 xmake show target 等稍微看看 不就能定位了么。

这是我自己配置的 add_linkorders,从报错只能看出来是个子集,哪看出来的循环依赖? image

waruqi commented 5 months ago

还要结合 add_links , target deps 和 packages links 里面的初始顺序来看。。循环依赖不单单只是分析 add_linkorders 。。是分析根据 add_linkorders + add_links/add_packages 一起调整后的顺序

错误信息里面的就是个环。。错误提示: cycle A -> B -> C

意思就是 C 也依赖 A, A -> B -> C -> A

Issues-translate-bot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically.


Also look at the initial order in add_links, target deps and packages links. . Circular dependencies go beyond just analyzing add_linkorders. . It is the order adjusted according to add_linkorders + add_links/add_packages.