Open huye opened 1 day ago
Bot detected the issue body's language is not English, translate it automatically.
Title: xmake v2.9.5 has some cache failures under macOS system
无法复现
ruki-2:test ruki$ xmake -v
[100%]: build ok, spent 0.039s
ruki-2:test ruki$ xmake -v
[100%]: build ok, spent 0.021s
我也没复现出来,不过经过我的测试发现,是 .xmake 目录的问题。
在我复现的过程中,发现就是和我旧项目一样的 xmake.lua 也不会有这个问题。 所以我直接把我旧项目的 .xmake 目录删除了再执行 xmake -v 就正常了。 会不会是因为旧版本的 xmake 生成的 .xmake 目录中有什么不一致的缓存导致了这个问题?
Bot detected the issue body's language is not English, translate it automatically.
I haven't reproduced it, but after my testing, I found that it was a problem with the .xmake directory.
During my reproduction process, I found that even xmake.lua, which is the same as my old project, would not have this problem. So I directly deleted the .xmake directory of my old project and then executed xmake -v and everything was normal. Could it be that there is some inconsistent cache in the .xmake directory generated by the old version of xmake that causes this problem?
不知道,无法复现 没法确认问题,如果清了 cache 后正常,那就没啥问题
Bot detected the issue body's language is not English, translate it automatically.
I don’t know, it can’t be reproduced. I can’t confirm the problem. If it works normally after clearing the cache, then there is no problem.
Xmake 版本
2.9.5
操作系统版本和架构
macOS Sonoma 14.5
描述问题
刚执行过 xmake -v 命令再执行一次 xmake -v 的时候还会做一些检测输出大片的 checking for ... 而 Linux 相同版本只会输出最后一行 [100%]: build ok, spent 0.392s 。我忘了升级之前是什么版本了,升级之前是没有这个问题的。
注:不使用 -v 参数也会有些 checking for ... 的输出。就是明显能感觉到 xmake 的有些缓存没起作用
期待的结果
希望在未修改项目文件及 xmake 配置等的情况下,和 Linux 一致
工程配置
应该和配置也没有关系,同一个项目在 Linux 就没有多余输出,缓存是有效的
附加信息和错误日志
checking for Xcode directory ... %s checking for Codesign Identity of Xcode ... no checking for zig ... no checking for zig ... no checking for nim ... no checking for nim ... no checking for /Library/Developer/CommandLineTools/usr/bin/clang++ ... ok checking for the shared library linker (sh) ... clang++ generating config.h.in to /path/to/code/config.h .. checking for git ... /usr/local/bin/git generating config.h.in ... cache checking for /Library/Developer/CommandLineTools/usr/bin/clang ... ok checking for the c compiler (cc) ... clang checking for /Library/Developer/CommandLineTools/usr/bin/clang ... ok checking for flags (-fPIC) ... ok checking for flags (-O3) ... ok checking for flags (-DNDEBUG) ... ok checking for /Library/Developer/CommandLineTools/usr/bin/clang++ ... ok checking for flags (-fPIC) ... ok checking for flags (-Wl,-rpath=@loader_path) ... no checking for flags (-Xlinker -rpath -Xlinker @loader_path) ... ok checking for flags (-Wl,-rpath=@loader_path/libs) ... no checking for the c compiler (cc) ... clang checking for flags (-Xlinker -rpath -Xlinker @loader_path/libs) ... ok checking for /Library/Developer/CommandLineTools/usr/bin/clang++ ... ok checking for the linker (ld) ... clang++ checking for flags (-fPIC) ... ok checking for flags (-Wl,-rpath=@loader_path) ... no checking for flags (-Xlinker -rpath -Xlinker @loader_path) ... ok checking for flags (-Wl,-rpath=@loader_path/libs) ... no checking for flags (-Xlinker -rpath -Xlinker @loader_path/libs) ... ok [100%]: build ok, spent 0.905s