31dc969da2
Refactors the hot reload test suite to support non-FE server based hot reload. Similar to DartPad it uses a DDC process running in '--persistent_worker' mode and sends bazel requests for each reload. I call this "stateless" mode because the compilation process itself is not maintaining any state. The necessary metadata is passed from one compilation to the other via a delta dill. This differs from the "stateful" mode where the FE server persists a kernel AST in memory from one compilation to the next. Disregarding the browsers there are effectively 3 run modes now: - web stateful - web stateless (new) - vm stateful One key difference between the "stateless" and "stateful" modes is the output format of the JS files. In stateful mode DDC emits a file per library being re-compiled. In stateless mode DDC is emitting a single file with all the libraries. DartPad's workflow is slightly simpler than what's seen in the stateless mode here. It only supports editing a single library so we skip processing any metadata. To simulate this I've added the special 'main_only' which passes a single library for each reload generation. I've verified that this would fail if not for the change recently made to ddc_module_loader.js. Change-Id: If05da6dbeded4dd20e9e6d9dfaed52151541a19b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/434340 Commit-Queue: Nate Biggs <natebiggs@google.com> Reviewed-by: Mark Zhou <markzipan@google.com> Reviewed-by: Kevin Moore <kevmoo@google.com> Reviewed-by: Nicholas Shahan <nshahan@google.com>