-
Notifications
You must be signed in to change notification settings - Fork 6k
[web] Warn users when picking a deprecated renderer. #55709
[web] Warn users when picking a deprecated renderer. #55709
Conversation
kevmoo
left a comment
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.
HOLD PLEASE! Need to update the link!
|
|
||
| // Warn users in development that anything other than canvaskit is deprecated. | ||
| assert(() { | ||
| if (!useCanvasKit) { |
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.
Will this trigger if you pick auto but are debugging in desktop Chrome (I imagine it's the most common case)? I think we want if (['html', 'auto'].contains(configuration.requestedRendererType)).
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.
When we hit this if, we know that the HTMLRenderer is going to be chosen, this is only trying to reconstruct why.
I think the only corner case that this won't pick up at runtime is if the user has set --web-renderer=auto but then used renderer: canvaskit in their load() call.
That's why we need a tool change in flutter build as 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.
What is the value of useCanvasKit when you do --web-renderer=auto and test in desktop Chrome?
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.
What is the value of useCanvasKit when you do --web-renderer=auto and test in desktop Chrome?
true (as expected, no?)
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.
I think we could've done:
if (FlutterConfiguration.flutterWebAutoDetect || !useCanvasKit) {to capture all cases we want to warn against.
|
(The tests failings seem to be related to impeller, unrelated to this change. Hit retry just in case they were flakes.) |
eyebrowsoffire
left a comment
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
…156376) This PR emits a blue warning text when using `flutter ... --web-renderer=html|auto`. (The message is similar to the one that we emit at run-time) ## Issues Fixes #154878 See also: flutter/engine#55709
…156379) flutter/engine@e096ddb...07c702f 2024-10-08 ditman@gmail.com [web] Warn users when picking a deprecated renderer. (flutter/engine#55709) 2024-10-08 jacksongardner@google.com Revert "Reland [skwasm] Scene builder optimizations for platform view placement (#55468)" (flutter/engine#55715) 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,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
…55709) Warn users when they pick a deprecated renderer for the web, and point them to the appropriate /go/ link. ## Issues * Part of flutter#145954 * Fixes flutter#154879 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Warn users when they pick a deprecated renderer for the web, and point them to the appropriate /go/ link.
Issues
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.