Skip to content

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

Merged
merged 5 commits into from
Oct 14, 2022

Conversation

elliette
Copy link
Contributor

@elliette elliette commented Oct 6, 2022

Work towards #1640

@elliette elliette marked this pull request as ready for review October 7, 2022 18:06
@elliette elliette requested a review from annagrin October 7, 2022 18:06
Copy link
Contributor

@annagrin annagrin left a 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.

Copy link
Contributor

@annagrin annagrin left a 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;
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, done!

Copy link
Contributor

@annagrin annagrin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@elliette elliette merged commit ce498c2 into dart-lang:master Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants