-
Notifications
You must be signed in to change notification settings - Fork 6k
Ignore several import_of_legacy_library_into_null_safe #22326
Ignore several import_of_legacy_library_into_null_safe #22326
Conversation
| import 'package:test/bootstrap/browser.dart'; | ||
| import 'package:test/test.dart'; | ||
| import 'package:ui/ui.dart'; | ||
| import 'package:test/bootstrap/browser.dart'; // ignore: import_of_legacy_library_into_null_safe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: Do we need to change every occurrence of this import? I think we use it many golden tests, example: https://github.com/flutter/engine/blob/master/lib/web_ui/test/golden_tests/engine/canvas_blend_golden_test.dart
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only if the library that imports it is Null Safe, i.e. the Dart SDK is 2.12.0, and the library does not opt-out from null safety. The example you pointed at does opt-out, it has // @dart = 2.6, so sets the language version to 2.6, which is less than 2.12 where non-nullable feature it released, and less than 2.10 when this feature was experimentally-released.
|
@nturgut Do you have concerns with these changes, something I should fix? |
cbracken
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rslgtm
We want to enforce the migration order, and show when a legacy library is migrated into a Null Safe library.
See https://dart-review.googlesource.com/c/sdk/+/170441
There are several violations in Flutter.
I'd like to ignore them, and land the analyzer CL to prevent further regressions.