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
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
```[tasklist]
Tasks
~~~
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
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.
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
alexcrichton commented on issue #9124:
Sounds like this is an expected error, so I'm going to close.
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.
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
alexcrichton commented on issue #9124:
Ah ok, I'll reopen then
Last updated: Dec 23 2024 at 12:05 UTC