From d7a2ace0dfaa93a7661a6fb9c56e202a324cfc3a Mon Sep 17 00:00:00 2001 From: Nicholas Shahan Date: Wed, 13 May 2026 14:08:22 -0700 Subject: [PATCH 01/10] [dwds] Bump min SDK constraint to 3.13.0-107.0.dev Apply new formatter changes. --- dwds/pubspec.yaml | 2 +- dwds/test/frontend_server_common/devfs.dart | 5 +- .../frontend_server_client.dart | 6 +- .../common/chrome_proxy_service_common.dart | 675 ++++++++---------- dwds/test/integration/dart_uri_test.dart | 84 +-- dwds/test/integration/evaluate_common.dart | 49 +- dwds/test/integration/events_common.dart | 28 +- dwds/test/integration/fixtures/context.dart | 15 +- dwds/test/integration/fixtures/project.dart | 6 +- 9 files changed, 380 insertions(+), 490 deletions(-) diff --git a/dwds/pubspec.yaml b/dwds/pubspec.yaml index 809c86dc8..e20456040 100644 --- a/dwds/pubspec.yaml +++ b/dwds/pubspec.yaml @@ -7,7 +7,7 @@ description: >- service protocol. repository: https://github.com/dart-lang/webdev/tree/main/dwds environment: - sdk: ^3.12.0-307.0.dev + sdk: ^3.13.0-107.0.dev dependencies: async: ^2.9.0 diff --git a/dwds/test/frontend_server_common/devfs.dart b/dwds/test/frontend_server_common/devfs.dart index fa005a5eb..98408e73f 100644 --- a/dwds/test/frontend_server_common/devfs.dart +++ b/dwds/test/frontend_server_common/devfs.dart @@ -263,9 +263,8 @@ class WebDevFS { for (final module in modules) { final metadata = ModuleMetadata.fromJson( json.decode( - utf8.decode(assetServer.getMetadata('$module.metadata').toList()), - ) - as Map, + utf8.decode(assetServer.getMetadata('$module.metadata').toList()), + ) as Map, ); final libraries = metadata.libraries.keys.toList(); moduleToLibrary.add( diff --git a/dwds/test/frontend_server_common/frontend_server_client.dart b/dwds/test/frontend_server_common/frontend_server_client.dart index 9c3ee5d2c..b2b13c605 100644 --- a/dwds/test/frontend_server_common/frontend_server_client.dart +++ b/dwds/test/frontend_server_common/frontend_server_client.dart @@ -24,8 +24,10 @@ void defaultConsumer(String message, {StackTrace? stackTrace}) => ? _serverLogger.info(message) : _serverLogger.severe(message, null, stackTrace); -typedef CompilerMessageConsumer = - void Function(String message, {StackTrace stackTrace}); +typedef CompilerMessageConsumer = void Function( + String message, { + StackTrace stackTrace, +}); class CompilerOutput { const CompilerOutput(this.outputFilename, this.errorCount, this.sources); diff --git a/dwds/test/integration/common/chrome_proxy_service_common.dart b/dwds/test/integration/common/chrome_proxy_service_common.dart index e12589e26..333db0852 100644 --- a/dwds/test/integration/common/chrome_proxy_service_common.dart +++ b/dwds/test/integration/common/chrome_proxy_service_common.dart @@ -470,11 +470,10 @@ void runTests({ Future createRemoteObject(String message) async { return await service.evaluate( - isolate.id!, - bootstrap!.id!, - 'createObject("$message")', - ) - as InstanceRef; + isolate.id!, + bootstrap!.id!, + 'createObject("$message")', + ) as InstanceRef; } test('single scope object', () async { @@ -638,12 +637,10 @@ void runTests({ }); test('Classes', () async { - final testClass = - await service.getObject( - isolate.id!, - rootLibrary!.classes!.first.id!, - ) - as Class; + final testClass = await service.getObject( + isolate.id!, + rootLibrary!.classes!.first.id!, + ) as Class; expect( testClass.functions, unorderedEquals([ @@ -685,42 +682,41 @@ void runTests({ }); test('Runtime classes', () async { - final testClass = - await service.getObject(isolate.id!, 'classes|dart:_runtime|_Type') - as Class; + final testClass = await service.getObject( + isolate.id!, + 'classes|dart:_runtime|_Type', + ) as Class; expect(testClass.name, '_Type'); }); test('String', () async { - final worldRef = - await service.evaluate( - isolate.id!, - bootstrap!.id!, - "helloString('world')", - ) - as InstanceRef; + final worldRef = await service.evaluate( + isolate.id!, + bootstrap!.id!, + "helloString('world')", + ) as InstanceRef; final world = await service.getObject(isolate.id!, worldRef.id!) as Instance; expect(world.valueAsString, 'world'); }); test('Large strings not truncated', () async { - final largeString = - await service.evaluate( - isolate.id!, - bootstrap!.id!, - "helloString('${'abcde' * 250}')", - ) - as InstanceRef; + final largeString = await service.evaluate( + isolate.id!, + bootstrap!.id!, + "helloString('${'abcde' * 250}')", + ) as InstanceRef; expect(largeString.valueAsStringIsTruncated, isNot(isTrue)); expect(largeString.valueAsString!.length, largeString.length); expect(largeString.length, 5 * 250); }); test('Lists', () async { - final list = - await service.evaluate(isolate.id!, bootstrap!.id!, 'topLevelList') - as InstanceRef; + final list = await service.evaluate( + isolate.id!, + bootstrap!.id!, + 'topLevelList', + ) as InstanceRef; final inst = await service.getObject(isolate.id!, list.id!) as Instance; expect(inst.length, 1001); expect(inst.offset, null); @@ -733,9 +729,11 @@ void runTests({ }); test('Maps', () async { - final map = - await service.evaluate(isolate.id!, bootstrap!.id!, 'topLevelMap') - as InstanceRef; + final map = await service.evaluate( + isolate.id!, + bootstrap!.id!, + 'topLevelMap', + ) as InstanceRef; final inst = await service.getObject(isolate.id!, map.id!) as Instance; expect(inst.length, 1001); expect(inst.offset, null); @@ -750,13 +748,11 @@ void runTests({ }); test('bool', () async { - final ref = - await service.evaluate( - isolate.id!, - bootstrap!.id!, - 'helloBool(true)', - ) - as InstanceRef; + final ref = await service.evaluate( + isolate.id!, + bootstrap!.id!, + 'helloBool(true)', + ) as InstanceRef; final obj = await service.getObject(isolate.id!, ref.id!) as Instance; expect(obj.kind, InstanceKind.kBool); expect(obj.classRef!.name, 'Bool'); @@ -764,9 +760,11 @@ void runTests({ }); test('num', () async { - final ref = - await service.evaluate(isolate.id!, bootstrap!.id!, 'helloNum(42)') - as InstanceRef; + final ref = await service.evaluate( + isolate.id!, + bootstrap!.id!, + 'helloNum(42)', + ) as InstanceRef; final obj = await service.getObject(isolate.id!, ref.id!) as Instance; expect(obj.kind, InstanceKind.kDouble); expect(obj.classRef!.name, 'Double'); @@ -791,21 +789,17 @@ void runTests({ group('getObject called with offset/count parameters', () { test('Lists with null offset and count are not truncated', () async { - final list = - await service.evaluate( - isolate.id!, - bootstrap!.id!, - 'topLevelList', - ) - as InstanceRef; - final inst = - await service.getObject( - isolate.id!, - list.id!, - count: null, - offset: null, - ) - as Instance; + final list = await service.evaluate( + isolate.id!, + bootstrap!.id!, + 'topLevelList', + ) as InstanceRef; + final inst = await service.getObject( + isolate.id!, + list.id!, + count: null, + offset: null, + ) as Instance; expect(inst.length, 1001); expect(inst.offset, null); expect(inst.count, null); @@ -817,21 +811,17 @@ void runTests({ }); test('Lists with null count are not truncated', () async { - final list = - await service.evaluate( - isolate.id!, - bootstrap!.id!, - 'topLevelList', - ) - as InstanceRef; - final inst = - await service.getObject( - isolate.id!, - list.id!, - count: null, - offset: 0, - ) - as Instance; + final list = await service.evaluate( + isolate.id!, + bootstrap!.id!, + 'topLevelList', + ) as InstanceRef; + final inst = await service.getObject( + isolate.id!, + list.id!, + count: null, + offset: 0, + ) as Instance; expect(inst.length, 1001); expect(inst.offset, 0); expect(inst.count, null); @@ -844,21 +834,17 @@ void runTests({ test('Lists with null count and offset greater than 0 are ' 'truncated from offset to end of list', () async { - final list = - await service.evaluate( - isolate.id!, - bootstrap!.id!, - 'topLevelList', - ) - as InstanceRef; - final inst = - await service.getObject( - isolate.id!, - list.id!, - count: null, - offset: 1000, - ) - as Instance; + final list = await service.evaluate( + isolate.id!, + bootstrap!.id!, + 'topLevelList', + ) as InstanceRef; + final inst = await service.getObject( + isolate.id!, + list.id!, + count: null, + offset: 1000, + ) as Instance; expect(inst.length, 1001); expect(inst.offset, 1000); expect(inst.count, null); @@ -868,21 +854,17 @@ void runTests({ }); test('Lists with offset/count are truncated', () async { - final list = - await service.evaluate( - isolate.id!, - bootstrap!.id!, - 'topLevelList', - ) - as InstanceRef; - final inst = - await service.getObject( - isolate.id!, - list.id!, - count: 7, - offset: 4, - ) - as Instance; + final list = await service.evaluate( + isolate.id!, + bootstrap!.id!, + 'topLevelList', + ) as InstanceRef; + final inst = await service.getObject( + isolate.id!, + list.id!, + count: 7, + offset: 4, + ) as Instance; expect(inst.length, 1001); expect(inst.offset, 4); expect(inst.count, 7); @@ -896,21 +878,17 @@ void runTests({ test( 'Lists are truncated to the end if offset/count runs off the end', () async { - final list = - await service.evaluate( - isolate.id!, - bootstrap!.id!, - 'topLevelList', - ) - as InstanceRef; - final inst = - await service.getObject( - isolate.id!, - list.id!, - count: 5, - offset: 1000, - ) - as Instance; + final list = await service.evaluate( + isolate.id!, + bootstrap!.id!, + 'topLevelList', + ) as InstanceRef; + final inst = await service.getObject( + isolate.id!, + list.id!, + count: 5, + offset: 1000, + ) as Instance; expect(inst.length, 1001); expect(inst.offset, 1000); expect(inst.count, 1); @@ -923,21 +901,17 @@ void runTests({ test( 'Lists are truncated to empty if offset runs off the end', () async { - final list = - await service.evaluate( - isolate.id!, - bootstrap!.id!, - 'topLevelList', - ) - as InstanceRef; - final inst = - await service.getObject( - isolate.id!, - list.id!, - count: 5, - offset: 1002, - ) - as Instance; + final list = await service.evaluate( + isolate.id!, + bootstrap!.id!, + 'topLevelList', + ) as InstanceRef; + final inst = await service.getObject( + isolate.id!, + list.id!, + count: 5, + offset: 1002, + ) as Instance; expect(inst.elements!.length, 0); expect(inst.length, 1001); expect(inst.offset, 1002); @@ -949,21 +923,17 @@ void runTests({ test( 'Lists are truncated to empty with 0 count and null offset', () async { - final list = - await service.evaluate( - isolate.id!, - bootstrap!.id!, - 'topLevelList', - ) - as InstanceRef; - final inst = - await service.getObject( - isolate.id!, - list.id!, - count: 0, - offset: null, - ) - as Instance; + final list = await service.evaluate( + isolate.id!, + bootstrap!.id!, + 'topLevelList', + ) as InstanceRef; + final inst = await service.getObject( + isolate.id!, + list.id!, + count: 0, + offset: null, + ) as Instance; expect(inst.elements!.length, 0); expect(inst.length, 1001); expect(inst.offset, null); @@ -973,17 +943,17 @@ void runTests({ ); test('Maps with null offset/count are not truncated', () async { - final map = - await service.evaluate(isolate.id!, bootstrap!.id!, 'topLevelMap') - as InstanceRef; - final inst = - await service.getObject( - isolate.id!, - map.id!, - count: null, - offset: null, - ) - as Instance; + final map = await service.evaluate( + isolate.id!, + bootstrap!.id!, + 'topLevelMap', + ) as InstanceRef; + final inst = await service.getObject( + isolate.id!, + map.id!, + count: null, + offset: null, + ) as Instance; expect(inst.length, 1001); expect(inst.offset, null); expect(inst.count, null); @@ -998,17 +968,17 @@ void runTests({ test('Maps with null count and offset greater than 0 are ' 'truncated from offset to end of map', () async { - final map = - await service.evaluate(isolate.id!, bootstrap!.id!, 'topLevelMap') - as InstanceRef; - final inst = - await service.getObject( - isolate.id!, - map.id!, - count: null, - offset: 1000, - ) - as Instance; + final map = await service.evaluate( + isolate.id!, + bootstrap!.id!, + 'topLevelMap', + ) as InstanceRef; + final inst = await service.getObject( + isolate.id!, + map.id!, + count: null, + offset: 1000, + ) as Instance; expect(inst.length, 1001); expect(inst.offset, 1000); expect(inst.count, null); @@ -1019,17 +989,17 @@ void runTests({ }); test('Maps with null count are not truncated', () async { - final map = - await service.evaluate(isolate.id!, bootstrap!.id!, 'topLevelMap') - as InstanceRef; - final inst = - await service.getObject( - isolate.id!, - map.id!, - count: null, - offset: 0, - ) - as Instance; + final map = await service.evaluate( + isolate.id!, + bootstrap!.id!, + 'topLevelMap', + ) as InstanceRef; + final inst = await service.getObject( + isolate.id!, + map.id!, + count: null, + offset: 0, + ) as Instance; expect(inst.length, 1001); expect(inst.offset, 0); expect(inst.count, null); @@ -1043,12 +1013,17 @@ void runTests({ }); test('Maps with offset/count are truncated', () async { - final map = - await service.evaluate(isolate.id!, bootstrap!.id!, 'topLevelMap') - as InstanceRef; - final inst = - await service.getObject(isolate.id!, map.id!, count: 7, offset: 4) - as Instance; + final map = await service.evaluate( + isolate.id!, + bootstrap!.id!, + 'topLevelMap', + ) as InstanceRef; + final inst = await service.getObject( + isolate.id!, + map.id!, + count: 7, + offset: 4, + ) as Instance; expect(inst.length, 1001); expect(inst.offset, 4); expect(inst.count, 7); @@ -1064,21 +1039,17 @@ void runTests({ test( 'Maps are truncated to the end if offset/count runs off the end', () async { - final map = - await service.evaluate( - isolate.id!, - bootstrap!.id!, - 'topLevelMap', - ) - as InstanceRef; - final inst = - await service.getObject( - isolate.id!, - map.id!, - count: 5, - offset: 1000, - ) - as Instance; + final map = await service.evaluate( + isolate.id!, + bootstrap!.id!, + 'topLevelMap', + ) as InstanceRef; + final inst = await service.getObject( + isolate.id!, + map.id!, + count: 5, + offset: 1000, + ) as Instance; expect(inst.length, 1001); expect(inst.offset, 1000); expect(inst.count, 1); @@ -1092,21 +1063,17 @@ void runTests({ test( 'Maps are truncated to empty if offset runs off the end', () async { - final map = - await service.evaluate( - isolate.id!, - bootstrap!.id!, - 'topLevelMap', - ) - as InstanceRef; - final inst = - await service.getObject( - isolate.id!, - map.id!, - count: 5, - offset: 1002, - ) - as Instance; + final map = await service.evaluate( + isolate.id!, + bootstrap!.id!, + 'topLevelMap', + ) as InstanceRef; + final inst = await service.getObject( + isolate.id!, + map.id!, + count: 5, + offset: 1002, + ) as Instance; expect(inst.associations!.length, 0); expect(inst.length, 1001); expect(inst.offset, 1002); @@ -1116,21 +1083,17 @@ void runTests({ ); test('Strings with offset/count are truncated', () async { - final worldRef = - await service.evaluate( - isolate.id!, - bootstrap!.id!, - "helloString('world')", - ) - as InstanceRef; - final world = - await service.getObject( - isolate.id!, - worldRef.id!, - count: 2, - offset: 1, - ) - as Instance; + final worldRef = await service.evaluate( + isolate.id!, + bootstrap!.id!, + "helloString('world')", + ) as InstanceRef; + final world = await service.getObject( + isolate.id!, + worldRef.id!, + count: 2, + offset: 1, + ) as Instance; expect(world.valueAsString, 'or'); expect(world.count, 2); expect(world.length, 5); @@ -1140,21 +1103,17 @@ void runTests({ test( 'Maps are truncated to empty if offset runs off the end', () async { - final map = - await service.evaluate( - isolate.id!, - bootstrap!.id!, - 'topLevelMap', - ) - as InstanceRef; - final inst = - await service.getObject( - isolate.id!, - map.id!, - count: 5, - offset: 1002, - ) - as Instance; + final map = await service.evaluate( + isolate.id!, + bootstrap!.id!, + 'topLevelMap', + ) as InstanceRef; + final inst = await service.getObject( + isolate.id!, + map.id!, + count: 5, + offset: 1002, + ) as Instance; expect(inst.associations!.length, 0); expect(inst.length, 1001); expect(inst.offset, 1002); @@ -1166,21 +1125,17 @@ void runTests({ test( 'Maps are truncated to empty with 0 count and null offset', () async { - final map = - await service.evaluate( - isolate.id!, - bootstrap!.id!, - 'topLevelMap', - ) - as InstanceRef; - final inst = - await service.getObject( - isolate.id!, - map.id!, - count: 0, - offset: null, - ) - as Instance; + final map = await service.evaluate( + isolate.id!, + bootstrap!.id!, + 'topLevelMap', + ) as InstanceRef; + final inst = await service.getObject( + isolate.id!, + map.id!, + count: 0, + offset: null, + ) as Instance; expect(inst.associations!.length, 0); expect(inst.length, 1001); expect(inst.offset, null); @@ -1192,21 +1147,17 @@ void runTests({ test( 'Strings are truncated to the end if offset/count runs off the end', () async { - final worldRef = - await service.evaluate( - isolate.id!, - bootstrap!.id!, - "helloString('world')", - ) - as InstanceRef; - final world = - await service.getObject( - isolate.id!, - worldRef.id!, - count: 5, - offset: 3, - ) - as Instance; + final worldRef = await service.evaluate( + isolate.id!, + bootstrap!.id!, + "helloString('world')", + ) as InstanceRef; + final world = await service.getObject( + isolate.id!, + worldRef.id!, + count: 5, + offset: 3, + ) as Instance; expect(world.valueAsString, 'ld'); expect(world.count, 2); expect(world.length, 5); @@ -1217,14 +1168,12 @@ void runTests({ test( 'offset/count parameters greater than zero are ignored for Classes', () async { - final testClass = - await service.getObject( - isolate.id!, - rootLibrary!.classes!.first.id!, - offset: 100, - count: 100, - ) - as Class; + final testClass = await service.getObject( + isolate.id!, + rootLibrary!.classes!.first.id!, + offset: 100, + count: 100, + ) as Class; expect( testClass.functions, unorderedEquals([ @@ -1273,14 +1222,12 @@ void runTests({ test( 'offset/count parameters equal to zero are ignored for Classes', () async { - final testClass = - await service.getObject( - isolate.id!, - rootLibrary!.classes!.first.id!, - offset: 0, - count: 0, - ) - as Class; + final testClass = await service.getObject( + isolate.id!, + rootLibrary!.classes!.first.id!, + offset: 0, + count: 0, + ) as Class; expect( testClass.functions, unorderedEquals([ @@ -1327,63 +1274,51 @@ void runTests({ ); test('offset/count parameters are ignored for bools', () async { - final ref = - await service.evaluate( - isolate.id!, - bootstrap!.id!, - 'helloBool(true)', - ) - as InstanceRef; - final obj = - await service.getObject( - isolate.id!, - ref.id!, - offset: 100, - count: 100, - ) - as Instance; + final ref = await service.evaluate( + isolate.id!, + bootstrap!.id!, + 'helloBool(true)', + ) as InstanceRef; + final obj = await service.getObject( + isolate.id!, + ref.id!, + offset: 100, + count: 100, + ) as Instance; expect(obj.kind, InstanceKind.kBool); expect(obj.classRef!.name, 'Bool'); expect(obj.valueAsString, 'true'); }); test('offset/count parameters are ignored for nums', () async { - final ref = - await service.evaluate( - isolate.id!, - bootstrap!.id!, - 'helloNum(42)', - ) - as InstanceRef; - final obj = - await service.getObject( - isolate.id!, - ref.id!, - offset: 100, - count: 100, - ) - as Instance; + final ref = await service.evaluate( + isolate.id!, + bootstrap!.id!, + 'helloNum(42)', + ) as InstanceRef; + final obj = await service.getObject( + isolate.id!, + ref.id!, + offset: 100, + count: 100, + ) as Instance; expect(obj.kind, InstanceKind.kDouble); expect(obj.classRef!.name, 'Double'); expect(obj.valueAsString, '42'); }); test('offset/count parameters are ignored for null', () async { - final ref = - await service.evaluate( - isolate.id!, - bootstrap!.id!, - 'helloNum(null)', - ) - as InstanceRef; - final obj = - await service.getObject( - isolate.id!, - ref.id!, - offset: 100, - count: 100, - ) - as Instance; + final ref = await service.evaluate( + isolate.id!, + bootstrap!.id!, + 'helloNum(null)', + ) as InstanceRef; + final obj = await service.getObject( + isolate.id!, + ref.id!, + offset: 100, + count: 100, + ) as Instance; expect(obj.kind, InstanceKind.kNull); expect(obj.classRef!.name, 'Null'); expect(obj.valueAsString, 'null'); @@ -1813,9 +1748,11 @@ void runTests({ vm = await service.getVM(); isolate = await service.getIsolate(vm.isolates!.first.id!); bootstrap = isolate.rootLib; - testInstance = - await service.evaluate(isolate.id!, bootstrap!.id!, 'myInstance') - as InstanceRef; + testInstance = await service.evaluate( + isolate.id!, + bootstrap!.id!, + 'myInstance', + ) as InstanceRef; }); test('rootLib', () async { @@ -2088,25 +2025,21 @@ void runTests({ }, ); - test( - 'lookupResolvedPackageUris translates dart uris', - () async { - final service = context.service; - final vm = await service.getVM(); - final isolateId = vm.isolates!.first.id!; + test('lookupResolvedPackageUris translates dart uris', () async { + final service = context.service; + final vm = await service.getVM(); + final isolateId = vm.isolates!.first.id!; - final resolvedUris = await service.lookupResolvedPackageUris( - isolateId, - ['dart:html', 'dart:async'], - ); + final resolvedUris = await service.lookupResolvedPackageUris(isolateId, [ + 'dart:html', + 'dart:async', + ]); - expect(resolvedUris.uris, [ - 'org-dartlang-sdk:///sdk/lib/html/dart2js/html_dart2js.dart', - 'org-dartlang-sdk:///sdk/lib/async/async.dart', - ]); - }, - skip: 'https://github.com/dart-lang/webdev/issues/1584', - ); + expect(resolvedUris.uris, [ + 'org-dartlang-sdk:///sdk/lib/html/dart2js/html_dart2js.dart', + 'org-dartlang-sdk:///sdk/lib/async/async.dart', + ]); + }, skip: 'https://github.com/dart-lang/webdev/issues/1584'); test( 'lookupPackageUris finds package and org-dartlang-app paths', @@ -2196,22 +2129,18 @@ void runTests({ expect(resolvedUris.uris, [null, null, null]); }); - test( - 'lookupPackageUris translates dart uris', - () async { - final service = context.service; - final vm = await service.getVM(); - final isolateId = vm.isolates!.first.id!; + test('lookupPackageUris translates dart uris', () async { + final service = context.service; + final vm = await service.getVM(); + final isolateId = vm.isolates!.first.id!; - final resolvedUris = await service.lookupPackageUris(isolateId, [ - 'org-dartlang-sdk:///sdk/lib/html/dart2js/html_dart2js.dart', - 'org-dartlang-sdk:///sdk/lib/async/async.dart', - ]); + final resolvedUris = await service.lookupPackageUris(isolateId, [ + 'org-dartlang-sdk:///sdk/lib/html/dart2js/html_dart2js.dart', + 'org-dartlang-sdk:///sdk/lib/async/async.dart', + ]); - expect(resolvedUris.uris, ['dart:html', 'dart:async']); - }, - skip: 'https://github.com/dart-lang/webdev/issues/1584', - ); + expect(resolvedUris.uris, ['dart:html', 'dart:async']); + }, skip: 'https://github.com/dart-lang/webdev/issues/1584'); test('registerService', () async { final service = context.service; diff --git a/dwds/test/integration/dart_uri_test.dart b/dwds/test/integration/dart_uri_test.dart index 55308015e..9a0d5babd 100644 --- a/dwds/test/integration/dart_uri_test.dart +++ b/dwds/test/integration/dart_uri_test.dart @@ -100,25 +100,17 @@ void main() { tearDownAll(DartUri.clear); - test( - 'can resolve uris', - () { - final resolved = DartUri.toResolvedUri('dart:io'); - expect(resolved, 'org-dartlang-sdk:///sdk/lib/io/io.dart'); - }, - skip: 'https://github.com/dart-lang/webdev/issues/1584', - ); + test('can resolve uris', () { + final resolved = DartUri.toResolvedUri('dart:io'); + expect(resolved, 'org-dartlang-sdk:///sdk/lib/io/io.dart'); + }, skip: 'https://github.com/dart-lang/webdev/issues/1584'); - test( - 'can un-resolve uris', - () { - final unresolved = DartUri.toPackageUri( - 'org-dartlang-sdk:///sdk/lib/io/io.dart', - ); - expect(unresolved, 'dart:io'); - }, - skip: 'https://github.com/dart-lang/webdev/issues/1584', - ); + test('can un-resolve uris', () { + final unresolved = DartUri.toPackageUri( + 'org-dartlang-sdk:///sdk/lib/io/io.dart', + ); + expect(unresolved, 'dart:io'); + }, skip: 'https://github.com/dart-lang/webdev/issues/1584'); }); group('initialized with other SDK directory', () { @@ -131,25 +123,17 @@ void main() { DartUri.clear(); }); - test( - 'can resolve uris', - () { - final resolved = DartUri.toResolvedUri('dart:io'); - expect(resolved, 'org-dartlang-sdk:///sdk/lib/io/io.dart'); - }, - skip: 'https://github.com/dart-lang/webdev/issues/1584', - ); + test('can resolve uris', () { + final resolved = DartUri.toResolvedUri('dart:io'); + expect(resolved, 'org-dartlang-sdk:///sdk/lib/io/io.dart'); + }, skip: 'https://github.com/dart-lang/webdev/issues/1584'); - test( - 'can unresolve uris', - () { - final unresolved = DartUri.toPackageUri( - 'org-dartlang-sdk:///sdk/lib/io/io.dart', - ); - expect(unresolved, 'dart:io'); - }, - skip: 'https://github.com/dart-lang/webdev/issues/1584', - ); + test('can unresolve uris', () { + final unresolved = DartUri.toPackageUri( + 'org-dartlang-sdk:///sdk/lib/io/io.dart', + ); + expect(unresolved, 'dart:io'); + }, skip: 'https://github.com/dart-lang/webdev/issues/1584'); }); group('initialized with other SDK directory with no libraries spec', () { @@ -181,25 +165,17 @@ void main() { DartUri.clear(); }); - test( - 'cannot resolve uris', - () { - final resolved = DartUri.toResolvedUri('dart:io'); - expect(resolved, null); - }, - skip: 'https://github.com/dart-lang/webdev/issues/1584', - ); + test('cannot resolve uris', () { + final resolved = DartUri.toResolvedUri('dart:io'); + expect(resolved, null); + }, skip: 'https://github.com/dart-lang/webdev/issues/1584'); - test( - 'cannot unresolve uris', - () { - final unresolved = DartUri.toPackageUri( - 'org-dartlang-sdk:///sdk/lib/io/io.dart', - ); - expect(unresolved, null); - }, - skip: 'https://github.com/dart-lang/webdev/issues/1584', - ); + test('cannot unresolve uris', () { + final unresolved = DartUri.toPackageUri( + 'org-dartlang-sdk:///sdk/lib/io/io.dart', + ); + expect(unresolved, null); + }, skip: 'https://github.com/dart-lang/webdev/issues/1584'); }); }); diff --git a/dwds/test/integration/evaluate_common.dart b/dwds/test/integration/evaluate_common.dart index cb6e962d1..3e3f8b51c 100644 --- a/dwds/test/integration/evaluate_common.dart +++ b/dwds/test/integration/evaluate_common.dart @@ -286,26 +286,19 @@ void testAll({ }); }); - test( - 'extension method scope variables can be evaluated', - () async { - await onBreakPoint(mainScript, 'extension', (Event event) async { - final stack = await context.service.getStack(isolateId); - final scope = _getFrameVariables(stack.frames!.first); - for (final p in scope.entries) { - final name = p.key; - final value = p.value as InstanceRef; - final result = await getInstanceRef( - event.topFrame!.index!, - name!, - ); - - expect(result, matchInstanceRef(value.valueAsString)); - } - }); - }, - skip: 'https://github.com/dart-lang/webdev/issues/1371', - ); + test('extension method scope variables can be evaluated', () async { + await onBreakPoint(mainScript, 'extension', (Event event) async { + final stack = await context.service.getStack(isolateId); + final scope = _getFrameVariables(stack.frames!.first); + for (final p in scope.entries) { + final name = p.key; + final value = p.value as InstanceRef; + final result = await getInstanceRef(event.topFrame!.index!, name!); + + expect(result, matchInstanceRef(value.valueAsString)); + } + }); + }, skip: 'https://github.com/dart-lang/webdev/issues/1371'); test('does not crash if class metadata cannot be found', () async { await onBreakPoint(mainScript, 'printStream', (Event event) async { @@ -695,18 +688,14 @@ void testAll({ return isolate.rootLib!.id!; } - test( - 'RecordType getters', - () async { - final libraryId = getRootLibraryId(); + test('RecordType getters', () async { + final libraryId = getRootLibraryId(); - final type = await getInstanceRef(libraryId, '(0,1).runtimeType'); - final result = await getInstanceRef(type.id, 'hashCode'); + final type = await getInstanceRef(libraryId, '(0,1).runtimeType'); + final result = await getInstanceRef(type.id, 'hashCode'); - expect(result, matchInstanceRefKind('Double')); - }, - skip: 'https://github.com/dart-lang/sdk/issues/54609', - ); + expect(result, matchInstanceRefKind('Double')); + }, skip: 'https://github.com/dart-lang/sdk/issues/54609'); test('Object getters', () async { final libraryId = getRootLibraryId(); diff --git a/dwds/test/integration/events_common.dart b/dwds/test/integration/events_common.dart index 17fe12885..1fa651f6d 100644 --- a/dwds/test/integration/events_common.dart +++ b/dwds/test/integration/events_common.dart @@ -93,22 +93,18 @@ void testWithDwds({required TestSdkConfigurationProvider provider}) { await context.tearDown(); }); - test( - 'emits DEBUGGER_READY and DEVTOOLS_LOAD events', - () async { - await expectEventsDuring([ - matchesEvent(DwdsEventKind.debuggerReady, { - 'elapsedMilliseconds': isNotNull, - 'screen': equals('debugger'), - }), - matchesEvent(DwdsEventKind.devToolsLoad, { - 'elapsedMilliseconds': isNotNull, - 'screen': equals('debugger'), - }), - ], () => keyboard.sendChord([Keyboard.alt, 'd'])); - }, - skip: 'https://github.com/dart-lang/webdev/issues/2394', - ); + test('emits DEBUGGER_READY and DEVTOOLS_LOAD events', () async { + await expectEventsDuring([ + matchesEvent(DwdsEventKind.debuggerReady, { + 'elapsedMilliseconds': isNotNull, + 'screen': equals('debugger'), + }), + matchesEvent(DwdsEventKind.devToolsLoad, { + 'elapsedMilliseconds': isNotNull, + 'screen': equals('debugger'), + }), + ], () => keyboard.sendChord([Keyboard.alt, 'd'])); + }, skip: 'https://github.com/dart-lang/webdev/issues/2394'); test('emits DEVTOOLS_LAUNCH event', () async { await expectEventDuring( diff --git a/dwds/test/integration/fixtures/context.dart b/dwds/test/integration/fixtures/context.dart index 833e83bbf..12c138aa9 100644 --- a/dwds/test/integration/fixtures/context.dart +++ b/dwds/test/integration/fixtures/context.dart @@ -896,11 +896,9 @@ class TestContext { } Future _buildDebugExtension() async { - final process = await Process.run( - 'tool/build_extension.sh', - ['prod'], - workingDirectory: absolutePath(pathFromDwds: 'debug_extension'), - ); + final process = await Process.run('tool/build_extension.sh', [ + 'prod', + ], workingDirectory: absolutePath(pathFromDwds: 'debug_extension')); print(process.stdout); } @@ -933,9 +931,10 @@ class TestContext { String isolateId, ScriptRef scriptRef, ) async { - final script = - await debugConnection.vmService.getObject(isolateId, scriptRef.id!) - as Script; + final script = await debugConnection.vmService.getObject( + isolateId, + scriptRef.id!, + ) as Script; final lines = LineSplitter.split(script.source!).toList(); final lineNumber = lines.indexWhere( (l) => l.endsWith('// Breakpoint: $breakpointId'), diff --git a/dwds/test/integration/fixtures/project.dart b/dwds/test/integration/fixtures/project.dart index 992bb838f..1779ff59d 100644 --- a/dwds/test/integration/fixtures/project.dart +++ b/dwds/test/integration/fixtures/project.dart @@ -203,9 +203,9 @@ class TestProject { Directory(newPath).createSync(); copyPathSync(currentPath, newPath); copiedPackageDirectories.add(packageDirectory); - final pubspec = - loadYaml(File(p.join(currentPath, 'pubspec.yaml')).readAsStringSync()) - as Map; + final pubspec = loadYaml( + File(p.join(currentPath, 'pubspec.yaml')).readAsStringSync(), + ) as Map; final dependencies = pubspec['dependencies'] as Map? ?? {}; for (final dependency in dependencies.values) { if (dependency is Map && dependency.containsKey('path')) { From e3261431d5b9a2f0d8ca8f8a803d870641e832b3 Mon Sep 17 00:00:00 2001 From: Nicholas Shahan Date: Tue, 28 Apr 2026 16:04:43 -0700 Subject: [PATCH 02/10] [dwds] Use new hot restart API from embedder Start using the new `hotRestartBegin` and `hotRestartEnd` APIs from the embedder. These require the library bundle module system and allow for more customization in the integration of the hot restart operation. Specifically this allows for `$dartReloadModifiedModules` to decide which of the files provided from reloadedSources.json should actually be requested at this time and return the list of the actual requests so the restart logic in dwds knows what scripts it should await parse events for. Issue: https://github.com/dart-lang/webdev/issues/2826 --- dwds/lib/dwds.dart | 6 +- dwds/lib/src/debugging/chrome_inspector.dart | 3 +- dwds/lib/src/dwds_vm_client.dart | 78 +++++-- dwds/lib/src/handlers/injected_client_js.dart | 218 +++++++++++++----- dwds/lib/src/handlers/injector.dart | 4 +- dwds/lib/src/loaders/ddc_library_bundle.dart | 27 +-- dwds/lib/src/loaders/strategy.dart | 29 +++ dwds/web/client.dart | 29 ++- .../ddc_library_bundle_restarter.dart | 27 ++- dwds/web/reloader/manager.dart | 16 ++ dwds/web/reloader/restarter.dart | 15 ++ 11 files changed, 342 insertions(+), 110 deletions(-) diff --git a/dwds/lib/dwds.dart b/dwds/lib/dwds.dart index 2e178b52c..97c735fd8 100644 --- a/dwds/lib/dwds.dart +++ b/dwds/lib/dwds.dart @@ -30,7 +30,11 @@ export 'src/loaders/frontend_server_strategy_provider.dart' FrontendServerRequireStrategyProvider; export 'src/loaders/require.dart' show RequireStrategy; export 'src/loaders/strategy.dart' - show BuildSettings, LoadStrategy, ReloadConfiguration; + show + BuildSettings, + LoadStrategy, + ReloadConfiguration, + ReloadableLoadStrategy; export 'src/readers/asset_reader.dart' show AssetReader, PackageUriMapper; export 'src/readers/frontend_server_asset_reader.dart' show FrontendServerAssetReader; diff --git a/dwds/lib/src/debugging/chrome_inspector.dart b/dwds/lib/src/debugging/chrome_inspector.dart index 40a6472ff..47a920118 100644 --- a/dwds/lib/src/debugging/chrome_inspector.dart +++ b/dwds/lib/src/debugging/chrome_inspector.dart @@ -15,7 +15,6 @@ import 'package:dwds/src/debugging/libraries.dart'; import 'package:dwds/src/debugging/location.dart'; import 'package:dwds/src/debugging/metadata/provider.dart'; import 'package:dwds/src/debugging/remote_debugger.dart'; -import 'package:dwds/src/loaders/ddc_library_bundle.dart'; import 'package:dwds/src/readers/asset_reader.dart'; import 'package:dwds/src/utilities/conversions.dart'; import 'package:dwds/src/utilities/dart_uri.dart'; @@ -265,7 +264,7 @@ class ChromeAppInspector extends AppInspector { if (libraryUri == null) { throwInvalidParam('invoke', 'library uri is null'); } - return globalToolConfiguration.loadStrategy is DdcLibraryBundleStrategy + return globalToolConfiguration.loadStrategy.id == 'ddc-library-bundle' ? _evaluateLibraryMethodWithDdcLibraryBundle( libraryUri, selector, diff --git a/dwds/lib/src/dwds_vm_client.dart b/dwds/lib/src/dwds_vm_client.dart index aacfa597e..716ce0f4e 100644 --- a/dwds/lib/src/dwds_vm_client.dart +++ b/dwds/lib/src/dwds_vm_client.dart @@ -7,7 +7,6 @@ import 'dart:convert'; import 'package:dwds/src/config/tool_configuration.dart'; import 'package:dwds/src/events.dart'; -import 'package:dwds/src/loaders/ddc_library_bundle.dart'; import 'package:dwds/src/services/chrome/chrome_debug_exception.dart'; import 'package:dwds/src/services/chrome/chrome_debug_service.dart'; import 'package:dwds/src/services/chrome/chrome_proxy_service.dart'; @@ -441,11 +440,17 @@ final class ChromeDwdsVmClient (event) => event.kind == EventKind.kIsolateStart, ); try { + final isDdcLibraryBundle = + globalToolConfiguration.loadStrategy.id == 'ddc-library-bundle'; // If we should pause isolates on start, then only run main once we get a // resume event. final pauseIsolatesOnStart = chromeProxyService.pauseIsolatesOnStart; if (pauseIsolatesOnStart) { - _waitForResumeEventToRunMain(chromeProxyService); + if (isDdcLibraryBundle) { + _waitForResumeEventToEndHotRestart(chromeProxyService); + } else { + _waitForResumeEventToRunMain(chromeProxyService); + } } // Generate run id to hot restart all apps loaded into the tab. final runId = const Uuid().v4(); @@ -458,18 +463,18 @@ final class ChromeDwdsVmClient // TODO(srujzs): We don't do this for the AMD module format, should we? It // would require adding an extra parameter in the AMD strategy. As we're // planning to deprecate it, for now, do nothing. - final isDdcLibraryBundle = - globalToolConfiguration.loadStrategy is DdcLibraryBundleStrategy; - final computedReloadedSrcs = Completer(); - final reloadedSrcs = {}; - late StreamSubscription parsedScriptsSubscription; + if (isDdcLibraryBundle) { + final computedReloadedSrcs = Completer(); + final reloadedSrcs = {}; // Injected client should send a request to recreate the isolate after // the hot restart. The creation of the isolate should in turn wait // until all scripts are parsed. chromeProxyService.allowedToCreateIsolate = Completer(); final debugger = await chromeProxyService.debuggerFuture; - parsedScriptsSubscription = debugger.parsedScriptsController.stream + final parsedScriptsSubscription = debugger + .parsedScriptsController + .stream .listen((url) { computedReloadedSrcs.future.then((_) async { reloadedSrcs.remove(Uri.parse(url).normalizePath().path); @@ -479,14 +484,13 @@ final class ChromeDwdsVmClient } }); }); - } - logger.info('Issuing \$dartHotRestartDwds request'); - final remoteObject = await chromeProxyService.inspector.jsEvaluate( - '\$dartHotRestartDwds(\'$runId\', $pauseIsolatesOnStart);', - awaitPromise: true, - returnByValue: true, - ); - if (isDdcLibraryBundle) { + logger.info('Issuing \$dartHotRestartBeginDwds request'); + final remoteObject = await chromeProxyService.inspector.jsEvaluate( + '\$dartHotRestartBeginDwds(\'$runId\', $pauseIsolatesOnStart);', + awaitPromise: true, + returnByValue: true, + ); + logger.info('\$dartHotRestartBeginDwds request complete.'); final reloadedSrcModuleLibraries = (remoteObject.value as List) .cast(); for (final srcModuleLibrary in reloadedSrcModuleLibraries) { @@ -504,9 +508,23 @@ final class ChromeDwdsVmClient await chromeProxyService.allowedToCreateIsolate.future; await parsedScriptsSubscription.cancel(); } else { + logger.info('Issuing \$dartHotRestartDwds request.'); + final remoteObject = await chromeProxyService.inspector.jsEvaluate( + '\$dartHotRestartDwds(\'$runId\', $pauseIsolatesOnStart);', + awaitPromise: true, + returnByValue: true, + ); assert(remoteObject.value == null); + logger.info('\$dartHotRestartDwds request complete.'); + } + logger.info('Waiting for Isolate Start event.'); + await waitForIsolateStarted; + chromeProxyService.terminatingIsolates = false; + if (isDdcLibraryBundle && !pauseIsolatesOnStart) { + // When there will be no resume event coming, we can just complete the + // hot restart immediately. + await _requestHotRestartEnd(chromeProxyService); } - logger.info('\$dartHotRestartDwds request complete.'); } on WipError catch (exception) { final code = exception.error?['code']; final message = exception.error?['message']; @@ -526,10 +544,6 @@ final class ChromeDwdsVmClient }, }; } - logger.info('Waiting for Isolate Start event.'); - await waitForIsolateStarted; - chromeProxyService.terminatingIsolates = false; - logger.info('Successful hot restart'); return {'result': Success().toJson()}; } @@ -545,6 +559,28 @@ final class ChromeDwdsVmClient }); } + /// Waits for the isolate to start after a hot restart and then issues the + /// request to finish the hot restart operation. + void _waitForResumeEventToEndHotRestart( + ChromeProxyService chromeProxyService, + ) { + StreamSubscription? resumeEventsSubscription; + resumeEventsSubscription = chromeProxyService.resumeAfterRestartEventsStream + .listen((_) async { + logger.info('Received resume event.'); + await resumeEventsSubscription!.cancel(); + await _requestHotRestartEnd(chromeProxyService); + }); + } + + Future _requestHotRestartEnd( + ChromeProxyService chromeProxyService, + ) async { + logger.info('Issuing \$dartHotRestartEndDwds request.'); + await chromeProxyService.inspector.jsEvaluate('\$dartHotRestartEndDwds();'); + logger.info('\$dartHotRestartEndDwds request complete.'); + } + Future> _fullReload( ChromeProxyService chromeProxyService, ) async { diff --git a/dwds/lib/src/handlers/injected_client_js.dart b/dwds/lib/src/handlers/injected_client_js.dart index 9ce54820e..6857c06a9 100644 --- a/dwds/lib/src/handlers/injected_client_js.dart +++ b/dwds/lib/src/handlers/injected_client_js.dart @@ -2,7 +2,7 @@ // Emits the transpiled client.js directly into a statically embeddable string. // dart format off -const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-values), the Dart to JavaScript compiler version: 3.13.0-89.0.dev.\n" +const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-values), the Dart to JavaScript compiler version: 3.13.0-107.0.dev.\n" "// The code supports the following hooks:\n" "// dartPrint(message):\n" "// if this function is defined it is called instead of the Dart [print]\n" @@ -8692,7 +8692,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " handleWebSocketHotRestartRequest\$body(\$event, manager, clientSink) {\n" " var \$async\$goto = 0,\n" " \$async\$completer = A._makeAsyncAwaitCompleter(type\$.void),\n" -" \$async\$handler = 1, \$async\$errorStack = [], runId, e, exception, requestId, \$async\$exception;\n" +" \$async\$handler = 1, \$async\$errorStack = [], runId, e, t1, t2, exception, requestId, \$async\$exception;\n" " var \$async\$handleWebSocketHotRestartRequest = A._wrapJsFunctionForAsync(function(\$async\$errorCode, \$async\$result) {\n" " if (\$async\$errorCode === 1) {\n" " \$async\$errorStack.push(\$async\$result);\n" @@ -8705,10 +8705,29 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " requestId = \$event.id;\n" " \$async\$handler = 3;\n" " runId = B.C_Uuid.v4\$0();\n" -" \$async\$goto = 6;\n" -" return A._asyncAwait(manager.hotRestart\$2\$reloadedSourcesPath\$runId(A._asStringQ(init.G.\$reloadedSourcesPath), runId), \$async\$handleWebSocketHotRestartRequest);\n" +" t1 = init.G;\n" +" \$async\$goto = manager._restarter instanceof A.DdcLibraryBundleRestarter ? 6 : 8;\n" +" break;\n" " case 6:\n" +" // then\n" +" t2 = A._asStringQ(t1.\$reloadedSourcesPath);\n" +" t2.toString;\n" +" \$async\$goto = 9;\n" +" return A._asyncAwait(manager.hotRestartBegin\$1(t2), \$async\$handleWebSocketHotRestartRequest);\n" +" case 9:\n" +" // returning from await.\n" +" A._asJSObject(t1.dartDevEmbedder).hotRestartEnd();\n" +" // goto join\n" +" \$async\$goto = 7;\n" +" break;\n" +" case 8:\n" +" // else\n" +" \$async\$goto = 10;\n" +" return A._asyncAwait(manager.hotRestart\$2\$reloadedSourcesPath\$runId(A._asStringQ(t1.\$reloadedSourcesPath), runId), \$async\$handleWebSocketHotRestartRequest);\n" +" case 10:\n" " // returning from await.\n" +" case 7:\n" +" // join\n" " A._sendHotRestartResponse(clientSink, requestId, null, true);\n" " \$async\$handler = 1;\n" " // goto after finally\n" @@ -8821,37 +8840,40 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " main__closure0: function main__closure0(t0) {\n" " this.manager = t0;\n" " },\n" -" main__closure1: function main__closure1(t0, t1) {\n" +" main__closure1: function main__closure1(t0) {\n" +" this.manager = t0;\n" +" },\n" +" main__closure2: function main__closure2(t0, t1) {\n" " this._box_0 = t0;\n" " this.manager = t1;\n" " },\n" -" main__closure2: function main__closure2(t0) {\n" +" main__closure3: function main__closure3(t0) {\n" " this.client = t0;\n" " },\n" -" main__closure3: function main__closure3(t0) {\n" +" main__closure4: function main__closure4(t0) {\n" " this._box_0 = t0;\n" " },\n" -" main__closure4: function main__closure4(t0) {\n" +" main__closure5: function main__closure5(t0) {\n" " this.client = t0;\n" " },\n" -" main__closure5: function main__closure5(t0) {\n" +" main__closure6: function main__closure6(t0) {\n" " this.debugEventController = t0;\n" " },\n" -" main__closure6: function main__closure6(t0) {\n" +" main__closure7: function main__closure7(t0) {\n" " this.client = t0;\n" " },\n" -" main__closure7: function main__closure7(t0) {\n" +" main__closure8: function main__closure8(t0) {\n" " this.client = t0;\n" " },\n" -" main__closure8: function main__closure8(t0, t1, t2) {\n" +" main__closure9: function main__closure9(t0, t1, t2) {\n" " this._box_0 = t0;\n" " this.manager = t1;\n" " this.client = t2;\n" " },\n" -" main__closure9: function main__closure9() {\n" -" },\n" " main__closure10: function main__closure10() {\n" " },\n" +" main__closure11: function main__closure11() {\n" +" },\n" " main_closure0: function main_closure0() {\n" " },\n" " _handleAuthRequest_closure: function _handleAuthRequest_closure() {\n" @@ -10265,7 +10287,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$0() {\n" " return A.Future_Future\$value(null, type\$.void);\n" " },\n" -" \$signature: 5\n" +" \$signature: 6\n" " };\n" " A.SentinelValue.prototype = {};\n" " A.EfficientLengthIterable.prototype = {};\n" @@ -18124,7 +18146,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " type\$.StackTrace._as(stackTrace);\n" " return \$.\$get\$_logger().log\$4(B.Level_WARNING_900, \"Error in unawaited Future:\", error, stackTrace);\n" " },\n" -" \$signature: 6\n" +" \$signature: 7\n" " };\n" " A.Uuid.prototype = {\n" " v4\$0() {\n" @@ -18423,7 +18445,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " });\n" " return A._asyncStartSync(\$async\$call\$0, \$async\$completer);\n" " },\n" -" \$signature: 5\n" +" \$signature: 6\n" " };\n" " A.ByteStream.prototype = {\n" " toBytes\$0() {\n" @@ -20780,10 +20802,12 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " manager = new A.ReloadingManager(client, t2);\n" " t1.\$dartHotReloadStartDwds = A._functionToJS0(new A.main__closure(manager));\n" " t1.\$dartHotReloadEndDwds = A._functionToJS0(new A.main__closure0(manager));\n" +" t1.\$dartHotRestartBeginDwds = A._functionToJS0(new A.main__closure1(manager));\n" +" t1.\$dartHotRestartEndDwds = A._functionToJS0(manager.get\$hotRestartEnd());\n" " _box_0.readyToRunMainCompleter = null;\n" -" t1.\$dartHotRestartDwds = A._functionToJS2(new A.main__closure1(_box_0, manager));\n" -" t1.\$dartRequestHotRestartDwds = A._functionToJS1(new A.main__closure2(client));\n" -" t1.\$dartReadyToRunMain = A._functionToJS0(new A.main__closure3(_box_0));\n" +" t1.\$dartHotRestartDwds = A._functionToJS2(new A.main__closure2(_box_0, manager));\n" +" t1.\$dartRequestHotRestartDwds = A._functionToJS1(new A.main__closure3(client));\n" +" t1.\$dartReadyToRunMain = A._functionToJS0(new A.main__closure4(_box_0));\n" " t2 = \$.Zone__current;\n" " t3 = Math.max(100, 1);\n" " t4 = A.StreamController_StreamController(type\$.DebugEvent);\n" @@ -20794,14 +20818,14 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t6 = type\$.StreamQueue_DebugEvent;\n" " debugEventController.__BatchedStreamController__inputQueue_A = t6._as(new A.StreamQueue(new A._ControllerStream(t4, A._instanceType(t4)._eval\$1(\"_ControllerStream<1>\")), new A.QueueList(t2, 0, 0, type\$.QueueList_Result_DebugEvent), t3, t6));\n" " A.safeUnawaited(debugEventController._batchAndSendEvents\$0());\n" -" new A._ControllerStream(t5, A._instanceType(t5)._eval\$1(\"_ControllerStream<1>\")).listen\$1(new A.main__closure4(client));\n" -" t1.\$emitDebugEvent = A._functionToJS2(new A.main__closure5(debugEventController));\n" -" t1.\$emitRegisterEvent = A._functionToJS1(new A.main__closure6(client));\n" -" t1.\$launchDevTools = A._functionToJS0(new A.main__closure7(client));\n" +" new A._ControllerStream(t5, A._instanceType(t5)._eval\$1(\"_ControllerStream<1>\")).listen\$1(new A.main__closure5(client));\n" +" t1.\$emitDebugEvent = A._functionToJS2(new A.main__closure6(debugEventController));\n" +" t1.\$emitRegisterEvent = A._functionToJS1(new A.main__closure7(client));\n" +" t1.\$launchDevTools = A._functionToJS0(new A.main__closure8(client));\n" " _box_0.mainRun = false;\n" -" client.get\$stream().listen\$2\$onError(new A.main__closure8(_box_0, manager, client), new A.main__closure9());\n" +" client.get\$stream().listen\$2\$onError(new A.main__closure9(_box_0, manager, client), new A.main__closure10());\n" " if (A._asBool(t1.\$dwdsEnableDevToolsLaunch))\n" -" A._EventStreamSubscription\$(A._asJSObject(t1.window), \"keydown\", type\$.nullable_void_Function_JSObject._as(new A.main__closure10()), false, type\$.JSObject);\n" +" A._EventStreamSubscription\$(A._asJSObject(t1.window), \"keydown\", type\$.nullable_void_Function_JSObject._as(new A.main__closure11()), false, type\$.JSObject);\n" " A.initializeConnection(client.get\$sink());\n" " // implicit return\n" " return A._asyncReturn(null, \$async\$completer);\n" @@ -20809,7 +20833,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " });\n" " return A._asyncStartSync(\$async\$call\$0, \$async\$completer);\n" " },\n" -" \$signature: 5\n" +" \$signature: 6\n" " };\n" " A.main__closure.prototype = {\n" " call\$0() {\n" @@ -20817,15 +20841,23 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " path.toString;\n" " return A.FutureOfJSAnyToJSPromise_get_toJS(this.manager._restarter.hotReloadStart\$1(path), type\$.JSArray_nullable_Object);\n" " },\n" -" \$signature: 7\n" +" \$signature: 5\n" " };\n" " A.main__closure0.prototype = {\n" " call\$0() {\n" " return A.FutureOfVoidToJSPromise_get_toJS(this.manager.hotReloadEnd\$0());\n" " },\n" -" \$signature: 7\n" +" \$signature: 5\n" " };\n" " A.main__closure1.prototype = {\n" +" call\$0() {\n" +" var path = A._asStringQ(init.G.\$reloadedSourcesPath);\n" +" path.toString;\n" +" return A.FutureOfJSAnyToJSPromise_get_toJS(this.manager.hotRestartBegin\$1(path), type\$.JSArray_nullable_Object);\n" +" },\n" +" \$signature: 5\n" +" };\n" +" A.main__closure2.prototype = {\n" " call\$2(runId, pauseIsolatesOnStart) {\n" " var t1, t2, t3, t4;\n" " A._asString(runId);\n" @@ -20845,7 +20877,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " \$signature: 60\n" " };\n" -" A.main__closure2.prototype = {\n" +" A.main__closure3.prototype = {\n" " call\$1(runId) {\n" " var t1;\n" " A._asString(runId);\n" @@ -20854,7 +20886,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " \$signature: 17\n" " };\n" -" A.main__closure3.prototype = {\n" +" A.main__closure4.prototype = {\n" " call\$0() {\n" " var t1 = this._box_0,\n" " t2 = t1.readyToRunMainCompleter;\n" @@ -20867,7 +20899,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " \$signature: 1\n" " };\n" -" A.main__closure4.prototype = {\n" +" A.main__closure5.prototype = {\n" " call\$1(events) {\n" " type\$.List_DebugEvent._as(events);\n" " if (A._asBool(init.G.\$dartEmitDebugEvents))\n" @@ -20875,7 +20907,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " \$signature: 62\n" " };\n" -" A.main__closure5.prototype = {\n" +" A.main__closure6.prototype = {\n" " call\$2(kind, eventData) {\n" " var t1;\n" " A._asString(kind);\n" @@ -20887,14 +20919,14 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " \$signature: 63\n" " };\n" -" A.main__closure6.prototype = {\n" +" A.main__closure7.prototype = {\n" " call\$1(eventData) {\n" " A._asString(eventData);\n" " A._trySendEvent(this.client.get\$sink(), B.C_JsonCodec.encode\$2\$toEncodable(A._setArrayType([\"RegisterEvent\", new A.RegisterEvent(eventData, Date.now()).toJson\$0()], type\$.JSArray_Object), null), type\$.dynamic);\n" " },\n" " \$signature: 17\n" " };\n" -" A.main__closure7.prototype = {\n" +" A.main__closure8.prototype = {\n" " call\$0() {\n" " var t1, t2, t3;\n" " if (!A._isChromium()) {\n" @@ -20910,7 +20942,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " \$signature: 1\n" " };\n" -" A.main__closure8.prototype = {\n" +" A.main__closure9.prototype = {\n" " call\$1(serialized) {\n" " return this.\$call\$body\$main__closure(A._asString(serialized));\n" " },\n" @@ -21078,12 +21110,12 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " \$signature: 22\n" " };\n" -" A.main__closure9.prototype = {\n" +" A.main__closure10.prototype = {\n" " call\$1(error) {\n" " },\n" " \$signature: 8\n" " };\n" -" A.main__closure10.prototype = {\n" +" A.main__closure11.prototype = {\n" " call\$1(e) {\n" " var t1 = A.JSAnyUtilityExtension_instanceOfString(e, \"KeyboardEvent\");\n" " if (t1)\n" @@ -21100,7 +21132,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " type\$.StackTrace._as(stackTrace);\n" " A.print(\"Unhandled error detected in the injected client.js script.\\n\\nYou can disable this script in webdev by passing --no-injected-client if it\\nis preventing your app from loading, but note that this will also prevent\\nall debugging and hot reload/restart functionality from working.\\n\\nThe original error is below, please file an issue at\\nhttps://github.com/dart-lang/webdev/issues/new and attach this output:\\n\\n\" + A.S(error) + \"\\n\" + stackTrace.toString\$0(0) + \"\\n\");\n" " },\n" -" \$signature: 6\n" +" \$signature: 7\n" " };\n" " A._handleAuthRequest_closure.prototype = {\n" " call\$1(isAuthenticated) {\n" @@ -21207,7 +21239,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " // returning from await.\n" " srcModuleLibraries = \$async\$result;\n" " \$async\$goto = 5;\n" -" return A._asyncAwait(A.promiseToFuture(A._asJSObject(A._asJSObject(t1.dartDevEmbedder).hotRestart()), type\$.nullable_Object), \$async\$restart\$3\$readyToRunMain\$reloadedSourcesPath\$runId);\n" +" return A._asyncAwait(A.promiseToFuture(A._asJSObject(A._asJSObject(t1.dartDevEmbedder).hotRestart()), type\$.nullable_JSArray_nullable_Object), \$async\$restart\$3\$readyToRunMain\$reloadedSourcesPath\$runId);\n" " case 5:\n" " // returning from await.\n" " \$async\$returnValue = new A._Record_2(true, type\$.JSArray_nullable_Object._as(A.jsify(srcModuleLibraries)));\n" @@ -21221,6 +21253,45 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " });\n" " return A._asyncStartSync(\$async\$restart\$3\$readyToRunMain\$reloadedSourcesPath\$runId, \$async\$completer);\n" " },\n" +" hotRestartBegin\$1(reloadedSourcesPath) {\n" +" var \$async\$goto = 0,\n" +" \$async\$completer = A._makeAsyncAwaitCompleter(type\$.JSArray_nullable_Object),\n" +" \$async\$returnValue, \$async\$self = this, t2, jsFilesToRequest, t1, \$async\$temp1, \$async\$temp2;\n" +" var \$async\$hotRestartBegin\$1 = A._wrapJsFunctionForAsync(function(\$async\$errorCode, \$async\$result) {\n" +" if (\$async\$errorCode === 1)\n" +" return A._asyncRethrow(\$async\$result, \$async\$completer);\n" +" for (;;)\n" +" switch (\$async\$goto) {\n" +" case 0:\n" +" // Function start\n" +" t1 = init.G;\n" +" \$async\$goto = 3;\n" +" return A._asyncAwait(A._Debugger_maybeInvokeFlutterDisassemble(A._asJSObject(A._asJSObject(t1.dartDevEmbedder).debugger)), \$async\$hotRestartBegin\$1);\n" +" case 3:\n" +" // returning from await.\n" +" t2 = type\$.JSArray_nullable_Object;\n" +" \$async\$temp1 = t2;\n" +" \$async\$temp2 = A;\n" +" \$async\$goto = 4;\n" +" return A._asyncAwait(\$async\$self._getSrcModuleLibraries\$1(reloadedSourcesPath), \$async\$hotRestartBegin\$1);\n" +" case 4:\n" +" // returning from await.\n" +" jsFilesToRequest = \$async\$temp1._as(\$async\$temp2.jsify(\$async\$result));\n" +" \$async\$goto = 5;\n" +" return A._asyncAwait(A.promiseToFuture(A._asJSObject(A._asJSObject(t1.dartDevEmbedder).hotRestartBegin(jsFilesToRequest)), t2), \$async\$hotRestartBegin\$1);\n" +" case 5:\n" +" // returning from await.\n" +" \$async\$returnValue = \$async\$result;\n" +" // goto return\n" +" \$async\$goto = 1;\n" +" break;\n" +" case 1:\n" +" // return\n" +" return A._asyncReturn(\$async\$returnValue, \$async\$completer);\n" +" }\n" +" });\n" +" return A._asyncStartSync(\$async\$hotRestartBegin\$1, \$async\$completer);\n" +" },\n" " hotReloadStart\$1(reloadedSourcesPath) {\n" " var \$async\$goto = 0,\n" " \$async\$completer = A._makeAsyncAwaitCompleter(type\$.JSArray_nullable_Object),\n" @@ -21358,6 +21429,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " });\n" " return A._asyncStartSync(\$async\$handleServiceExtension\$2, \$async\$completer);\n" " },\n" +" \$isTwoPhaseRestarter: 1,\n" " \$isRestarter: 1\n" " };\n" " A.DdcLibraryBundleRestarter__getSrcModuleLibraries_closure.prototype = {\n" @@ -21451,7 +21523,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " hotRestart\$3\$readyToRunMain\$reloadedSourcesPath\$runId(readyToRunMain, reloadedSourcesPath, runId) {\n" " var \$async\$goto = 0,\n" " \$async\$completer = A._makeAsyncAwaitCompleter(type\$.nullable_JSArray_nullable_Object),\n" -" \$async\$returnValue, \$async\$self = this, result, t1;\n" +" \$async\$returnValue, \$async\$self = this, result;\n" " var \$async\$hotRestart\$3\$readyToRunMain\$reloadedSourcesPath\$runId = A._wrapJsFunctionForAsync(function(\$async\$errorCode, \$async\$result) {\n" " if (\$async\$errorCode === 1)\n" " return A._asyncRethrow(\$async\$result, \$async\$completer);\n" @@ -21459,8 +21531,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " switch (\$async\$goto) {\n" " case 0:\n" " // Function start\n" -" t1 = \$async\$self._client.get\$sink();\n" -" t1._async\$_target.add\$1(0, t1.\$ti._precomputed1._as(B.C_JsonCodec.encode\$2\$toEncodable(A._setArrayType([\"IsolateExit\", A.LinkedHashMap_LinkedHashMap\$_empty(type\$.String, type\$.dynamic)], type\$.JSArray_Object), null)));\n" +" \$async\$self._beforeRestart\$0();\n" " \$async\$goto = 3;\n" " return A._asyncAwait(\$async\$self._restarter.restart\$3\$readyToRunMain\$reloadedSourcesPath\$runId(readyToRunMain, reloadedSourcesPath, runId), \$async\$hotRestart\$3\$readyToRunMain\$reloadedSourcesPath\$runId);\n" " case 3:\n" @@ -21484,6 +21555,39 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " hotRestart\$2\$reloadedSourcesPath\$runId(reloadedSourcesPath, runId) {\n" " return this.hotRestart\$3\$readyToRunMain\$reloadedSourcesPath\$runId(null, reloadedSourcesPath, runId);\n" " },\n" +" hotRestartBegin\$1(reloadedSourcesPath) {\n" +" var \$async\$goto = 0,\n" +" \$async\$completer = A._makeAsyncAwaitCompleter(type\$.JSArray_nullable_Object),\n" +" \$async\$returnValue, \$async\$self = this, requestedSources;\n" +" var \$async\$hotRestartBegin\$1 = A._wrapJsFunctionForAsync(function(\$async\$errorCode, \$async\$result) {\n" +" if (\$async\$errorCode === 1)\n" +" return A._asyncRethrow(\$async\$result, \$async\$completer);\n" +" for (;;)\n" +" switch (\$async\$goto) {\n" +" case 0:\n" +" // Function start\n" +" \$async\$goto = 3;\n" +" return A._asyncAwait(type\$.TwoPhaseRestarter._as(\$async\$self._restarter).hotRestartBegin\$1(reloadedSourcesPath), \$async\$hotRestartBegin\$1);\n" +" case 3:\n" +" // returning from await.\n" +" requestedSources = \$async\$result;\n" +" \$async\$self._beforeRestart\$0();\n" +" \$async\$self._afterRestart\$1(true);\n" +" \$async\$returnValue = requestedSources;\n" +" // goto return\n" +" \$async\$goto = 1;\n" +" break;\n" +" case 1:\n" +" // return\n" +" return A._asyncReturn(\$async\$returnValue, \$async\$completer);\n" +" }\n" +" });\n" +" return A._asyncStartSync(\$async\$hotRestartBegin\$1, \$async\$completer);\n" +" },\n" +" hotRestartEnd\$0() {\n" +" type\$.TwoPhaseRestarter._as(this._restarter);\n" +" A._asJSObject(init.G.dartDevEmbedder).hotRestartEnd();\n" +" },\n" " hotReloadEnd\$0() {\n" " var \$async\$goto = 0,\n" " \$async\$completer = A._makeAsyncAwaitCompleter(type\$.void),\n" @@ -21551,6 +21655,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return;\n" " t1 = this._client.get\$sink();\n" " t1._async\$_target.add\$1(0, t1.\$ti._precomputed1._as(B.C_JsonCodec.encode\$2\$toEncodable(A._setArrayType([\"IsolateStart\", A.LinkedHashMap_LinkedHashMap\$_empty(type\$.String, type\$.dynamic)], type\$.JSArray_Object), null)));\n" +" },\n" +" _beforeRestart\$0() {\n" +" var t1 = this._client.get\$sink();\n" +" t1._async\$_target.add\$1(0, t1.\$ti._precomputed1._as(B.C_JsonCodec.encode\$2\$toEncodable(A._setArrayType([\"IsolateExit\", A.LinkedHashMap_LinkedHashMap\$_empty(type\$.String, type\$.dynamic)], type\$.JSArray_Object), null)));\n" " }\n" " };\n" " A.HotReloadFailedException.prototype = {\n" @@ -21964,7 +22072,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$0() {\n" " return A._asJSObject(A._asJSObject(init.G.document).createElement(\"script\"));\n" " },\n" -" \$signature: 7\n" +" \$signature: 5\n" " };\n" " A._createScript__closure0.prototype = {\n" " call\$0() {\n" @@ -21972,7 +22080,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " scriptElement.setAttribute(\"nonce\", this.nonce);\n" " return scriptElement;\n" " },\n" -" \$signature: 7\n" +" \$signature: 5\n" " };\n" " A.runMain_closure.prototype = {\n" " call\$0() {\n" @@ -22023,7 +22131,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _static_1(A, \"async__AsyncRun__scheduleImmediateWithTimer\$closure\", \"_AsyncRun__scheduleImmediateWithTimer\", 14);\n" " _static_0(A, \"async___startMicrotaskLoop\$closure\", \"_startMicrotaskLoop\", 0);\n" " _static_1(A, \"async___nullDataHandler\$closure\", \"_nullDataHandler\", 4);\n" -" _static_2(A, \"async___nullErrorHandler\$closure\", \"_nullErrorHandler\", 6);\n" +" _static_2(A, \"async___nullErrorHandler\$closure\", \"_nullErrorHandler\", 7);\n" " _static_0(A, \"async___nullDoneHandler\$closure\", \"_nullDoneHandler\", 0);\n" " _static(A, \"async___rootHandleUncaughtError\$closure\", 5, null, [\"call\$5\"], [\"_rootHandleUncaughtError\"], 75, 0);\n" " _static(A, \"async___rootRun\$closure\", 4, null, [\"call\$1\$4\", \"call\$4\"], [\"_rootRun\", function(\$self, \$parent, zone, f) {\n" @@ -22053,7 +22161,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _static_1(A, \"async___printToZone\$closure\", \"_printToZone0\", 87);\n" " _static(A, \"async___rootFork\$closure\", 5, null, [\"call\$5\"], [\"_rootFork\"], 88, 0);\n" " _instance(A._Completer.prototype, \"get\$completeError\", 0, 1, null, [\"call\$2\", \"call\$1\"], [\"completeError\$2\", \"completeError\$1\"], 53, 0, 0);\n" -" _instance_2_u(A._Future.prototype, \"get\$_completeError\", \"_completeError\$2\", 6);\n" +" _instance_2_u(A._Future.prototype, \"get\$_completeError\", \"_completeError\$2\", 7);\n" " var _;\n" " _instance_0_u(_ = A._ControllerSubscription.prototype, \"get\$_onPause\", \"_onPause\$0\", 0);\n" " _instance_0_u(_, \"get\$_onResume\", \"_onResume\$0\", 0);\n" @@ -22078,7 +22186,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return A.max(a, b, type\$.num);\n" " }], 91, 0);\n" " _instance_1_u(_ = A.PersistentWebSocket.prototype, \"get\$_writeToWebSocket\", \"_writeToWebSocket\$1\", 4);\n" -" _instance_0_u(_, \"get\$_listenWithRetry\", \"_listenWithRetry\$0\", 5);\n" +" _instance_0_u(_, \"get\$_listenWithRetry\", \"_listenWithRetry\$0\", 6);\n" " _static_1(A, \"case_insensitive_map_CaseInsensitiveMap__canonicalizer\$closure\", \"CaseInsensitiveMap__canonicalizer\", 9);\n" " _instance_1_u(_ = A.SseClient.prototype, \"get\$_onIncomingControlMessage\", \"_onIncomingControlMessage\$1\", 2);\n" " _instance_1_u(_, \"get\$_onIncomingMessage\", \"_onIncomingMessage\$1\", 2);\n" @@ -22086,6 +22194,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _instance_1_u(_, \"get\$_onOutgoingMessage\", \"_onOutgoingMessage\$1\", 56);\n" " _static_1(A, \"client__initializeConnection\$closure\", \"initializeConnection\", 61);\n" " _static_1(A, \"client___handleAuthRequest\$closure\", \"_handleAuthRequest\", 2);\n" +" _instance_0_u(A.ReloadingManager.prototype, \"get\$hotRestartEnd\", \"hotRestartEnd\$0\", 0);\n" " _instance_1_u(_ = A.RequireRestarter.prototype, \"get\$_moduleParents\", \"_moduleParents\$1\", 69);\n" " _instance_2_u(_, \"get\$_moduleTopologicalCompare\", \"_moduleTopologicalCompare\$2\", 70);\n" " })();\n" @@ -22106,14 +22215,14 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _inheritMany(A._CastIterableBase, [A.CastIterable, A.__CastListBase__CastIterableBase_ListMixin]);\n" " _inherit(A._EfficientLengthCastIterable, A.CastIterable);\n" " _inherit(A._CastListBase, A.__CastListBase__CastIterableBase_ListMixin);\n" -" _inheritMany(A.Closure, [A.Closure2Args, A.Closure0Args, A.Instantiation, A.TearOffClosure, A.initHooks_closure, A.initHooks_closure1, A._AsyncRun__initializeScheduleImmediate_internalCallback, A._AsyncRun__initializeScheduleImmediate_closure, A._awaitOnObject_closure, A._Future__propagateToListeners_handleWhenCompleteCallback_closure, A._Future_timeout_closure0, A.Stream_length_closure, A.Stream_first_closure0, A._CustomZone_bindUnaryCallback_closure, A._CustomZone_bindUnaryCallbackGuarded_closure, A._RootZone_bindUnaryCallback_closure, A._RootZone_bindUnaryCallbackGuarded_closure, A.runZonedGuarded_closure, A._LinkedCustomHashMap_closure, A._Uri__makePath_closure, A.FutureOfJSAnyToJSPromise_get_toJS__closure, A.FutureOfVoidToJSPromise_get_toJS__closure, A.jsify__convert, A.promiseToFuture_closure, A.promiseToFuture_closure0, A.dartify_convert, A.StreamQueue__ensureListening_closure, A.CanonicalizedMap_keys_closure, A.BuildStatus_BuildStatus\$fromJson_closure, A.BatchedDebugEvents_toJson_closure, A.WebSocketClient_stream_closure, A.PersistentWebSocket_connect_closure, A.PersistentWebSocket__listenWithRetry_attemptRetry, A.PersistentWebSocket__listenWithRetry_closure, A.BaseRequest_closure0, A.BrowserClient_send_closure, A._bodyToStream_closure, A.ByteStream_toBytes_closure, A.MediaType_toString__closure, A.expectQuotedString_closure, A.Context_joinAll_closure, A.Context_split_closure, A._validateArgList_closure, A.Pool__runOnRelease_closure, A.Highlighter\$__closure, A.Highlighter\$___closure, A.Highlighter\$__closure0, A.Highlighter__collateLines_closure, A.Highlighter__collateLines_closure1, A.Highlighter__collateLines__closure, A.Highlighter_highlight_closure, A.SseClient_closure0, A.SseClient_closure1, A._EventStreamSubscription_closure, A._EventStreamSubscription_onData_closure, A.BrowserWebSocket_connect_closure, A.BrowserWebSocket_connect_closure0, A.BrowserWebSocket_connect_closure1, A.BrowserWebSocket_connect_closure2, A.main__closure1, A.main__closure2, A.main__closure4, A.main__closure6, A.main__closure8, A.main__closure9, A.main__closure10, A._handleAuthRequest_closure, A._sendHotReloadResponse_closure, A._sendHotRestartResponse_closure, A.DdcLibraryBundleRestarter_restart_closure, A.DdcLibraryBundleRestarter_hotReloadStart_closure, A.DdcRestarter_restart_closure0, A.DdcRestarter_restart_closure, A.RequireRestarter__reloadModule_closure0, A.JSArrayExtension_toDartIterable_closure]);\n" -" _inheritMany(A.Closure2Args, [A._CastListBase_sort_closure, A.CastMap_forEach_closure, A.initHooks_closure0, A._awaitOnObject_closure0, A._wrapJsFunctionForAsync_closure, A._Future__propagateToListeners_handleWhenCompleteCallback_closure0, A._Future_timeout_closure1, A._BufferingStreamSubscription_asFuture_closure0, A.MapBase_mapToString_closure, A._JsonStringifier_writeMap_closure, A.Uri_parseIPv6Address_error, A.FutureOfJSAnyToJSPromise_get_toJS_closure, A.FutureOfJSAnyToJSPromise_get_toJS__closure0, A.FutureOfVoidToJSPromise_get_toJS_closure, A.FutureOfVoidToJSPromise_get_toJS__closure0, A.StreamQueue__ensureListening_closure1, A.CanonicalizedMap_addAll_closure, A.CanonicalizedMap_forEach_closure, A.safeUnawaited_closure, A.BaseRequest_closure, A.MediaType_toString_closure, A.Pool__runOnRelease_closure0, A.Highlighter__collateLines_closure0, A.main__closure5, A.main_closure0]);\n" +" _inheritMany(A.Closure, [A.Closure2Args, A.Closure0Args, A.Instantiation, A.TearOffClosure, A.initHooks_closure, A.initHooks_closure1, A._AsyncRun__initializeScheduleImmediate_internalCallback, A._AsyncRun__initializeScheduleImmediate_closure, A._awaitOnObject_closure, A._Future__propagateToListeners_handleWhenCompleteCallback_closure, A._Future_timeout_closure0, A.Stream_length_closure, A.Stream_first_closure0, A._CustomZone_bindUnaryCallback_closure, A._CustomZone_bindUnaryCallbackGuarded_closure, A._RootZone_bindUnaryCallback_closure, A._RootZone_bindUnaryCallbackGuarded_closure, A.runZonedGuarded_closure, A._LinkedCustomHashMap_closure, A._Uri__makePath_closure, A.FutureOfJSAnyToJSPromise_get_toJS__closure, A.FutureOfVoidToJSPromise_get_toJS__closure, A.jsify__convert, A.promiseToFuture_closure, A.promiseToFuture_closure0, A.dartify_convert, A.StreamQueue__ensureListening_closure, A.CanonicalizedMap_keys_closure, A.BuildStatus_BuildStatus\$fromJson_closure, A.BatchedDebugEvents_toJson_closure, A.WebSocketClient_stream_closure, A.PersistentWebSocket_connect_closure, A.PersistentWebSocket__listenWithRetry_attemptRetry, A.PersistentWebSocket__listenWithRetry_closure, A.BaseRequest_closure0, A.BrowserClient_send_closure, A._bodyToStream_closure, A.ByteStream_toBytes_closure, A.MediaType_toString__closure, A.expectQuotedString_closure, A.Context_joinAll_closure, A.Context_split_closure, A._validateArgList_closure, A.Pool__runOnRelease_closure, A.Highlighter\$__closure, A.Highlighter\$___closure, A.Highlighter\$__closure0, A.Highlighter__collateLines_closure, A.Highlighter__collateLines_closure1, A.Highlighter__collateLines__closure, A.Highlighter_highlight_closure, A.SseClient_closure0, A.SseClient_closure1, A._EventStreamSubscription_closure, A._EventStreamSubscription_onData_closure, A.BrowserWebSocket_connect_closure, A.BrowserWebSocket_connect_closure0, A.BrowserWebSocket_connect_closure1, A.BrowserWebSocket_connect_closure2, A.main__closure2, A.main__closure3, A.main__closure5, A.main__closure7, A.main__closure9, A.main__closure10, A.main__closure11, A._handleAuthRequest_closure, A._sendHotReloadResponse_closure, A._sendHotRestartResponse_closure, A.DdcLibraryBundleRestarter_restart_closure, A.DdcLibraryBundleRestarter_hotReloadStart_closure, A.DdcRestarter_restart_closure0, A.DdcRestarter_restart_closure, A.RequireRestarter__reloadModule_closure0, A.JSArrayExtension_toDartIterable_closure]);\n" +" _inheritMany(A.Closure2Args, [A._CastListBase_sort_closure, A.CastMap_forEach_closure, A.initHooks_closure0, A._awaitOnObject_closure0, A._wrapJsFunctionForAsync_closure, A._Future__propagateToListeners_handleWhenCompleteCallback_closure0, A._Future_timeout_closure1, A._BufferingStreamSubscription_asFuture_closure0, A.MapBase_mapToString_closure, A._JsonStringifier_writeMap_closure, A.Uri_parseIPv6Address_error, A.FutureOfJSAnyToJSPromise_get_toJS_closure, A.FutureOfJSAnyToJSPromise_get_toJS__closure0, A.FutureOfVoidToJSPromise_get_toJS_closure, A.FutureOfVoidToJSPromise_get_toJS__closure0, A.StreamQueue__ensureListening_closure1, A.CanonicalizedMap_addAll_closure, A.CanonicalizedMap_forEach_closure, A.safeUnawaited_closure, A.BaseRequest_closure, A.MediaType_toString_closure, A.Pool__runOnRelease_closure0, A.Highlighter__collateLines_closure0, A.main__closure6, A.main_closure0]);\n" " _inherit(A.CastList, A._CastListBase);\n" " _inheritMany(A.MapBase, [A.CastMap, A.JsLinkedHashMap, A._HashMap, A._JsonMap]);\n" " _inheritMany(A.Error, [A.LateError, A.TypeError, A.JsNoSuchMethodError, A.UnknownJsTypeError, A.RuntimeError, A._Error, A.JsonUnsupportedObjectError, A.AssertionError, A.ArgumentError, A.UnsupportedError, A.UnimplementedError, A.StateError, A.ConcurrentModificationError]);\n" " _inherit(A.UnmodifiableListBase, A.ListBase);\n" " _inherit(A.CodeUnits, A.UnmodifiableListBase);\n" -" _inheritMany(A.Closure0Args, [A.nullFuture_closure, A._AsyncRun__scheduleImmediateJsOverride_internalCallback, A._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, A._TimerImpl_internalCallback, A._TimerImpl\$periodic_closure, A.Future_Future\$microtask_closure, A.Future_Future\$delayed_closure, A._Future__addListener_closure, A._Future__prependListeners_closure, A._Future__chainCoreFuture_closure, A._Future__asyncCompleteWithValue_closure, A._Future__asyncCompleteErrorObject_closure, A._Future__propagateToListeners_handleWhenCompleteCallback, A._Future__propagateToListeners_handleValueCallback, A._Future__propagateToListeners_handleError, A._Future_timeout_closure, A.Stream_length_closure0, A.Stream_first_closure, A._StreamController__subscribe_closure, A._StreamController__recordCancel_complete, A._BufferingStreamSubscription_asFuture_closure, A._BufferingStreamSubscription_asFuture__closure, A._BufferingStreamSubscription__sendError_sendError, A._BufferingStreamSubscription__sendDone_sendDone, A._PendingEvents_schedule_closure, A._MultiStream_listen_closure, A._cancelAndValue_closure, A._CustomZone_bindCallback_closure, A._CustomZone_bindCallbackGuarded_closure, A._RootZone_bindCallback_closure, A._RootZone_bindCallbackGuarded_closure, A._rootHandleError_closure, A._Utf8Decoder__decoder_closure, A._Utf8Decoder__decoderNonfatal_closure, A.StreamQueue__ensureListening_closure0, A.BuildStatus_BuildStatus\$fromJson_closure0, A.BatchedStreamController__hasEventOrTimeOut_closure, A.BatchedStreamController__hasEventDuring_closure, A._readStreamBody_closure, A._readStreamBody_closure0, A.MediaType_MediaType\$parse_closure, A.Logger_Logger_closure, A.Highlighter_closure, A.Highlighter__writeFileStart_closure, A.Highlighter__writeMultilineHighlights_closure, A.Highlighter__writeMultilineHighlights_closure0, A.Highlighter__writeMultilineHighlights_closure1, A.Highlighter__writeMultilineHighlights_closure2, A.Highlighter__writeMultilineHighlights__closure, A.Highlighter__writeMultilineHighlights__closure0, A.Highlighter__writeHighlightedText_closure, A.Highlighter__writeIndicator_closure, A.Highlighter__writeIndicator_closure0, A.Highlighter__writeIndicator_closure1, A.Highlighter__writeSidebar_closure, A._Highlight_closure, A.SseClient_closure, A.SseClient__closure, A.SseClient__onOutgoingMessage_closure, A.main_closure, A.main__closure, A.main__closure0, A.main__closure3, A.main__closure7, A.DdcLibraryBundleRestarter__getSrcModuleLibraries_closure, A.RequireRestarter__reload_closure, A.RequireRestarter__reloadModule_closure, A._createScript_closure, A._createScript__closure, A._createScript__closure0, A.runMain_closure]);\n" +" _inheritMany(A.Closure0Args, [A.nullFuture_closure, A._AsyncRun__scheduleImmediateJsOverride_internalCallback, A._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, A._TimerImpl_internalCallback, A._TimerImpl\$periodic_closure, A.Future_Future\$microtask_closure, A.Future_Future\$delayed_closure, A._Future__addListener_closure, A._Future__prependListeners_closure, A._Future__chainCoreFuture_closure, A._Future__asyncCompleteWithValue_closure, A._Future__asyncCompleteErrorObject_closure, A._Future__propagateToListeners_handleWhenCompleteCallback, A._Future__propagateToListeners_handleValueCallback, A._Future__propagateToListeners_handleError, A._Future_timeout_closure, A.Stream_length_closure0, A.Stream_first_closure, A._StreamController__subscribe_closure, A._StreamController__recordCancel_complete, A._BufferingStreamSubscription_asFuture_closure, A._BufferingStreamSubscription_asFuture__closure, A._BufferingStreamSubscription__sendError_sendError, A._BufferingStreamSubscription__sendDone_sendDone, A._PendingEvents_schedule_closure, A._MultiStream_listen_closure, A._cancelAndValue_closure, A._CustomZone_bindCallback_closure, A._CustomZone_bindCallbackGuarded_closure, A._RootZone_bindCallback_closure, A._RootZone_bindCallbackGuarded_closure, A._rootHandleError_closure, A._Utf8Decoder__decoder_closure, A._Utf8Decoder__decoderNonfatal_closure, A.StreamQueue__ensureListening_closure0, A.BuildStatus_BuildStatus\$fromJson_closure0, A.BatchedStreamController__hasEventOrTimeOut_closure, A.BatchedStreamController__hasEventDuring_closure, A._readStreamBody_closure, A._readStreamBody_closure0, A.MediaType_MediaType\$parse_closure, A.Logger_Logger_closure, A.Highlighter_closure, A.Highlighter__writeFileStart_closure, A.Highlighter__writeMultilineHighlights_closure, A.Highlighter__writeMultilineHighlights_closure0, A.Highlighter__writeMultilineHighlights_closure1, A.Highlighter__writeMultilineHighlights_closure2, A.Highlighter__writeMultilineHighlights__closure, A.Highlighter__writeMultilineHighlights__closure0, A.Highlighter__writeHighlightedText_closure, A.Highlighter__writeIndicator_closure, A.Highlighter__writeIndicator_closure0, A.Highlighter__writeIndicator_closure1, A.Highlighter__writeSidebar_closure, A._Highlight_closure, A.SseClient_closure, A.SseClient__closure, A.SseClient__onOutgoingMessage_closure, A.main_closure, A.main__closure, A.main__closure0, A.main__closure1, A.main__closure4, A.main__closure8, A.DdcLibraryBundleRestarter__getSrcModuleLibraries_closure, A.RequireRestarter__reload_closure, A.RequireRestarter__reloadModule_closure, A._createScript_closure, A._createScript__closure, A._createScript__closure0, A.runMain_closure]);\n" " _inheritMany(A.EfficientLengthIterable, [A.ListIterable, A.EmptyIterable, A.LinkedHashMapKeysIterable, A.LinkedHashMapValuesIterable, A.LinkedHashMapEntriesIterable, A._HashMapKeyIterable]);\n" " _inheritMany(A.ListIterable, [A.SubListIterable, A.MappedListIterable, A.ReversedListIterable, A.ListQueue, A._JsonMapKeyIterable]);\n" " _inherit(A.EfficientLengthMappedIterable, A.MappedIterable);\n" @@ -22204,7 +22313,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " typeUniverse: {eC: new Map(), tR: {}, eT: {}, tPV: {}, sEA: []},\n" " mangledGlobalNames: {int: \"int\", double: \"double\", num: \"num\", String: \"String\", bool: \"bool\", Null: \"Null\", List: \"List\", Object: \"Object\", Map: \"Map\", JSObject: \"JSObject\"},\n" " mangledNames: {},\n" -" types: [\"~()\", \"Null()\", \"~(JSObject)\", \"Null(Object,StackTrace)\", \"~(@)\", \"Future<~>()\", \"~(Object,StackTrace)\", \"JSObject()\", \"Null(@)\", \"String(String)\", \"Object?(Object?)\", \"~(Object?)\", \"bool(_Highlight)\", \"Null(JSObject)\", \"~(~())\", \"int(Object?)\", \"@(@)\", \"Null(String)\", \"~(Object?,Object?)\", \"@()\", \"Null(JavaScriptFunction,JavaScriptFunction)\", \"bool()\", \"Future<~>(String)\", \"String(Match)\", \"bool(String)\", \"int()\", \"Null(JavaScriptFunction)\", \"int(@,@)\", \"bool(Object?,Object?)\", \"PersistentWebSocket(WebSocket)\", \"String(@)\", \"~(Zone,ZoneDelegate,Zone,Object,StackTrace)\", \"bool(Object?)\", \"Future<~>(WebSocketEvent)\", \"bool(String,String)\", \"int(String)\", \"Null(String,String[Object?])\", \"~(MultiStreamController>)\", \"~(List)\", \"MediaType()\", \"~(String,String)\", \"Null(@,StackTrace)\", \"Logger()\", \"~(int,@)\", \"String(String?)\", \"Null(~)\", \"String?()\", \"int(_Line)\", \"0&(String,int?)\", \"Object(_Line)\", \"Object(_Highlight)\", \"int(_Highlight,_Highlight)\", \"List<_Line>(MapEntry>)\", \"~(Object[StackTrace?])\", \"SourceSpanWithContext()\", \"@(String)\", \"~(String?)\", \"Future()\", \"@(@,String)\", \"JSObject(Object,StackTrace)\", \"JSObject(String[bool?])\", \"~(StreamSink<@>)\", \"~(List)\", \"Null(String,String)\", \"~(bool)\", \"HotReloadResponse(String,bool,String?)\", \"HotRestartResponse(String,bool,String?)\", \"Object?(~)\", \"bool(bool)\", \"List(String)\", \"int(String,String)\", \"Null(JavaScriptObject)\", \"JSObject()()\", \"bool(BuildStatus)\", \"0&()\", \"~(Zone?,ZoneDelegate?,Zone,Object,StackTrace)\", \"0^(Zone?,ZoneDelegate?,Zone,0^())\", \"0^(Zone?,ZoneDelegate?,Zone,0^(1^),1^)\", \"0^(Zone?,ZoneDelegate?,Zone,0^(1^,2^),1^,2^)\", \"0^()(Zone,ZoneDelegate,Zone,0^())\", \"0^(1^)(Zone,ZoneDelegate,Zone,0^(1^))\", \"0^(1^,2^)(Zone,ZoneDelegate,Zone,0^(1^,2^))\", \"AsyncError?(Zone,ZoneDelegate,Zone,Object,StackTrace?)\", \"~(Zone?,ZoneDelegate?,Zone,~())\", \"Timer(Zone,ZoneDelegate,Zone,Duration,~())\", \"Timer(Zone,ZoneDelegate,Zone,Duration,~(Timer))\", \"~(Zone,ZoneDelegate,Zone,String)\", \"~(String)\", \"Zone(Zone?,ZoneDelegate?,Zone,ZoneSpecification?,Map?)\", \"Map(DebugEvent)\", \"Null(~())\", \"0^(0^,0^)\", \"~(@,StackTrace)\"],\n" +" types: [\"~()\", \"Null()\", \"~(JSObject)\", \"Null(Object,StackTrace)\", \"~(@)\", \"JSObject()\", \"Future<~>()\", \"~(Object,StackTrace)\", \"Null(@)\", \"String(String)\", \"Object?(Object?)\", \"~(Object?)\", \"bool(_Highlight)\", \"Null(JSObject)\", \"~(~())\", \"int(Object?)\", \"@(@)\", \"Null(String)\", \"~(Object?,Object?)\", \"@()\", \"Null(JavaScriptFunction,JavaScriptFunction)\", \"bool()\", \"Future<~>(String)\", \"String(Match)\", \"bool(String)\", \"int()\", \"Null(JavaScriptFunction)\", \"int(@,@)\", \"bool(Object?,Object?)\", \"PersistentWebSocket(WebSocket)\", \"String(@)\", \"~(Zone,ZoneDelegate,Zone,Object,StackTrace)\", \"bool(Object?)\", \"Future<~>(WebSocketEvent)\", \"bool(String,String)\", \"int(String)\", \"Null(String,String[Object?])\", \"~(MultiStreamController>)\", \"~(List)\", \"MediaType()\", \"~(String,String)\", \"Null(@,StackTrace)\", \"Logger()\", \"~(int,@)\", \"String(String?)\", \"Null(~)\", \"String?()\", \"int(_Line)\", \"0&(String,int?)\", \"Object(_Line)\", \"Object(_Highlight)\", \"int(_Highlight,_Highlight)\", \"List<_Line>(MapEntry>)\", \"~(Object[StackTrace?])\", \"SourceSpanWithContext()\", \"@(String)\", \"~(String?)\", \"Future()\", \"@(@,String)\", \"JSObject(Object,StackTrace)\", \"JSObject(String[bool?])\", \"~(StreamSink<@>)\", \"~(List)\", \"Null(String,String)\", \"~(bool)\", \"HotReloadResponse(String,bool,String?)\", \"HotRestartResponse(String,bool,String?)\", \"Object?(~)\", \"bool(bool)\", \"List(String)\", \"int(String,String)\", \"Null(JavaScriptObject)\", \"JSObject()()\", \"bool(BuildStatus)\", \"0&()\", \"~(Zone?,ZoneDelegate?,Zone,Object,StackTrace)\", \"0^(Zone?,ZoneDelegate?,Zone,0^())\", \"0^(Zone?,ZoneDelegate?,Zone,0^(1^),1^)\", \"0^(Zone?,ZoneDelegate?,Zone,0^(1^,2^),1^,2^)\", \"0^()(Zone,ZoneDelegate,Zone,0^())\", \"0^(1^)(Zone,ZoneDelegate,Zone,0^(1^))\", \"0^(1^,2^)(Zone,ZoneDelegate,Zone,0^(1^,2^))\", \"AsyncError?(Zone,ZoneDelegate,Zone,Object,StackTrace?)\", \"~(Zone?,ZoneDelegate?,Zone,~())\", \"Timer(Zone,ZoneDelegate,Zone,Duration,~())\", \"Timer(Zone,ZoneDelegate,Zone,Duration,~(Timer))\", \"~(Zone,ZoneDelegate,Zone,String)\", \"~(String)\", \"Zone(Zone?,ZoneDelegate?,Zone,ZoneSpecification?,Map?)\", \"Map(DebugEvent)\", \"Null(~())\", \"0^(0^,0^)\", \"~(@,StackTrace)\"],\n" " interceptorsByTag: null,\n" " leafTags: null,\n" " arrayRti: Symbol(\"\$ti\"),\n" @@ -22212,7 +22321,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " \"2;\": (t1, t2) => o => o instanceof A._Record_2 && t1._is(o._0) && t2._is(o._1)\n" " }\n" " };\n" -" A._Universe_addRules(init.typeUniverse, JSON.parse('{\"JavaScriptFunction\":\"LegacyJavaScriptObject\",\"PlainJavaScriptObject\":\"LegacyJavaScriptObject\",\"UnknownJavaScriptObject\":\"LegacyJavaScriptObject\",\"NativeSharedArrayBuffer\":\"NativeByteBuffer\",\"JavaScriptObject\":{\"JSObject\":[]},\"JSArray\":{\"List\":[\"1\"],\"JavaScriptObject\":[],\"EfficientLengthIterable\":[\"1\"],\"JSObject\":[],\"Iterable\":[\"1\"],\"Iterable.E\":\"1\"},\"JSBool\":{\"bool\":[],\"TrustedGetRuntimeType\":[]},\"JSNull\":{\"Null\":[],\"TrustedGetRuntimeType\":[]},\"LegacyJavaScriptObject\":{\"JavaScriptObject\":[],\"JSObject\":[]},\"JSArraySafeToStringHook\":{\"SafeToStringHook\":[]},\"JSUnmodifiableArray\":{\"JSArray\":[\"1\"],\"List\":[\"1\"],\"JavaScriptObject\":[],\"EfficientLengthIterable\":[\"1\"],\"JSObject\":[],\"Iterable\":[\"1\"],\"Iterable.E\":\"1\"},\"ArrayIterator\":{\"Iterator\":[\"1\"]},\"JSNumber\":{\"double\":[],\"num\":[],\"Comparable\":[\"num\"]},\"JSInt\":{\"double\":[],\"int\":[],\"num\":[],\"Comparable\":[\"num\"],\"TrustedGetRuntimeType\":[]},\"JSNumNotInt\":{\"double\":[],\"num\":[],\"Comparable\":[\"num\"],\"TrustedGetRuntimeType\":[]},\"JSString\":{\"String\":[],\"Comparable\":[\"String\"],\"Pattern\":[],\"TrustedGetRuntimeType\":[]},\"CastStream\":{\"Stream\":[\"2\"],\"Stream.T\":\"2\"},\"CastStreamSubscription\":{\"StreamSubscription\":[\"2\"]},\"_CastIterableBase\":{\"Iterable\":[\"2\"]},\"CastIterator\":{\"Iterator\":[\"2\"]},\"CastIterable\":{\"_CastIterableBase\":[\"1\",\"2\"],\"Iterable\":[\"2\"],\"Iterable.E\":\"2\"},\"_EfficientLengthCastIterable\":{\"CastIterable\":[\"1\",\"2\"],\"_CastIterableBase\":[\"1\",\"2\"],\"EfficientLengthIterable\":[\"2\"],\"Iterable\":[\"2\"],\"Iterable.E\":\"2\"},\"_CastListBase\":{\"ListBase\":[\"2\"],\"List\":[\"2\"],\"_CastIterableBase\":[\"1\",\"2\"],\"EfficientLengthIterable\":[\"2\"],\"Iterable\":[\"2\"]},\"CastList\":{\"_CastListBase\":[\"1\",\"2\"],\"ListBase\":[\"2\"],\"List\":[\"2\"],\"_CastIterableBase\":[\"1\",\"2\"],\"EfficientLengthIterable\":[\"2\"],\"Iterable\":[\"2\"],\"ListBase.E\":\"2\",\"Iterable.E\":\"2\"},\"CastMap\":{\"MapBase\":[\"3\",\"4\"],\"Map\":[\"3\",\"4\"],\"MapBase.K\":\"3\",\"MapBase.V\":\"4\"},\"LateError\":{\"Error\":[]},\"CodeUnits\":{\"ListBase\":[\"int\"],\"UnmodifiableListMixin\":[\"int\"],\"List\":[\"int\"],\"EfficientLengthIterable\":[\"int\"],\"Iterable\":[\"int\"],\"ListBase.E\":\"int\",\"Iterable.E\":\"int\",\"UnmodifiableListMixin.E\":\"int\"},\"EfficientLengthIterable\":{\"Iterable\":[\"1\"]},\"ListIterable\":{\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"]},\"SubListIterable\":{\"ListIterable\":[\"1\"],\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"],\"ListIterable.E\":\"1\",\"Iterable.E\":\"1\"},\"ListIterator\":{\"Iterator\":[\"1\"]},\"MappedIterable\":{\"Iterable\":[\"2\"],\"Iterable.E\":\"2\"},\"EfficientLengthMappedIterable\":{\"MappedIterable\":[\"1\",\"2\"],\"EfficientLengthIterable\":[\"2\"],\"Iterable\":[\"2\"],\"Iterable.E\":\"2\"},\"MappedIterator\":{\"Iterator\":[\"2\"]},\"MappedListIterable\":{\"ListIterable\":[\"2\"],\"EfficientLengthIterable\":[\"2\"],\"Iterable\":[\"2\"],\"ListIterable.E\":\"2\",\"Iterable.E\":\"2\"},\"WhereIterable\":{\"Iterable\":[\"1\"],\"Iterable.E\":\"1\"},\"WhereIterator\":{\"Iterator\":[\"1\"]},\"ExpandIterable\":{\"Iterable\":[\"2\"],\"Iterable.E\":\"2\"},\"ExpandIterator\":{\"Iterator\":[\"2\"]},\"TakeIterable\":{\"Iterable\":[\"1\"],\"Iterable.E\":\"1\"},\"EfficientLengthTakeIterable\":{\"TakeIterable\":[\"1\"],\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"],\"Iterable.E\":\"1\"},\"TakeIterator\":{\"Iterator\":[\"1\"]},\"SkipIterable\":{\"Iterable\":[\"1\"],\"Iterable.E\":\"1\"},\"EfficientLengthSkipIterable\":{\"SkipIterable\":[\"1\"],\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"],\"Iterable.E\":\"1\"},\"SkipIterator\":{\"Iterator\":[\"1\"]},\"EmptyIterable\":{\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"],\"Iterable.E\":\"1\"},\"EmptyIterator\":{\"Iterator\":[\"1\"]},\"WhereTypeIterable\":{\"Iterable\":[\"1\"],\"Iterable.E\":\"1\"},\"WhereTypeIterator\":{\"Iterator\":[\"1\"]},\"UnmodifiableListBase\":{\"ListBase\":[\"1\"],\"UnmodifiableListMixin\":[\"1\"],\"List\":[\"1\"],\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"]},\"ReversedListIterable\":{\"ListIterable\":[\"1\"],\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"],\"ListIterable.E\":\"1\",\"Iterable.E\":\"1\"},\"_Record_2\":{\"_Record2\":[],\"_Record\":[]},\"ConstantMap\":{\"Map\":[\"1\",\"2\"]},\"ConstantStringMap\":{\"ConstantMap\":[\"1\",\"2\"],\"Map\":[\"1\",\"2\"]},\"_KeysOrValues\":{\"Iterable\":[\"1\"],\"Iterable.E\":\"1\"},\"_KeysOrValuesOrElementsIterator\":{\"Iterator\":[\"1\"]},\"Instantiation\":{\"Closure\":[],\"Function\":[]},\"Instantiation1\":{\"Closure\":[],\"Function\":[]},\"NullError\":{\"TypeError\":[],\"Error\":[]},\"JsNoSuchMethodError\":{\"Error\":[]},\"UnknownJsTypeError\":{\"Error\":[]},\"NullThrownFromJavaScriptException\":{\"Exception\":[]},\"_StackTrace\":{\"StackTrace\":[]},\"Closure\":{\"Function\":[]},\"Closure0Args\":{\"Closure\":[],\"Function\":[]},\"Closure2Args\":{\"Closure\":[],\"Function\":[]},\"TearOffClosure\":{\"Closure\":[],\"Function\":[]},\"StaticClosure\":{\"Closure\":[],\"Function\":[]},\"BoundClosure\":{\"Closure\":[],\"Function\":[]},\"RuntimeError\":{\"Error\":[]},\"JsLinkedHashMap\":{\"MapBase\":[\"1\",\"2\"],\"LinkedHashMap\":[\"1\",\"2\"],\"Map\":[\"1\",\"2\"],\"MapBase.K\":\"1\",\"MapBase.V\":\"2\"},\"LinkedHashMapKeysIterable\":{\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"],\"Iterable.E\":\"1\"},\"LinkedHashMapKeyIterator\":{\"Iterator\":[\"1\"]},\"LinkedHashMapValuesIterable\":{\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"],\"Iterable.E\":\"1\"},\"LinkedHashMapValueIterator\":{\"Iterator\":[\"1\"]},\"LinkedHashMapEntriesIterable\":{\"EfficientLengthIterable\":[\"MapEntry<1,2>\"],\"Iterable\":[\"MapEntry<1,2>\"],\"Iterable.E\":\"MapEntry<1,2>\"},\"LinkedHashMapEntryIterator\":{\"Iterator\":[\"MapEntry<1,2>\"]},\"JsIdentityLinkedHashMap\":{\"JsLinkedHashMap\":[\"1\",\"2\"],\"MapBase\":[\"1\",\"2\"],\"LinkedHashMap\":[\"1\",\"2\"],\"Map\":[\"1\",\"2\"],\"MapBase.K\":\"1\",\"MapBase.V\":\"2\"},\"_Record2\":{\"_Record\":[]},\"JSSyntaxRegExp\":{\"RegExp\":[],\"Pattern\":[]},\"_MatchImplementation\":{\"RegExpMatch\":[],\"Match\":[]},\"_AllMatchesIterable\":{\"Iterable\":[\"RegExpMatch\"],\"Iterable.E\":\"RegExpMatch\"},\"_AllMatchesIterator\":{\"Iterator\":[\"RegExpMatch\"]},\"StringMatch\":{\"Match\":[]},\"_StringAllMatchesIterable\":{\"Iterable\":[\"Match\"],\"Iterable.E\":\"Match\"},\"_StringAllMatchesIterator\":{\"Iterator\":[\"Match\"]},\"NativeByteBuffer\":{\"JavaScriptObject\":[],\"JSObject\":[],\"ByteBuffer\":[],\"TrustedGetRuntimeType\":[]},\"NativeArrayBuffer\":{\"NativeByteBuffer\":[],\"JavaScriptObject\":[],\"JSObject\":[],\"ByteBuffer\":[],\"TrustedGetRuntimeType\":[]},\"NativeTypedData\":{\"JavaScriptObject\":[],\"JSObject\":[]},\"_UnmodifiableNativeByteBufferView\":{\"ByteBuffer\":[]},\"NativeByteData\":{\"JavaScriptObject\":[],\"ByteData\":[],\"JSObject\":[],\"TrustedGetRuntimeType\":[]},\"NativeTypedArray\":{\"JavaScriptIndexingBehavior\":[\"1\"],\"JavaScriptObject\":[],\"JSObject\":[]},\"NativeTypedArrayOfDouble\":{\"ListBase\":[\"double\"],\"NativeTypedArray\":[\"double\"],\"List\":[\"double\"],\"JavaScriptIndexingBehavior\":[\"double\"],\"JavaScriptObject\":[],\"EfficientLengthIterable\":[\"double\"],\"JSObject\":[],\"Iterable\":[\"double\"],\"FixedLengthListMixin\":[\"double\"]},\"NativeTypedArrayOfInt\":{\"ListBase\":[\"int\"],\"NativeTypedArray\":[\"int\"],\"List\":[\"int\"],\"JavaScriptIndexingBehavior\":[\"int\"],\"JavaScriptObject\":[],\"EfficientLengthIterable\":[\"int\"],\"JSObject\":[],\"Iterable\":[\"int\"],\"FixedLengthListMixin\":[\"int\"]},\"NativeFloat32List\":{\"Float32List\":[],\"ListBase\":[\"double\"],\"NativeTypedArray\":[\"double\"],\"List\":[\"double\"],\"JavaScriptIndexingBehavior\":[\"double\"],\"JavaScriptObject\":[],\"EfficientLengthIterable\":[\"double\"],\"JSObject\":[],\"Iterable\":[\"double\"],\"FixedLengthListMixin\":[\"double\"],\"TrustedGetRuntimeType\":[],\"ListBase.E\":\"double\",\"Iterable.E\":\"double\",\"FixedLengthListMixin.E\":\"double\"},\"NativeFloat64List\":{\"Float64List\":[],\"ListBase\":[\"double\"],\"NativeTypedArray\":[\"double\"],\"List\":[\"double\"],\"JavaScriptIndexingBehavior\":[\"double\"],\"JavaScriptObject\":[],\"EfficientLengthIterable\":[\"double\"],\"JSObject\":[],\"Iterable\":[\"double\"],\"FixedLengthListMixin\":[\"double\"],\"TrustedGetRuntimeType\":[],\"ListBase.E\":\"double\",\"Iterable.E\":\"double\",\"FixedLengthListMixin.E\":\"double\"},\"NativeInt16List\":{\"NativeTypedArrayOfInt\":[],\"Int16List\":[],\"ListBase\":[\"int\"],\"NativeTypedArray\":[\"int\"],\"List\":[\"int\"],\"JavaScriptIndexingBehavior\":[\"int\"],\"JavaScriptObject\":[],\"EfficientLengthIterable\":[\"int\"],\"JSObject\":[],\"Iterable\":[\"int\"],\"FixedLengthListMixin\":[\"int\"],\"TrustedGetRuntimeType\":[],\"ListBase.E\":\"int\",\"Iterable.E\":\"int\",\"FixedLengthListMixin.E\":\"int\"},\"NativeInt32List\":{\"NativeTypedArrayOfInt\":[],\"Int32List\":[],\"ListBase\":[\"int\"],\"NativeTypedArray\":[\"int\"],\"List\":[\"int\"],\"JavaScriptIndexingBehavior\":[\"int\"],\"JavaScriptObject\":[],\"EfficientLengthIterable\":[\"int\"],\"JSObject\":[],\"Iterable\":[\"int\"],\"FixedLengthListMixin\":[\"int\"],\"TrustedGetRuntimeType\":[],\"ListBase.E\":\"int\",\"Iterable.E\":\"int\",\"FixedLengthListMixin.E\":\"int\"},\"NativeInt8List\":{\"NativeTypedArrayOfInt\":[],\"Int8List\":[],\"ListBase\":[\"int\"],\"NativeTypedArray\":[\"int\"],\"List\":[\"int\"],\"JavaScriptIndexingBehavior\":[\"int\"],\"JavaScriptObject\":[],\"EfficientLengthIterable\":[\"int\"],\"JSObject\":[],\"Iterable\":[\"int\"],\"FixedLengthListMixin\":[\"int\"],\"TrustedGetRuntimeType\":[],\"ListBase.E\":\"int\",\"Iterable.E\":\"int\",\"FixedLengthListMixin.E\":\"int\"},\"NativeUint16List\":{\"NativeTypedArrayOfInt\":[],\"Uint16List\":[],\"ListBase\":[\"int\"],\"NativeTypedArray\":[\"int\"],\"List\":[\"int\"],\"JavaScriptIndexingBehavior\":[\"int\"],\"JavaScriptObject\":[],\"EfficientLengthIterable\":[\"int\"],\"JSObject\":[],\"Iterable\":[\"int\"],\"FixedLengthListMixin\":[\"int\"],\"TrustedGetRuntimeType\":[],\"ListBase.E\":\"int\",\"Iterable.E\":\"int\",\"FixedLengthListMixin.E\":\"int\"},\"NativeUint32List\":{\"NativeTypedArrayOfInt\":[],\"Uint32List\":[],\"ListBase\":[\"int\"],\"NativeTypedArray\":[\"int\"],\"List\":[\"int\"],\"JavaScriptIndexingBehavior\":[\"int\"],\"JavaScriptObject\":[],\"EfficientLengthIterable\":[\"int\"],\"JSObject\":[],\"Iterable\":[\"int\"],\"FixedLengthListMixin\":[\"int\"],\"TrustedGetRuntimeType\":[],\"ListBase.E\":\"int\",\"Iterable.E\":\"int\",\"FixedLengthListMixin.E\":\"int\"},\"NativeUint8ClampedList\":{\"NativeTypedArrayOfInt\":[],\"Uint8ClampedList\":[],\"ListBase\":[\"int\"],\"NativeTypedArray\":[\"int\"],\"List\":[\"int\"],\"JavaScriptIndexingBehavior\":[\"int\"],\"JavaScriptObject\":[],\"EfficientLengthIterable\":[\"int\"],\"JSObject\":[],\"Iterable\":[\"int\"],\"FixedLengthListMixin\":[\"int\"],\"TrustedGetRuntimeType\":[],\"ListBase.E\":\"int\",\"Iterable.E\":\"int\",\"FixedLengthListMixin.E\":\"int\"},\"NativeUint8List\":{\"NativeTypedArrayOfInt\":[],\"Uint8List\":[],\"ListBase\":[\"int\"],\"NativeTypedArray\":[\"int\"],\"List\":[\"int\"],\"JavaScriptIndexingBehavior\":[\"int\"],\"JavaScriptObject\":[],\"EfficientLengthIterable\":[\"int\"],\"JSObject\":[],\"Iterable\":[\"int\"],\"FixedLengthListMixin\":[\"int\"],\"TrustedGetRuntimeType\":[],\"ListBase.E\":\"int\",\"Iterable.E\":\"int\",\"FixedLengthListMixin.E\":\"int\"},\"_Error\":{\"Error\":[]},\"_TypeError\":{\"TypeError\":[],\"Error\":[]},\"AsyncError\":{\"Error\":[]},\"MultiStreamController\":{\"StreamController\":[\"1\"],\"StreamSink\":[\"1\"]},\"_TimerImpl\":{\"Timer\":[]},\"_AsyncAwaitCompleter\":{\"Completer\":[\"1\"]},\"_Completer\":{\"Completer\":[\"1\"]},\"_AsyncCompleter\":{\"_Completer\":[\"1\"],\"Completer\":[\"1\"]},\"_SyncCompleter\":{\"_Completer\":[\"1\"],\"Completer\":[\"1\"]},\"_Future\":{\"Future\":[\"1\"]},\"StreamView\":{\"Stream\":[\"1\"]},\"_StreamController\":{\"StreamController\":[\"1\"],\"StreamSink\":[\"1\"],\"_StreamControllerLifecycle\":[\"1\"],\"_EventSink\":[\"1\"],\"_EventDispatch\":[\"1\"]},\"_AsyncStreamController\":{\"_AsyncStreamControllerDispatch\":[\"1\"],\"_StreamController\":[\"1\"],\"StreamController\":[\"1\"],\"StreamSink\":[\"1\"],\"_StreamControllerLifecycle\":[\"1\"],\"_EventSink\":[\"1\"],\"_EventDispatch\":[\"1\"]},\"_ControllerStream\":{\"_StreamImpl\":[\"1\"],\"Stream\":[\"1\"],\"Stream.T\":\"1\"},\"_ControllerSubscription\":{\"_BufferingStreamSubscription\":[\"1\"],\"StreamSubscription\":[\"1\"],\"_EventSink\":[\"1\"],\"_EventDispatch\":[\"1\"],\"_BufferingStreamSubscription.T\":\"1\"},\"_StreamSinkWrapper\":{\"StreamSink\":[\"1\"]},\"_BufferingStreamSubscription\":{\"StreamSubscription\":[\"1\"],\"_EventSink\":[\"1\"],\"_EventDispatch\":[\"1\"],\"_BufferingStreamSubscription.T\":\"1\"},\"_StreamImpl\":{\"Stream\":[\"1\"]},\"_DelayedData\":{\"_DelayedEvent\":[\"1\"]},\"_DelayedError\":{\"_DelayedEvent\":[\"@\"]},\"_DelayedDone\":{\"_DelayedEvent\":[\"@\"]},\"_DoneStreamSubscription\":{\"StreamSubscription\":[\"1\"]},\"_EmptyStream\":{\"Stream\":[\"1\"],\"Stream.T\":\"1\"},\"_MultiStream\":{\"Stream\":[\"1\"],\"Stream.T\":\"1\"},\"_MultiStreamController\":{\"_AsyncStreamController\":[\"1\"],\"_AsyncStreamControllerDispatch\":[\"1\"],\"_StreamController\":[\"1\"],\"MultiStreamController\":[\"1\"],\"StreamController\":[\"1\"],\"StreamSink\":[\"1\"],\"_StreamControllerLifecycle\":[\"1\"],\"_EventSink\":[\"1\"],\"_EventDispatch\":[\"1\"]},\"_ForwardingStream\":{\"Stream\":[\"2\"]},\"_ForwardingStreamSubscription\":{\"_BufferingStreamSubscription\":[\"2\"],\"StreamSubscription\":[\"2\"],\"_EventSink\":[\"2\"],\"_EventDispatch\":[\"2\"],\"_BufferingStreamSubscription.T\":\"2\"},\"_MapStream\":{\"_ForwardingStream\":[\"1\",\"2\"],\"Stream\":[\"2\"],\"Stream.T\":\"2\"},\"_Zone\":{\"Zone\":[]},\"_CustomZone\":{\"_Zone\":[],\"Zone\":[]},\"_RootZone\":{\"_Zone\":[],\"Zone\":[]},\"_ZoneDelegate\":{\"ZoneDelegate\":[]},\"_ZoneSpecification\":{\"ZoneSpecification\":[]},\"_SplayTreeSetNode\":{\"_SplayTreeNode\":[\"1\",\"_SplayTreeSetNode<1>\"],\"_SplayTreeNode.K\":\"1\",\"_SplayTreeNode.1\":\"_SplayTreeSetNode<1>\"},\"_HashMap\":{\"MapBase\":[\"1\",\"2\"],\"HashMap\":[\"1\",\"2\"],\"Map\":[\"1\",\"2\"],\"MapBase.K\":\"1\",\"MapBase.V\":\"2\"},\"_IdentityHashMap\":{\"_HashMap\":[\"1\",\"2\"],\"MapBase\":[\"1\",\"2\"],\"HashMap\":[\"1\",\"2\"],\"Map\":[\"1\",\"2\"],\"MapBase.K\":\"1\",\"MapBase.V\":\"2\"},\"_HashMapKeyIterable\":{\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"],\"Iterable.E\":\"1\"},\"_HashMapKeyIterator\":{\"Iterator\":[\"1\"]},\"_LinkedCustomHashMap\":{\"JsLinkedHashMap\":[\"1\",\"2\"],\"MapBase\":[\"1\",\"2\"],\"LinkedHashMap\":[\"1\",\"2\"],\"Map\":[\"1\",\"2\"],\"MapBase.K\":\"1\",\"MapBase.V\":\"2\"},\"_HashSet\":{\"SetBase\":[\"1\"],\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"],\"Iterable.E\":\"1\"},\"_HashSetIterator\":{\"Iterator\":[\"1\"]},\"ListBase\":{\"List\":[\"1\"],\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"]},\"MapBase\":{\"Map\":[\"1\",\"2\"]},\"MapView\":{\"Map\":[\"1\",\"2\"]},\"UnmodifiableMapView\":{\"_UnmodifiableMapView_MapView__UnmodifiableMapMixin\":[\"1\",\"2\"],\"MapView\":[\"1\",\"2\"],\"_UnmodifiableMapMixin\":[\"1\",\"2\"],\"Map\":[\"1\",\"2\"]},\"ListQueue\":{\"Queue\":[\"1\"],\"ListIterable\":[\"1\"],\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"],\"ListIterable.E\":\"1\",\"Iterable.E\":\"1\"},\"_ListQueueIterator\":{\"Iterator\":[\"1\"]},\"SetBase\":{\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"]},\"_SetBase\":{\"SetBase\":[\"1\"],\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"]},\"_SplayTreeIterator\":{\"Iterator\":[\"3\"]},\"_SplayTreeKeyIterator\":{\"_SplayTreeIterator\":[\"1\",\"2\",\"1\"],\"Iterator\":[\"1\"],\"_SplayTreeIterator.K\":\"1\",\"_SplayTreeIterator.T\":\"1\",\"_SplayTreeIterator.1\":\"2\"},\"SplayTreeSet\":{\"SetBase\":[\"1\"],\"EfficientLengthIterable\":[\"1\"],\"_SplayTree\":[\"1\",\"_SplayTreeSetNode<1>\"],\"Iterable\":[\"1\"],\"Iterable.E\":\"1\",\"_SplayTree.1\":\"_SplayTreeSetNode<1>\",\"_SplayTree.K\":\"1\"},\"Encoding\":{\"Codec\":[\"String\",\"List\"]},\"_JsonMap\":{\"MapBase\":[\"String\",\"@\"],\"Map\":[\"String\",\"@\"],\"MapBase.K\":\"String\",\"MapBase.V\":\"@\"},\"_JsonMapKeyIterable\":{\"ListIterable\":[\"String\"],\"EfficientLengthIterable\":[\"String\"],\"Iterable\":[\"String\"],\"ListIterable.E\":\"String\",\"Iterable.E\":\"String\"},\"AsciiCodec\":{\"Encoding\":[],\"Codec\":[\"String\",\"List\"]},\"_UnicodeSubsetEncoder\":{\"Converter\":[\"String\",\"List\"]},\"AsciiEncoder\":{\"Converter\":[\"String\",\"List\"]},\"_UnicodeSubsetDecoder\":{\"Converter\":[\"List\",\"String\"]},\"AsciiDecoder\":{\"Converter\":[\"List\",\"String\"]},\"Base64Codec\":{\"Codec\":[\"List\",\"String\"]},\"Base64Encoder\":{\"Converter\":[\"List\",\"String\"]},\"JsonUnsupportedObjectError\":{\"Error\":[]},\"JsonCyclicError\":{\"Error\":[]},\"JsonCodec\":{\"Codec\":[\"Object?\",\"String\"]},\"JsonEncoder\":{\"Converter\":[\"Object?\",\"String\"]},\"JsonDecoder\":{\"Converter\":[\"String\",\"Object?\"]},\"Latin1Codec\":{\"Encoding\":[],\"Codec\":[\"String\",\"List\"]},\"Latin1Encoder\":{\"Converter\":[\"String\",\"List\"]},\"Latin1Decoder\":{\"Converter\":[\"List\",\"String\"]},\"Utf8Codec\":{\"Encoding\":[],\"Codec\":[\"String\",\"List\"]},\"Utf8Encoder\":{\"Converter\":[\"String\",\"List\"]},\"Utf8Decoder\":{\"Converter\":[\"List\",\"String\"]},\"DateTime\":{\"Comparable\":[\"DateTime\"]},\"double\":{\"num\":[],\"Comparable\":[\"num\"]},\"Duration\":{\"Comparable\":[\"Duration\"]},\"int\":{\"num\":[],\"Comparable\":[\"num\"]},\"List\":{\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"]},\"num\":{\"Comparable\":[\"num\"]},\"RegExpMatch\":{\"Match\":[]},\"String\":{\"Comparable\":[\"String\"],\"Pattern\":[]},\"AssertionError\":{\"Error\":[]},\"TypeError\":{\"Error\":[]},\"ArgumentError\":{\"Error\":[]},\"RangeError\":{\"Error\":[]},\"IndexError\":{\"Error\":[]},\"UnsupportedError\":{\"Error\":[]},\"UnimplementedError\":{\"Error\":[]},\"StateError\":{\"Error\":[]},\"ConcurrentModificationError\":{\"Error\":[]},\"OutOfMemoryError\":{\"Error\":[]},\"StackOverflowError\":{\"Error\":[]},\"_Exception\":{\"Exception\":[]},\"FormatException\":{\"Exception\":[]},\"_StringStackTrace\":{\"StackTrace\":[]},\"StringBuffer\":{\"StringSink\":[]},\"_Uri\":{\"Uri\":[]},\"_SimpleUri\":{\"Uri\":[]},\"_DataUri\":{\"Uri\":[]},\"NullRejectionException\":{\"Exception\":[]},\"ErrorResult\":{\"Result\":[\"0&\"]},\"ValueResult\":{\"Result\":[\"1\"]},\"_NextRequest\":{\"_EventRequest\":[\"1\"]},\"_HasNextRequest\":{\"_EventRequest\":[\"1\"]},\"CanonicalizedMap\":{\"Map\":[\"2\",\"3\"]},\"QueueList\":{\"ListBase\":[\"1\"],\"List\":[\"1\"],\"Queue\":[\"1\"],\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"],\"ListBase.E\":\"1\",\"QueueList.E\":\"1\",\"Iterable.E\":\"1\"},\"_CastQueueList\":{\"QueueList\":[\"2\"],\"ListBase\":[\"2\"],\"List\":[\"2\"],\"Queue\":[\"2\"],\"EfficientLengthIterable\":[\"2\"],\"Iterable\":[\"2\"],\"ListBase.E\":\"2\",\"QueueList.E\":\"2\",\"Iterable.E\":\"2\"},\"PersistentWebSocket\":{\"StreamChannelMixin\":[\"@\"]},\"SseSocketClient\":{\"SocketClient\":[]},\"WebSocketClient\":{\"SocketClient\":[]},\"RequestAbortedException\":{\"Exception\":[]},\"ByteStream\":{\"StreamView\":[\"List\"],\"Stream\":[\"List\"],\"Stream.T\":\"List\",\"StreamView.T\":\"List\"},\"ClientException\":{\"Exception\":[]},\"Request\":{\"BaseRequest\":[]},\"StreamedResponseV2\":{\"StreamedResponse\":[]},\"CaseInsensitiveMap\":{\"CanonicalizedMap\":[\"String\",\"String\",\"1\"],\"Map\":[\"String\",\"1\"],\"CanonicalizedMap.K\":\"String\",\"CanonicalizedMap.V\":\"1\",\"CanonicalizedMap.C\":\"String\"},\"Level\":{\"Comparable\":[\"Level\"]},\"PathException\":{\"Exception\":[]},\"PosixStyle\":{\"InternalStyle\":[]},\"UrlStyle\":{\"InternalStyle\":[]},\"WindowsStyle\":{\"InternalStyle\":[]},\"FileLocation\":{\"SourceLocation\":[],\"Comparable\":[\"SourceLocation\"]},\"_FileSpan\":{\"SourceSpanWithContext\":[],\"SourceSpan\":[],\"Comparable\":[\"SourceSpan\"]},\"SourceLocation\":{\"Comparable\":[\"SourceLocation\"]},\"SourceLocationMixin\":{\"SourceLocation\":[],\"Comparable\":[\"SourceLocation\"]},\"SourceSpan\":{\"Comparable\":[\"SourceSpan\"]},\"SourceSpanBase\":{\"SourceSpan\":[],\"Comparable\":[\"SourceSpan\"]},\"SourceSpanException\":{\"Exception\":[]},\"SourceSpanFormatException\":{\"FormatException\":[],\"Exception\":[]},\"SourceSpanMixin\":{\"SourceSpan\":[],\"Comparable\":[\"SourceSpan\"]},\"SourceSpanWithContext\":{\"SourceSpan\":[],\"Comparable\":[\"SourceSpan\"]},\"SseClient\":{\"StreamChannelMixin\":[\"String?\"]},\"StringScannerException\":{\"FormatException\":[],\"Exception\":[]},\"_EventStream\":{\"Stream\":[\"1\"],\"Stream.T\":\"1\"},\"_EventStreamSubscription\":{\"StreamSubscription\":[\"1\"]},\"BrowserWebSocket\":{\"WebSocket\":[]},\"TextDataReceived\":{\"WebSocketEvent\":[]},\"BinaryDataReceived\":{\"WebSocketEvent\":[]},\"CloseReceived\":{\"WebSocketEvent\":[]},\"WebSocketException\":{\"Exception\":[]},\"WebSocketConnectionClosed\":{\"Exception\":[]},\"DdcLibraryBundleRestarter\":{\"Restarter\":[]},\"DdcRestarter\":{\"Restarter\":[]},\"RequireRestarter\":{\"Restarter\":[]},\"HotReloadFailedException\":{\"Exception\":[]},\"Int8List\":{\"List\":[\"int\"],\"EfficientLengthIterable\":[\"int\"],\"Iterable\":[\"int\"]},\"Uint8List\":{\"List\":[\"int\"],\"EfficientLengthIterable\":[\"int\"],\"Iterable\":[\"int\"]},\"Uint8ClampedList\":{\"List\":[\"int\"],\"EfficientLengthIterable\":[\"int\"],\"Iterable\":[\"int\"]},\"Int16List\":{\"List\":[\"int\"],\"EfficientLengthIterable\":[\"int\"],\"Iterable\":[\"int\"]},\"Uint16List\":{\"List\":[\"int\"],\"EfficientLengthIterable\":[\"int\"],\"Iterable\":[\"int\"]},\"Int32List\":{\"List\":[\"int\"],\"EfficientLengthIterable\":[\"int\"],\"Iterable\":[\"int\"]},\"Uint32List\":{\"List\":[\"int\"],\"EfficientLengthIterable\":[\"int\"],\"Iterable\":[\"int\"]},\"Float32List\":{\"List\":[\"double\"],\"EfficientLengthIterable\":[\"double\"],\"Iterable\":[\"double\"]},\"Float64List\":{\"List\":[\"double\"],\"EfficientLengthIterable\":[\"double\"],\"Iterable\":[\"double\"]}}'));\n" +" A._Universe_addRules(init.typeUniverse, JSON.parse('{\"JavaScriptFunction\":\"LegacyJavaScriptObject\",\"PlainJavaScriptObject\":\"LegacyJavaScriptObject\",\"UnknownJavaScriptObject\":\"LegacyJavaScriptObject\",\"NativeSharedArrayBuffer\":\"NativeByteBuffer\",\"JavaScriptObject\":{\"JSObject\":[]},\"JSArray\":{\"List\":[\"1\"],\"JavaScriptObject\":[],\"EfficientLengthIterable\":[\"1\"],\"JSObject\":[],\"Iterable\":[\"1\"],\"Iterable.E\":\"1\"},\"JSBool\":{\"bool\":[],\"TrustedGetRuntimeType\":[]},\"JSNull\":{\"Null\":[],\"TrustedGetRuntimeType\":[]},\"LegacyJavaScriptObject\":{\"JavaScriptObject\":[],\"JSObject\":[]},\"JSArraySafeToStringHook\":{\"SafeToStringHook\":[]},\"JSUnmodifiableArray\":{\"JSArray\":[\"1\"],\"List\":[\"1\"],\"JavaScriptObject\":[],\"EfficientLengthIterable\":[\"1\"],\"JSObject\":[],\"Iterable\":[\"1\"],\"Iterable.E\":\"1\"},\"ArrayIterator\":{\"Iterator\":[\"1\"]},\"JSNumber\":{\"double\":[],\"num\":[],\"Comparable\":[\"num\"]},\"JSInt\":{\"double\":[],\"int\":[],\"num\":[],\"Comparable\":[\"num\"],\"TrustedGetRuntimeType\":[]},\"JSNumNotInt\":{\"double\":[],\"num\":[],\"Comparable\":[\"num\"],\"TrustedGetRuntimeType\":[]},\"JSString\":{\"String\":[],\"Comparable\":[\"String\"],\"Pattern\":[],\"TrustedGetRuntimeType\":[]},\"CastStream\":{\"Stream\":[\"2\"],\"Stream.T\":\"2\"},\"CastStreamSubscription\":{\"StreamSubscription\":[\"2\"]},\"_CastIterableBase\":{\"Iterable\":[\"2\"]},\"CastIterator\":{\"Iterator\":[\"2\"]},\"CastIterable\":{\"_CastIterableBase\":[\"1\",\"2\"],\"Iterable\":[\"2\"],\"Iterable.E\":\"2\"},\"_EfficientLengthCastIterable\":{\"CastIterable\":[\"1\",\"2\"],\"_CastIterableBase\":[\"1\",\"2\"],\"EfficientLengthIterable\":[\"2\"],\"Iterable\":[\"2\"],\"Iterable.E\":\"2\"},\"_CastListBase\":{\"ListBase\":[\"2\"],\"List\":[\"2\"],\"_CastIterableBase\":[\"1\",\"2\"],\"EfficientLengthIterable\":[\"2\"],\"Iterable\":[\"2\"]},\"CastList\":{\"_CastListBase\":[\"1\",\"2\"],\"ListBase\":[\"2\"],\"List\":[\"2\"],\"_CastIterableBase\":[\"1\",\"2\"],\"EfficientLengthIterable\":[\"2\"],\"Iterable\":[\"2\"],\"ListBase.E\":\"2\",\"Iterable.E\":\"2\"},\"CastMap\":{\"MapBase\":[\"3\",\"4\"],\"Map\":[\"3\",\"4\"],\"MapBase.K\":\"3\",\"MapBase.V\":\"4\"},\"LateError\":{\"Error\":[]},\"CodeUnits\":{\"ListBase\":[\"int\"],\"UnmodifiableListMixin\":[\"int\"],\"List\":[\"int\"],\"EfficientLengthIterable\":[\"int\"],\"Iterable\":[\"int\"],\"ListBase.E\":\"int\",\"Iterable.E\":\"int\",\"UnmodifiableListMixin.E\":\"int\"},\"EfficientLengthIterable\":{\"Iterable\":[\"1\"]},\"ListIterable\":{\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"]},\"SubListIterable\":{\"ListIterable\":[\"1\"],\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"],\"ListIterable.E\":\"1\",\"Iterable.E\":\"1\"},\"ListIterator\":{\"Iterator\":[\"1\"]},\"MappedIterable\":{\"Iterable\":[\"2\"],\"Iterable.E\":\"2\"},\"EfficientLengthMappedIterable\":{\"MappedIterable\":[\"1\",\"2\"],\"EfficientLengthIterable\":[\"2\"],\"Iterable\":[\"2\"],\"Iterable.E\":\"2\"},\"MappedIterator\":{\"Iterator\":[\"2\"]},\"MappedListIterable\":{\"ListIterable\":[\"2\"],\"EfficientLengthIterable\":[\"2\"],\"Iterable\":[\"2\"],\"ListIterable.E\":\"2\",\"Iterable.E\":\"2\"},\"WhereIterable\":{\"Iterable\":[\"1\"],\"Iterable.E\":\"1\"},\"WhereIterator\":{\"Iterator\":[\"1\"]},\"ExpandIterable\":{\"Iterable\":[\"2\"],\"Iterable.E\":\"2\"},\"ExpandIterator\":{\"Iterator\":[\"2\"]},\"TakeIterable\":{\"Iterable\":[\"1\"],\"Iterable.E\":\"1\"},\"EfficientLengthTakeIterable\":{\"TakeIterable\":[\"1\"],\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"],\"Iterable.E\":\"1\"},\"TakeIterator\":{\"Iterator\":[\"1\"]},\"SkipIterable\":{\"Iterable\":[\"1\"],\"Iterable.E\":\"1\"},\"EfficientLengthSkipIterable\":{\"SkipIterable\":[\"1\"],\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"],\"Iterable.E\":\"1\"},\"SkipIterator\":{\"Iterator\":[\"1\"]},\"EmptyIterable\":{\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"],\"Iterable.E\":\"1\"},\"EmptyIterator\":{\"Iterator\":[\"1\"]},\"WhereTypeIterable\":{\"Iterable\":[\"1\"],\"Iterable.E\":\"1\"},\"WhereTypeIterator\":{\"Iterator\":[\"1\"]},\"UnmodifiableListBase\":{\"ListBase\":[\"1\"],\"UnmodifiableListMixin\":[\"1\"],\"List\":[\"1\"],\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"]},\"ReversedListIterable\":{\"ListIterable\":[\"1\"],\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"],\"ListIterable.E\":\"1\",\"Iterable.E\":\"1\"},\"_Record_2\":{\"_Record2\":[],\"_Record\":[]},\"ConstantMap\":{\"Map\":[\"1\",\"2\"]},\"ConstantStringMap\":{\"ConstantMap\":[\"1\",\"2\"],\"Map\":[\"1\",\"2\"]},\"_KeysOrValues\":{\"Iterable\":[\"1\"],\"Iterable.E\":\"1\"},\"_KeysOrValuesOrElementsIterator\":{\"Iterator\":[\"1\"]},\"Instantiation\":{\"Closure\":[],\"Function\":[]},\"Instantiation1\":{\"Closure\":[],\"Function\":[]},\"NullError\":{\"TypeError\":[],\"Error\":[]},\"JsNoSuchMethodError\":{\"Error\":[]},\"UnknownJsTypeError\":{\"Error\":[]},\"NullThrownFromJavaScriptException\":{\"Exception\":[]},\"_StackTrace\":{\"StackTrace\":[]},\"Closure\":{\"Function\":[]},\"Closure0Args\":{\"Closure\":[],\"Function\":[]},\"Closure2Args\":{\"Closure\":[],\"Function\":[]},\"TearOffClosure\":{\"Closure\":[],\"Function\":[]},\"StaticClosure\":{\"Closure\":[],\"Function\":[]},\"BoundClosure\":{\"Closure\":[],\"Function\":[]},\"RuntimeError\":{\"Error\":[]},\"JsLinkedHashMap\":{\"MapBase\":[\"1\",\"2\"],\"LinkedHashMap\":[\"1\",\"2\"],\"Map\":[\"1\",\"2\"],\"MapBase.K\":\"1\",\"MapBase.V\":\"2\"},\"LinkedHashMapKeysIterable\":{\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"],\"Iterable.E\":\"1\"},\"LinkedHashMapKeyIterator\":{\"Iterator\":[\"1\"]},\"LinkedHashMapValuesIterable\":{\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"],\"Iterable.E\":\"1\"},\"LinkedHashMapValueIterator\":{\"Iterator\":[\"1\"]},\"LinkedHashMapEntriesIterable\":{\"EfficientLengthIterable\":[\"MapEntry<1,2>\"],\"Iterable\":[\"MapEntry<1,2>\"],\"Iterable.E\":\"MapEntry<1,2>\"},\"LinkedHashMapEntryIterator\":{\"Iterator\":[\"MapEntry<1,2>\"]},\"JsIdentityLinkedHashMap\":{\"JsLinkedHashMap\":[\"1\",\"2\"],\"MapBase\":[\"1\",\"2\"],\"LinkedHashMap\":[\"1\",\"2\"],\"Map\":[\"1\",\"2\"],\"MapBase.K\":\"1\",\"MapBase.V\":\"2\"},\"_Record2\":{\"_Record\":[]},\"JSSyntaxRegExp\":{\"RegExp\":[],\"Pattern\":[]},\"_MatchImplementation\":{\"RegExpMatch\":[],\"Match\":[]},\"_AllMatchesIterable\":{\"Iterable\":[\"RegExpMatch\"],\"Iterable.E\":\"RegExpMatch\"},\"_AllMatchesIterator\":{\"Iterator\":[\"RegExpMatch\"]},\"StringMatch\":{\"Match\":[]},\"_StringAllMatchesIterable\":{\"Iterable\":[\"Match\"],\"Iterable.E\":\"Match\"},\"_StringAllMatchesIterator\":{\"Iterator\":[\"Match\"]},\"NativeByteBuffer\":{\"JavaScriptObject\":[],\"JSObject\":[],\"ByteBuffer\":[],\"TrustedGetRuntimeType\":[]},\"NativeArrayBuffer\":{\"NativeByteBuffer\":[],\"JavaScriptObject\":[],\"JSObject\":[],\"ByteBuffer\":[],\"TrustedGetRuntimeType\":[]},\"NativeTypedData\":{\"JavaScriptObject\":[],\"JSObject\":[]},\"_UnmodifiableNativeByteBufferView\":{\"ByteBuffer\":[]},\"NativeByteData\":{\"JavaScriptObject\":[],\"ByteData\":[],\"JSObject\":[],\"TrustedGetRuntimeType\":[]},\"NativeTypedArray\":{\"JavaScriptIndexingBehavior\":[\"1\"],\"JavaScriptObject\":[],\"JSObject\":[]},\"NativeTypedArrayOfDouble\":{\"ListBase\":[\"double\"],\"NativeTypedArray\":[\"double\"],\"List\":[\"double\"],\"JavaScriptIndexingBehavior\":[\"double\"],\"JavaScriptObject\":[],\"EfficientLengthIterable\":[\"double\"],\"JSObject\":[],\"Iterable\":[\"double\"],\"FixedLengthListMixin\":[\"double\"]},\"NativeTypedArrayOfInt\":{\"ListBase\":[\"int\"],\"NativeTypedArray\":[\"int\"],\"List\":[\"int\"],\"JavaScriptIndexingBehavior\":[\"int\"],\"JavaScriptObject\":[],\"EfficientLengthIterable\":[\"int\"],\"JSObject\":[],\"Iterable\":[\"int\"],\"FixedLengthListMixin\":[\"int\"]},\"NativeFloat32List\":{\"Float32List\":[],\"ListBase\":[\"double\"],\"NativeTypedArray\":[\"double\"],\"List\":[\"double\"],\"JavaScriptIndexingBehavior\":[\"double\"],\"JavaScriptObject\":[],\"EfficientLengthIterable\":[\"double\"],\"JSObject\":[],\"Iterable\":[\"double\"],\"FixedLengthListMixin\":[\"double\"],\"TrustedGetRuntimeType\":[],\"ListBase.E\":\"double\",\"Iterable.E\":\"double\",\"FixedLengthListMixin.E\":\"double\"},\"NativeFloat64List\":{\"Float64List\":[],\"ListBase\":[\"double\"],\"NativeTypedArray\":[\"double\"],\"List\":[\"double\"],\"JavaScriptIndexingBehavior\":[\"double\"],\"JavaScriptObject\":[],\"EfficientLengthIterable\":[\"double\"],\"JSObject\":[],\"Iterable\":[\"double\"],\"FixedLengthListMixin\":[\"double\"],\"TrustedGetRuntimeType\":[],\"ListBase.E\":\"double\",\"Iterable.E\":\"double\",\"FixedLengthListMixin.E\":\"double\"},\"NativeInt16List\":{\"NativeTypedArrayOfInt\":[],\"Int16List\":[],\"ListBase\":[\"int\"],\"NativeTypedArray\":[\"int\"],\"List\":[\"int\"],\"JavaScriptIndexingBehavior\":[\"int\"],\"JavaScriptObject\":[],\"EfficientLengthIterable\":[\"int\"],\"JSObject\":[],\"Iterable\":[\"int\"],\"FixedLengthListMixin\":[\"int\"],\"TrustedGetRuntimeType\":[],\"ListBase.E\":\"int\",\"Iterable.E\":\"int\",\"FixedLengthListMixin.E\":\"int\"},\"NativeInt32List\":{\"NativeTypedArrayOfInt\":[],\"Int32List\":[],\"ListBase\":[\"int\"],\"NativeTypedArray\":[\"int\"],\"List\":[\"int\"],\"JavaScriptIndexingBehavior\":[\"int\"],\"JavaScriptObject\":[],\"EfficientLengthIterable\":[\"int\"],\"JSObject\":[],\"Iterable\":[\"int\"],\"FixedLengthListMixin\":[\"int\"],\"TrustedGetRuntimeType\":[],\"ListBase.E\":\"int\",\"Iterable.E\":\"int\",\"FixedLengthListMixin.E\":\"int\"},\"NativeInt8List\":{\"NativeTypedArrayOfInt\":[],\"Int8List\":[],\"ListBase\":[\"int\"],\"NativeTypedArray\":[\"int\"],\"List\":[\"int\"],\"JavaScriptIndexingBehavior\":[\"int\"],\"JavaScriptObject\":[],\"EfficientLengthIterable\":[\"int\"],\"JSObject\":[],\"Iterable\":[\"int\"],\"FixedLengthListMixin\":[\"int\"],\"TrustedGetRuntimeType\":[],\"ListBase.E\":\"int\",\"Iterable.E\":\"int\",\"FixedLengthListMixin.E\":\"int\"},\"NativeUint16List\":{\"NativeTypedArrayOfInt\":[],\"Uint16List\":[],\"ListBase\":[\"int\"],\"NativeTypedArray\":[\"int\"],\"List\":[\"int\"],\"JavaScriptIndexingBehavior\":[\"int\"],\"JavaScriptObject\":[],\"EfficientLengthIterable\":[\"int\"],\"JSObject\":[],\"Iterable\":[\"int\"],\"FixedLengthListMixin\":[\"int\"],\"TrustedGetRuntimeType\":[],\"ListBase.E\":\"int\",\"Iterable.E\":\"int\",\"FixedLengthListMixin.E\":\"int\"},\"NativeUint32List\":{\"NativeTypedArrayOfInt\":[],\"Uint32List\":[],\"ListBase\":[\"int\"],\"NativeTypedArray\":[\"int\"],\"List\":[\"int\"],\"JavaScriptIndexingBehavior\":[\"int\"],\"JavaScriptObject\":[],\"EfficientLengthIterable\":[\"int\"],\"JSObject\":[],\"Iterable\":[\"int\"],\"FixedLengthListMixin\":[\"int\"],\"TrustedGetRuntimeType\":[],\"ListBase.E\":\"int\",\"Iterable.E\":\"int\",\"FixedLengthListMixin.E\":\"int\"},\"NativeUint8ClampedList\":{\"NativeTypedArrayOfInt\":[],\"Uint8ClampedList\":[],\"ListBase\":[\"int\"],\"NativeTypedArray\":[\"int\"],\"List\":[\"int\"],\"JavaScriptIndexingBehavior\":[\"int\"],\"JavaScriptObject\":[],\"EfficientLengthIterable\":[\"int\"],\"JSObject\":[],\"Iterable\":[\"int\"],\"FixedLengthListMixin\":[\"int\"],\"TrustedGetRuntimeType\":[],\"ListBase.E\":\"int\",\"Iterable.E\":\"int\",\"FixedLengthListMixin.E\":\"int\"},\"NativeUint8List\":{\"NativeTypedArrayOfInt\":[],\"Uint8List\":[],\"ListBase\":[\"int\"],\"NativeTypedArray\":[\"int\"],\"List\":[\"int\"],\"JavaScriptIndexingBehavior\":[\"int\"],\"JavaScriptObject\":[],\"EfficientLengthIterable\":[\"int\"],\"JSObject\":[],\"Iterable\":[\"int\"],\"FixedLengthListMixin\":[\"int\"],\"TrustedGetRuntimeType\":[],\"ListBase.E\":\"int\",\"Iterable.E\":\"int\",\"FixedLengthListMixin.E\":\"int\"},\"_Error\":{\"Error\":[]},\"_TypeError\":{\"TypeError\":[],\"Error\":[]},\"AsyncError\":{\"Error\":[]},\"MultiStreamController\":{\"StreamController\":[\"1\"],\"StreamSink\":[\"1\"]},\"_TimerImpl\":{\"Timer\":[]},\"_AsyncAwaitCompleter\":{\"Completer\":[\"1\"]},\"_Completer\":{\"Completer\":[\"1\"]},\"_AsyncCompleter\":{\"_Completer\":[\"1\"],\"Completer\":[\"1\"]},\"_SyncCompleter\":{\"_Completer\":[\"1\"],\"Completer\":[\"1\"]},\"_Future\":{\"Future\":[\"1\"]},\"StreamView\":{\"Stream\":[\"1\"]},\"_StreamController\":{\"StreamController\":[\"1\"],\"StreamSink\":[\"1\"],\"_StreamControllerLifecycle\":[\"1\"],\"_EventSink\":[\"1\"],\"_EventDispatch\":[\"1\"]},\"_AsyncStreamController\":{\"_AsyncStreamControllerDispatch\":[\"1\"],\"_StreamController\":[\"1\"],\"StreamController\":[\"1\"],\"StreamSink\":[\"1\"],\"_StreamControllerLifecycle\":[\"1\"],\"_EventSink\":[\"1\"],\"_EventDispatch\":[\"1\"]},\"_ControllerStream\":{\"_StreamImpl\":[\"1\"],\"Stream\":[\"1\"],\"Stream.T\":\"1\"},\"_ControllerSubscription\":{\"_BufferingStreamSubscription\":[\"1\"],\"StreamSubscription\":[\"1\"],\"_EventSink\":[\"1\"],\"_EventDispatch\":[\"1\"],\"_BufferingStreamSubscription.T\":\"1\"},\"_StreamSinkWrapper\":{\"StreamSink\":[\"1\"]},\"_BufferingStreamSubscription\":{\"StreamSubscription\":[\"1\"],\"_EventSink\":[\"1\"],\"_EventDispatch\":[\"1\"],\"_BufferingStreamSubscription.T\":\"1\"},\"_StreamImpl\":{\"Stream\":[\"1\"]},\"_DelayedData\":{\"_DelayedEvent\":[\"1\"]},\"_DelayedError\":{\"_DelayedEvent\":[\"@\"]},\"_DelayedDone\":{\"_DelayedEvent\":[\"@\"]},\"_DoneStreamSubscription\":{\"StreamSubscription\":[\"1\"]},\"_EmptyStream\":{\"Stream\":[\"1\"],\"Stream.T\":\"1\"},\"_MultiStream\":{\"Stream\":[\"1\"],\"Stream.T\":\"1\"},\"_MultiStreamController\":{\"_AsyncStreamController\":[\"1\"],\"_AsyncStreamControllerDispatch\":[\"1\"],\"_StreamController\":[\"1\"],\"MultiStreamController\":[\"1\"],\"StreamController\":[\"1\"],\"StreamSink\":[\"1\"],\"_StreamControllerLifecycle\":[\"1\"],\"_EventSink\":[\"1\"],\"_EventDispatch\":[\"1\"]},\"_ForwardingStream\":{\"Stream\":[\"2\"]},\"_ForwardingStreamSubscription\":{\"_BufferingStreamSubscription\":[\"2\"],\"StreamSubscription\":[\"2\"],\"_EventSink\":[\"2\"],\"_EventDispatch\":[\"2\"],\"_BufferingStreamSubscription.T\":\"2\"},\"_MapStream\":{\"_ForwardingStream\":[\"1\",\"2\"],\"Stream\":[\"2\"],\"Stream.T\":\"2\"},\"_Zone\":{\"Zone\":[]},\"_CustomZone\":{\"_Zone\":[],\"Zone\":[]},\"_RootZone\":{\"_Zone\":[],\"Zone\":[]},\"_ZoneDelegate\":{\"ZoneDelegate\":[]},\"_ZoneSpecification\":{\"ZoneSpecification\":[]},\"_SplayTreeSetNode\":{\"_SplayTreeNode\":[\"1\",\"_SplayTreeSetNode<1>\"],\"_SplayTreeNode.K\":\"1\",\"_SplayTreeNode.1\":\"_SplayTreeSetNode<1>\"},\"_HashMap\":{\"MapBase\":[\"1\",\"2\"],\"HashMap\":[\"1\",\"2\"],\"Map\":[\"1\",\"2\"],\"MapBase.K\":\"1\",\"MapBase.V\":\"2\"},\"_IdentityHashMap\":{\"_HashMap\":[\"1\",\"2\"],\"MapBase\":[\"1\",\"2\"],\"HashMap\":[\"1\",\"2\"],\"Map\":[\"1\",\"2\"],\"MapBase.K\":\"1\",\"MapBase.V\":\"2\"},\"_HashMapKeyIterable\":{\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"],\"Iterable.E\":\"1\"},\"_HashMapKeyIterator\":{\"Iterator\":[\"1\"]},\"_LinkedCustomHashMap\":{\"JsLinkedHashMap\":[\"1\",\"2\"],\"MapBase\":[\"1\",\"2\"],\"LinkedHashMap\":[\"1\",\"2\"],\"Map\":[\"1\",\"2\"],\"MapBase.K\":\"1\",\"MapBase.V\":\"2\"},\"_HashSet\":{\"SetBase\":[\"1\"],\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"],\"Iterable.E\":\"1\"},\"_HashSetIterator\":{\"Iterator\":[\"1\"]},\"ListBase\":{\"List\":[\"1\"],\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"]},\"MapBase\":{\"Map\":[\"1\",\"2\"]},\"MapView\":{\"Map\":[\"1\",\"2\"]},\"UnmodifiableMapView\":{\"_UnmodifiableMapView_MapView__UnmodifiableMapMixin\":[\"1\",\"2\"],\"MapView\":[\"1\",\"2\"],\"_UnmodifiableMapMixin\":[\"1\",\"2\"],\"Map\":[\"1\",\"2\"]},\"ListQueue\":{\"Queue\":[\"1\"],\"ListIterable\":[\"1\"],\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"],\"ListIterable.E\":\"1\",\"Iterable.E\":\"1\"},\"_ListQueueIterator\":{\"Iterator\":[\"1\"]},\"SetBase\":{\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"]},\"_SetBase\":{\"SetBase\":[\"1\"],\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"]},\"_SplayTreeIterator\":{\"Iterator\":[\"3\"]},\"_SplayTreeKeyIterator\":{\"_SplayTreeIterator\":[\"1\",\"2\",\"1\"],\"Iterator\":[\"1\"],\"_SplayTreeIterator.K\":\"1\",\"_SplayTreeIterator.T\":\"1\",\"_SplayTreeIterator.1\":\"2\"},\"SplayTreeSet\":{\"SetBase\":[\"1\"],\"EfficientLengthIterable\":[\"1\"],\"_SplayTree\":[\"1\",\"_SplayTreeSetNode<1>\"],\"Iterable\":[\"1\"],\"Iterable.E\":\"1\",\"_SplayTree.1\":\"_SplayTreeSetNode<1>\",\"_SplayTree.K\":\"1\"},\"Encoding\":{\"Codec\":[\"String\",\"List\"]},\"_JsonMap\":{\"MapBase\":[\"String\",\"@\"],\"Map\":[\"String\",\"@\"],\"MapBase.K\":\"String\",\"MapBase.V\":\"@\"},\"_JsonMapKeyIterable\":{\"ListIterable\":[\"String\"],\"EfficientLengthIterable\":[\"String\"],\"Iterable\":[\"String\"],\"ListIterable.E\":\"String\",\"Iterable.E\":\"String\"},\"AsciiCodec\":{\"Encoding\":[],\"Codec\":[\"String\",\"List\"]},\"_UnicodeSubsetEncoder\":{\"Converter\":[\"String\",\"List\"]},\"AsciiEncoder\":{\"Converter\":[\"String\",\"List\"]},\"_UnicodeSubsetDecoder\":{\"Converter\":[\"List\",\"String\"]},\"AsciiDecoder\":{\"Converter\":[\"List\",\"String\"]},\"Base64Codec\":{\"Codec\":[\"List\",\"String\"]},\"Base64Encoder\":{\"Converter\":[\"List\",\"String\"]},\"JsonUnsupportedObjectError\":{\"Error\":[]},\"JsonCyclicError\":{\"Error\":[]},\"JsonCodec\":{\"Codec\":[\"Object?\",\"String\"]},\"JsonEncoder\":{\"Converter\":[\"Object?\",\"String\"]},\"JsonDecoder\":{\"Converter\":[\"String\",\"Object?\"]},\"Latin1Codec\":{\"Encoding\":[],\"Codec\":[\"String\",\"List\"]},\"Latin1Encoder\":{\"Converter\":[\"String\",\"List\"]},\"Latin1Decoder\":{\"Converter\":[\"List\",\"String\"]},\"Utf8Codec\":{\"Encoding\":[],\"Codec\":[\"String\",\"List\"]},\"Utf8Encoder\":{\"Converter\":[\"String\",\"List\"]},\"Utf8Decoder\":{\"Converter\":[\"List\",\"String\"]},\"DateTime\":{\"Comparable\":[\"DateTime\"]},\"double\":{\"num\":[],\"Comparable\":[\"num\"]},\"Duration\":{\"Comparable\":[\"Duration\"]},\"int\":{\"num\":[],\"Comparable\":[\"num\"]},\"List\":{\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"]},\"num\":{\"Comparable\":[\"num\"]},\"RegExpMatch\":{\"Match\":[]},\"String\":{\"Comparable\":[\"String\"],\"Pattern\":[]},\"AssertionError\":{\"Error\":[]},\"TypeError\":{\"Error\":[]},\"ArgumentError\":{\"Error\":[]},\"RangeError\":{\"Error\":[]},\"IndexError\":{\"Error\":[]},\"UnsupportedError\":{\"Error\":[]},\"UnimplementedError\":{\"Error\":[]},\"StateError\":{\"Error\":[]},\"ConcurrentModificationError\":{\"Error\":[]},\"OutOfMemoryError\":{\"Error\":[]},\"StackOverflowError\":{\"Error\":[]},\"_Exception\":{\"Exception\":[]},\"FormatException\":{\"Exception\":[]},\"_StringStackTrace\":{\"StackTrace\":[]},\"StringBuffer\":{\"StringSink\":[]},\"_Uri\":{\"Uri\":[]},\"_SimpleUri\":{\"Uri\":[]},\"_DataUri\":{\"Uri\":[]},\"NullRejectionException\":{\"Exception\":[]},\"ErrorResult\":{\"Result\":[\"0&\"]},\"ValueResult\":{\"Result\":[\"1\"]},\"_NextRequest\":{\"_EventRequest\":[\"1\"]},\"_HasNextRequest\":{\"_EventRequest\":[\"1\"]},\"CanonicalizedMap\":{\"Map\":[\"2\",\"3\"]},\"QueueList\":{\"ListBase\":[\"1\"],\"List\":[\"1\"],\"Queue\":[\"1\"],\"EfficientLengthIterable\":[\"1\"],\"Iterable\":[\"1\"],\"ListBase.E\":\"1\",\"QueueList.E\":\"1\",\"Iterable.E\":\"1\"},\"_CastQueueList\":{\"QueueList\":[\"2\"],\"ListBase\":[\"2\"],\"List\":[\"2\"],\"Queue\":[\"2\"],\"EfficientLengthIterable\":[\"2\"],\"Iterable\":[\"2\"],\"ListBase.E\":\"2\",\"QueueList.E\":\"2\",\"Iterable.E\":\"2\"},\"PersistentWebSocket\":{\"StreamChannelMixin\":[\"@\"]},\"SseSocketClient\":{\"SocketClient\":[]},\"WebSocketClient\":{\"SocketClient\":[]},\"RequestAbortedException\":{\"Exception\":[]},\"ByteStream\":{\"StreamView\":[\"List\"],\"Stream\":[\"List\"],\"Stream.T\":\"List\",\"StreamView.T\":\"List\"},\"ClientException\":{\"Exception\":[]},\"Request\":{\"BaseRequest\":[]},\"StreamedResponseV2\":{\"StreamedResponse\":[]},\"CaseInsensitiveMap\":{\"CanonicalizedMap\":[\"String\",\"String\",\"1\"],\"Map\":[\"String\",\"1\"],\"CanonicalizedMap.K\":\"String\",\"CanonicalizedMap.V\":\"1\",\"CanonicalizedMap.C\":\"String\"},\"Level\":{\"Comparable\":[\"Level\"]},\"PathException\":{\"Exception\":[]},\"PosixStyle\":{\"InternalStyle\":[]},\"UrlStyle\":{\"InternalStyle\":[]},\"WindowsStyle\":{\"InternalStyle\":[]},\"FileLocation\":{\"SourceLocation\":[],\"Comparable\":[\"SourceLocation\"]},\"_FileSpan\":{\"SourceSpanWithContext\":[],\"SourceSpan\":[],\"Comparable\":[\"SourceSpan\"]},\"SourceLocation\":{\"Comparable\":[\"SourceLocation\"]},\"SourceLocationMixin\":{\"SourceLocation\":[],\"Comparable\":[\"SourceLocation\"]},\"SourceSpan\":{\"Comparable\":[\"SourceSpan\"]},\"SourceSpanBase\":{\"SourceSpan\":[],\"Comparable\":[\"SourceSpan\"]},\"SourceSpanException\":{\"Exception\":[]},\"SourceSpanFormatException\":{\"FormatException\":[],\"Exception\":[]},\"SourceSpanMixin\":{\"SourceSpan\":[],\"Comparable\":[\"SourceSpan\"]},\"SourceSpanWithContext\":{\"SourceSpan\":[],\"Comparable\":[\"SourceSpan\"]},\"SseClient\":{\"StreamChannelMixin\":[\"String?\"]},\"StringScannerException\":{\"FormatException\":[],\"Exception\":[]},\"_EventStream\":{\"Stream\":[\"1\"],\"Stream.T\":\"1\"},\"_EventStreamSubscription\":{\"StreamSubscription\":[\"1\"]},\"BrowserWebSocket\":{\"WebSocket\":[]},\"TextDataReceived\":{\"WebSocketEvent\":[]},\"BinaryDataReceived\":{\"WebSocketEvent\":[]},\"CloseReceived\":{\"WebSocketEvent\":[]},\"WebSocketException\":{\"Exception\":[]},\"WebSocketConnectionClosed\":{\"Exception\":[]},\"DdcLibraryBundleRestarter\":{\"TwoPhaseRestarter\":[],\"Restarter\":[]},\"DdcRestarter\":{\"Restarter\":[]},\"RequireRestarter\":{\"Restarter\":[]},\"HotReloadFailedException\":{\"Exception\":[]},\"Int8List\":{\"List\":[\"int\"],\"EfficientLengthIterable\":[\"int\"],\"Iterable\":[\"int\"]},\"Uint8List\":{\"List\":[\"int\"],\"EfficientLengthIterable\":[\"int\"],\"Iterable\":[\"int\"]},\"Uint8ClampedList\":{\"List\":[\"int\"],\"EfficientLengthIterable\":[\"int\"],\"Iterable\":[\"int\"]},\"Int16List\":{\"List\":[\"int\"],\"EfficientLengthIterable\":[\"int\"],\"Iterable\":[\"int\"]},\"Uint16List\":{\"List\":[\"int\"],\"EfficientLengthIterable\":[\"int\"],\"Iterable\":[\"int\"]},\"Int32List\":{\"List\":[\"int\"],\"EfficientLengthIterable\":[\"int\"],\"Iterable\":[\"int\"]},\"Uint32List\":{\"List\":[\"int\"],\"EfficientLengthIterable\":[\"int\"],\"Iterable\":[\"int\"]},\"Float32List\":{\"List\":[\"double\"],\"EfficientLengthIterable\":[\"double\"],\"Iterable\":[\"double\"]},\"Float64List\":{\"List\":[\"double\"],\"EfficientLengthIterable\":[\"double\"],\"Iterable\":[\"double\"]}}'));\n" " A._Universe_addErasedTypes(init.typeUniverse, JSON.parse('{\"UnmodifiableListBase\":1,\"__CastListBase__CastIterableBase_ListMixin\":2,\"NativeTypedArray\":1,\"_DelayedEvent\":1,\"_SetBase\":1,\"_SplayTreeSet__SplayTree_Iterable\":1,\"_SplayTreeSet__SplayTree_Iterable_SetMixin\":1,\"_QueueList_Object_ListMixin\":1,\"StreamChannelMixin\":1}'));\n" " var string\$ = {\n" " x00_____: \"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\u03f6\\x00\\u0404\\u03f4 \\u03f4\\u03f6\\u01f6\\u01f6\\u03f6\\u03fc\\u01f4\\u03ff\\u03ff\\u0584\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u05d4\\u01f4\\x00\\u01f4\\x00\\u0504\\u05c4\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u0400\\x00\\u0400\\u0200\\u03f7\\u0200\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u03ff\\u0200\\u0200\\u0200\\u03f7\\x00\",\n" @@ -22315,6 +22424,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " String_Function_Match: findType(\"String(Match)\"),\n" " Timer: findType(\"Timer\"),\n" " TrustedGetRuntimeType: findType(\"TrustedGetRuntimeType\"),\n" +" TwoPhaseRestarter: findType(\"TwoPhaseRestarter\"),\n" " TypeError: findType(\"TypeError\"),\n" " Uint16List: findType(\"Uint16List\"),\n" " Uint32List: findType(\"Uint32List\"),\n" @@ -22860,4 +22970,4 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value "})();\n" ""; -const clientDartHash = 'fca4b3f5a690b875dcb1a66b1f52617a7a7bb23e65cf16ca141766220b0c683c'; +const clientDartHash = '8435065dc6e0da85f11644426d60c36fb1648785a2a896f6e40ae2da995f07b2'; diff --git a/dwds/lib/src/handlers/injector.dart b/dwds/lib/src/handlers/injector.dart index f0f6e1b92..5523a43fe 100644 --- a/dwds/lib/src/handlers/injector.dart +++ b/dwds/lib/src/handlers/injector.dart @@ -9,7 +9,7 @@ import 'dart:io'; import 'package:crypto/crypto.dart'; import 'package:dwds/src/config/tool_configuration.dart'; import 'package:dwds/src/handlers/injected_client_js.dart'; -import 'package:dwds/src/loaders/ddc_library_bundle.dart'; +import 'package:dwds/src/loaders/strategy.dart'; import 'package:dwds/src/version.dart'; import 'package:logging/logging.dart'; import 'package:shelf/shelf.dart'; @@ -189,7 +189,7 @@ Future _injectedClientSnippet( final buildSettings = loadStrategy.buildSettings; final appMetadata = globalToolConfiguration.appMetadata; final debugSettings = globalToolConfiguration.debugSettings; - final reloadedSourcesPath = loadStrategy is DdcLibraryBundleStrategy + final reloadedSourcesPath = loadStrategy is ReloadableLoadStrategy ? 'window.\$reloadedSourcesPath = "${loadStrategy.reloadedSourcesUri}";\n' : ''; diff --git a/dwds/lib/src/loaders/ddc_library_bundle.dart b/dwds/lib/src/loaders/ddc_library_bundle.dart index 31b483e4e..2404fb956 100644 --- a/dwds/lib/src/loaders/ddc_library_bundle.dart +++ b/dwds/lib/src/loaders/ddc_library_bundle.dart @@ -14,7 +14,8 @@ import 'package:shelf/shelf.dart'; // TODO(srujzs): This is mostly a copy of `DdcStrategy`. Some of the // functionality in here may not make sense with the library bundle format yet. -class DdcLibraryBundleStrategy extends LoadStrategy { +class DdcLibraryBundleStrategy extends LoadStrategy + implements ReloadableLoadStrategy { @override final ReloadConfiguration reloadConfiguration; @@ -104,29 +105,7 @@ class DdcLibraryBundleStrategy extends LoadStrategy { final BuildSettings _buildSettings; - /// The [Uri] of the file that contains a JSONified list of maps which follows - /// the following format: - /// - /// ```json - /// [ - /// { - /// "src": "/", - /// "module": "", - /// "libraries": ["", ""], - /// }, - /// ] - /// ``` - /// - /// `src`: A string that corresponds to the file path containing a DDC library - /// bundle. - /// `module`: The name of the library bundle in `src`. - /// `libraries`: An array of strings containing the libraries that were - /// compiled in `src`. - /// - /// This is needed for hot reloads and restarts in order to tell the module - /// loader what files need to be loaded and what libraries need to be - /// reloaded. The contents of the file this [Uri] points to should be updated - /// whenever a hot reload or hot restart is executed. + @override final Uri? reloadedSourcesUri; /// When enabled, injects the script loader into the bootstrapper from diff --git a/dwds/lib/src/loaders/strategy.dart b/dwds/lib/src/loaders/strategy.dart index 9be33e21f..b3f849d56 100644 --- a/dwds/lib/src/loaders/strategy.dart +++ b/dwds/lib/src/loaders/strategy.dart @@ -13,6 +13,35 @@ import 'package:dwds/src/utilities/dart_uri.dart'; import 'package:path/path.dart' as p; import 'package:shelf/shelf.dart'; +/// A load strategy that supports reading from a URI to find the sources needed +/// to complete the hot reload or hot restart operation. +abstract class ReloadableLoadStrategy implements LoadStrategy { + /// The [Uri] of the file that contains a JSONified list of maps which follows + /// the following format: + /// + /// ```json + /// [ + /// { + /// "src": "/", + /// "module": "", + /// "libraries": ["", ""], + /// }, + /// ] + /// ``` + /// + /// `src`: A string that corresponds to the file path containing a DDC library + /// bundle. + /// `module`: The name of the library bundle in `src`. + /// `libraries`: An array of strings containing the libraries that were + /// compiled in `src`. + /// + /// This is needed for hot reloads and restarts in order to tell the module + /// loader what files need to be loaded and what libraries need to be + /// reloaded. The contents of the file this [Uri] points to should be updated + /// whenever a hot reload or hot restart is executed. + Uri? get reloadedSourcesUri; +} + abstract class LoadStrategy { final AssetReader _assetReader; final String? _packageConfigPath; diff --git a/dwds/web/client.dart b/dwds/web/client.dart index 059e054c5..882d8ec59 100644 --- a/dwds/web/client.dart +++ b/dwds/web/client.dart @@ -90,6 +90,12 @@ Future? main() { return manager.hotReloadEnd().toJS; }.toJS; + hotRestartBeginJs = () { + return manager.hotRestartBegin(hotReloadReloadedSourcesPath).toJS; + }.toJS; + + hotRestartEndJs = manager.hotRestartEnd.toJS; + Completer? readyToRunMainCompleter; hotRestartJs = (String runId, [bool? pauseIsolatesOnStart]) { @@ -523,10 +529,17 @@ Future handleWebSocketHotRestartRequest( final requestId = event.id; try { final runId = const Uuid().v4(); - await manager.hotRestart( - runId: runId, - reloadedSourcesPath: hotRestartReloadedSourcesPath, - ); + if (manager.supportsTwoPhaseHotRestart) { + await manager.hotRestartBegin(hotRestartReloadedSourcesPath!); + manager.hotRestartEnd(); + } else { + // TODO(nshahan): Remove after migrating to hotRestartBegin/hotRestartEnd. + // https://github.com/dart-lang/webdev/issues/2826 + await manager.hotRestart( + runId: runId, + reloadedSourcesPath: hotRestartReloadedSourcesPath, + ); + } _sendHotRestartResponse(clientSink, requestId, success: true); } catch (e) { _sendHotRestartResponse( @@ -597,6 +610,12 @@ external set hotReloadStartJs(JSFunction cb); @JS(r'$dartHotReloadEndDwds') external set hotReloadEndJs(JSFunction cb); +@JS(r'$dartHotRestartBeginDwds') +external set hotRestartBeginJs(JSFunction cb); + +@JS(r'$dartHotRestartEndDwds') +external set hotRestartEndJs(JSFunction cb); + @JS(r'$reloadedSourcesPath') external String? get _reloadedSourcesPath; @@ -612,6 +631,8 @@ String get hotReloadReloadedSourcesPath { } /// Debugger-initiated hot restart. +// TODO(nshahan): Remove after migrating to hotRestartBegin/hotRestartEnd. +// https://github.com/dart-lang/webdev/issues/2826 @JS(r'$dartHotRestartDwds') external set hotRestartJs(JSFunction cb); diff --git a/dwds/web/reloader/ddc_library_bundle_restarter.dart b/dwds/web/reloader/ddc_library_bundle_restarter.dart index c0335b934..0e431d891 100644 --- a/dwds/web/reloader/ddc_library_bundle_restarter.dart +++ b/dwds/web/reloader/ddc_library_bundle_restarter.dart @@ -15,7 +15,14 @@ external _DartDevEmbedder get _dartDevEmbedder; extension type _DartDevEmbedder._(JSObject _) implements JSObject { external _Debugger get debugger; - external JSPromise hotRestart(); + external JSPromise?> hotRestart([ + JSArray? reloadedSources, + ]); + external JSPromise> hotRestartBegin([ + JSArray? reloadedSources, + ]); + external JSAny? hotRestartEnd(); + external JSPromise hotReload( JSArray filesToLoad, JSArray librariesToReload, @@ -64,7 +71,7 @@ extension on JSArray { external void push(JSString value); } -class DdcLibraryBundleRestarter implements Restarter { +class DdcLibraryBundleRestarter implements Restarter, TwoPhaseRestarter { JSFunction? _capturedHotReloadEndCallback; Future _runMainWhenReady( @@ -125,6 +132,22 @@ class DdcLibraryBundleRestarter implements Restarter { return (true, srcModuleLibraries.jsify() as JSArray); } + @override + Future> hotRestartBegin(String reloadedSourcesPath) async { + await _dartDevEmbedder.debugger.maybeInvokeFlutterDisassemble(); + final srcModuleLibraries = await _getSrcModuleLibraries( + reloadedSourcesPath, + ); + final jsFilesToRequest = srcModuleLibraries.jsify() as JSArray; + final requestedJsFiles = await _dartDevEmbedder + .hotRestartBegin(jsFilesToRequest) + .toDart; + return requestedJsFiles; + } + + @override + void hotRestartEnd() => _dartDevEmbedder.hotRestartEnd(); + @override Future> hotReloadStart(String reloadedSourcesPath) async { final filesToLoad = JSArray(); diff --git a/dwds/web/reloader/manager.dart b/dwds/web/reloader/manager.dart index 8c3f52a85..f1f7ac154 100644 --- a/dwds/web/reloader/manager.dart +++ b/dwds/web/reloader/manager.dart @@ -64,6 +64,22 @@ class ReloadingManager { return result.$2; } + bool get supportsTwoPhaseHotRestart => _restarter is TwoPhaseRestarter; + + Future> hotRestartBegin(String reloadedSourcesPath) async { + final requestedSources = await (_restarter as TwoPhaseRestarter) + .hotRestartBegin(reloadedSourcesPath); + // Notify package:dwds that the isolate is exiting and a new isolate will + // be created. + _beforeRestart(); + _afterRestart(true); + return requestedSources; + } + + void hotRestartEnd() { + (_restarter as TwoPhaseRestarter).hotRestartEnd(); + } + /// After a previous call to [hotReloadStart], completes the hot /// reload by pushing the libraries into the Dart runtime. Future hotReloadEnd() async { diff --git a/dwds/web/reloader/restarter.dart b/dwds/web/reloader/restarter.dart index 689491146..01a93f401 100644 --- a/dwds/web/reloader/restarter.dart +++ b/dwds/web/reloader/restarter.dart @@ -4,6 +4,19 @@ import 'dart:js_interop'; +/// A Restarter that supports a hot restart over two phases. +abstract class TwoPhaseRestarter implements Restarter { + /// Starts a hot restart operation. + /// + /// Passes the [reloadedSourcesPath] through to the `DartDevEmbedder` and + /// bubbles up the returned array of scripts that were actually requested. + Future> hotRestartBegin(String reloadedSourcesPath); + + /// Finishes the hot restart operation that must have been previously started + /// by [hotRestartBegin]. + void hotRestartEnd(); +} + abstract class Restarter { /// Attempts to perform a hot restart. /// @@ -30,6 +43,8 @@ abstract class Restarter { /// Returns a record containing whether the hot restart succeeded and either /// the JS version of the list of maps from [reloadedSourcesPath] if /// [reloadedSourcesPath] is non-null and null otherwise. + // TODO(nshahan): Remove after migrating to hotRestartBegin/hotRestartEnd. + // https://github.com/dart-lang/webdev/issues/2826 Future<(bool, JSArray?)> restart({ String? runId, Future? readyToRunMain, From 080eed08550d013ceb60fb029566945022de1955 Mon Sep 17 00:00:00 2001 From: Nicholas Shahan Date: Fri, 15 May 2026 14:12:38 -0700 Subject: [PATCH 03/10] switch tests from build daemon to frontend server --- .../frontend_server_common/bootstrap.dart | 82 +++++++++---------- dwds/test/integration/events_common.dart | 13 ++- .../events_ddc_library_bundle_test.dart | 20 ++++- dwds/test/integration/fixtures/project.dart | 2 +- ...t_breakpoints_ddc_library_bundle_test.dart | 14 +++- ...t_correctness_ddc_library_bundle_test.dart | 33 ++++---- .../hot_restart_ddc_library_bundle_test.dart | 35 ++++---- 7 files changed, 119 insertions(+), 80 deletions(-) diff --git a/dwds/test/frontend_server_common/bootstrap.dart b/dwds/test/frontend_server_common/bootstrap.dart index 0d38392fe..143cbd450 100644 --- a/dwds/test/frontend_server_common/bootstrap.dart +++ b/dwds/test/frontend_server_common/bootstrap.dart @@ -494,50 +494,46 @@ $_simpleLoaderScript let reloadedSources = _currentDirectory + '/reloaded_sources.json'; if (!window.\$dartReloadModifiedModules) { - window.\$dartReloadModifiedModules = (function(appName, callback) { - var xhttp = new XMLHttpRequest(); - xhttp.withCredentials = true; - xhttp.onreadystatechange = function() { - // https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState - if (this.readyState == 4 && this.status == 200 || this.status == 304) { - var scripts = JSON.parse(this.responseText); - var numToLoad = 0; - var numLoaded = 0; - for (var i = 0; i < scripts.length; i++) { - var script = scripts[i]; - var module = script.module; - if (module == null) continue; - var src = script.src; - var oldSrc = window.\$dartLoader.moduleIdToUrl.get(module); - - // We might actually load from a different uri, delete the old one - // just to be sure. - window.\$dartLoader.urlToModuleId.delete(oldSrc); - - window.\$dartLoader.moduleIdToUrl.set(module, src); - window.\$dartLoader.urlToModuleId.set(src, module); - - numToLoad++; - - var el = document.getElementById(module); - if (el) el.remove(); - el = window.\$dartCreateScript(); - el.src = policy.createScriptURL(src); - el.async = false; - el.defer = true; - el.id = module; - el.onload = function() { - numLoaded++; - if (numToLoad == numLoaded) callback(); - }; - document.head.appendChild(el); - } - // Call `callback` right away if we found no updated scripts. - if (numToLoad == 0) callback(); + window.\$dartReloadModifiedModules = (function(filesToReload, appName) { + return new Promise(function(resolve) { + let requestedScripts = []; + function callback() { + resolve(filesToReload); } - }; - xhttp.open("GET", reloadedSources, true); - xhttp.send(); + let numToLoad = 0; + let numLoaded = 0; + for (let i = 0; i < filesToReload.length; i++) { + const file = filesToReload[i]; + const module = file.module; + if (module == null) continue; + const src = file.src; + const oldSrc = window.\$dartLoader.moduleIdToUrl.get(module); + + // We might actually load from a different uri, delete the old one + // just to be sure. + window.\$dartLoader.urlToModuleId.delete(oldSrc); + + window.\$dartLoader.moduleIdToUrl.set(module, src); + window.\$dartLoader.urlToModuleId.set(src, module); + + numToLoad++; + + let el = document.getElementById(module); + if (el) el.remove(); + el = window.\$dartCreateScript(); + el.src = policy.createScriptURL(src); + el.async = false; + el.defer = true; + el.id = module; + el.onload = function() { + numLoaded++; + if (numToLoad == numLoaded) callback(); + }; + document.head.appendChild(el); + } + // Call `callback` right away if we found no updated scripts. + if (numToLoad == 0) callback(); + }); }); } }; diff --git a/dwds/test/integration/events_common.dart b/dwds/test/integration/events_common.dart index 1fa651f6d..0736d9b97 100644 --- a/dwds/test/integration/events_common.dart +++ b/dwds/test/integration/events_common.dart @@ -17,7 +17,10 @@ import 'fixtures/context.dart'; import 'fixtures/project.dart'; import 'fixtures/utilities.dart'; -void testWithDwds({required TestSdkConfigurationProvider provider}) { +void testWithDwds({ + required TestSdkConfigurationProvider provider, + required CompilationMode compilationMode, +}) { final context = TestContext(TestProject.test, provider); group( @@ -70,13 +73,17 @@ void testWithDwds({required TestSdkConfigurationProvider provider}) { pipe(eventStream, timeout: const Timeout.factor(5)), emitsThrough( matchesEvent(DwdsEventKind.compilerUpdateDependencies, { - 'entrypoint': 'hello_world/main.dart.bootstrap.js', + if (compilationMode == CompilationMode.frontendServer) + 'entrypoint': 'example/hello_world/main_module.bootstrap.js' + else + 'entrypoint': 'hello_world/main.dart.bootstrap.js', 'elapsedMilliseconds': isNotNull, }), ), ); await context.setUp( testSettings: TestSettings( + compilationMode: compilationMode, enableExpressionEvaluation: true, moduleFormat: provider.ddcModuleFormat, verboseCompiler: provider.verbose, @@ -388,7 +395,7 @@ void testWithDwds({required TestSdkConfigurationProvider provider}) { final hotRestart = context.getRegisteredServiceExtension( 'hotRestart', ); - + await context.recompile(fullRestart: true); await expectEventDuring( matchesEvent(DwdsEventKind.hotRestart, { 'elapsedMilliseconds': isNotNull, diff --git a/dwds/test/integration/events_ddc_library_bundle_test.dart b/dwds/test/integration/events_ddc_library_bundle_test.dart index d3eaeab91..8532fa427 100644 --- a/dwds/test/integration/events_ddc_library_bundle_test.dart +++ b/dwds/test/integration/events_ddc_library_bundle_test.dart @@ -10,6 +10,7 @@ import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; import 'events_common.dart'; +import 'fixtures/context.dart'; void main() { // Enable verbose logging for debugging. @@ -22,5 +23,22 @@ void main() { ); tearDownAll(provider.dispose); - testWithDwds(provider: provider); + group('Frontend Server', () { + testWithDwds( + provider: provider, + compilationMode: CompilationMode.frontendServer, + ); + }); + + group( + 'Build Daemon', + () { + testWithDwds( + provider: provider, + compilationMode: CompilationMode.buildDaemon, + ); + }, + // https://github.com/dart-lang/build/issues/4928 + skip: true, + ); } diff --git a/dwds/test/integration/fixtures/project.dart b/dwds/test/integration/fixtures/project.dart index 1779ff59d..3322800e2 100644 --- a/dwds/test/integration/fixtures/project.dart +++ b/dwds/test/integration/fixtures/project.dart @@ -103,7 +103,7 @@ class TestProject { static final test = TestProject._( packageName: '_test', packageDirectory: '_test', - webAssetsPath: 'example/hello_world', + webAssetsPath: webCompatiblePath(['example', 'hello_world']), dartEntryFileName: 'main.dart', htmlEntryFileName: 'index.html', ); diff --git a/dwds/test/integration/hot_restart_breakpoints_ddc_library_bundle_test.dart b/dwds/test/integration/hot_restart_breakpoints_ddc_library_bundle_test.dart index 364a4112d..e97e213e0 100644 --- a/dwds/test/integration/hot_restart_breakpoints_ddc_library_bundle_test.dart +++ b/dwds/test/integration/hot_restart_breakpoints_ddc_library_bundle_test.dart @@ -32,7 +32,15 @@ void main() { ); }); - group('Build Daemon', () { - runTests(provider: provider, compilationMode: CompilationMode.buildDaemon); - }); + group( + 'Build Daemon', + () { + runTests( + provider: provider, + compilationMode: CompilationMode.buildDaemon, + ); + }, + // https://github.com/dart-lang/build/issues/4928 + skip: true, + ); } diff --git a/dwds/test/integration/hot_restart_correctness_ddc_library_bundle_test.dart b/dwds/test/integration/hot_restart_correctness_ddc_library_bundle_test.dart index f5a1f6839..333038da6 100644 --- a/dwds/test/integration/hot_restart_correctness_ddc_library_bundle_test.dart +++ b/dwds/test/integration/hot_restart_correctness_ddc_library_bundle_test.dart @@ -35,18 +35,23 @@ void main() { ); }); - group('canary: $canaryFeatures | Build Daemon |', () { - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: moduleFormat, - ); - final compilationMode = CompilationMode.buildDaemon; - runTests( - provider: provider, - moduleFormat: moduleFormat, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); + group( + 'canary: $canaryFeatures | Build Daemon |', + () { + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: moduleFormat, + ); + final compilationMode = CompilationMode.buildDaemon; + runTests( + provider: provider, + moduleFormat: moduleFormat, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }, + // https://github.com/dart-lang/build/issues/4928 + skip: true, + ); } diff --git a/dwds/test/integration/hot_restart_ddc_library_bundle_test.dart b/dwds/test/integration/hot_restart_ddc_library_bundle_test.dart index dacc2f86e..0ba000f18 100644 --- a/dwds/test/integration/hot_restart_ddc_library_bundle_test.dart +++ b/dwds/test/integration/hot_restart_ddc_library_bundle_test.dart @@ -36,19 +36,24 @@ void main() { ); }); - group('canary: $canaryFeatures | Build Daemon |', () { - final compilationMode = CompilationMode.buildDaemon; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: moduleFormat, - ); - - runTests( - provider: provider, - moduleFormat: moduleFormat, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); + group( + 'canary: $canaryFeatures | Build Daemon |', + () { + final compilationMode = CompilationMode.buildDaemon; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: moduleFormat, + ); + + runTests( + provider: provider, + moduleFormat: moduleFormat, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }, + // https://github.com/dart-lang/build/issues/4928 + skip: true, + ); } From 374e80638e67fe628a0c67e1c241af66e5eb3ce1 Mon Sep 17 00:00:00 2001 From: Nicholas Shahan Date: Fri, 15 May 2026 14:16:22 -0700 Subject: [PATCH 04/10] fix amd test to continue using build daemon --- dwds/test/integration/events_amd_test.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dwds/test/integration/events_amd_test.dart b/dwds/test/integration/events_amd_test.dart index 11fbc5b5b..1fd465339 100644 --- a/dwds/test/integration/events_amd_test.dart +++ b/dwds/test/integration/events_amd_test.dart @@ -15,6 +15,7 @@ import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; import 'events_common.dart'; +import 'fixtures/context.dart'; void main() { final provider = TestSdkConfigurationProvider(); @@ -77,5 +78,8 @@ void main() { }); }); - testWithDwds(provider: provider); + testWithDwds( + provider: provider, + compilationMode: CompilationMode.buildDaemon, + ); } From 463dd4467d32fb9a16fcfaf5eaafc8ad01d18d50 Mon Sep 17 00:00:00 2001 From: Nicholas Shahan Date: Fri, 15 May 2026 15:12:34 -0700 Subject: [PATCH 05/10] fix skips not skipping --- dwds/test/integration/events_amd_test.dart | 17 ++++++-- dwds/test/integration/events_common.dart | 41 +++++++++++-------- .../events_ddc_library_bundle_test.dart | 17 +++----- 3 files changed, 42 insertions(+), 33 deletions(-) diff --git a/dwds/test/integration/events_amd_test.dart b/dwds/test/integration/events_amd_test.dart index 1fd465339..db87a0df4 100644 --- a/dwds/test/integration/events_amd_test.dart +++ b/dwds/test/integration/events_amd_test.dart @@ -78,8 +78,17 @@ void main() { }); }); - testWithDwds( - provider: provider, - compilationMode: CompilationMode.buildDaemon, - ); + group('Frontend Server', () { + testWithDwds( + provider: provider, + compilationMode: CompilationMode.frontendServer, + ); + }); + + group('Build Daemon', () { + testWithDwds( + provider: provider, + compilationMode: CompilationMode.buildDaemon, + ); + }); } diff --git a/dwds/test/integration/events_common.dart b/dwds/test/integration/events_common.dart index 0736d9b97..c52c423b6 100644 --- a/dwds/test/integration/events_common.dart +++ b/dwds/test/integration/events_common.dart @@ -386,24 +386,29 @@ void testWithDwds({ }); }); - group('hotRestart', () { - setUp(() async { - setCurrentLogWriter(debug: provider.verbose); - }); - - test('emits HOT_RESTART event', () async { - final hotRestart = context.getRegisteredServiceExtension( - 'hotRestart', - ); - await context.recompile(fullRestart: true); - await expectEventDuring( - matchesEvent(DwdsEventKind.hotRestart, { - 'elapsedMilliseconds': isNotNull, - }), - () => fakeClient.callServiceExtension(hotRestart!), - ); - }); - }); + group( + 'hotRestart', + () { + setUp(() async { + setCurrentLogWriter(debug: provider.verbose); + }); + + test('emits HOT_RESTART event', () async { + final hotRestart = context.getRegisteredServiceExtension( + 'hotRestart', + ); + await context.recompile(fullRestart: true); + await expectEventDuring( + matchesEvent(DwdsEventKind.hotRestart, { + 'elapsedMilliseconds': isNotNull, + }), + () => fakeClient.callServiceExtension(hotRestart!), + ); + }); + }, + // https://github.com/dart-lang/build/issues/4928 + skip: compilationMode == CompilationMode.buildDaemon, + ); group('resume', () { late VmServiceInterface service; diff --git a/dwds/test/integration/events_ddc_library_bundle_test.dart b/dwds/test/integration/events_ddc_library_bundle_test.dart index 8532fa427..4f850e22a 100644 --- a/dwds/test/integration/events_ddc_library_bundle_test.dart +++ b/dwds/test/integration/events_ddc_library_bundle_test.dart @@ -30,15 +30,10 @@ void main() { ); }); - group( - 'Build Daemon', - () { - testWithDwds( - provider: provider, - compilationMode: CompilationMode.buildDaemon, - ); - }, - // https://github.com/dart-lang/build/issues/4928 - skip: true, - ); + group('Build Daemon', () { + testWithDwds( + provider: provider, + compilationMode: CompilationMode.buildDaemon, + ); + }); } From c1fe7ba71e03f58909c92632aeefe2b4261b23f5 Mon Sep 17 00:00:00 2001 From: Nicholas Shahan Date: Mon, 18 May 2026 10:19:21 -0700 Subject: [PATCH 06/10] copy windows skip logic --- dwds/test/integration/events_common.dart | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dwds/test/integration/events_common.dart b/dwds/test/integration/events_common.dart index c52c423b6..035649770 100644 --- a/dwds/test/integration/events_common.dart +++ b/dwds/test/integration/events_common.dart @@ -406,8 +406,14 @@ void testWithDwds({ ); }); }, - // https://github.com/dart-lang/build/issues/4928 - skip: compilationMode == CompilationMode.buildDaemon, + + skip: + // Windows is only here to ensure the skip on the outer group gets + // applied. + // https://github.com/dart-lang/webdev/issues/1852 + Platform.isWindows || + // https://github.com/dart-lang/build/issues/4928 + compilationMode == CompilationMode.buildDaemon, ); group('resume', () { From 7c0b371cd77b8036d3ba126864b04ce5c105efe5 Mon Sep 17 00:00:00 2001 From: Nicholas Shahan Date: Tue, 19 May 2026 12:51:43 -0700 Subject: [PATCH 07/10] address some review comments --- dwds/lib/src/dwds_vm_client.dart | 2 +- dwds/test/frontend_server_common/bootstrap.dart | 1 - dwds/web/reloader/ddc_library_bundle_restarter.dart | 2 +- dwds/web/reloader/restarter.dart | 7 +++++++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/dwds/lib/src/dwds_vm_client.dart b/dwds/lib/src/dwds_vm_client.dart index 716ce0f4e..33f473117 100644 --- a/dwds/lib/src/dwds_vm_client.dart +++ b/dwds/lib/src/dwds_vm_client.dart @@ -484,7 +484,7 @@ final class ChromeDwdsVmClient } }); }); - logger.info('Issuing \$dartHotRestartBeginDwds request'); + logger.info('Issuing \$dartHotRestartBeginDwds request.'); final remoteObject = await chromeProxyService.inspector.jsEvaluate( '\$dartHotRestartBeginDwds(\'$runId\', $pauseIsolatesOnStart);', awaitPromise: true, diff --git a/dwds/test/frontend_server_common/bootstrap.dart b/dwds/test/frontend_server_common/bootstrap.dart index 143cbd450..c49a2368e 100644 --- a/dwds/test/frontend_server_common/bootstrap.dart +++ b/dwds/test/frontend_server_common/bootstrap.dart @@ -496,7 +496,6 @@ $_simpleLoaderScript if (!window.\$dartReloadModifiedModules) { window.\$dartReloadModifiedModules = (function(filesToReload, appName) { return new Promise(function(resolve) { - let requestedScripts = []; function callback() { resolve(filesToReload); } diff --git a/dwds/web/reloader/ddc_library_bundle_restarter.dart b/dwds/web/reloader/ddc_library_bundle_restarter.dart index 0e431d891..630890bb0 100644 --- a/dwds/web/reloader/ddc_library_bundle_restarter.dart +++ b/dwds/web/reloader/ddc_library_bundle_restarter.dart @@ -21,7 +21,7 @@ extension type _DartDevEmbedder._(JSObject _) implements JSObject { external JSPromise> hotRestartBegin([ JSArray? reloadedSources, ]); - external JSAny? hotRestartEnd(); + external void hotRestartEnd(); external JSPromise hotReload( JSArray filesToLoad, diff --git a/dwds/web/reloader/restarter.dart b/dwds/web/reloader/restarter.dart index 01a93f401..1810cca2d 100644 --- a/dwds/web/reloader/restarter.dart +++ b/dwds/web/reloader/restarter.dart @@ -5,6 +5,13 @@ import 'dart:js_interop'; /// A Restarter that supports a hot restart over two phases. +/// +/// The APIs here should be used in place of [Restarter.restart]. +/// +/// This is a temporary interface that is only useful while there are +/// `Restarter`s that don't use the two phase restart. +// TODO(nshahan): Move these members into `Restarter` when all have been +// migrated to the two phase restart. abstract class TwoPhaseRestarter implements Restarter { /// Starts a hot restart operation. /// From 3f573b753b6e1018c41339f23bd42c43704caa62 Mon Sep 17 00:00:00 2001 From: Nicholas Shahan Date: Tue, 9 Jun 2026 13:34:46 -0700 Subject: [PATCH 08/10] [build_web_compilers] Use two phase hot restart * Update the injected `$dartReloadModifiedModules` method to return the descriptors for the scripts that were reloaded. * Bumps the min SDK constrain to support the two phase restart logic that requires the new API. --- dwds/lib/src/dwds_vm_client.dart | 181 ++++++++++-------- dwds/lib/src/handlers/injected_client_js.dart | 110 ++++++----- dwds/lib/src/loaders/strategy.dart | 6 +- .../frontend_server_common/bootstrap.dart | 9 - ...t_breakpoints_ddc_library_bundle_test.dart | 2 +- .../hot_restart_ddc_library_bundle_test.dart | 2 +- dwds/web/client.dart | 11 +- .../pubspec.yaml | 9 + dwds_test_common/pubspec_overrides.yaml | 5 - 9 files changed, 186 insertions(+), 149 deletions(-) diff --git a/dwds/lib/src/dwds_vm_client.dart b/dwds/lib/src/dwds_vm_client.dart index 33f473117..cce7e0096 100644 --- a/dwds/lib/src/dwds_vm_client.dart +++ b/dwds/lib/src/dwds_vm_client.dart @@ -440,90 +440,13 @@ final class ChromeDwdsVmClient (event) => event.kind == EventKind.kIsolateStart, ); try { - final isDdcLibraryBundle = - globalToolConfiguration.loadStrategy.id == 'ddc-library-bundle'; - // If we should pause isolates on start, then only run main once we get a - // resume event. - final pauseIsolatesOnStart = chromeProxyService.pauseIsolatesOnStart; - if (pauseIsolatesOnStart) { - if (isDdcLibraryBundle) { - _waitForResumeEventToEndHotRestart(chromeProxyService); - } else { - _waitForResumeEventToRunMain(chromeProxyService); - } - } - // Generate run id to hot restart all apps loaded into the tab. - final runId = const Uuid().v4(); - - // When using the DDC library bundle format, we determine the sources - // that were reloaded during a hot restart to then wait until all the - // sources are parsed before finishing hot restart. This is necessary - // before we can recompute any source location metadata in the - // `ChromeProxyService`. - // TODO(srujzs): We don't do this for the AMD module format, should we? It - // would require adding an extra parameter in the AMD strategy. As we're - // planning to deprecate it, for now, do nothing. - - if (isDdcLibraryBundle) { - final computedReloadedSrcs = Completer(); - final reloadedSrcs = {}; - // Injected client should send a request to recreate the isolate after - // the hot restart. The creation of the isolate should in turn wait - // until all scripts are parsed. - chromeProxyService.allowedToCreateIsolate = Completer(); - final debugger = await chromeProxyService.debuggerFuture; - final parsedScriptsSubscription = debugger - .parsedScriptsController - .stream - .listen((url) { - computedReloadedSrcs.future.then((_) async { - reloadedSrcs.remove(Uri.parse(url).normalizePath().path); - if (reloadedSrcs.isEmpty && - !chromeProxyService.allowedToCreateIsolate.isCompleted) { - chromeProxyService.allowedToCreateIsolate.complete(); - } - }); - }); - logger.info('Issuing \$dartHotRestartBeginDwds request.'); - final remoteObject = await chromeProxyService.inspector.jsEvaluate( - '\$dartHotRestartBeginDwds(\'$runId\', $pauseIsolatesOnStart);', - awaitPromise: true, - returnByValue: true, + if (globalToolConfiguration.loadStrategy.id == 'ddc-library-bundle') { + await _libraryBundleHotRestart( + chromeProxyService, + waitForIsolateStarted, ); - logger.info('\$dartHotRestartBeginDwds request complete.'); - final reloadedSrcModuleLibraries = (remoteObject.value as List) - .cast(); - for (final srcModuleLibrary in reloadedSrcModuleLibraries) { - final srcModuleLibraryCast = srcModuleLibrary.cast(); - reloadedSrcs.add( - Uri.parse( - srcModuleLibraryCast['src'] as String, - ).normalizePath().path, - ); - } - if (reloadedSrcs.isEmpty) { - chromeProxyService.allowedToCreateIsolate.complete(); - } - computedReloadedSrcs.complete(); - await chromeProxyService.allowedToCreateIsolate.future; - await parsedScriptsSubscription.cancel(); } else { - logger.info('Issuing \$dartHotRestartDwds request.'); - final remoteObject = await chromeProxyService.inspector.jsEvaluate( - '\$dartHotRestartDwds(\'$runId\', $pauseIsolatesOnStart);', - awaitPromise: true, - returnByValue: true, - ); - assert(remoteObject.value == null); - logger.info('\$dartHotRestartDwds request complete.'); - } - logger.info('Waiting for Isolate Start event.'); - await waitForIsolateStarted; - chromeProxyService.terminatingIsolates = false; - if (isDdcLibraryBundle && !pauseIsolatesOnStart) { - // When there will be no resume event coming, we can just complete the - // hot restart immediately. - await _requestHotRestartEnd(chromeProxyService); + await _legacyHotRestart(chromeProxyService, waitForIsolateStarted); } } on WipError catch (exception) { final code = exception.error?['code']; @@ -548,6 +471,100 @@ final class ChromeDwdsVmClient return {'result': Success().toJson()}; } + Future _libraryBundleHotRestart( + ChromeProxyService chromeProxyService, + Future waitForIsolateStarted, + ) async { + final pauseIsolatesOnStart = chromeProxyService.pauseIsolatesOnStart; + if (pauseIsolatesOnStart) { + // When pausing isolates on start, a resume event will signal when it is + // safe to finish the hot restart. + _waitForResumeEventToEndHotRestart(chromeProxyService); + } + // Generate run id to hot restart all apps loaded into the tab. + final runId = const Uuid().v4(); + + // When using the DDC library bundle format, we determine the sources + // that were reloaded during a hot restart to then wait until all the + // sources are parsed before finishing hot restart. This is necessary + // before we can recompute any source location metadata in the + // `ChromeProxyService`. + // TODO(srujzs): We don't do this for the AMD module format, should we? It + // would require adding an extra parameter in the AMD strategy. As we're + // planning to deprecate it, for now, do nothing. + final computedReloadedSrcs = Completer(); + final reloadedSrcs = {}; + // Injected client should send a request to recreate the isolate after + // the hot restart. The creation of the isolate should in turn wait + // until all scripts are parsed. + chromeProxyService.allowedToCreateIsolate = Completer(); + final debugger = await chromeProxyService.debuggerFuture; + final parsedScriptsSubscription = debugger.parsedScriptsController.stream + .listen((url) { + computedReloadedSrcs.future.then((_) async { + reloadedSrcs.remove(Uri.parse(url).normalizePath().path); + if (reloadedSrcs.isEmpty && + !chromeProxyService.allowedToCreateIsolate.isCompleted) { + chromeProxyService.allowedToCreateIsolate.complete(); + } + }); + }); + logger.info('Issuing \$dartHotRestartBeginDwds request.'); + final remoteObject = await chromeProxyService.inspector.jsEvaluate( + '\$dartHotRestartBeginDwds(\'$runId\', $pauseIsolatesOnStart);', + awaitPromise: true, + returnByValue: true, + ); + logger.info('\$dartHotRestartBeginDwds request complete.'); + final reloadedSrcModuleLibraries = (remoteObject.value as List).cast(); + for (final srcModuleLibrary in reloadedSrcModuleLibraries) { + final srcModuleLibraryCast = srcModuleLibrary.cast(); + reloadedSrcs.add( + Uri.parse(srcModuleLibraryCast['src'] as String).normalizePath().path, + ); + } + if (reloadedSrcs.isEmpty) { + chromeProxyService.allowedToCreateIsolate.complete(); + } + computedReloadedSrcs.complete(); + await chromeProxyService.allowedToCreateIsolate.future; + await parsedScriptsSubscription.cancel(); + logger.info('Waiting for Isolate Start event.'); + await waitForIsolateStarted; + chromeProxyService.terminatingIsolates = false; + if (!pauseIsolatesOnStart) { + // When there will be no resume event coming, just finish the hot restart + // immediately. + await _requestHotRestartEnd(chromeProxyService); + } + } + + Future _legacyHotRestart( + ChromeProxyService chromeProxyService, + Future waitForIsolateStarted, + ) async { + // If we should pause isolates on start, then only run main once we get a + // resume event. + final pauseIsolatesOnStart = chromeProxyService.pauseIsolatesOnStart; + if (pauseIsolatesOnStart) { + _waitForResumeEventToRunMain(chromeProxyService); + } + // Generate run id to hot restart all apps loaded into the tab. + final runId = const Uuid().v4(); + + logger.info('Issuing \$dartHotRestartDwds request.'); + final remoteObject = await chromeProxyService.inspector.jsEvaluate( + '\$dartHotRestartDwds(\'$runId\', $pauseIsolatesOnStart);', + awaitPromise: true, + returnByValue: true, + ); + assert(remoteObject.value == null); + logger.info('\$dartHotRestartDwds request complete.'); + logger.info('Waiting for Isolate Start event.'); + await waitForIsolateStarted; + chromeProxyService.terminatingIsolates = false; + } + void _waitForResumeEventToRunMain(ChromeProxyService chromeProxyService) { StreamSubscription? resumeEventsSubscription; resumeEventsSubscription = chromeProxyService.resumeAfterRestartEventsStream diff --git a/dwds/lib/src/handlers/injected_client_js.dart b/dwds/lib/src/handlers/injected_client_js.dart index 6857c06a9..4a2175838 100644 --- a/dwds/lib/src/handlers/injected_client_js.dart +++ b/dwds/lib/src/handlers/injected_client_js.dart @@ -2,7 +2,7 @@ // Emits the transpiled client.js directly into a statically embeddable string. // dart format off -const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-values), the Dart to JavaScript compiler version: 3.13.0-107.0.dev.\n" +const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-values), the Dart to JavaScript compiler version: 3.13.0-edge.\n" "// The code supports the following hooks:\n" "// dartPrint(message):\n" "// if this function is defined it is called instead of the Dart [print]\n" @@ -20949,7 +20949,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " \$call\$body\$main__closure(serialized) {\n" " var \$async\$goto = 0,\n" " \$async\$completer = A._makeAsyncAwaitCompleter(type\$.void),\n" -" \$async\$self = this, t1, t2, path, \$alert, \$event;\n" +" \$async\$self = this, t1, t2, t3, path, \$alert, \$event;\n" " var \$async\$call\$1 = A._wrapJsFunctionForAsync(function(\$async\$errorCode, \$async\$result) {\n" " if (\$async\$errorCode === 1)\n" " return A._asyncRethrow(\$async\$result, \$async\$completer);\n" @@ -20977,31 +20977,51 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " break;\n" " case 8:\n" " // then\n" -" \$async\$goto = 11;\n" -" return A._asyncAwait(\$async\$self.manager.hotRestart\$1\$reloadedSourcesPath(A._asStringQ(t1.\$reloadedSourcesPath)), \$async\$call\$1);\n" +" t2 = \$async\$self.manager;\n" +" \$async\$goto = A._asString(t1.\$dartModuleStrategy) === \"ddc-library-bundle\" ? 11 : 13;\n" +" break;\n" " case 11:\n" +" // then\n" +" t3 = A._asStringQ(t1.\$reloadedSourcesPath);\n" +" t3.toString;\n" +" \$async\$goto = 14;\n" +" return A._asyncAwait(t2.hotRestartBegin\$1(t3), \$async\$call\$1);\n" +" case 14:\n" +" // returning from await.\n" +" type\$.TwoPhaseRestarter._as(t2._restarter);\n" +" A._asJSObject(t1.dartDevEmbedder).hotRestartEnd();\n" +" // goto join\n" +" \$async\$goto = 12;\n" +" break;\n" +" case 13:\n" +" // else\n" +" \$async\$goto = 15;\n" +" return A._asyncAwait(t2.hotRestart\$1\$reloadedSourcesPath(A._asStringQ(t1.\$reloadedSourcesPath)), \$async\$call\$1);\n" +" case 15:\n" " // returning from await.\n" +" case 12:\n" +" // join\n" " // goto join\n" " \$async\$goto = 9;\n" " break;\n" " case 10:\n" " // else\n" -" \$async\$goto = A._asString(t1.\$dartReloadConfiguration) === \"ReloadConfiguration.hotReload\" ? 12 : 13;\n" +" \$async\$goto = A._asString(t1.\$dartReloadConfiguration) === \"ReloadConfiguration.hotReload\" ? 16 : 17;\n" " break;\n" -" case 12:\n" +" case 16:\n" " // then\n" " t2 = \$async\$self.manager;\n" " path = A._asStringQ(t1.\$reloadedSourcesPath);\n" " path.toString;\n" -" \$async\$goto = 14;\n" +" \$async\$goto = 18;\n" " return A._asyncAwait(t2._restarter.hotReloadStart\$1(path), \$async\$call\$1);\n" -" case 14:\n" +" case 18:\n" " // returning from await.\n" -" \$async\$goto = 15;\n" +" \$async\$goto = 19;\n" " return A._asyncAwait(t2.hotReloadEnd\$0(), \$async\$call\$1);\n" -" case 15:\n" +" case 19:\n" " // returning from await.\n" -" case 13:\n" +" case 17:\n" " // join\n" " case 9:\n" " // join\n" @@ -21012,9 +21032,9 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " break;\n" " case 4:\n" " // else\n" -" \$async\$goto = \$event instanceof A.DevToolsResponse ? 16 : 18;\n" +" \$async\$goto = \$event instanceof A.DevToolsResponse ? 20 : 22;\n" " break;\n" -" case 16:\n" +" case 20:\n" " // then\n" " if (!\$event.success) {\n" " \$alert = \"DevTools failed to open with:\\n\" + A.S(\$event.error);\n" @@ -21026,13 +21046,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " A._asJSObject(t2.window).alert(\$alert);\n" " }\n" " // goto join\n" -" \$async\$goto = 17;\n" +" \$async\$goto = 21;\n" " break;\n" -" case 18:\n" +" case 22:\n" " // else\n" -" \$async\$goto = \$event instanceof A.RunRequest ? 19 : 21;\n" +" \$async\$goto = \$event instanceof A.RunRequest ? 23 : 25;\n" " break;\n" -" case 19:\n" +" case 23:\n" " // then\n" " t1 = \$async\$self._box_0;\n" " if (!t1.mainRun) {\n" @@ -21040,65 +21060,65 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " A.runMain();\n" " }\n" " // goto join\n" -" \$async\$goto = 20;\n" +" \$async\$goto = 24;\n" " break;\n" -" case 21:\n" +" case 25:\n" " // else\n" -" \$async\$goto = \$event instanceof A.ErrorResponse ? 22 : 24;\n" +" \$async\$goto = \$event instanceof A.ErrorResponse ? 26 : 28;\n" " break;\n" -" case 22:\n" +" case 26:\n" " // then\n" " A._asJSObject(init.G.window).reportError(\"Error from backend:\\n\\nError: \" + \$event.error + \"\\n\\nStack Trace:\\n\" + \$event.stackTrace);\n" " // goto join\n" -" \$async\$goto = 23;\n" +" \$async\$goto = 27;\n" " break;\n" -" case 24:\n" +" case 28:\n" " // else\n" -" \$async\$goto = \$event instanceof A.HotReloadRequest ? 25 : 27;\n" +" \$async\$goto = \$event instanceof A.HotReloadRequest ? 29 : 31;\n" " break;\n" -" case 25:\n" +" case 29:\n" " // then\n" -" \$async\$goto = 28;\n" +" \$async\$goto = 32;\n" " return A._asyncAwait(A.handleWebSocketHotReloadRequest(\$event, \$async\$self.manager, \$async\$self.client.get\$sink()), \$async\$call\$1);\n" -" case 28:\n" +" case 32:\n" " // returning from await.\n" " // goto join\n" -" \$async\$goto = 26;\n" +" \$async\$goto = 30;\n" " break;\n" -" case 27:\n" +" case 31:\n" " // else\n" -" \$async\$goto = \$event instanceof A.HotRestartRequest ? 29 : 31;\n" +" \$async\$goto = \$event instanceof A.HotRestartRequest ? 33 : 35;\n" " break;\n" -" case 29:\n" +" case 33:\n" " // then\n" -" \$async\$goto = 32;\n" +" \$async\$goto = 36;\n" " return A._asyncAwait(A.handleWebSocketHotRestartRequest(\$event, \$async\$self.manager, \$async\$self.client.get\$sink()), \$async\$call\$1);\n" -" case 32:\n" +" case 36:\n" " // returning from await.\n" " // goto join\n" -" \$async\$goto = 30;\n" +" \$async\$goto = 34;\n" " break;\n" -" case 31:\n" +" case 35:\n" " // else\n" -" \$async\$goto = \$event instanceof A.ServiceExtensionRequest ? 33 : 34;\n" +" \$async\$goto = \$event instanceof A.ServiceExtensionRequest ? 37 : 38;\n" " break;\n" -" case 33:\n" +" case 37:\n" " // then\n" -" \$async\$goto = 35;\n" +" \$async\$goto = 39;\n" " return A._asyncAwait(A.handleServiceExtensionRequest(\$event, \$async\$self.client.get\$sink(), \$async\$self.manager), \$async\$call\$1);\n" -" case 35:\n" +" case 39:\n" " // returning from await.\n" +" case 38:\n" +" // join\n" " case 34:\n" " // join\n" " case 30:\n" " // join\n" -" case 26:\n" -" // join\n" -" case 23:\n" +" case 27:\n" " // join\n" -" case 20:\n" +" case 24:\n" " // join\n" -" case 17:\n" +" case 21:\n" " // join\n" " case 3:\n" " // join\n" @@ -22970,4 +22990,4 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value "})();\n" ""; -const clientDartHash = '8435065dc6e0da85f11644426d60c36fb1648785a2a896f6e40ae2da995f07b2'; +const clientDartHash = 'eb87fbfbfd5a1d956d883131177756f74503b621509846fb09367d3ab94173eb'; diff --git a/dwds/lib/src/loaders/strategy.dart b/dwds/lib/src/loaders/strategy.dart index b3f849d56..c4ccaa6aa 100644 --- a/dwds/lib/src/loaders/strategy.dart +++ b/dwds/lib/src/loaders/strategy.dart @@ -22,15 +22,15 @@ abstract class ReloadableLoadStrategy implements LoadStrategy { /// ```json /// [ /// { - /// "src": "/", + /// "src": "/", /// "module": "", /// "libraries": ["", ""], /// }, /// ] /// ``` /// - /// `src`: A string that corresponds to the file path containing a DDC library - /// bundle. + /// `src`: A string that corresponds to the file path relative to the app base + /// URL root that contains the DDC library bundle. /// `module`: The name of the library bundle in `src`. /// `libraries`: An array of strings containing the libraries that were /// compiled in `src`. diff --git a/dwds/test/frontend_server_common/bootstrap.dart b/dwds/test/frontend_server_common/bootstrap.dart index c49a2368e..8efe76ec5 100644 --- a/dwds/test/frontend_server_common/bootstrap.dart +++ b/dwds/test/frontend_server_common/bootstrap.dart @@ -484,15 +484,6 @@ $_simpleLoaderScript }); } - let currentUri = _currentScript.src; - // We should have written a file containing all the scripts that need to be - // reloaded into the page. This is then read when a hot restart is triggered - // in DDC via the `\$dartReloadModifiedModules` callback. - // TODO(srujzs): We should avoid using a callback here in the bootstrap once - // the embedder supports passing a list of files/libraries to `hotRestart` - // instead. Currently, we're forced to read this file twice. - let reloadedSources = _currentDirectory + '/reloaded_sources.json'; - if (!window.\$dartReloadModifiedModules) { window.\$dartReloadModifiedModules = (function(filesToReload, appName) { return new Promise(function(resolve) { diff --git a/dwds/test/integration/hot_restart_breakpoints_ddc_library_bundle_test.dart b/dwds/test/integration/hot_restart_breakpoints_ddc_library_bundle_test.dart index e97e213e0..7dc9acfcc 100644 --- a/dwds/test/integration/hot_restart_breakpoints_ddc_library_bundle_test.dart +++ b/dwds/test/integration/hot_restart_breakpoints_ddc_library_bundle_test.dart @@ -41,6 +41,6 @@ void main() { ); }, // https://github.com/dart-lang/build/issues/4928 - skip: true, + // skip: true, ); } diff --git a/dwds/test/integration/hot_restart_ddc_library_bundle_test.dart b/dwds/test/integration/hot_restart_ddc_library_bundle_test.dart index 0ba000f18..c0946fbd6 100644 --- a/dwds/test/integration/hot_restart_ddc_library_bundle_test.dart +++ b/dwds/test/integration/hot_restart_ddc_library_bundle_test.dart @@ -54,6 +54,6 @@ void main() { ); }, // https://github.com/dart-lang/build/issues/4928 - skip: true, + skip: false, ); } diff --git a/dwds/web/client.dart b/dwds/web/client.dart index 882d8ec59..89a91b840 100644 --- a/dwds/web/client.dart +++ b/dwds/web/client.dart @@ -200,9 +200,14 @@ Future? main() { manager.reloadPage(); } else if (reloadConfiguration == 'ReloadConfiguration.hotRestart') { - await manager.hotRestart( - reloadedSourcesPath: hotRestartReloadedSourcesPath, - ); + if (dartModuleStrategy == 'ddc-library-bundle') { + await manager.hotRestartBegin(hotRestartReloadedSourcesPath!); + manager.hotRestartEnd(); + } else { + await manager.hotRestart( + reloadedSourcesPath: hotRestartReloadedSourcesPath, + ); + } } else if (reloadConfiguration == 'ReloadConfiguration.hotReload') { await manager.hotReloadStart(hotReloadReloadedSourcesPath); await manager.hotReloadEnd(); diff --git a/dwds_test_common/fixtures/_test_hot_restart_breakpoints/pubspec.yaml b/dwds_test_common/fixtures/_test_hot_restart_breakpoints/pubspec.yaml index ebfda2bb5..837b847d1 100644 --- a/dwds_test_common/fixtures/_test_hot_restart_breakpoints/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_restart_breakpoints/pubspec.yaml @@ -9,3 +9,12 @@ environment: dev_dependencies: build_runner: ^2.5.0 build_web_compilers: ^4.4.12 + +dependency_overrides: + # https://github.com/dart-lang/build/issues/4928 + build_web_compilers: + git: + url: https://github.com/dart-lang/build.git + ref: hot-restart-api + path: builder_pkgs/build_web_compilers + diff --git a/dwds_test_common/pubspec_overrides.yaml b/dwds_test_common/pubspec_overrides.yaml index 1399b587c..d3d78b8af 100644 --- a/dwds_test_common/pubspec_overrides.yaml +++ b/dwds_test_common/pubspec_overrides.yaml @@ -1,8 +1,3 @@ dependency_overrides: dwds: path: ../dwds - sse: - git: - url: https://github.com/dart-lang/tools.git - ref: 06493ded8ca27996d979f9f903d2bc24a1215064 - path: pkgs/sse From 5e7b912386e3142f3c04a938d5acc9b24aa8ea80 Mon Sep 17 00:00:00 2001 From: Nicholas Shahan Date: Wed, 10 Jun 2026 10:04:55 -0700 Subject: [PATCH 09/10] add more dep overrides --- .../hot_restart_correctness_ddc_library_bundle_test.dart | 2 +- .../integration/hot_restart_ddc_library_bundle_test.dart | 2 +- dwds_test_common/fixtures/_test/pubspec.yaml | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dwds/test/integration/hot_restart_correctness_ddc_library_bundle_test.dart b/dwds/test/integration/hot_restart_correctness_ddc_library_bundle_test.dart index 333038da6..d7feb1672 100644 --- a/dwds/test/integration/hot_restart_correctness_ddc_library_bundle_test.dart +++ b/dwds/test/integration/hot_restart_correctness_ddc_library_bundle_test.dart @@ -52,6 +52,6 @@ void main() { ); }, // https://github.com/dart-lang/build/issues/4928 - skip: true, + // skip: true, ); } diff --git a/dwds/test/integration/hot_restart_ddc_library_bundle_test.dart b/dwds/test/integration/hot_restart_ddc_library_bundle_test.dart index c0946fbd6..719e90290 100644 --- a/dwds/test/integration/hot_restart_ddc_library_bundle_test.dart +++ b/dwds/test/integration/hot_restart_ddc_library_bundle_test.dart @@ -54,6 +54,6 @@ void main() { ); }, // https://github.com/dart-lang/build/issues/4928 - skip: false, + // skip: true, ); } diff --git a/dwds_test_common/fixtures/_test/pubspec.yaml b/dwds_test_common/fixtures/_test/pubspec.yaml index 63e3c4010..fec239b7c 100644 --- a/dwds_test_common/fixtures/_test/pubspec.yaml +++ b/dwds_test_common/fixtures/_test/pubspec.yaml @@ -13,3 +13,11 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 build_web_compilers: ^4.4.12 + +dependency_overrides: + # https://github.com/dart-lang/build/issues/4928 + build_web_compilers: + git: + url: https://github.com/dart-lang/build.git + ref: hot-restart-api + path: builder_pkgs/build_web_compilers From 6e13c44f10ed4407ab13b4ad6263669c61a96b18 Mon Sep 17 00:00:00 2001 From: Nicholas Shahan Date: Wed, 10 Jun 2026 13:46:02 -0700 Subject: [PATCH 10/10] one more dep override --- dwds_test_common/fixtures/_test_hot_restart2/pubspec.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dwds_test_common/fixtures/_test_hot_restart2/pubspec.yaml b/dwds_test_common/fixtures/_test_hot_restart2/pubspec.yaml index 482d39fe9..e3399d93d 100644 --- a/dwds_test_common/fixtures/_test_hot_restart2/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_restart2/pubspec.yaml @@ -15,3 +15,11 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 build_web_compilers: ^4.4.12 + +dependency_overrides: + # https://github.com/dart-lang/build/issues/4928 + build_web_compilers: + git: + url: https://github.com/dart-lang/build.git + ref: hot-restart-api + path: builder_pkgs/build_web_compilers