shekohex / flutterust

Flutter + Rust = :heart:
Apache License 2.0
699 stars 56 forks source link

"Cannot run with sound null safety" for package:isolate when doing "flutter run" without "--no-sound-null-safety" #27

Open florianrein opened 3 years ago

florianrein commented 3 years ago

For Android & iOS, when I do flutter run, i get the following error message

Error output from Xcode build: ↳ ** BUILD FAILED Xcode's output: ↳ Error: Cannot run with sound null safety, because the following dependencies don't support null safety:

 - package:isolate

For solutions, see https://dart.dev/go/unsound-null-safety

(Respectively the Android equivalent).

My flutter doctor output is the following:

Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 2.0.5, on Mac OS X 10.15.4 19E287 darwin-x64, locale de-DE) [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2) [✓] Xcode - develop for iOS and macOS [✓] Chrome - develop for the web [✓] Android Studio (version 4.0) [✓] VS Code (version 1.55.2) [✓] Connected device (2 available)

• No issues found!

It is fixed by applying --no-sound-null-safety. I'd like to suggest to at least add it to the readme.

davehorner commented 1 year ago

https://github.com/shekohex/flutterust/pull/46 includes note just needs to be merged...

davehorner commented 1 year ago

I would be interested to know if this --no-sound-null-safety flag can be avoided with additional changes in Isolate? unsafe code and this is the ramifications? If there's nothing more to do, i think this issue can be closed.

shekohex commented 1 year ago

I would be interested to know if this --no-sound-null-safety flag can be avoided with additional changes in Isolate? unsafe code and this is the ramifications? If there's nothing more to do, i think this issue can be closed.

Yes, mostly likely is to rework/rewrite the bindgen code so that it generates a null-safe code, and on top of that we need to update any packages to at least the version where they support null-safety.