Skip to content

Conversation

harryterkelsen
Copy link
Contributor

Uses the CanvasKit artifacts hosted on gstatic by default when running flutter build web.

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, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

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

@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Mar 16, 2023
static const String kUseApplicationBinary = 'use-application-binary';
static const String kWebBrowserFlag = 'web-browser-flag';
static const String kWebRendererFlag = 'web-renderer';
static const String kGstaticCanvasKitFlag = 'gstatic-canvaskit';
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think of making this less coupled to gstatic and canvaskit? We are aiming to eventually converge on one renderer, at which point referring to "canvaskit" may no longer be meaningful. We may decide to change the CDN to something other than gstatic.com (you never know 🤷 ), so hard-coding "gstatic" in the name may paint us into a corner. It would also be ideal if we had a "one option to rule them all", including custom URLs our users may want to use instead of our defaults.

Strawman:

# Full option: specifies a CDN or a custom relative URL, up to the developer.
flutter run --web-static-resources=https://my.favorite.cdn/flutter-web-resources/
flutter run --web-static-resources=/a/different/path/for/resources/

# A special value that instructs us to use bundled resources relative to the base URL (currently `/canvaskit/`).
flutter run --web-static-resources=bundled

# The following two are equivalent and mean "use the default CDN" (currently gstatic.com).
flutter run --web-static-resources=default
flutter run

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How about --web-resources-cdn? I agree we should make it more general than "gstatic CanvasKit" but I think we should have the configuration object/FLUTTER_WEB_CANVASKIT_URL be the way to override the static resource URL and this flag is just a boolean flag saying "please set the resource base URL to the CDN you have set up".

Copy link
Contributor

Choose a reason for hiding this comment

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

SGTM!

Copy link
Contributor

@yjbanov yjbanov left a comment

Choose a reason for hiding this comment

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

lgtm

@harryterkelsen harryterkelsen merged commit 897e3db into flutter:master Mar 23, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 23, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 23, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 23, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 23, 2023
tarrinneal pushed a commit to flutter/packages that referenced this pull request Mar 24, 2023
* cbdee52 Roll Flutter Engine from 59acb5362098 to 12c822327825 (3 revisions) (flutter/flutter#123330)

* 897e3db Inject the gstatic CanvasKit CDN URL by default in `flutter build web` (flutter/flutter#122772)

* 5a36bdd Stop serving Observatory by default (flutter/flutter#122419)

* b212e7b implement Iterator and Comparable instead of extending them (flutter/flutter#123282)

* af6029c c0fbe5a53 Roll Dart SDK from 9256fffbd5af to e8e045620234 (1 revision) (flutter/engine#40561) (flutter/flutter#123336)

* 9dec4fb FIX: NavigationDrawer hover/focus/pressed does not use indicatorShape (flutter/flutter#123325)

* 4907464 20ab040cd Roll Skia from ce5ff5cc03ce to c42320d53714 (2 revisions) (flutter/engine#40565) (flutter/flutter#123340)

* 28d40a4 Roll Packages from 75491e9 to 0826798 (5 revisions) (flutter/flutter#123342)

* 674ff15 [macOS] Add platform_channel sample/test (flutter/flutter#123141)

* 7b7af9f roll packages (flutter/flutter#123339)

* 3179875 replace some ._() constructors with class modifiers (flutter/flutter#122765)

* 7f41ab2 Fix (insert|move|remove)RenderObjectChild methods in base class (flutter/flutter#123276)

* fccca49 Refactor buildOverscrollIndicator (flutter/flutter#123246)

* 11bbce1 6b0933e74 [web] Add `dart:js_interop` to `_embedder.yaml`. (flutter/engine#40545) (flutter/flutter#123347)

* 716d252 Remove prefer_const_constructors ignores (flutter/flutter#123284)

* 100cf21 Prefer enum over class. (flutter/flutter#123312)

* 5ef9b84 Expose toggle to textfield's opacity animation. (flutter/flutter#122474)

* d79f3aa Roll Flutter Engine from 6b0933e74965 to bdce896fb64f (2 revisions) (flutter/flutter#123351)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
nploi pushed a commit to nploi/packages that referenced this pull request Jul 16, 2023
)

* cbdee52 Roll Flutter Engine from 59acb5362098 to 12c822327825 (3 revisions) (flutter/flutter#123330)

* 897e3db Inject the gstatic CanvasKit CDN URL by default in `flutter build web` (flutter/flutter#122772)

* 5a36bdd Stop serving Observatory by default (flutter/flutter#122419)

* b212e7b implement Iterator and Comparable instead of extending them (flutter/flutter#123282)

* af6029c c0fbe5a53 Roll Dart SDK from 9256fffbd5af to e8e045620234 (1 revision) (flutter/engine#40561) (flutter/flutter#123336)

* 9dec4fb FIX: NavigationDrawer hover/focus/pressed does not use indicatorShape (flutter/flutter#123325)

* 4907464 20ab040cd Roll Skia from ce5ff5cc03ce to c42320d53714 (2 revisions) (flutter/engine#40565) (flutter/flutter#123340)

* 28d40a4 Roll Packages from 75491e9 to 0826798 (5 revisions) (flutter/flutter#123342)

* 674ff15 [macOS] Add platform_channel sample/test (flutter/flutter#123141)

* 7b7af9f roll packages (flutter/flutter#123339)

* 3179875 replace some ._() constructors with class modifiers (flutter/flutter#122765)

* 7f41ab2 Fix (insert|move|remove)RenderObjectChild methods in base class (flutter/flutter#123276)

* fccca49 Refactor buildOverscrollIndicator (flutter/flutter#123246)

* 11bbce1 6b0933e74 [web] Add `dart:js_interop` to `_embedder.yaml`. (flutter/engine#40545) (flutter/flutter#123347)

* 716d252 Remove prefer_const_constructors ignores (flutter/flutter#123284)

* 100cf21 Prefer enum over class. (flutter/flutter#123312)

* 5ef9b84 Expose toggle to textfield's opacity animation. (flutter/flutter#122474)

* d79f3aa Roll Flutter Engine from 6b0933e74965 to bdce896fb64f (2 revisions) (flutter/flutter#123351)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants