Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSound null safety for framework and flutter_test #68642
Conversation
|
Besides layer example LGTM |
|
LGTM if LG to CI |
|
CI is still sad: https://cirrus-ci.com/task/5469809754243072
|
|
The failing |
|
LGTM |
|
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 |
|
The null-safety code changes themselves LGTM, just some questions about |
| @@ -613,14 +614,14 @@ Future<void> _runFrameworkTests() async { | |||
| await _runFlutterTest(path.join(flutterRoot, 'dev', 'manual_tests'), tableData: bigqueryApi?.tabledata); | |||
| 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); | |||
shihaohong
Oct 21, 2020
Contributor
I might've missed the context, but what about the layer example that's giving it mixedModeNullSafetyOptions vs the rest of the tests?
I might've missed the context, but what about the layer example that's giving it mixedModeNullSafetyOptions vs the rest of the tests?
goderbauer
Oct 21, 2020
Author
Member
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.
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.
| @@ -2,7 +2,7 @@ | |||
| // Use of this source code is governed by a BSD-style license that can be | |||
| // found in the LICENSE file. | |||
|
|
|||
| // @dart = 2.8 | |||
| // @dart = 2.10 | |||
shihaohong
Oct 21, 2020
Contributor
Does this turn on null-safety, but in mixed mode for examples/layers?
Does this turn on null-safety, but in mixed mode for examples/layers?
goderbauer
Oct 21, 2020
Author
Member
This allows us to use null safety syntax in this file (i.e. the ! and ?).
This allows us to use null safety syntax in this file (i.e. the ! and ?).
| @@ -249,7 +249,7 @@ void main() { | |||
| }); | |||
|
|
|||
| testWidgets('Return value from pop is correct', (WidgetTester tester) async { | |||
| late Future<Object> result; | |||
| late Future<Object?> result; | |||
shihaohong
Oct 21, 2020
Contributor
The internal test failure is similar to what caused this test to fail
The internal test failure is similar to what caused this test to fail
goderbauer
Oct 21, 2020
Author
Member
It's slightly different, fix is in cl/338282385.
It's slightly different, fix is in cl/338282385.
|
Submitting, google3 is fixed with cl/338282385. |
42f3709
into
flutter:master
This fixes all issues expect the test failures from
test/widgets/widget_inspector_test.dart, which are resolved by @jacob314 in #68661.Fixes #68562