Interface with an overlapping name used internally will cause build error
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 42/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- rust, wasm
- Área
- build-system
Línea de trabajo
Reproducir el build con el ejemplo de WIT e inspeccionar src/hyperlight_wasm_macro/src/wasmguest.rs alrededor de la línea 90; después, seguir el uso generado desde src/component.rs. Confirmar cómo el nombre de interfaz coincidente cambia las llamadas generadas y verificar que el ejemplo se compile sin los errores reportados E0107 y E0061.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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:
- Lenguaje dominante
- Rust
- Estrellas
- 728
- Forks
- 39
- Merge medio
- 2 d 3 h
- PR fusionados (30 d)
- 25
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de hyperlight-dev/hyperlight-wasm
-
lifecycle/needs review
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
-
lifecycle/needs review
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
-
Can't update to wasmtime 48 Abiertolifecycle/needs review
Dificultad 4/5 3-5 días Aptitud para principiantes 38/100
-
use the #[guest_func] macro on `init_wasm_runtime` instead of manually calling register_function? Abiertolifecycle/needs review
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
hyperlight-dev/hyperlight-wasm#395 · 1 comentario · 1 reacción ·
-
lifecycle/needs review
Dificultad 2/5 1-3 horas Aptitud para principiantes 48/100
Todos los issues de hyperlight-dev/hyperlight-wasm
Issues similares
-
bug github_actions
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
registrystack/registry-stack#1393 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
longbridge/gpui-kit#3223 ·
-
bug engine
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
rocky-data/rocky#2181 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
oasisprotocol/oasis-sdk#2523 ·
-
[indexer] [QA] Add a focused test for the new NonRetryableError / assertSocketAlive() behavior. Abiertobot:ai-assisted component:indexer QA-roadmap status:untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
midnightntwrk/midnight-indexer#1557 ·