Plumbing flags required for running tests with the DDC module system.#2295
Plumbing flags required for running tests with the DDC module system.#2295Markzipan merged 29 commits intodart-lang:masterfrom
Conversation
annagrin
left a comment
There was a problem hiding this comment.
Thanks Mark, looks like a great step in the right direction for module system unification! I left some comments.
annagrin
left a comment
There was a problem hiding this comment.
Thanks Mark, left a few more comments
annagrin
left a comment
There was a problem hiding this comment.
This looks really good. Let's separate the major API update into a separate PR and add a few tests. Thanks!
dwds/test/fixtures/context.dart
Outdated
| buildResults: buildResults, | ||
| chromeConnection: () async => connection, | ||
| autoRun: testSettings.autoRun, | ||
| completeBeforeHandlingConnections: tabConnectionCompleter.future, |
There was a problem hiding this comment.
I am curious about the exact details here (given that the plumbing changes the interface and will need a major version update) - could you please add more information on what exactly is the set of events and how it hangs? Also adding the comments in code so we can avoid this in the future.
annagrin
left a comment
There was a problem hiding this comment.
Thank @Markzipan, this is looking good! lets fix some minor things and add a couple of tests (I left comments).
annagrin
left a comment
There was a problem hiding this comment.
Thanks @Markzipan, just a few things I missed plus an ask for one more test.
|
Looks good! Let's sync and make sure tests are passing. |
…#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
Besides passing flags, this change includes:
Future.delayed(someDuration)just beforegetTab).This change requires the updated DDC Module Loader API to be landed first in the SDK (see this change).
This is part of a greater effort to deprecate the AMD module system: dart-lang/sdk#52361