Skip to content

Adding support for Build Daemon + Frontend Server with expression eval.#2836

Draft
Markzipan wants to merge 33 commits into
dart-lang:mainfrom
Markzipan:expression_eval_dwds
Draft

Adding support for Build Daemon + Frontend Server with expression eval.#2836
Markzipan wants to merge 33 commits into
dart-lang:mainfrom
Markzipan:expression_eval_dwds

Conversation

@Markzipan

@Markzipan Markzipan commented May 14, 2026

Copy link
Copy Markdown
Contributor

Changes at a glance:

DWDS

  • ddc_uri_translator.dart
    • Added DdcUriTranslator, which translates paths between FES and package:build asset URI formats (e.g., mapping .dart.lib suffixes to .ddc, handling package lib/ segment inclusion/exclusion, etc.).
  • frontend_server_strategy_provider.dart
    • Added FrontendServerBuildDaemonStrategyProvider to translate/remap FES and build daemon paths and other conventions.
  • daemon_expression_compiler.dart
    • Added DaemonExpressionCompiler, which forwards expression evaluation requests to the instantiated Frontend Server worker via socket.
  • location.dart
    • Updated sourcemap parsing to account for FES-specific URIs (org-dartlang-app and other bits).

Webdev and Serving Workflow

  • dev_workflow.dart
    • Spawns a background build_frontend_server:fes_manager subprocess when webHotReload is enabled. This creates a persistent shared Frontend Server (with a persistent scratch space) that can receive expression eval, hot reload, and hot restart requests while allowing communication with the build daemon.
  • webdev_server.dart
    • Use FrontendServerBuildDaemonStrategyProvider when webHotReload. Also write a special fes_manager_config to signal to build runner that a shared FES should be used.

Tests

  • context.dart
    • Rewrote _createBuildRunnerDdcLibraryBundleAssetHandler to serve compiled outputs directly from the build cache or scratch space via multi-roots.
  • Migrated a bunch of integration tests to support/run under the new DDC Library Bundle + Frontend Server.
  • Updated hot reload tests to signal reload failure by a crash when reading reloaded_source.json. This is unlike a real app but works well for the test fixtures.
  • Bumped build_web_compilers to 4.8.2 in test fixtures.

Depends on dart-lang/build#4979

@Markzipan Markzipan force-pushed the expression_eval_dwds branch from b86e719 to 79b7fa2 Compare June 16, 2026 08:43
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.

1 participant