koute / cargo-web

A Cargo subcommand for the client-side Web

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cargo web suppresses error output when JSON is too nested

aidanhs opened this issue · comments

$ RUST_LOG=trace cargo web deploy --target wasm32-unknown-unknown --release
   Compiling XX-page v0.1.0 (/home/aidanhs/Desktop/per/XX/page)
warning: unused import: `TimeoutTask`
  --> src/lib.rs:16:46
   |
16 | use yew::services::timeout::{TimeoutService, TimeoutTask};
   |                                              ^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

thread 'main' panicked at 'failed to parse cargo output: Error("recursion limit exceeded", line: 1, column: 122250)', src/libcore/result.rs:1165:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

let json: serde_json::Value = serde_json::from_str( &line ).expect( "failed to parse cargo output" );

I've recently upgraded yew and have presumably got something wrong, but there seems to be no way to get the actual output if the parse fails.

(had to clone and build cargo web with an inserted println to figure it out, turned out to be a simple incorrect type deep in the yew html! macro)