flutter_gherkin
flutter_gherkin copied to clipboard
No support for --no-sound-null-safety
I have a project which I migrated to null-safety however it had one dependency which had no null-safety support. The project runs fine with --no-sound-null-safety
option however trying to run the tests would fail and would not produce any output as to why it was failing. Here you can see what I mean:
dart test_driver/app_test.dart --no-sound-null-safety
Starting Flutter app under test 'test_driver/app.dart', this might take a few moments
Could not build the application for the simulator.
Flutter build error: Error launching application on iPhone SE (3rd generation).
After struggling on this for a few hours I had a hunch it might be silently failing because of the sound null safety requirement not being met so I removed that dependency from my project and the tests ran fine.
It would be nice if there was some output stating it is an issue with null safety, it would be even nicer if the --no-sound-null-safety
worked.
Here is the output I get from flutter build ios when I don't pass in the --no-sound-null-safety argument:
Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:
- package:flutter_gifimage
I'm guessing something like this is happening under the hood but not being captured and reported?
In the meantime I went ahead and found a path forwards by migrating that dependency to null-safety but I wanted to post this issue incase others run into similar problem.
@f3z0 thank you for reporting this. Are you using the current rc version of the library or the current (soon to be deprecated) Flutter driver based version?
Hello @jonsamwell , We're facing the same challenge at this point. Our project is not yet migrated to sound null-safety, and if we do not remove the specific keywords from the generated file, the project is not compiling. This is a nice to have feature. At the moment it provides us more arguments to move further into adopting the sound null safety feature 😄