Skip to content

Add support for hot restart tests in DWDS with the frontend server #2608

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

Merged
merged 3 commits into from
Apr 14, 2025

Conversation

srujzs
Copy link
Contributor

@srujzs srujzs commented Apr 11, 2025

  • Aligns the bootstrap script with Flutter tools for the DDC library bundle format. This includes adding the dartReloadModifiedModules callback and the script to wait until all sources are loaded before calling main.
  • Aligns the recompile code with Flutter tools. This includes adding support for detecting invalidated files, using recompile-restart, and writing a script that DWDS can use to detect files for a hot restart.
  • Refactors hot restart tests into shared test code that is now tested both with the build daemon and the frontend server. Tests that rely on build events are skipped in the frontend server by design and tests that rely on deferring main are skipped with the new DDC library bundle format until Separate hotRestart and hotReload into two methods each in the embedder sdk#60528 is resolved. Tests are also renamed to use "restart" instead of "reload" to distinguish from hot reload tests, which will be added in a future CL.

- Aligns the bootstrap script with Flutter tools for the DDC library
bundle format. This includes adding the dartReloadModifiedModules
callback and the script to wait until all sources are loaded before
calling main.
- Aligns the recompile code with Flutter tools. This includes adding
support for detecting invalidated files, using recompile-restart,
and writing a script that DWDS can use to detect files for a hot
restart.
- Refactors hot restart tests into shared test code that is now
tested both with the build daemon and the frontend server. Tests
that rely on build events are skipped in the frontend server by
design and tests that rely on deferring main are skipped with the
new DDC library bundle format until dart-lang/sdk#60528
is resolved. Tests are also renamed to use "restart" instead of
"reload" to distinguish from hot reload tests, which will be added
in a future CL.
@srujzs srujzs requested review from nshahan, bkonyi and jyameo April 11, 2025 20:42
Copy link
Contributor

@jyameo jyameo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@srujzs srujzs merged commit fa0b74b into dart-lang:main Apr 14, 2025
43 of 47 checks passed
@srujzs
Copy link
Contributor Author

srujzs commented Apr 14, 2025

Thanks! (failures are preexisting, so landing)

copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Apr 16, 2025
Revisions updated by `dart tools/rev_sdk_deps.dart`.

ecosystem (https://github.com/dart-lang/ecosystem/compare/7f6f1c1..815d4ba):
  815d4ba  2025-04-15  Devon Carew  [firehose] don't fail publish validation if we see the pub pre-release warning (dart-lang/ecosystem#357)
  e7bae16  2025-04-15  Moritz  Fix label fetching (dart-lang/ecosystem#358)
  7aa1313  2025-04-15  Moritz  Fix PR label fetching (dart-lang/ecosystem#356)

test (https://github.com/dart-lang/test/compare/8643fbf..84eba11):
  84eba115  2025-04-11  Daco Harkes  [native assets] Add support for pub workspaces (dart-lang/test#2484)
  ab850972  2025-04-11  Daco Harkes  [native assets] Add support for pub workspaces
  9f9fd77d  2025-04-10  Nate Bosch  Migrate host.dart to new JS interop (dart-lang/test#2448)

tools (https://github.com/dart-lang/tools/compare/d74f9e1..4a28415):
  4a284152  2025-04-15  Moritz  [package:code_builder] Remove transitive dependency on package:macros (dart-lang/tools#2073)
  2bb6eba7  2025-04-11  Lasse R.H. Nielsen  Simplifies the format for client IDs. (dart-lang/tools#2072)
  77e41774  2025-04-10  Liam Appelbe  [coverage] Prepare to publish (dart-lang/tools#2070)
  e7168ae1  2025-04-10  Liam Appelbe  [coverage] Finish collection as soon as main isolate exits (dart-lang/tools#2069)

vector_math (https://github.com/google/vector_math.dart/compare/f08d7d2..dc9d379):
  dc9d379  2025-04-15  Lukas Klingsbo  chore: Remove test_all.dart since this is built-in to `dart test` (google/vector_math.dart#343)

webdev (https://github.com/dart-lang/webdev/compare/c8b1cfa..5bf833d):
  5bf833d0  2025-04-15  Srujan Gaddam  Support hot reload testing (dart-lang/webdev#2611)
  fa0b74bf  2025-04-14  Srujan Gaddam  Add support for hot restart tests in DWDS with the frontend server (dart-lang/webdev#2608)

Change-Id: Ic3ff6ed88ee2db935dc48fafe1e16a869d73506c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/422580
Reviewed-by: Ivan Inozemtsev <[email protected]>
Commit-Queue: Ivan Inozemtsev <[email protected]>
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.

3 participants