Skip to content

make DdcFrontendServerBuilder use custom sdk build options - #4945

Open
schultek wants to merge 1 commit into
dart-lang:masterfrom
schultek:master
Open

make DdcFrontendServerBuilder use custom sdk build options#4945
schultek wants to merge 1 commit into
dart-lang:masterfrom
schultek:master

Conversation

@schultek

Copy link
Copy Markdown
Contributor

This makes DdcFrontendServerBuilder use the same build options as DevCompilerBuilder for specifying a custom sdk for building.

This is needed for Jaspr to run in "flutter compatibility mode", as added in #4299

As these options are only available during the build phase, the PersistentFrontendServer is modified to not start immediately when it's created in the resource, but only when the builder calls ensureStarted with the respective options.

@Markzipan


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

Note: The Dart team is trialing Gemini Code Assist. Don't take its comments as final Dart team feedback. Use the suggestions if they're helpful; otherwise, wait for a human reviewer.

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown

PR Health

Changelog Entry
Package Changed Files
package:build_web_compilers builder_pkgs/build_web_compilers/bin/fes_manager.dart
builder_pkgs/build_web_compilers/lib/builders.dart
builder_pkgs/build_web_compilers/lib/src/build_frontend_server/frontend_server_driver.dart
builder_pkgs/build_web_compilers/lib/src/build_modules/workers.dart
builder_pkgs/build_web_compilers/lib/src/ddc_frontend_server_builder.dart

Changes to files need to be accounted for in their respective changelogs.

This check can be disabled by tagging the PR with skip-changelog-check.

@Markzipan

Copy link
Copy Markdown
Contributor

I like the changes - thanks! However, I recently landed some somewhat large changes to a few of these objects (hopefully the last). I'll take a look after the merge.

@schultek

schultek commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

I've rebased my changes to resolve the conflicts. However maybe this isn't the right apporach, I see that the PersistentFrontendServer is now connecting via socket to an existing instance, which when I understand it right is managed by webdev.

Is this related to the dwds logic that webdev (and Jaspr) have? Maybe Jaspr can then pass these options there and don't need to go throug build_web_compilers.

@Markzipan

Markzipan commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

PersistentFrontendServer now has two running modes: one that connects to an existing FES instance (socket) and another that creates a local instance (same as before). I think the changes here are fine - though we should actually extend these build options to PersistentFrontendServer.start, FesManager.start, and related functions in fes_manager.dart.

@schultek

Copy link
Copy Markdown
Contributor Author

@Markzipan How is the FesManager started? I see it's a script in bin/ but I don't find how it is executed.

@Markzipan

Copy link
Copy Markdown
Contributor

@schultek It's started as an aot process by webdev - but this change hasn't landed yet. I'm fine with landing this - and I can add those build options to my change when it's out for review.

WIP here: dart-lang/webdev#2836

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants