We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
print_tyid
type
I was testing out #547 with our bindings, and encountered this assert: https://github.com/bytecodealliance/wit-bindgen/blob/main/crates/rust-lib/src/lib.rs#L245
This is the minimal repro:
default world bindings { import component: self.component } interface component { type value = list<tuple<>> type entity = list<tuple<u32, value>> add-components: func(entity: u64, data: entity) query-eval: func(q: u64) -> list<tuple<u64, list<value>>> }
Note that the type entity is necessary; substituting its definition into add-components allows for generation to pass.
type entity
add-components
This is the resulting callstack:
% RUST_BACKTRACE=1 wit-bindgen rust wit -w main thread 'main' panicked at 'assertion failed: `(left == right)` left: `"'a"`, right: `"'_"`', wit-bindgen-f98ccff846621481/58c130a/crates/rust-lib/src/lib.rs:245:21 stack backtrace: 0: rust_begin_unwind at /rustc/9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0/library/std/src/panicking.rs:575:5 1: core::panicking::panic_fmt at /rustc/9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0/library/core/src/panicking.rs:64:14 2: core::panicking::assert_failed_inner 3: core::panicking::assert_failed 4: wit_bindgen_rust_lib::RustGenerator::print_tyid 5: wit_bindgen_rust_lib::RustGenerator::print_ty 6: wit_bindgen_rust_lib::RustGenerator::print_tyid 7: wit_bindgen_rust_lib::RustGenerator::print_ty 8: wit_bindgen_rust_lib::RustGenerator::print_rust_slice 9: wit_bindgen_rust_lib::RustGenerator::print_type_list 10: <wit_bindgen_rust::RustWasm as wit_bindgen_core::WorldGenerator>::import_interface 11: wit_bindgen_core::WorldGenerator::generate 12: wit_bindgen::main note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
(with the latest wit-bindgen-cli installed through cargo install --git https://github.com/bytecodealliance/wit-bindgen.git wit-bindgen-cli)
wit-bindgen-cli
cargo install --git https://github.com/bytecodealliance/wit-bindgen.git wit-bindgen-cli
The text was updated successfully, but these errors were encountered:
Relax an assertion in Rust type emission
7b40bf9
I forgot a context where the assertion would trip, so implement the code necessary to avoid the need for the assertion. Closes bytecodealliance#551
Thanks! I think #552 should fix this
Sorry, something went wrong.
Relax an assertion in Rust type emission (#552)
7ec986b
I forgot a context where the assertion would trip, so implement the code necessary to avoid the need for the assertion. Closes #551
Successfully merging a pull request may close this issue.
I was testing out #547 with our bindings, and encountered this assert:
https://github.com/bytecodealliance/wit-bindgen/blob/main/crates/rust-lib/src/lib.rs#L245
This is the minimal repro:
Note that the
type entity
is necessary; substituting its definition intoadd-components
allows for generation to pass.This is the resulting callstack:
(with the latest
wit-bindgen-cli
installed throughcargo install --git https://github.com/bytecodealliance/wit-bindgen.git wit-bindgen-cli
)The text was updated successfully, but these errors were encountered: