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

Conversation

@ditman
Copy link
Member

@ditman ditman commented Oct 7, 2024

Warn users when they pick a deprecated renderer for the web, and point them to the appropriate /go/ link.

Issues

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added the platform-web Code specifically for the web engine label Oct 7, 2024
Copy link
Contributor

@kevmoo kevmoo left a 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) {
Copy link
Contributor

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)).

Copy link
Member Author

@ditman ditman Oct 7, 2024

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.

Copy link
Contributor

@yjbanov yjbanov Oct 8, 2024

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?

Copy link
Member Author

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?)

Copy link
Contributor

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.

@ditman
Copy link
Member Author

ditman commented Oct 7, 2024

(The tests failings seem to be related to impeller, unrelated to this change. Hit retry just in case they were flakes.)

Copy link
Contributor

@eyebrowsoffire eyebrowsoffire left a comment

Choose a reason for hiding this comment

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

LGTM

@ditman ditman added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 8, 2024
@auto-submit auto-submit bot merged commit 07c702f into flutter:main Oct 8, 2024
28 checks passed
@ditman ditman deleted the html-renderer-deprecation-warning branch October 8, 2024 00:42
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 8, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Oct 8, 2024
…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
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Oct 8, 2024
…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
nick9822 pushed a commit to nick9822/flutter that referenced this pull request Dec 18, 2024
…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
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.

web + html renderer + asserts enabled: log that HTML renderer is deprecated

5 participants