uniffi-rs icon indicating copy to clipboard operation
uniffi-rs copied to clipboard

Better errors on parse failures

Open mhammond opened this issue 5 years ago • 1 comments

eg, in the nimbus IDL, I removed the trailing semicolon from the first (ie, namespace) line and see:

thread 'main' panicked at 'There is redundant raw data after parsing', C:\Users\skip.cargo\registry\src\github.com-1ecc6299db9ec823\weedle-0.11.0\src\lib.rs:85:5 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace thread 'main' panicked at 'called Result::unwrap() on an Err value: Error while generating scaffolding code', build.rs:6:60 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

(no idea if other errors are the same - I stumbled on this "organically")

┆Issue is synchronized with this Jira Task ┆Issue Number: UNIFFI-34

mhammond avatar Oct 29 '20 03:10 mhammond

no idea if other errors are the same

Yeah, the errors are almost universally bad here, sorry. I think the parser we're using is designed more for parsing known-good WebIDL files obtained from a spec than for doing iterative development of a new IDL file.

rfk avatar Oct 29 '20 03:10 rfk