xmake-io / xmake

🔥 A cross-platform build utility based on Lua
https://xmake.io
Apache License 2.0
9.84k stars 776 forks source link

cannot import module: lib.luajit.bcsave #5092

Closed TOMO-CAT closed 4 months ago

TOMO-CAT commented 4 months ago

Xmake 版本

xmake v2.9.1+master.7bb2f2bd6

操作系统版本和架构

Ubuntu 2204

描述问题

更新了最新 master 版本后报错,怀疑是之前我重写了 protobuf 的 rule,调用了 private.utils,是现在不让调用了吗? image 之所以要重写是因为现在 protobuf.cpp 的规则不支持引用第三方路径的 proto 文件,比如 triton-backend 需要引用到它的 proto,这样在 protoc 生成 xx.pb.h 文件的时候就需要传入 -I${triton_root_path} -I${my_proto_path},所以重写了一下支持传入各种自定义参数。

期待的结果

解决新版本 xmake 无法运行的问题。

工程配置

附加信息和错误日志

waruqi commented 4 months ago

模块名都说了是 private ,意思就是私有模块,我随时都会改,用户不能用,乱用用出问题,这边概不负责。。

你整个 utils 加载,里面很多模块都会被带进来,还有一些 luajit 才会用到的模块也被加载了,当然会跪

Issues-translate-bot commented 4 months ago

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


The module name is said to be private, which means a private module. I will change it at any time. Users cannot use it. If misuse occurs, we will not be held responsible. .

When you load the entire utils, many modules in it will be brought in, and some modules that are only used by luajit will also be loaded. Of course, they will kneel down.

waruqi commented 4 months ago

如果非要用 private 自己翻下源码分析下,utils是目录 不是单个模块

https://github.com/xmake-io/xmake/tree/master/xmake/modules/private/utils

Issues-translate-bot commented 4 months ago

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


If you have to use private, look through the source code and analyze it yourself. utils is a directory, not a single module.

https://github.com/xmake-io/xmake/tree/master/xmake/modules/private/utils

TOMO-CAT commented 4 months ago

如果非要用 private 自己翻下源码分析下,utils是目录 不是单个模块

https://github.com/xmake-io/xmake/tree/master/xmake/modules/private/utils

好的,我研究下

Issues-translate-bot commented 4 months ago

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


If you must use private, look through the source code and analyze it yourself. utils is a directory, not a single module.

https://github.com/xmake-io/xmake/tree/master/xmake/modules/private/utils

Okay, I'll look into it

waruqi commented 4 months ago

要么改成 import("private.utils.batchcmds") ,至少当前错误应该能过掉,但不保证后面这个私有模块 会有其他改动

Issues-translate-bot commented 4 months ago

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


Or change it to import("private.utils.batchcmds"). At least the current error should be able to be overcome, but there is no guarantee that there will be other changes to the private module later.

TOMO-CAT commented 4 months ago

要么改成 import("private.utils.batchcmds") ,至少当前错误应该能过掉,但不保证后面这个私有模块 会有其他改动

好的解决了。

Issues-translate-bot commented 4 months ago

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


Either change it to import("private.utils.batchcmds"), at least the current error should be able to be overcome, but there is no guarantee that there will be other changes to the private module later.

Ok solved.