Closed yukibtc closed 2 days ago
Hi! Thanks for opening your first issue here! :smile:
Firstly, build.rs approach has some limitations. For example, macro expansions may not work (because expanding macros need compilation thus a naive implementation will lead to infinite loop).
Secondly, could you please collect and show the logs? I suspect it is because the codegen somehow fails in the middle of generation, otherwise formatting should be always done.
Ok looks like it is
Error details: Err(Command execution failed: sh: 1: dart: not found
more full logs:
I guess this is related to how you setup the dart binary. i.e. sh
seems to be confused and cannot find that binary when executed from build.rs.
Ah, thanks! Weird, dart is installed. I guess again an issue with RustRover
, when it auto check the crates (the last time not found flutter
binary). Thanks!
You are welcome and happy to see it is solved!
Description
Hi, I'm using
flutter_rust_bridge
with thebuild.rs
to automatically generate the dart output. I noticed that also if the rust APIs aren't changed and the dart output is already updated, it's re-genereated a new output "unformatted". If I commit those changes after few time it's re-generated formatted.The final output (formatted) that is re-generated with many whitespaces:
Describe the solution you'd like
Always format the dart output or add an field in
Config
to choose if format the code.