Interface with an overlapping name used internally will cause build error
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 42/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- rust, wasm
- Lĩnh vực
- build-system
Hướng nghiên cứu
Tái hiện build với ví dụ WIT và kiểm tra src/hyperlight_wasm_macro/src/wasmguest.rs quanh dòng 90, sau đó lần theo phần use được sinh ra từ src/component.rs. Xác nhận tên interface bị trùng thay đổi các lệnh gọi được sinh ra như thế nào, và xác minh rằng ví dụ build được mà không có các lỗi E0107 và E0061 đã báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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:
- Ngôn ngữ chính
- Rust
- Star
- 728
- Fork
- 39
- Merge trung bình
- 2 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 25
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của hyperlight-dev/hyperlight-wasm
-
lifecycle/needs review
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
lifecycle/needs review
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
-
Can't update to wasmtime 48 Đang mởlifecycle/needs review
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
-
use the #[guest_func] macro on `init_wasm_runtime` instead of manually calling register_function? Đang mởlifecycle/needs review
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
hyperlight-dev/hyperlight-wasm#395 · 1 bình luận · 1 reaction ·
-
lifecycle/needs review
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 48/100
Tất cả issue của hyperlight-dev/hyperlight-wasm
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
bug good first issue package: quic
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
-
`dora trace view` sends a non-canonical full UUID as-is, so a valid trace ID shows "No spans found" Đang mởcli coordinator rust
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
area: tasks enhancement good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Jason-jo17/Polybench#15 · 1 bình luận ·