Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用远程库构建时updating repositories阶段存在版本管理相关报错导致失败 #5457

Closed
ryanrhu opened this issue Aug 9, 2024 · 3 comments
Labels

Comments

@ryanrhu
Copy link

ryanrhu commented Aug 9, 2024

Xmake 版本

2.9.4

操作系统版本和架构

Windows 11 Version 23H2 x86_64

描述问题

使用本地的sdk+远程库组合构建,在xmake build执行后updating repositories .. 阶段报错,提示无法rebase更新,本地有未stash 的更新,但这个目录并不是一个git仓库,并不存在任何版本管理相关的操作。尝试过xmake clean、重新安装xmake和重启等方案,都无法解决。似乎是xmake

期待的结果

正常构建完毕

工程配置

add_rules("mode.debug", "mode.release")
add_rules("plugin.compile_commands.autoupdate", {outputdir = ".vscode"})
set_languages("cxx20")

local vulkan_sdk_path = os.getenv("VULKAN_SDK")

add_includedirs(path.join(vulkan_sdk_path, "include"))
add_linkdirs(path.join(vulkan_sdk_path, "lib"))

add_requires("glfw")

target("vulkan_config")
set_kind("binary")
add_files("src/*.cpp")
add_packages("glfw")

附加信息和错误日志

PS E:\vulkan_config> xmake -vD
checking for platform ... windows
checking for architecture ... x64
checking for cl.exe ... E:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\HostX64\x64\cl.exe
checking for Microsoft Visual Studio (x64) version ... 2022
checking for Microsoft C/C++ Compiler (x64) version ... 19.34.31935
checkinfo: cannot runv(zig.exe version), No such file or directory
checking for zig ... no
checkinfo: cannot runv(zig.exe version), No such file or directory
checking for zig ... no
checkinfo: cannot runv(nim.exe --version), No such file or directory
checking for nim ... no
checkinfo: cannot runv(nim.exe --version), No such file or directory
checking for nim ... no
checkinfo: cannot runv(unzip.exe -v), No such file or directory
checking for unzip ... no
checking for 7z ... E:\Program Files\xmake\winenv\bin\7z
checking for git ... ok
checkinfo: cannot runv(gzip.exe --version), No such file or directory
checking for gzip ... no
updating repositories ..
pulling repository(build-artifacts): https://gitee.com/xmake-mirror/build-artifacts.git to C:\Users\ryanr\AppData\Local.xmake\repositories\build-artifacts ..
git -c core.fsmonitor=false pull origin main -f
error: cannot pull with rebase: You have unstaged changes.
error: please commit or stash them.
error: @programdir\core\main.lua:329: @programdir\core\sandbox\modules\import\core\base\task.lua:65: @programdir\core\sandbox\modules\import\core\base\task.lua:65: @programdir\core\sandbox\modules\os.lua:378: execv(git -c core.fsmonitor=false pull origin main -f) failed(128)
stack traceback:
[C]: in function 'error'
[@programdir\core\base\os.lua:973]:
[@programdir\core\sandbox\modules\os.lua:378]:
[@programdir\core\sandbox\modules\os.lua:291]: in function 'vrunv'
[@programdir\modules\devel\git\pull.lua:97]:
[@programdir\plugins\repo\main.lua:118]: in function 'task'
[@programdir\plugins\repo\main.lua:137]: in function '_update'
[@programdir\plugins\repo\main.lua:241]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]:
[@programdir\core\base\task.lua:491]: in function 'run'
[@programdir\core\sandbox\modules\import\core\base\task.lua:63]: in function 'run'
[@programdir\modules\private\action\require\install.lua:80]:
[@programdir\actions\config\main.lua:391]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]:
[@programdir\core\base\task.lua:491]: in function 'run'
[@programdir\core\sandbox\modules\import\core\base\task.lua:63]: in function 'run'
[@programdir\actions\build\main.lua:191]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]:
[@programdir\core\base\task.lua:491]: in function 'run'
[@programdir\core\main.lua:327]: in function 'cotask'
[@programdir\core\base\scheduler.lua:406]:

stack traceback:
[C]: in function 'error'
@programdir\core\base\os.lua:973: in function 'base/os.raiselevel'
(...tail calls...)
@programdir\core\main.lua:329: in upvalue 'cotask'
@programdir\core\base\scheduler.lua:406: in function <@programdir\core\base\scheduler.lua:399>

@ryanrhu ryanrhu added the bug label Aug 9, 2024
@Issues-translate-bot
Copy link

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


Title: When building with a remote library, there are version management-related errors in the updating repositories phase, leading to failure.

@ryanrhu
Copy link
Author

ryanrhu commented Aug 9, 2024

因为重新安装也没有解决,所以怀疑是本地xmake相关缓存中存在问题,所以清理了user及appdata目录下的相关信息,问题解决

@ryanrhu ryanrhu closed this as completed Aug 9, 2024
@Issues-translate-bot
Copy link

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


Since reinstallation did not solve the problem, I suspected that there was a problem in the local xmake-related cache, so I cleaned up the relevant information in the user and appdata directories, and the problem was solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants