Skip to content

[dwds] Use new hot restart API from embedder#2827

Open
nshahan wants to merge 10 commits into
mainfrom
new-restart-logic
Open

[dwds] Use new hot restart API from embedder#2827
nshahan wants to merge 10 commits into
mainfrom
new-restart-logic

Conversation

@nshahan

@nshahan nshahan commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

Start using the new hotRestartBegin and hotRestartEnd APIs from the embedder.

These require the library bundle module system and allow for more customization in the integration of the hot restart operation.

Specifically this allows for $dartReloadModifiedModules to decide which of the files provided from reloadedSources.json should actually be requested at this time and return the list of the actual requests so the restart logic in dwds knows what scripts it should await parse events for.

  • Changes load strategy detection in some branching logic to loadStrategy.id == 'ddc-library-bundle' as a way to identify load strategies that handle library bundles.
  • Moves reloadedSourcesUri getter to a new interface named ReloadableLoadStrategy so strategies that support this mechanism can be identified by a type test.
  • Updates events_amd_test.dart and events_ddc_library_bundle_test.dart so they run in both Frontend Server and Build Daemon integration modes.
  • Temporarily skips hot restart tests on Build Daemon until the injected $dartReloadModifiedModules has been updated. Migrate to an embedder API that exposes hot restart as two phases (begin and end) build#4928

Issue: #2826

@nshahan nshahan force-pushed the new-restart-logic branch 2 times, most recently from 67f4db1 to bc334d5 Compare May 13, 2026 21:09
nshahan added 2 commits May 13, 2026 14:16
Start using the new `hotRestartBegin` and `hotRestartEnd` APIs from
the embedder.

These require the library bundle module system and allow for more
customization in the integration of the hot restart operation.

Specifically this allows for `$dartReloadModifiedModules` to decide
which of the files provided from reloadedSources.json should actually
be requested at this time and return the list of the actual requests so
the restart logic in dwds knows what scripts it should await parse
events for.

Issue: #2826
@nshahan nshahan force-pushed the new-restart-logic branch from bc334d5 to e326143 Compare May 13, 2026 21:17
@nshahan nshahan marked this pull request as ready for review May 18, 2026 18:43
@nshahan nshahan requested review from Markzipan and srujzs May 18, 2026 18:43
@nshahan

nshahan commented May 18, 2026

Copy link
Copy Markdown
Contributor Author

NOTE: The first commit simply updates the SDK lower bound and applied the new Dart formatter. I suggest removing that first commit from the range when reviewing to make the changes easier to see.

Comment thread dwds/web/reloader/restarter.dart
Comment thread dwds/lib/src/dwds_vm_client.dart Outdated
Comment thread dwds/test/frontend_server_common/bootstrap.dart Outdated
Comment thread dwds/lib/src/dwds_vm_client.dart Outdated
Comment thread dwds/lib/src/loaders/strategy.dart Outdated
Comment thread dwds/web/reloader/ddc_library_bundle_restarter.dart Outdated
Comment thread dwds/lib/src/dwds_vm_client.dart Outdated
nshahan added 3 commits June 9, 2026 17:02
* Update the injected `$dartReloadModifiedModules` method to return
  the descriptors for the scripts that were reloaded.
* Bumps the min SDK constrain to support the two phase restart logic
  that requires the new API.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants