Ignore several import_of_legacy_library_into_null_safe#22326
Ignore several import_of_legacy_library_into_null_safe#22326scheglov merged 1 commit intoflutter:masterfrom
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.
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.
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? |
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.