Skip to content

Commit ec1ad11

Browse files
committed
Remove reassemble removal - that should be done in another PR
1 parent 1010d40 commit ec1ad11

File tree

3 files changed

+43
-2
lines changed

3 files changed

+43
-2
lines changed

dwds/CHANGELOG.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
service extensions. It also now throws a `RPCError` with
55
`RPCErrorKind.kMethodNotFound` when a service extension is not found instead
66
of throwing a JS evaluation error.
7-
- The registered extension `reassemble` is now no longer called when calling
8-
`reloadSources`. Users should call `reassemble` using `callServiceExtension`.
97

108
## 24.3.6
119

dwds/lib/src/injected/client.js

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

dwds/web/reloader/ddc_library_bundle_restarter.dart

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ extension type _Debugger._(JSObject _) implements JSObject {
3030
await invokeExtension(method, '{}').toDart;
3131
}
3232
}
33+
34+
Future<void> maybeInvokeFlutterReassemble() async {
35+
final method = 'ext.flutter.reassemble';
36+
if (extensionNames.toDart.contains(method.toJS)) {
37+
await invokeExtension(method, '{}').toDart;
38+
}
39+
}
3340
}
3441

3542
@JS('XMLHttpRequest')
@@ -85,5 +92,9 @@ class DdcLibraryBundleRestarter implements Restarter {
8592
}
8693
}
8794
await _dartDevEmbedder.hotReload(filesToLoad, librariesToReload).toDart;
95+
// TODO(srujzs): Reassembling is slow. It's roughly almost the time it takes
96+
// to recompile and do a hot reload. We should do some better profiling and
97+
// see if we can improve this.
98+
await _dartDevEmbedder.debugger.maybeInvokeFlutterReassemble();
8899
}
89100
}

0 commit comments

Comments
 (0)