You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Glues FES into build_runner, which is our first step towards hot reload + build_runner.
The high level workflow is:
1) A persistently running frontend server is initialized once when a build starts.
2) build_runner requests JS files based on locally modified/generated dart files (as usual). Builders that collect meta-information about DDC modules also - as a side effect - record the main app entrypoint and any locally modified files.
3) When a JS file is requested, the frontend server receives recompile requests via a proxy queue (to maintain communication order with the frontend server).
4) The frontend server processes compilation requests and serves compiled JS files back to `build_runner` (hot-reload ready).
Major changes:
* Adds a `DdcFrontendServerBuilder` to our set of DDC builders (enabled via the `web-hot-reload` config). This builder keeps a `PersistentFrontendServer` instance alive across rebuilds. Compile/recompile requests are queued via a `FrontendServerProxyDriver` resource.
* Uses `scratch_space` to record both 1) the main app entrypoint and 2) updated local files from the `entrypoint_marker` builder and the `module_builder` builder respectively. These are side effects that break certain stateful 'guarantees' of standard build_runner execution. The `entrypoint_marker` builder runs before any of the downstream DDC builders and finds the web entrypoint, as Frontend Server must receive the same entrypoint on every compilation request.
* Requires that strongly connected components in both the frontend server and `build_runner` be disabled.
Test changes:
* Extends `build_test` to permit incremental builds. This involves passing the asset graph + asset reader/writer across build results and only performing cleanup operations after a series of rebuilds.
* `build_test` doesn't support `runs_before` and other ordering rules in `build.yaml`, so the above changes allows a kind of imperative ordering, which is important for testing `entrypoint_marker`.
Minor changes:
* Added a flag to disable strongly connected components in build_web_compilers (implemented using raw ddc meta-modules over clean ddc meta-modules + enforcing fine module aggregation).
* Added disposal logic to `scratch_space` so that rebuilds only retain modified files.
* Updated `scratch_space` `package_config.json` specs (`packageUri` and `rootUri`). The previous values didn't seem to make sense to me, but I'm also not familiar with how that's standardized in `scratch_space`.
* Added `file` and `uuid` deps to `build_modules`.
* Moved around some helper functions.
* Ported some naming functions from the DDC runtime.
0 commit comments