Skip to content

Add webdev support for hot reload via the build daemon and a persistent Frontend Server - #2867

Open
Markzipan wants to merge 234 commits into
dart-lang:mainfrom
Markzipan:hot_reload_and_eval_via_SDK
Open

Add webdev support for hot reload via the build daemon and a persistent Frontend Server#2867
Markzipan wants to merge 234 commits into
dart-lang:mainfrom
Markzipan:hot_reload_and_eval_via_SDK

Conversation

@Markzipan

Copy link
Copy Markdown
Contributor

Changes at a glance

Webdev (core)

  • dev_workflow.dart: Spawns a background build_frontend_server:fes_manager subprocess when webHotReload is enabled. The FesManager maintains a persistent shared Frontend Server instance (and scratch space) to handle expression evaluation, hot reload, and hot restart requests while coordinating with the build daemon.
  • webdev_server.dart: Configures FrontendServerBuildDaemonStrategyProvider when webHotReload is enabled. Writes fes_manager_config to signal to build_runner that a shared FesManager is active.
  • app_domain.dart: Can now handle hot reload requests via build_daemon.
  • server_manager.dart: Now passes BuildDaemonClient to WebDevServer to ensure build results are accessible to webdev.
  • pubspec.yaml / pubspec_overrides.yaml: Add a dep overrides for dwds and dwds_test_common in the SDK.

Webdev (tests)

  • webdev/test/helpers/context.dart:
    • Add BuildDaemonTestContext and BuildDaemonAndFrontendServerTestContext for testing with buildDaemon and buildDaemonAndFrontendServer modes.
    • Adds asset handlers (createBuildRunnerProxyHandler, _createBuildRunnerDdcLibraryBundleAssetHandler) to serve build outputs directly from the build cache and scratch space.
  • webdev/test/:
    • Migrated integration test suites to webdev to run against BuildDaemonAndFrontendServerTestContext (split across AMD and DDC Library Bundle formats).

CI

  • tool/ci.sh & mono_repo.yaml: Re-generated with mono_repo v6.7.2 to support Linux Xvfb and headless Chrome execution (required for webdev to run tests that used to be in dwds and dwds_test_common).
  • GitHub Workflows (.github/workflows/): Updated permissions according to Zizmor guidance.

Validation

# Conflicts:
#	dwds_test_common/lib/fixtures/context.dart
#	webdev/CHANGELOG.md
#	webdev/lib/src/version.dart
#	webdev/pubspec.yaml
#	webdev/test/helpers/context.dart
@github-actions github-actions Bot added package:webdev package:frontend_server_client type-infra A repository infrastructure change or enhancement labels Aug 20, 2026
@Markzipan Markzipan changed the title Hot reload and eval via sdk Add webdev support for hot reload via the build daemon and a persistent Frontend Server Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package:frontend_server_client package:webdev type-infra A repository infrastructure change or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant