Skip to content
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

Adding DDC module system targets to web SDK artifacts. #47783

Merged
merged 7 commits into from
Jan 25, 2024

Conversation

Markzipan
Copy link
Contributor

This is part of an ongoing effort to replace DDC's module system in Flutter Web (for hot reload support).

Side effects of this change include doubling the code generated by DDC whenever this build pathway is hit (until the full module system transition lands), but this shouldn't affect debug performance. We may be able to lock this behind a build flag if this is an issue.

See related issue: dart-lang/sdk#52361

@Markzipan Markzipan marked this pull request as draft November 8, 2023 01:39
@github-actions github-actions bot added the platform-web Code specifically for the web engine label Nov 8, 2023
@Markzipan Markzipan marked this pull request as ready for review November 8, 2023 01:40
@flutter-dashboard
Copy link

This pull request executed golden file tests, but it has not been updated in a while (20+ days). Test results from Gold expire after as many days, so this pull request will need to be updated with a fresh commit in order to get results from Gold.

@harryterkelsen
Copy link
Contributor

I don't see any reason not to do this, especially if it helps move us toward improved hot reload support. WDYT @yjbanov ?

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!

@Markzipan Markzipan changed the title Adding DDC/legacy module system targets to web SDK artifacts. Adding DDC module system targets to web SDK artifacts. Jan 23, 2024
@elliette elliette added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 24, 2024
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jan 24, 2024
Copy link
Contributor

auto-submit bot commented Jan 24, 2024

auto label is removed for flutter/engine/47783, due to - The status or check suite Linux mac_unopt has failed. Please fix the issues identified (or deflake) before re-applying this label.

@elliette elliette added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 25, 2024
@auto-submit auto-submit bot merged commit 4424ea2 into flutter:main Jan 25, 2024
27 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 25, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jan 25, 2024
…142202)

flutter/engine@4880592...499ed00

2024-01-25 skia-flutter-autoroll@skia.org Roll Skia from 3b7accdf8ed8 to 571873c31056 (1 revision) (flutter/engine#50026)
2024-01-25 jonahwilliams@google.com [Impeller] round up subpass coverage when it is close to (and smaller) than root pass size. (flutter/engine#49925)
2024-01-25 mzhou620@gmail.com Adding DDC module system targets to web SDK artifacts. (flutter/engine#47783)
2024-01-25 hasan@hasali.dev [Windows] Set cursor immediately when framework requests update (flutter/engine#49784)
2024-01-25 737941+loic-sharma@users.noreply.github.com [Windows] Introduce `egl::Surface` and `egl::WindowSurface` (flutter/engine#49983)
2024-01-25 skia-flutter-autoroll@skia.org Roll Skia from 588caf1ceddd to 3b7accdf8ed8 (1 revision) (flutter/engine#50025)

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 jacksongardner@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
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Feb 24, 2024
…#141423)

### Context:

DDC modules are abstractions over how libraries are loaded/updated. The entirety of google3 uses the DDC/legacy module system due to its flexibility extensibility over the other two (ES6 and AMD/RequireJS). Unifying DDC's module system saves us from duplicating work and will allow us to have finer grained control over how JS modules are loaded. This is a a prerequisite to features such as hot reload.

### Overview:

This change plumbs a boolean flag through flutter_tools that switches between DDC (new) and AMD (current) modules. This mode is automatically applied when `--extra-front-end-options=--dartdevc-module-format=ddc` is specified alongside `flutter run`. Other important additions include:
* Splitting Flutter artifacts between DDC and AMD modules
* Adding unit tests for the DDC module system
* Additional bootstrapper logic for the DDC module system

We don't expect to see any user-visible behavior or performance differences.

This is dependent on [incoming module system support in DWDS](dart-lang/webdev#2295) and [additional artifacts in the engine](flutter/engine#47783).

This is part of a greater effort to deprecate the AMD module system: dart-lang/sdk#52361
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 platform-web Code specifically for the web engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants