Composed component from `wac plug` throws `NotImplementedError`
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
調査の方向性
A に対して componentize-py componentize を実行し、次に wac plug --plug a.wasm b.wasm を実行して、wasmtime で f-b(3) を呼び出して問題を再現します。b/interface/wit_world/imports/interface.py の f_a と、レポートに示されている Python 実装を調べます。合成されたコンポーネントが NotImplementedError やランタイム panic なしで f-b(3) を実行できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Hello,
I am experimenting with WASM components. I have two packages, A and B.
package example:a;
interface %type {
record blob {
x: f64,
}
}
interface %interface {
use %type.{blob};
f-a: func(x: f64) -> blob;
}
world %world {
export %type;
export %interface;
}
from a.interface.wit_world.exports import Interface as Base
from a.interface.wit_world.exports.type import Blob
class Interface(Base):
def f_a(self, x: float):
return Blob(x=x * 5)
package example:b;
interface %interface {
use example:a/%type.{blob};
f-b: func(x: f64) -> blob;
}
world %world {
import example:a/%interface;
export %interface;
}
from b.interface.wit_world.exports import Interface as Base
from b.interface.wit_world.imports.interface import f_a
class Interface(Base):
def f_b(self, x: float):
return f_a(f_a(x).x)
If I do componentize-py componentize on A, I can run this on the output successfully
wasmtime run --invoke 'f-a(3)' a.wasm
However, when i do
wac plug --plug a.wasm b.wasm --output composed.wasm
wasmtime run --invoke 'f-b(3)' composed.wasm
gives me
Traceback (most recent call last):
File "/1/b/implementation/__init__.py", line 11, in f_b1
File "/1/b/interface/wit_world/imports/interface.py", line 15, in f_a
NotImplementedError
thread '<unnamed>' (1) panicked at runtime/src/lib.rs:1290:25:
Python function threw an unexpected exception
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error: failed to run main module `composed.wasm`
Caused by:
0: error while executing at wasm backtrace:
0: 0x4b05657 - libc.so!abort
1: 0x2695395 - <unknown>!<wasm function 307>
2: 0x31fbc00 - libcomponentize_py_runtime_sync.so!std::sys::pal::wasip1::helpers::abort_internal
3: 0x31fdce0 - libcomponentize_py_runtime_sync.so!std::process::abort
4: 0x31eeaf7 - libcomponentize_py_runtime_sync.so!__rustc::__rust_abort
5: 0x318476f - libcomponentize_py_runtime_sync.so!__rustc::__rust_start_panic
6: 0x31ff807 - libcomponentize_py_runtime_sync.so!__rustc::rust_panic
7: 0x3200983 - libcomponentize_py_runtime_sync.so!std::panicking::panic_with_hook
8: 0x32038fc - libcomponentize_py_runtime_sync.so!std::panicking::panic_handler::{closure#0}
9: 0x320388f - libcomponentize_py_runtime_sync.so!std::sys::backtrace::__rust_end_short_backtrace::<std::panicking::panic_handler::{closure#0}, !>
10: 0x31ff8de - libcomponentize_py_runtime_sync.so!__rustc::rust_begin_unwind
11: 0x32453ff - libcomponentize_py_runtime_sync.so!core::panicking::panic_fmt
12: 0x31748f7 - libcomponentize_py_runtime_sync.so!wit_dylib_export_call
13: 0x4cd1934 - <unknown>!example:b/%interface#f-b
note: using the `WASMTIME_BACKTRACE_DETAILS=1` environment variable may show more debugging information
1: wasm trap: wasm `unreachable` instruction executed
Why doesn't the implementation of f-a end up in the composed component?
- 主要言語
- Rust
- スター
- 284
- フォーク
- 56
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bytecodealliance/componentize-py のほかの issue
-
難易度 3/5 半日 初心者へのやさしさ 40/100
bytecodealliance/componentize-py#259 · コメント 1 件 ·
-
wasm32-wasip3 target uses WASI preview 2 bindings対応中かも @Snowiiii が 6 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 57/100
bytecodealliance/componentize-py#253 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
bytecodealliance/componentize-py#247 · コメント 12 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
bytecodealliance/componentize-py#217 · コメント 6 件 ·
bytecodealliance/componentize-py の issue をすべて見る
似ている issue
-
[Bug] AM Context Monitor (am-monitor): Session turns count is capped at 80 due to turns.slice(-80)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
lbjlaq/Antigravity-Manager#4180 ·
メンテナーはふだん 1 日以内に返信
-
bug triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
zizmorcore/zizmor#2608 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
longbridge/nsh#4201 ·
メンテナーはふだん 1 日以内に返信