执行 xmake f -v -m releasedbg 后,xmake-require.lock 被修改
Xmake 版本
xmake v2.8.2
操作系统版本和架构
Linux 10-16-43-32 5.14.0-70.13.1.el9_0.x86_64 #1 SMP PREEMPT Wed May 25 21:01:57 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
描述问题
清空所有缓存后,执行添加 xrepo add 重新添加 repo后,再 xmake f 配置项目,发现 xmake-require.lock 被修改,某些 commit id 产生了回退。
期待的结果
不修改 xmake-require.lock
工程配置
无
附加信息和错误日志
以 gtest 为例(看起来也不是必现,可能和并发有关系?):
如上图,本地锁定的 gtest 是 296c5ede86adab3b022e02208eba65268b51be06,执行完 xmake f 后,xmake-require.lock 文件中的 gtest 被修改成了 3eec30498c29ba2efb3cbe637e7ebccec3412d72
这个是 build-artifacts 中下载的 gtest 包的 manifest,看起来是正常的:
这是 xmake f install 后的 manifest:
对于 build-artifacts 中存在的包,修改掉 manifest 文件中的 commit id,有一定概率会修改掉 xmake-require.lock 文件。对于不在 build-artifacts 中的包,会连同 xmake-require.lock 一起修改掉。
Bot detected the issue body's language is not English, translate it automatically.
Title: After executing xmake f -v -m releasedbg, xmake-require.lock is modified
,执行添加 xrepo add 重新添加 repo后
gtest 不是在 xmake-repo 的么,为啥还要加 repo? 给下完整可以复现的步骤命令。
Bot detected the issue body's language is not English, translate it automatically.
, execute add xrepo add after re-adding repo
Isn't gtest in xmake-repo, why add repo? Give a complete reproducible step command.
,执行添加 xrepo add 重新添加 repo后
gtest 不是在 xmake-repo 的么,为啥还要加 repo? 给下完整可以复现的步骤命令。
我们所有的包都在内网的,没有用官方的。
这个是复现的方法,起初是在 ci 环境发现的。
- ci 环境会下载全新的代码库
- 然后执行 xrepo add 内网的 repo(有2个 repo,一个是普通的,另一个是 build-artifacts。因为 ci 每次都是全新的,所以每次都要add 一次),接下来去 xmake f 和 xmake build
- 编译完后,发现 xmake-require.lock 文件内容变了。
本地把所有安装的 package 清空后,然后移除掉 xrepo rm-repo 内网的仓库,再重新加回来,只是为了模拟 ci 上的行为。
Bot detected the issue body's language is not English, translate it automatically.
, execute add xrepo add after re-adding repo
Isn’t gtest in xmake-repo, why add repo? Give a complete reproducible step command.
This is a reproducible method, which was first discovered in the ci environment.
- The ci environment will download a brand new code base
- Then execute xrepo add intranet repo (because ci is brand new every time, so add it every time), then go to xmake f and xmake build
- After compiling, it is found that the content of the xmake-require.lock file has changed.
After clearing all installed packages locally, remove the xrepo rm-repo intranet warehouse, and then add it back, just to simulate the behavior on ci.
我这里复现不了,要么你搞个复现脚本,我试试
Bot detected the issue body's language is not English, translate it automatically.
I can't reproduce it here, or you can make a reproduction script, I will try
我这里复现不了,要么你搞个复现脚本,我试试
我周末来弄一下,我猜主要是预编译包,和 xmake-repo 有冲突。
Bot detected the issue body's language is not English, translate it automatically.
I can't reproduce here, or you can make a reproduction script, I will try
I came to get it on the weekend, I guess it is mainly the precompiled package, which conflicts with xmake-repo.