Interface with an overlapping name used internally will cause build error
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 42/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- rust, wasm
- 领域
- build-system
调研方向
使用 WIT 示例重现 build,并检查 src/hyperlight_wasm_macro/src/wasmguest.rs 第 90 行附近的代码,然后从 src/component.rs 跟踪生成的 use。确认重叠的接口名称如何改变生成的调用,并验证该示例可以在没有报告的 E0107 和 E0061 错误的情况下完成构建。
由索引模型根据 Issue 内容生成。
描述
If you have a wit file with:
package wasi-sample:example;
world example {
import host;
export adder;
}
interface adder {
add: func(left: u32, right: u32) -> u32;
call-host-function: func(input: string);
}
interface host {
host-function: func(input: string) -> string;
}
you will end up with errors
Compiling hyperlight-wasm v0.1.0 (/home/jstur/projects/hyperlight-wasm/src/hyperlight_wasm)
error: failed to run custom build command for `hyperlight-wasm v0.1.0 (/home/jstur/projects/hyperlight-wasm/src/hyperlight_wasm)`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.
Caused by:
process didn't exit successfully: `/home/jstur/projects/hyperlight-wasm/target/debug/build/hyperlight-wasm-f9324c725c3b4d6a/build-script-build` (exit status: 101)
--- stdout
cargo::rerun-if-changed=/home/jstur/projects/hyperlight-wasm/src/wasm_runtime
cargo::rerun-if-env-changed=WIT_WORLD
....
warning: unused import: `hyperlight_guest_bin::host_comm::call_host_function`
--> src/component.rs:31:5
|
31 | use hyperlight_guest_bin::host_comm::call_host_function;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
error[E0107]: function takes 0 generic arguments but 1 generic argument was supplied
--> src/component.rs:41:1
|
41 | hyperlight_wasm_macro::wasm_guest_bindgen!();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 0 generic arguments
|
note: function defined here, with 0 generic parameters
--> src/component.rs:41:1
|
41 | hyperlight_wasm_macro::wasm_guest_bindgen!();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in the macro `hyperlight_wasm_macro::wasm_guest_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0061]: this function takes 1 argument but 3 arguments were supplied
--> src/component.rs:41:1
|
41 | hyperlight_wasm_macro::wasm_guest_bindgen!();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| expected `&FunctionCall`, found `&str`
| unexpected argument #2 of type `core::option::Option<Vec<ParameterValue>>`
| unexpected argument #3 of type `ReturnType`
|
= note: expected reference `&FunctionCall`
found reference `&'static str`
note: function defined here
--> src/component.rs:41:1
|
41 | hyperlight_wasm_macro::wasm_guest_bindgen!();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in the macro `hyperlight_wasm_macro::wasm_guest_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
looks like this might be caused because the relative call here:
- 主要语言
- Rust
- 星标
- 728
- 派生
- 39
- 平均合并
- 2 天 3 小时
- 30 天内合并 PR
- 25
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
hyperlight-dev/hyperlight-wasm 的其他 Issue
-
lifecycle/needs review
难度 4/5 3-5 天 新手友好度 35/100
-
lifecycle/needs review
难度 4/5 3-5 天 新手友好度 55/100
-
lifecycle/needs review
难度 4/5 3-5 天 新手友好度 38/100
-
use the #[guest_func] macro on `init_wasm_runtime` instead of manually calling register_function? 未关闭lifecycle/needs review
难度 3/5 1-2 天 新手友好度 35/100
hyperlight-dev/hyperlight-wasm#395 · 1 条评论 · 1 个 reaction ·
-
lifecycle/needs review
难度 2/5 1-3 小时 新手友好度 48/100
查看 hyperlight-dev/hyperlight-wasm 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 88/100
-
bug core
难度 2/5 1-3 小时 新手友好度 86/100
-
JIT-compiled number -> Decimal conversion silently overflows instead of raising DECIMAL_OVERFLOW 未关闭fuzz
难度 2/5 1-3 小时 新手友好度 82/100
ClickHouse/ClickHouse#122114 ·
-
难度 1/5 1 小时以内 新手友好度 92/100
linebender/vello_svg#90 ·
-
难度 2/5 1-3 小时 新手友好度 74/100