Interface with an overlapping name used internally will cause build error
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 42/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- rust, wasm
- 領域
- build-system
調査の方向性
WIT example を使って build を再現し、src/hyperlight_wasm_macro/src/wasmguest.rs の 90 行目付近を調査してから、src/component.rs から生成された use を追跡する。重複するインターフェース名によって生成される呼び出しがどのように変わるかを確認し、報告された E0107 および E0061 エラーなしで example がビルドできることを検証する。
索引モデルが 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時間
- マージ済み PR(30日)
- 25
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 件 ·
-
lifecycle/needs review
難易度 2/5 1〜3時間 初心者へのやさしさ 48/100
hyperlight-dev/hyperlight-wasm の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
TheLarkInn/aipm#2413 ·
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
alexgorbatchev/simple-ptt#15 ·
-
tooling
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
todo:ticket
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
taikoxyz/taiko-mono#22168 · コメント 1 件 ·