Skip to content

Commit d0fd3f7

Browse files
authored
[dwds] Pass reloaded sources path in all hot restart calls in client (#2673)
While the result may be currently unused, we'll likely need it for debugging soon both in the web-server and build daemon cases, so always pass the path. Currently, a null assertion that assumes the path is always passed when using the DDC library bundle format is being triggered.
1 parent 1c29125 commit d0fd3f7

File tree

5 files changed

+20
-11
lines changed

5 files changed

+20
-11
lines changed

dwds/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 25.0.3
2+
3+
### Bug Fixes:
4+
5+
- Fix issue in hot restart with the web socket where we didn't pass the reloaded
6+
sources path, resulting in a null assertion.
7+
18
## 25.0.2
29

310
### Bug Fixes:

dwds/lib/src/injected/client.js

Lines changed: 4 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dwds/lib/src/version.dart

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dwds/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: dwds
22
# Every time this changes you need to run `dart run build_runner build`.
3-
version: 25.0.2
3+
version: 25.0.3
44

55
description: >-
66
A service that proxies between the Chrome debug protocol and the Dart VM

dwds/web/client.dart

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,9 @@ Future<void>? main() {
190190
manager.reloadPage();
191191
} else if (reloadConfiguration ==
192192
'ReloadConfiguration.hotRestart') {
193-
await manager.hotRestart();
193+
await manager.hotRestart(
194+
reloadedSourcesPath: hotRestartReloadedSourcesPath,
195+
);
194196
} else if (reloadConfiguration == 'ReloadConfiguration.hotReload') {
195197
await manager.hotReloadStart(hotReloadReloadedSourcesPath);
196198
await manager.hotReloadEnd();
@@ -493,7 +495,10 @@ Future<void> handleWebSocketHotRestartRequest(
493495
final requestId = event.id;
494496
try {
495497
final runId = const Uuid().v4().toString();
496-
await manager.hotRestart(runId: runId);
498+
await manager.hotRestart(
499+
runId: runId,
500+
reloadedSourcesPath: hotRestartReloadedSourcesPath,
501+
);
497502
_sendHotRestartResponse(clientSink, requestId, success: true);
498503
} catch (e) {
499504
_sendHotRestartResponse(

0 commit comments

Comments
 (0)