-
Notifications
You must be signed in to change notification settings - Fork 6k
Reland (x2) "Output .js files as ES6 modules. (flutter#52023)" #53718
Conversation
🤞 |
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!
@@ -54,5 +51,5 @@ export function getCanvaskitBaseUrl(config, buildConfig) { | |||
if (buildConfig.engineRevision && !buildConfig.useLocalCanvasKit) { | |||
return joinPathSegments("https://www.gstatic.com/flutter-canvaskit", buildConfig.engineRevision); |
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.
(The gstatic.com/flutter-canvaskit URL should come from buildConfig 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.
Ah yeah, I agree. Although I'm not going to tackle that with this change (and would require other changes in the framework first).
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.
100% agreed
@@ -3698,7 +3698,7 @@ Future<CanvasKitModule> _downloadOneOf(Iterable<String> urls) async { | |||
} | |||
|
|||
String _resolveUrl(String url) { | |||
return DomURL(url.toJS, domWindow.document.baseUri?.toJS).toJSString().toDart; | |||
return createDomURL(url, domWindow.document.baseUri).toJSString().toDart; |
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.
You could wrap the .toJSString().toDart
in a toString()
method in the DomURLExtension
:)
…151550) flutter/engine@db2b45b...1c23c8f 2024-07-10 jacksongardner@google.com Reland (x2) "Output .js files as ES6 modules. (#52023)" (flutter/engine#53718) 2024-07-10 skia-flutter-autoroll@skia.org Roll Skia from 46e5bf98158a to 2783ba54bf8e (2 revisions) (flutter/engine#53796) 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 bdero@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
Now that flutter/engine#53718 is fixed, these tests should be fine.
Now that flutter/engine#53718 is fixed, these tests should be fine. After this, we should be able to close #147731
Failed to create CP due to merge conflicts. |
…er#53718) Second attempt to reland flutter#52023 Fixes since the previous reland attempt: * We need to pass the skwasm main JS URI when loading the module so that it can pass that along to the worker. Since the worker uses the workaround to allow a cross script worker, it has trouble locating the main JS URI in relation to itself in a way that actually works for dynamic imports, so passing it along fixes that issue. * Some of the Google3 tests relied on the relative default canvaskit path. Dynamic module imports seems to not handle relative paths the way we expect, so we do our own URL resolution using the URL constructor before passing it into the dynamic import API. Also cleaned up some of the other relative pathing stuff that we do around the base URI. in flutter.js
Second attempt to reland #52023
Fixes since the previous reland attempt: