Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[stable] Cherry-pick change to CanvasKit build flags to fix double download #164341

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

Conversation

harryterkelsen
Copy link
Contributor

@harryterkelsen harryterkelsen commented Feb 27, 2025

Stable Cherry Pick

Cherry-picks #162198 to stable to fix issue with double-downloading CanvasKit.

Fixes #163250

Impacted Users: All Flutter Web users
Impact Description: canvaskit.wasm (a roughly 5 MB download) is double-downloaded. While some browsers may retrieve the second request from the cache, not all do.
Workaround: None
Risk: Low (a small change to the BUILD flags for CanvasKit that prevents canvaskit.wasm from being downloaded twice)
Test Coverage: We don't have a test that checks how many requests there are for canvaskit.wasm
Validation Steps: Build and run any Flutter Web app and check the network requests to see that canvaskit.wasm is only requested once.

Fixes the debug build for CanvasKit.

NOTE: We need to build the debug WASM build with `-O1` because building
with `-O0` causes Emscripten to produce a binary that is rejected by
Chrome for having functions with too many local variables. Building with
`-O1` optimizes those locals out.

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
@github-actions github-actions bot added the engine flutter/engine repository. See also e: labels. label Feb 27, 2025
@harryterkelsen harryterkelsen added cp: review Cherry-picks in the review queue cp: merge-to-stable Cherry-picks that should be merged to stable labels Feb 27, 2025
Copy link
Contributor

@camsim99 camsim99 left a comment

Choose a reason for hiding this comment

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

This seems reasonable to me! I think merge this later after the current stable hotfix release is cut (3.29.1).

@milke
Copy link

milke commented Mar 6, 2025

We really need this merged rather quickly. Waiting for almost three weeks…

@camsim99 camsim99 added the cp: approved Approved cherry-pick request label Mar 6, 2025
@camsim99 camsim99 added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 6, 2025
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Mar 7, 2025
Copy link
Contributor

auto-submit bot commented Mar 7, 2025

autosubmit label was removed for flutter/flutter/164341, because - The status or check suite Mac clangd has failed. Please fix the issues identified (or deflake) before re-applying this label.

@camsim99 camsim99 added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 7, 2025
@auto-submit auto-submit bot merged commit bfcf486 into flutter:flutter-3.29-candidate.0 Mar 7, 2025
156 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 3, 2025
@reidbaker reidbaker mentioned this pull request Apr 4, 2025
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App cp: approved Approved cherry-pick request cp: merge-to-stable Cherry-picks that should be merged to stable cp: review Cherry-picks in the review queue engine flutter/engine repository. See also e: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants