Sound null safety for framework and flutter_test#68642
Sound null safety for framework and flutter_test#68642goderbauer merged 15 commits intoflutter:masterfrom
Conversation
jonahwilliams
left a comment
There was a problem hiding this comment.
Besides layer example LGTM
ec243ce to
1e64a2b
Compare
|
CI is still sad: https://cirrus-ci.com/task/5469809754243072 |
|
The failing |
4513adf to
133a5c3
Compare
|
The last few widget inspector failures need: Additionally you should only pass --sound-null-safety to the framework and flutter_test tests. |
|
That works too :) |
|
The failing internal tests are legit, but we can fix the code there there after merging this PR -- Some user code expects the returned value to be a non-nullable type for the result of |
shihaohong
left a comment
There was a problem hiding this comment.
The null-safety code changes themselves LGTM, just some questions about example/layers since I'm less familiar and might've missed some context.
| await _runFlutterTest(path.join(flutterRoot, 'dev', 'tools', 'vitool'), tableData: bigqueryApi?.tabledata); | ||
| await _runFlutterTest(path.join(flutterRoot, 'examples', 'hello_world'), tableData: bigqueryApi?.tabledata); | ||
| await _runFlutterTest(path.join(flutterRoot, 'examples', 'layers'), tableData: bigqueryApi?.tabledata); | ||
| await _runFlutterTest(path.join(flutterRoot, 'examples', 'layers'), tableData: bigqueryApi?.tabledata, options: mixedModeNullSafetyOptions); |
There was a problem hiding this comment.
I might've missed the context, but what about the layer example that's giving it mixedModeNullSafetyOptions vs the rest of the tests?
There was a problem hiding this comment.
Some files from this example are imported from the framework tests, so I've only migrated those files. The remaining files are still unmigrated, so the tests for the examples themselves need to run in mixed mode.
| // found in the LICENSE file. | ||
|
|
||
| // @dart = 2.8 | ||
| // @dart = 2.10 |
There was a problem hiding this comment.
Does this turn on null-safety, but in mixed mode for examples/layers?
There was a problem hiding this comment.
This allows us to use null safety syntax in this file (i.e. the ! and ?).
|
|
||
| testWidgets('Return value from pop is correct', (WidgetTester tester) async { | ||
| late Future<Object> result; | ||
| late Future<Object?> result; |
There was a problem hiding this comment.
The internal test failure is similar to what caused this test to fail
There was a problem hiding this comment.
It's slightly different, fix is in cl/338282385.
|
Submitting, google3 is fixed with cl/338282385. |
This fixes all issues expect the test failures from
test/widgets/widget_inspector_test.dart, which are resolved by @jacob314 in #68661.Fixes #68562