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
Migrate to null safety #139
Conversation
- Append `-nullsafety` to version. - Set min SDK to `2.11.0-0`, add `publish_to:none` since this package is not in the allow list. - Use late field initialization over constructor assignment to clean up the handling of backreferences in the different "phases". - Remove some conditional branches that are impossible to hit.
- Make Text.data consistently non nullable for getter and setter. - Add a local variable to avoid double null check for a field. - Make the `container` argument non-nullable in multiple places. - Remove unused `container` field. - Use `?.` over null check then `!`.
@lhrn can you check out my responses to your earlier comments? |
Will this PR be landed? We transitively use |
I'll revisit this PR. I think it's currently waiting for me to respond to Lasse's most recent comments. |
Ok, I think the last change needed was the switch to use |
@@ -156,28 +157,26 @@ abstract class Node { | |||
|
|||
/// A list of child nodes of the current node. This must | |||
/// include all elements but not necessarily other node types. | |||
final NodeList nodes = NodeList._(); | |||
late final nodes = NodeList._(this); |
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.
Do we want to avoid exposing the setter here?
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 has an initializing expression, so ti doesn't expose the setter.
-nullsafety
to version.2.11.0-0
, addpublish_to:none
since this package isnot in the allow list.
the handling of backreferences in the different "phases".