-
Notifications
You must be signed in to change notification settings - Fork 82
Migrate configuration.dart
and shared.dart
to null-safety
#1757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
Thanks Elliott, I left a few comments.
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.
Thanks Elliott! I think you are right that the private fields need to be nullable for the override to work (or we need to require the configuration a bit, which is out of scope of this change). Let's try to make the public configuration getters non-nullable wherever possible.
@@ -270,17 +268,17 @@ class Configuration { | |||
/// 'sound', 'unsound', or 'auto'. | |||
/// 'auto' indicates that the default `package:build_web_compilers` | |||
/// behavior should be used. | |||
String get nullSafety => _nullSafety; | |||
String? get nullSafety => _nullSafety; |
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.
this feels non-nullable - can we return auto
if _nullSafety
is null?
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.
Yes, done!
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.
LGTM!
Work towards #1640