Open 0xNF opened 2 months ago
Looks reasonable, and feel free to PR for this! (I am happy to provide hints)
Alternatively, I will work on it in the next batch.
Looks like in some cases they are generated with implements FrbException
which in turn is implements Exception
, which is what should be happening. In my case it seems like it might be related to not handing in extra crate information to the rust_input:
field of the flutter_rust_bridge.yaml file
Seems like pub use xyz
items aren't being scanned fully, and will be given a generic implementation in the FRB output
Hmm, then could you please provide a minimal reproducible sample? Then it is easier to see what is going wrong exactly.
After experimenting with some of the type translations, I notice that
Err(e)
in Rust are thrown as objects in Dart:In Dart, this portion is generated like so:
Which means that try/catches act like this:
This conflicts with some of the officially supported dart lints, such as avoid_catches_without_on_clauses.
It'd be nice if the generated code for these types was instead