-
Notifications
You must be signed in to change notification settings - Fork 81
Support for hot reload in DWDS #2516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
P1
A high priority bug; for example, a single project is unusable or has many test failures
package:dwds
triaged
Comments
//cc @natebiggs @nshahan @srujzs |
We may also want to track migrating the bootstrapping here, or at least part of it. It looks like a lot of hot restart is implemented using that bootstrapping, and it's possible we might not need all of that to handle hot reload, but some of it will be needed. |
8 tasks
This was referenced Jan 22, 2025
github-merge-queue bot
pushed a commit
to flutter/flutter
that referenced
this issue
Jan 28, 2025
dart-lang/webdev#2516 dart-lang/webdev#2561 - Adds logic to emit newly compiled sources to a file that can be read by the bootstrapper. - Adds bootstrapping logic to reload scripts as needed. This involves implementing the necessary hot restart callback, fetching and processing the emitted file of newly compiled sources, cache busting, and loading the scripts onto the page. A lot of this logic is similar or identical to what we have for internal hot restart support. - Runs existing hot restart tests with the new bundle format. - Adds meta tag to run with utf-8 like in #161493. - Uses DWDS 24.3.3. ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [X] I signed the [CLA]. - [X] I listed at least one issue that this PR fixes in the description above. - [X] I updated/added relevant documentation (doc comments with `///`). - [X] I added new tests to check the change I am making, or this PR is [test-exempt]. - [X] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [ ] All existing and new tests are passing.
9 tasks
github-merge-queue bot
pushed a commit
to flutter/flutter
that referenced
this issue
Feb 3, 2025
dart-lang/webdev#2516 - Updates restart/reload code to accept a resetCompiler boolean to disambiguate between whether this is a full restart and whether to reset the resident compiler. - Adds code to call reloadSources in DWDS and handle the response (including any errors). - Adds code to invoke reassemble. - Adds code to emit a script that DWDS can later consume that contains the changed sources and their associated libraries. This is used to hot reload. The bootstrapper puts this in the global window. DWDS should be updated to accept it in the provider itself. See dart-lang/webdev#2584. - Adds code to parse module metadata from the frontend server. This is identical to the implementation in DWDS % addressing type-related lints. - Adds tests that run the existing hot reload tests but with web. Some modifications are mode, including waiting for Flutter runs to finish executing, and skipping a test that's not possible on the web. Needs DWDS 24.3.4 to be published first and used before we can land. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [ ] All existing and new tests are passing.
9 tasks
github-merge-queue bot
pushed a commit
to flutter/flutter
that referenced
this issue
Feb 4, 2025
…2616) recompile has been split into recompile and recompile-restart in the frontend server so that DDC can distinguish between hot reload recompiles and hot restart recompiles, and therefore emit rejection errors only on hot reload. dart-lang/webdev#2516 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [ ] All existing and new tests are passing.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
P1
A high priority bug; for example, a single project is unusable or has many test failures
package:dwds
triaged
dwds/test/frontend_server_ddc_library_bundle_evaluate_test.dart
#2488The text was updated successfully, but these errors were encountered: