-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
同时安装多个版本optix时,add_packages中添加版本限制报错 #5566
Comments
Title: When installing multiple versions of optix at the same time, adding version restrictions in add_packages reports an error |
我没有 optix 环境,可以把包描述拷贝到项目里调试一下为啥没找到 |
I don’t have an optix environment. I can copy the package description into the project and debug why it’s not found. |
@star-hengxing 尝试调试了一下,发现是 xmake-repo/packages/o/optix/xmake.lua Line 17 in fe47762
这里会优先找到7.3.0的版本 想问下add_requires里面的version是否会传入包描述里面?或者这里应该如何处理比较合理? |
@star-hengxing tried to debug it and found that it is xmake-repo/packages/o/optix/xmake.lua Line 17 in fe47762
Version 7.3.0 will be found here first. I would like to ask whether the version in add_requires will be passed into the package description? Or how should it be handled more reasonably? |
local version = package:version()
if version:gt("7.3.0") then
-- balabala
else
local inc = find_path("optix.h", paths, {suffixes = "include"})
end |
local version = package:version()
if version:gt("7.3.0") then
-- balabala
else
local inc = find_path("optix.h", paths, {suffixes = "include"})
end |
如果外面传入的version使用了>=的语义符号进行版本范围限制,在这里又应该怎么获取呢? |
If the version passed in from outside uses the semantic symbol >= to limit the version range, how should it be obtained here? |
import("core.base.semver")
-- semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') => true
if semver.satisfies("7.3", package:version_str()) then
-- balabala
end |
发起了一个MR,麻烦 @star-hengxing review一下 |
I initiated a MR, please @star-hengxing review it |
Xmake Version
xmake v2.9.5+master.654f14971
Operating System Version and Architecture
windows 11
Describe Bug
同时安装optix的7.3.0与8.0.0后,使用add_requires("optix 8.0.0")无法正确识别8.0.0版本。如果去掉版本限制只能识别7.3.0
Expected Behavior
能够正确识别版本
Project Configuration
Additional Information and Error Logs
The text was updated successfully, but these errors were encountered: