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 rendering to nullsafety #64621
Conversation
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
Related to dart-lang/sdk#40146 |
/// [addWithPaintOffset]. | ||
/// | ||
/// * `paintTransform` has the semantics of the `transform` passed to | ||
/// [addWithPaintTransform], except thit it must be invertible; it |
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.
nit: that
@@ -165,6 +165,11 @@ abstract class RenderViewportBase<ParentDataClass extends ContainerParentDataMix | |||
extends RenderBox with ContainerRenderObjectMixin<RenderSliver, ParentDataClass> | |||
implements RenderAbstractViewport { | |||
/// Initializes fields for subclasses. | |||
/// Initializes fields for subclasses. |
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.
Duplicated line
Looks good but CI is failing |
e812f9a
to
cd4421c
Compare
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) ℹ️ Googlers: Go here for more info. |
(overriding clabot status because @a14n and I are working together on this) |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
93e5b51
to
06dea30
Compare
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) ℹ️ Googlers: Go here for more info. |
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
This pull request is not suitable for automatic merging in its current state.
|
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 after comment is resolved
final Map<int, TableColumnWidth> columnWidths; | ||
/// | ||
/// If this is set to null, then an empty map is assumed. | ||
final Map<int, TableColumnWidth>/*?*/ columnWidths; |
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.
Why is this still specified as an annotation?
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.
because this file is still opted-out (in widgets)
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.
Ah, that makes sense! Thanks.
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.
we haven't migrated widgets/ yet. This is just making sure we make the right call when we get to it.
String joiner = ', ', | ||
DiagnosticLevel minLevel = DiagnosticLevel.debug, | ||
}) { | ||
if (kReleaseMode) { |
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.
IIRC the reason these were added is that dart2js could not optimize the function otherwise. If that is still the case I would expect it to show up on the web size benchmarks
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.
Based on the history, @dnfield added the original if (kReleaseMode) return
logic, then @ferhatb added the assert()
around the body. This removes the if condition and leaves the assert so that the method can be non-nullable. I think it was ferhat's change that improved size, and this keeps that logic. Let's keep an eye on the numbers though, certainly...
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.
Ahh, yeah - I think I was remembering it backwards
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.
The problem with making this an assert is that profile mode will no longer show as much helpful information. But I guess we don't have any tests covering that and no one is complaining about it so oh well.
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.
My general opinion on this is release and profile should be as close to identical as possible except for the minimum required to actually enable collecting metrics.
@@ -830,52 +827,52 @@ class RenderCustomPaint extends RenderProxyBox { | |||
config.isChecked = properties.checked; | |||
} | |||
if (properties.selected != 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.
This function makes me sad
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.
yeah...
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
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) ℹ️ Googlers: Go here for more info. |
Yes profile mode info is reduced but closer to release build. This also allowed us to write an integration test to detect if treeshaking regresses. |
This is a continuation of #64456, the nnbd migration of rendering/.