Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust compiler errors hidden in flutter run #48

Open
AlienKevin opened this issue Dec 30, 2023 · 1 comment
Open

Rust compiler errors hidden in flutter run #48

AlienKevin opened this issue Dec 30, 2023 · 1 comment

Comments

@AlienKevin
Copy link

Hi, I'm using flutter_rust_bridge V2 which uses cargokit under the hood. I noticed that when I have a compiler error in my Rust code, it's not showing up when executing flutter run. Instead, there's only a mysterious one-liner error message: Could not build the precompiled application for the device.

I had to do flutter run -v, browse through the massive trace, and finally find out that the rust library is messed up due to the overwrite. So currently as a workaround, I've been manually running cargo build to see if my Rust is free of any compiler errors, before executing flutter run.

I think it'd be nice to show the compiler errors at the default log level when executing flutter run, so that the user is aware of why the build failed.

@knopp
Copy link
Contributor

knopp commented Jan 4, 2024

This unfortunately seems more like a problem with flutter tool. In case of exception or build failure, anything with SEVERE level in cargokit gets logged to stderr. I can't really do anything about flutter tool not always logging this.

Hopefully this will change once cargokit can be migrated to native assets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants