Replies: 5 comments
-
尽可能避免没必要的 sh wrap,也能提高检测和运行效率,否则不管跑任何编译还是啥,都是各种 |
Beta Was this translation helpful? Give feedback.
-
让它最后的可用方案。 是否可以通过管道拉起一个shell,避免重复执行shell? |
Beta Was this translation helpful? Give feedback.
-
我就是想尽可能避免 不去拉起 shell 搞事,才这么干的。。明明可以直接跑的 ,非得跑到 shell 里,多了一层不说,还额外多了一层 pipe 的处理和 stdin/stdout 的转发,没必要。 |
Beta Was this translation helpful? Give feedback.
-
避免不了,也没必要避免。并不是所有的程序都是pe格式。例如 node,py,dart 之类的。 |
Beta Was this translation helpful? Give feedback.
-
无所谓,如果是 xmake 内部需要的工具,或者常用工具,有专门的 find_node.lua 去针对性改进查找,wrap 上 sh,或者 patch .cmd 什么的都可以。
如果是用户自己想要 find_tool,直接用户自己
忍来干嘛,反正现在的逻辑,够用了,内部也能对特定 tool 提供 find_xxx.lua 脚本来改进查找。 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Xmake 版本
2.7.1
操作系统版本和架构
MINGW64_NT-10.0-19044 looyatest 3.3.5-341.x86_64 2022-05-13 15:40 UTC x86_64 Msys
描述问题
使用
find_program(program_name)
寻找脚本文件时,最终会执行sandbox_lib_detect_find_program._check
但是,该行的判断逻辑是否太过严格?
https://github.com/xmake-io/xmake/blob/v2.7.1/xmake/core/sandbox/modules/import/lib/detect/find_program.lua#L82-L82
只允许绝对路径(还必须是 windows 风格的绝对路径),和相对项目的路径。还会判断文件大小。意义是什么?
期待的结果
验证逻辑完全交给 shell 去处理
应该使用 sh -c "..." 所以还不能使用 os.runv
工程配置
No response
附加信息和错误日志
No response
Beta Was this translation helpful? Give feedback.
All reactions