Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

yjbanov
Copy link
Contributor

@yjbanov yjbanov commented Jun 5, 2024

Remove the avoid_dynamic_calls exception in web_ui, and clean up all dynamic calls.

@github-actions github-actions bot added the platform-web Code specifically for the web engine label Jun 5, 2024
@yjbanov yjbanov changed the title [web] clean up dynamic calls [web] clean up dynamic calls, remove always_specify_types Jun 5, 2024
@yjbanov yjbanov force-pushed the clean-up-dynamic-calls branch from efe1215 to 400d786 Compare June 5, 2024 18:15
@yjbanov yjbanov marked this pull request as ready for review June 5, 2024 18:15
Copy link
Member

@ditman ditman left a comment

Choose a reason for hiding this comment

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

Thanks for the cleanup!

@@ -535,7 +535,7 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher {
if (renderer is CanvasKitRenderer) {
assert(
decoded.arguments is int,
'Argument to Skia.setResourceCacheMaxBytes must be an int, but was ${decoded.arguments.runtimeType}',
'Argument to Skia.setResourceCacheMaxBytes must be an int, but was ${(decoded.arguments as Object?).runtimeType}',
Copy link
Member

Choose a reason for hiding this comment

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

I wonder why casting decoded.arguments as Object? doesn't make you access runtimeType trough ?.... I guess null also has runtimeType so it doesn't matter?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, null has all the Object methods, like runtimeType, toString, operator==, hashCode, etc. It's also surprising why dynamic.runtimeType is considered to be a dynamic invocation. Everything has a runtimeType in Dart. But I guess maybe dynamic.anything is considered "bad" by the lint.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is a bug in the lint

Copy link
Contributor

Choose a reason for hiding this comment

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

@yjbanov yjbanov added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 6, 2024
@auto-submit auto-submit bot merged commit 32c3b9b into flutter:main Jun 6, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jun 6, 2024
…149786)

flutter/engine@0edca2e...32c3b9b

2024-06-06 yjbanov@google.com [web] clean up dynamic calls, remove always_specify_types (flutter/engine#53228)
2024-06-06 jonahwilliams@google.com [Impeller] Reland Use Skia software renderer to draw stroked text. (flutter/engine#53238)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC matanl@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App platform-web Code specifically for the web engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants