Stream: git-wasmtime

Topic: wasmtime / issue #9124 cranelift-serde "Error("key must b...


view this post on Zulip Wasmtime GitHub notifications bot (Aug 13 2024 at 09:35):

abc767234318 opened issue #9124:

When I used cranelift-serde to convert Cranelift IR to JSON, the following error occurred:

thread 'main' panicked at C:\Users\Admin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\cranelift-serde-0.110.2\src/clif-json.rs:18:54:
called `Result::unwrap()` on an `Err` value: Error("key must be a string", line: 0, column: 0)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

wasm_func_10_clif.zip

view this post on Zulip Wasmtime GitHub notifications bot (Aug 13 2024 at 09:36):

abc767234318 edited issue #9124:

When I used cranelift-serde to convert Cranelift IR to JSON, the following error occurred:

thread 'main' panicked at C:\Users\Admin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\cranelift-serde-0.110.2\src/clif-json.rs:18:54:
called `Result::unwrap()` on an `Err` value: Error("key must be a string", line: 0, column: 0)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

wasm_func_10_clif.zip

```[tasklist]

Tasks

~~~

view this post on Zulip Wasmtime GitHub notifications bot (Aug 13 2024 at 09:36):

abc767234318 edited issue #9124:

When I used cranelift-serde to convert Cranelift IR to JSON, the following error occurred:

thread 'main' panicked at C:\Users\Admin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\cranelift-serde-0.110.2\src/clif-json.rs:18:54:
called `Result::unwrap()` on an `Err` value: Error("key must be a string", line: 0, column: 0)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

wasm_func_10_clif.zip

view this post on Zulip Wasmtime GitHub notifications bot (Aug 13 2024 at 09:53):

bjorn3 commented on issue #9124:

I don't think serializing to JSON will work. There are a couple of places where Cranelift uses a HashMap with a non-string key, which JSON doesn't allow. Serializing to a binary format like postcard should work though.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 13 2024 at 14:06):

alexcrichton closed issue #9124:

When I used cranelift-serde to convert Cranelift IR to JSON, the following error occurred:

thread 'main' panicked at C:\Users\Admin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\cranelift-serde-0.110.2\src/clif-json.rs:18:54:
called `Result::unwrap()` on an `Err` value: Error("key must be a string", line: 0, column: 0)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

wasm_func_10_clif.zip

view this post on Zulip Wasmtime GitHub notifications bot (Aug 13 2024 at 14:06):

alexcrichton commented on issue #9124:

Sounds like this is an expected error, so I'm going to close.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 13 2024 at 14:13):

bjorn3 commented on issue #9124:

I think we should remove the cranelift-serde crate as the only thing it does is trying to json serialize the cranelift ir. Cranelift-codegen already has all necessary serde implementations.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 13 2024 at 14:16):

alexcrichton reopened issue #9124:

When I used cranelift-serde to convert Cranelift IR to JSON, the following error occurred:

thread 'main' panicked at C:\Users\Admin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\cranelift-serde-0.110.2\src/clif-json.rs:18:54:
called `Result::unwrap()` on an `Err` value: Error("key must be a string", line: 0, column: 0)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

wasm_func_10_clif.zip

view this post on Zulip Wasmtime GitHub notifications bot (Aug 13 2024 at 14:16):

alexcrichton commented on issue #9124:

Ah ok, I'll reopen then


Last updated: Oct 23 2024 at 20:03 UTC