xmake-io / xmake

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

编译了过时的代码,但xmake clean && xmake清除后再构建则符合预期 #5161

Closed liuhaocsucczu closed 4 months ago

liuhaocsucczu commented 5 months ago

Xmake 版本

2.8.9

操作系统版本和架构

Ubuntu20.04

描述问题

打印了一条过时的调试信息。 1716889048455 此调试打印信息源代码中已删除。 企业微信截图_17168891277349 如果清除后再编译xmake clean&& xmake,则符合预期 企业微信截图_17168892102087

期待的结果

不打印过时的调试信息

工程配置

工作环境是Ubuntu20.04虚拟机,通过vscode远程开发。 企业微信截图_17168893454310 xmake工程配置如下图 企业微信截图_17168892823334

附加信息和错误日志

无。

Issues-translate-bot commented 5 months ago

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


Title: Compile obsolete code

Xmake version

2.8.9

Operating system version and architecture

Ubuntu20.04

Describe the problem

An outdated debug message was printed. 1716889048455 This debug print message has been removed from the source code. Enterprise WeChat screenshot_17168891277349 If you compile xmake clean&& xmake after cleaning, it is as expected Enterprise WeChat screenshot_17168892102087

Expected results

Don't print out-of-date debugging information

Project configuration

The working environment is an Ubuntu20.04 virtual machine, developed remotely through vscode. Enterprise WeChat screenshot_17168893454310 The xmake project configuration is as shown below Enterprise WeChat screenshot_17168892823334

Additional information and error logs

none.

waruqi commented 5 months ago

改下对应文件,看下 log ,是否会触发编译

touch src/dtn_arq.c
xmake
Issues-translate-bot commented 5 months ago

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


Change the corresponding file and check the log to see if it will trigger compilation.

touch dtn_arq.c
xmake
liuhaocsucczu commented 5 months ago

改下对应文件,看下 log ,是否会触发编译

touch src/dtn_arq.c
xmake

可以触发编译 企业微信截图_17174862568446

waruqi commented 5 months ago

那增量编译没啥问题,或者可以禁用 xmake f --ccache=n 试下

Issues-translate-bot commented 5 months ago

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


There is no problem with incremental compilation, or you can try disabling xmake f --ccache=n

liuhaocsucczu commented 5 months ago

那增量编译没啥问题,或者可以禁用 xmake f --ccache=n 试下 禁用 xmake f --ccache=n没有效果。 编译。 企业微信截图_17180751323708 企业微信截图_17180751749088 过时的打印内容 企业微信截图_1718075232603 源码中已删除 企业微信截图_17180752794677

Issues-translate-bot commented 5 months ago

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


Then there is no problem with incremental compilation, or you can disable xmake f --ccache=n and try it Disabling xmake f --ccache=n has no effect. Compile. Enterprise WeChat screenshot_17180751323708 Enterprise WeChat screenshot_17180751749088 Outdated print content Enterprise WeChat screenshot_1718075232603 Deleted from source code Enterprise WeChat screenshot_17180752794677

waruqi commented 5 months ago

ccache 都禁了,那就跟 xmake 没啥关系了,你可以自己 xmake -vD 对比看下实际 link 的 obj ,看下 obj 是否最新 ,或者反编译看下。。

Issues-translate-bot commented 5 months ago

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


If ccache is disabled, it has nothing to do with xmake. You can use xmake -vD to compare the obj of the actual link to see if the obj is the latest, or decompile it. .

liuhaocsucczu commented 4 months ago

此问题是我自己的原因,可以关闭了,我的xmake脚本里面从别的目录拷贝了过时的动态库到目标目录。

ccache 都禁了,那就跟 xmake 没啥关系了,你可以自己 xmake -vD 对比看下实际 link 的 obj ,看下 obj 是否最新 ,或者反编译看下。。

Issues-translate-bot commented 4 months ago

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


This problem is my own fault and can be closed. My xmake script copied the outdated dynamic library from another directory to the target directory.

ccache is disabled, so it has nothing to do with xmake. You can use xmake -vD to compare the obj of the actual link to see if the obj is the latest, or decompile it. .