From 6db11cd2300031a57d2cb699bce1f633060b87aa Mon Sep 17 00:00:00 2001 From: MarkZ Date: Mon, 20 Apr 2026 13:10:49 -0700 Subject: [PATCH 001/134] Adding tests for Build Daemon + Frontend Server backend --- .../breakpoint_ddc_library_bundle_test.dart | 7 +++++ .../callstack_ddc_library_bundle_test.dart | 7 +++++ ...proxy_service_ddc_library_bundle_test.dart | 17 ++++++++++++ ...ular_evaluate_ddc_library_bundle_test.dart | 7 +++++ .../evaluate_ddc_library_bundle_test.dart | 7 +++++ ...d_breakpoints_ddc_library_bundle_test.dart | 7 +++++ .../hot_reload_ddc_library_bundle_test.dart | 7 +++++ ...t_correctness_ddc_library_bundle_test.dart | 15 +++++++++++ ...ss_inspection_ddc_library_bundle_test.dart | 17 ++++++++++++ ...ot_shorthands_ddc_library_bundle_test.dart | 17 ++++++++++++ .../instance_ddc_library_bundle_test.dart | 16 ++++++++++++ ...ns_inspection_ddc_library_bundle_test.dart | 17 ++++++++++++ ...rd_inspection_ddc_library_bundle_test.dart | 15 +++++++++++ ...pe_inspection_ddc_library_bundle_test.dart | 15 +++++++++++ ...pe_inspection_ddc_library_bundle_test.dart | 17 ++++++++++++ ...arts_evaluate_ddc_library_bundle_test.dart | 7 +++++ .../app_domain_ddc_library_bundle_test.dart | 26 ++++++++++++++----- ...daemon_domain_ddc_library_bundle_test.dart | 26 ++++++++++++++----- .../launch_app_ddc_library_bundle_test.dart | 26 ++++++++++++++----- webdev/test/e2e_ddc_library_bundle_test.dart | 26 ++++++++++++++----- .../integration_ddc_library_bundle_test.dart | 26 ++++++++++++++----- webdev/test/tls_ddc_library_bundle_test.dart | 26 ++++++++++++++----- 22 files changed, 309 insertions(+), 42 deletions(-) diff --git a/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart b/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart index 71b4606d73..d8e93ec94d 100644 --- a/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart +++ b/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart @@ -31,6 +31,13 @@ void main() { ); }); + group('Build Daemon and Frontend Server |', () { + testBreakpoint( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); + group('Frontend Server |', () { testBreakpoint( provider: provider, diff --git a/dwds/test/integration/callstack_ddc_library_bundle_test.dart b/dwds/test/integration/callstack_ddc_library_bundle_test.dart index 3344150622..64cedfe03e 100644 --- a/dwds/test/integration/callstack_ddc_library_bundle_test.dart +++ b/dwds/test/integration/callstack_ddc_library_bundle_test.dart @@ -31,6 +31,13 @@ void main() { ); }); + group('Build Daemon and Frontend Server |', () { + testCallStack( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); + group('Frontend Server |', () { testCallStack( provider: provider, diff --git a/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart b/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart index fa577f8939..bddb5a0db0 100644 --- a/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart +++ b/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart @@ -53,4 +53,21 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: $canaryFeatures | Build Daemon and Frontend Server |', () { + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: moduleFormat, + ); + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + tearDownAll(provider.dispose); + + runTests( + provider: provider, + moduleFormat: moduleFormat, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } diff --git a/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart b/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart index a45d9fcfe8..5401ec8761 100644 --- a/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart +++ b/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart @@ -32,6 +32,13 @@ void main() async { testAll(provider: provider, compilationMode: CompilationMode.buildDaemon); }); + group('Build Daemon and Frontend Server |', () { + testAll( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); + group('Frontend Server |', () { group('Context with circular dependencies |', () { for (final indexBaseMode in IndexBaseMode.values) { diff --git a/dwds/test/integration/evaluate_ddc_library_bundle_test.dart b/dwds/test/integration/evaluate_ddc_library_bundle_test.dart index e8783c8c8d..3ace1355b3 100644 --- a/dwds/test/integration/evaluate_ddc_library_bundle_test.dart +++ b/dwds/test/integration/evaluate_ddc_library_bundle_test.dart @@ -33,6 +33,13 @@ void main() async { testAll(provider: provider, compilationMode: CompilationMode.buildDaemon); }); + group('Build Daemon and Frontend Server |', () { + testAll( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); + group('Frontend Server |', () { for (final useDebuggerModuleNames in [false, true]) { group('Debugger module names: $useDebuggerModuleNames |', () { diff --git a/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart b/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart index d0494e7400..fb6f10835d 100644 --- a/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart +++ b/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart @@ -31,4 +31,11 @@ void main() { compilationMode: CompilationMode.frontendServer, ); }); + + group('Build Daemon and Frontend Server', () { + runTests( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); } diff --git a/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart b/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart index ba5923935f..724af17bb3 100644 --- a/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart +++ b/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart @@ -31,4 +31,11 @@ void main() { compilationMode: CompilationMode.frontendServer, ); }); + + group('Build Daemon and Frontend Server', () { + runTests( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); } 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 f5a1f6839f..3a2388ddde 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 @@ -49,4 +49,19 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: $canaryFeatures | Build Daemon and Frontend Server |', () { + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: moduleFormat, + ); + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + runTests( + provider: provider, + moduleFormat: moduleFormat, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } diff --git a/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart index 77a97d66cd..abf912dbab 100644 --- a/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart @@ -51,4 +51,21 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } diff --git a/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart b/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart index 3559490635..d575a22a52 100644 --- a/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart @@ -51,4 +51,21 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } diff --git a/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart b/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart index 002c71c57e..400c598fb1 100644 --- a/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart @@ -50,4 +50,20 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + canaryFeatures: canaryFeatures, + verbose: debug, + ddcModuleFormat: moduleFormat, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } diff --git a/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart index e9a5e0fd96..713f35161e 100644 --- a/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart @@ -51,4 +51,21 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } diff --git a/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart index 0201c28224..f50b8d65f4 100644 --- a/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart @@ -48,4 +48,19 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } diff --git a/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart index 3832869b73..c5bec24ba1 100644 --- a/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart @@ -48,4 +48,19 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } diff --git a/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart index 3756541e0e..b019786e56 100644 --- a/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart @@ -51,4 +51,21 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } diff --git a/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart b/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart index d99e21b65a..5085203e63 100644 --- a/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart +++ b/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart @@ -32,6 +32,13 @@ void main() async { testAll(provider: provider, compilationMode: CompilationMode.buildDaemon); }); + group('Build Daemon and Frontend Server |', () { + testAll( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); + group('Frontend Server |', () { group('Context with parts |', () { for (final indexBaseMode in IndexBaseMode.values) { diff --git a/webdev/test/daemon/app_domain_ddc_library_bundle_test.dart b/webdev/test/daemon/app_domain_ddc_library_bundle_test.dart index 1f6fa8b3e7..ab58ec869b 100644 --- a/webdev/test/daemon/app_domain_ddc_library_bundle_test.dart +++ b/webdev/test/daemon/app_domain_ddc_library_bundle_test.dart @@ -12,11 +12,23 @@ import '../test_utils.dart'; import 'app_domain_common.dart'; void main() { - appDomainTests( - testRunner: TestRunner( - canaryFeatures: true, - webHotReload: false, - ddcModuleFormat: ModuleFormat.ddc, - ), - ); + group('Build Daemon', () { + appDomainTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: false, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); + + group('Build Daemon and Frontend Server', () { + appDomainTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: true, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); } diff --git a/webdev/test/daemon/daemon_domain_ddc_library_bundle_test.dart b/webdev/test/daemon/daemon_domain_ddc_library_bundle_test.dart index 30c04fb792..cad0ebcab1 100644 --- a/webdev/test/daemon/daemon_domain_ddc_library_bundle_test.dart +++ b/webdev/test/daemon/daemon_domain_ddc_library_bundle_test.dart @@ -12,11 +12,23 @@ import '../test_utils.dart'; import 'daemon_domain_common.dart'; void main() { - daemonDomainTests( - testRunner: TestRunner( - canaryFeatures: true, - webHotReload: false, - ddcModuleFormat: ModuleFormat.ddc, - ), - ); + group('Build Daemon', () { + daemonDomainTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: false, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); + + group('Build Daemon and Frontend Server', () { + daemonDomainTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: true, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); } diff --git a/webdev/test/daemon/launch_app_ddc_library_bundle_test.dart b/webdev/test/daemon/launch_app_ddc_library_bundle_test.dart index d9746fe977..baac246471 100644 --- a/webdev/test/daemon/launch_app_ddc_library_bundle_test.dart +++ b/webdev/test/daemon/launch_app_ddc_library_bundle_test.dart @@ -12,11 +12,23 @@ import '../test_utils.dart'; import 'launch_app_common.dart'; void main() { - launchAppTests( - testRunner: TestRunner( - canaryFeatures: true, - webHotReload: false, - ddcModuleFormat: ModuleFormat.ddc, - ), - ); + group('Build Daemon', () { + launchAppTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: false, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); + + group('Build Daemon and Frontend Server', () { + launchAppTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: true, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); } diff --git a/webdev/test/e2e_ddc_library_bundle_test.dart b/webdev/test/e2e_ddc_library_bundle_test.dart index 6a685854c2..ab0788892b 100644 --- a/webdev/test/e2e_ddc_library_bundle_test.dart +++ b/webdev/test/e2e_ddc_library_bundle_test.dart @@ -12,11 +12,23 @@ import 'e2e_common.dart'; import 'test_utils.dart'; void main() { - e2eTests( - testRunner: TestRunner( - canaryFeatures: true, - webHotReload: false, - ddcModuleFormat: ModuleFormat.ddc, - ), - ); + group('Build Daemon', () { + e2eTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: false, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); + + group('Build Daemon and Frontend Server', () { + e2eTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: true, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); } diff --git a/webdev/test/integration_ddc_library_bundle_test.dart b/webdev/test/integration_ddc_library_bundle_test.dart index 43870d02b4..e35e5ba8a2 100644 --- a/webdev/test/integration_ddc_library_bundle_test.dart +++ b/webdev/test/integration_ddc_library_bundle_test.dart @@ -12,11 +12,23 @@ import 'integration_common.dart'; import 'test_utils.dart'; void main() { - integrationTests( - testRunner: TestRunner( - canaryFeatures: true, - webHotReload: false, - ddcModuleFormat: ModuleFormat.ddc, - ), - ); + group('Build Daemon', () { + integrationTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: false, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); + + group('Build Daemon and Frontend Server', () { + integrationTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: true, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); } diff --git a/webdev/test/tls_ddc_library_bundle_test.dart b/webdev/test/tls_ddc_library_bundle_test.dart index 7c83b42c25..a0dc36d591 100644 --- a/webdev/test/tls_ddc_library_bundle_test.dart +++ b/webdev/test/tls_ddc_library_bundle_test.dart @@ -12,11 +12,23 @@ import 'test_utils.dart'; import 'tls_common.dart'; void main() { - tlsTests( - testRunner: TestRunner( - canaryFeatures: true, - webHotReload: false, - ddcModuleFormat: ModuleFormat.ddc, - ), - ); + group('Build Daemon', () { + tlsTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: false, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); + + group('Build Daemon and Frontend Server', () { + tlsTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: true, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); } From 0415fed3ff3ef7d8f0e8624a39148b719be665dc Mon Sep 17 00:00:00 2001 From: MarkZ Date: Wed, 29 Apr 2026 14:36:56 -0700 Subject: [PATCH 002/134] Adding dwds hooks for build runner + FES expression eval --- dwds/lib/dwds.dart | 3 + dwds/lib/src/debugging/location.dart | 8 +- .../frontend_server_strategy_provider.dart | 111 +++++++++++++++++- .../services/daemon_expression_compiler.dart | 60 ++++++++++ .../common/chrome_proxy_service_common.dart | 8 ++ dwds/test/integration/fixtures/context.dart | 55 +++++++-- webdev/lib/src/serve/dev_workflow.dart | 10 +- webdev/lib/src/serve/server_manager.dart | 6 +- webdev/lib/src/serve/webdev_server.dart | 21 +++- 9 files changed, 257 insertions(+), 25 deletions(-) create mode 100644 dwds/lib/src/services/daemon_expression_compiler.dart diff --git a/dwds/lib/dwds.dart b/dwds/lib/dwds.dart index 97c735fd8a..cac2797ee5 100644 --- a/dwds/lib/dwds.dart +++ b/dwds/lib/dwds.dart @@ -25,6 +25,7 @@ export 'src/loaders/build_runner_strategy_provider.dart' export 'src/loaders/ddc.dart' show DdcStrategy; export 'src/loaders/frontend_server_strategy_provider.dart' show + FrontendServerBuildDaemonStrategyProvider, FrontendServerDdcLibraryBundleStrategyProvider, FrontendServerDdcStrategyProvider, FrontendServerRequireStrategyProvider; @@ -42,6 +43,8 @@ export 'src/readers/proxy_server_asset_reader.dart' show ProxyServerAssetReader; export 'src/servers/devtools.dart'; export 'src/services/chrome/chrome_debug_exception.dart' show ChromeDebugException; +export 'src/services/daemon_expression_compiler.dart' + show DaemonExpressionCompiler; export 'src/services/expression_compiler.dart' show CompilerOptions, diff --git a/dwds/lib/src/debugging/location.dart b/dwds/lib/src/debugging/location.dart index b2c07dc547..111fbc035c 100644 --- a/dwds/lib/src/debugging/location.dart +++ b/dwds/lib/src/debugging/location.dart @@ -345,7 +345,13 @@ class Locations { '/${stripLeadingSlashes(modulePath)}', ); - if (sourceMapContents == null) return result; + if (sourceMapContents == null) { + _logger.warning( + 'Failed to load source map for module $module at path ' + '$sourceMapPath', + ); + return result; + } final runtimeScriptId = await _modules.getRuntimeScriptIdForModule( _entrypoint, diff --git a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart index 3e68b6eaff..2f555d8d3e 100644 --- a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart +++ b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart @@ -11,6 +11,8 @@ import 'package:dwds/src/readers/asset_reader.dart'; import 'package:dwds/src/services/expression_compiler.dart'; import 'package:path/path.dart' as p; +const _defaultWebDirs = ['web', 'test', 'example', 'benchmark']; + abstract class FrontendServerStrategyProvider { final ReloadConfiguration _configuration; final AssetReader _assetReader; @@ -135,9 +137,8 @@ class FrontendServerDdcStrategyProvider DdcStrategy get strategy => _ddcStrategy; } -/// Provides a [DdcLibraryBundleStrategy] suitable for use with the Frontend -/// Server. -// ignore: prefer-correct-type-name +/// Provides a [DdcLibraryBundleStrategy] for the Frontend Server-only +/// configuration. class FrontendServerDdcLibraryBundleStrategyProvider extends FrontendServerStrategyProvider { late final DdcLibraryBundleStrategy _libraryBundleStrategy; @@ -174,6 +175,110 @@ class FrontendServerDdcLibraryBundleStrategyProvider DdcLibraryBundleStrategy get strategy => _libraryBundleStrategy; } +/// Provides a [DdcLibraryBundleStrategy] for the Frontend Server + Build +/// Daemon configuration, which supports hot reload. +class FrontendServerBuildDaemonStrategyProvider + extends FrontendServerStrategyProvider { + late final DdcLibraryBundleStrategy _libraryBundleStrategy; + + FrontendServerBuildDaemonStrategyProvider( + super._configuration, + super._assetReader, + super._packageUriMapper, + super._digestsProvider, + super._buildSettings, { + super.packageConfigPath, + Uri? reloadedSourcesUri, + bool injectScriptLoad = true, + }) { + String stripPrefix(String path) { + if (path.startsWith('packages')) return path; + final parts = path.split('/'); + + final appUri = _buildSettings.appEntrypoint; + final validPrefixes = [ + if (appUri != null && appUri.pathSegments.isNotEmpty) + appUri.pathSegments.first, + ..._defaultWebDirs, + ]; + + if (parts.length > 1 && validPrefixes.contains(parts[0])) { + return parts.skip(1).join('/'); + } + return path; + } + + _libraryBundleStrategy = DdcLibraryBundleStrategy( + _configuration, + _moduleProvider, + (_) => _digestsProvider(), + /// Looks up the module name for a given server path. + (metadataProvider, sourcePath) async { + var module = await _moduleForServerPath(metadataProvider, sourcePath); + if (module != null) return module; + + final remappedPath = sourcePath.replaceAll('.ddc', '.dart.lib'); + module = await _moduleForServerPath(metadataProvider, remappedPath); + if (module != null) return module; + + final modulePathToModule = await metadataProvider.modulePathToModule; + for (final entry in modulePathToModule.entries) { + final key = entry.key; + final strippedKey = stripPrefix(key); + if (strippedKey == sourcePath || strippedKey == remappedPath) { + return entry.value; + } + } + return null; + }, + (metadataProvider, module) async { + final path = await _serverPathForModule(metadataProvider, module); + final stripped = stripPrefix(path); + return stripped.replaceAll('.dart.lib', '.ddc'); + }, + (metadataProvider, module) async { + final path = await _sourceMapPathForModule(metadataProvider, module); + final stripped = stripPrefix(path); + return stripped.replaceAll('.dart.lib', '.ddc'); + }, + (appUrl) { + final appUri = Uri.parse(appUrl); + if (appUri.isScheme('org-dartlang-app')) { + final segments = appUri.pathSegments; + if (segments.length > 2 && + segments[0] == segments[1] && + (segments[0] == 'web' || segments[0] == 'test')) { + return segments.skip(2).join('/'); + } + return segments.skip(1).join('/'); + } + return _serverPathForAppUri(appUrl); + }, + (metadataProvider) async { + final moduleInfo = await _moduleInfoForProvider(metadataProvider); + return moduleInfo.map((module, info) { + return MapEntry( + module, + ModuleInfo( + info.fullDillPath.replaceAll('.dart.lib', '.ddc'), + info.summaryPath.replaceAll('.dart.lib', '.ddc'), + ), + ); + }); + }, + _assetReader, + _buildSettings, + (String _) => null, + packageConfigPath: _packageConfigPath, + reloadedSourcesUri: reloadedSourcesUri, + injectScriptLoad: injectScriptLoad, + ); + } + + @override + DdcLibraryBundleStrategy get strategy => _libraryBundleStrategy; +} + /// Provides a [RequireStrategy] suitable for use with Frontend Server. class FrontendServerRequireStrategyProvider extends FrontendServerStrategyProvider { diff --git a/dwds/lib/src/services/daemon_expression_compiler.dart b/dwds/lib/src/services/daemon_expression_compiler.dart new file mode 100644 index 0000000000..9ea74c22e1 --- /dev/null +++ b/dwds/lib/src/services/daemon_expression_compiler.dart @@ -0,0 +1,60 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; + +import 'package:dwds/src/services/expression_compiler.dart'; + +/// An expression compiler that forwards expression compilation requests to the +/// build daemon. +/// +/// We assume the build daemon already has a Frontend Server intialized. +class DaemonExpressionCompiler implements ExpressionCompiler { + final Future> Function(Map request) + _sendRequest; + + DaemonExpressionCompiler(this._sendRequest); + + @override + Future compileExpressionToJs( + String isolateId, + String libraryUri, + String scriptUri, + int line, + int column, + Map jsModules, + Map jsFrameValues, + String moduleName, + String expression, + ) async { + final requestJson = { + 'type': 'EvaluateExpressionRequest', + 'isolateId': isolateId, + 'libraryUri': libraryUri, + 'scriptUri': scriptUri, + 'line': line, + 'column': column, + 'jsModules': jsModules, + 'jsFrameValues': jsFrameValues, + 'moduleName': moduleName, + 'expression': expression, + }; + final responseJson = await _sendRequest(requestJson); + final result = responseJson['result'] as String; + final isError = responseJson['isError'] as bool; + return ExpressionCompilationResult(result, isError); + } + + /// Not needed by [DaemonExpressionCompiler] since we assume that a shared + /// Frontend Server instance is already initialized. + @override + Future initialize(CompilerOptions options) async {} + + /// Not needed by [DaemonExpressionCompiler] since reloads are handled by + /// `reloaded_sources.json`, which are generated from build daemon's build + /// outputs. + @override + Future updateDependencies(Map modules) async => + true; +} diff --git a/dwds/test/integration/common/chrome_proxy_service_common.dart b/dwds/test/integration/common/chrome_proxy_service_common.dart index 333db0852b..651549aef2 100644 --- a/dwds/test/integration/common/chrome_proxy_service_common.dart +++ b/dwds/test/integration/common/chrome_proxy_service_common.dart @@ -775,6 +775,14 @@ void runTests({ final scripts = await service.getScripts(isolate.id!); assert(scripts.scripts!.isNotEmpty); for (final scriptRef in scripts.scripts!) { + final uri = scriptRef.uri!; + // Only check files that are in this test's [webAssetsPath]. + // For example, if webAssetsPath is 'web': + // skip: 'org-dartlang-app:///example/hello_world/main.dart' + // keep: 'org-dartlang-app:///web/main.dart' + if (uri.startsWith('org-dartlang-app:///')) { + if (!uri.contains(context.project.webAssetsPath)) continue; + } final script = await service.getObject(isolate.id!, scriptRef.id!) as Script; final serverPath = DartUri(script.uri!, '').serverPath; diff --git a/dwds/test/integration/fixtures/context.dart b/dwds/test/integration/fixtures/context.dart index 5b854ebd72..7cffde9a69 100644 --- a/dwds/test/integration/fixtures/context.dart +++ b/dwds/test/integration/fixtures/context.dart @@ -21,6 +21,7 @@ import 'package:dwds/src/loaders/frontend_server_strategy_provider.dart'; import 'package:dwds/src/loaders/strategy.dart'; import 'package:dwds/src/readers/proxy_server_asset_reader.dart'; import 'package:dwds/src/services/chrome/chrome_proxy_service.dart'; +import 'package:dwds/src/services/daemon_expression_compiler.dart'; import 'package:dwds/src/services/expression_compiler.dart'; import 'package:dwds/src/services/expression_compiler_service.dart'; import 'package:dwds/src/utilities/dart_uri.dart'; @@ -518,13 +519,9 @@ class TestContext { ); if (testSettings.enableExpressionEvaluation) { - ddcService = ExpressionCompilerService( - 'localhost', - _port!, - verbose: testSettings.verboseCompiler, - sdkConfigurationProvider: sdkConfigurationProvider, - ); - expressionCompiler = ddcService; + expressionCompiler = DaemonExpressionCompiler((request) async { + return await _daemonClient!.sendRequest(request); + }); } frontendServerFileSystem = const LocalFileSystem(); final packageUriMapper = await PackageUriMapper.create( @@ -537,7 +534,7 @@ class TestContext { buildSettings.canaryFeatures, )) { (ModuleFormat.ddc, true) => - FrontendServerDdcLibraryBundleStrategyProvider( + FrontendServerBuildDaemonStrategyProvider( testSettings.reloadConfiguration, assetReader, packageUriMapper, @@ -851,6 +848,48 @@ class TestContext { }; } + /// Returns a handler for build runner + the DDC Library Bundle module + /// system. + /// + /// This handler: + /// - serves the reloaded_sources.json file for reloads/restarts. + /// - serves the application directory and entrypoint from + /// `project.directoryToServe`. + Handler _createBuildRunnerDdcLibraryBundleAssetHandler(int assetServerPort) { + final rootProxy = proxyHandler( + 'http://localhost:$assetServerPort/', + client: client, + ); + final entrypointProxy = proxyHandler( + 'http://localhost:$assetServerPort/${project.directoryToServe}/', + client: client, + ); + + return (request) async { + final path = request.url.path; + if (path.endsWith(WebDevFS.reloadedSourcesFileName)) { + return shelf.Response.ok(jsonEncode(_reloadedSources)); + } + + // Swap between [rootProxy] and [entrypointProxy] to handle path serving + // differences for entrypoints vs library files. + // + // Use [rootProxy] for paths that already include the directory to serve + // (e.g., 'web/main.dart', 'packages/...', 'example/...'). + // + // Use [entrypointProxy] for files requested at the root (e.g. 'main.dart' + // or 'index.html'), These implicitly prepend [directoryToServe]. + final prefix = '${project.directoryToServe}/'; + final response = + await (path.startsWith(prefix) || + path.startsWith('packages/') || + path.startsWith('example/') + ? rootProxy(request) + : entrypointProxy(request)); + return response; + }; + } + Future recompile({required bool fullRestart}) async { await webRunner.rerun( fullRestart: fullRestart, diff --git a/webdev/lib/src/serve/dev_workflow.dart b/webdev/lib/src/serve/dev_workflow.dart index e7212eb6c1..3c992c7d58 100644 --- a/webdev/lib/src/serve/dev_workflow.dart +++ b/webdev/lib/src/serve/dev_workflow.dart @@ -106,10 +106,7 @@ Future _startServerManager( ); } logWriter(logging.Level.INFO, 'Starting resource servers...'); - final serverManager = await ServerManager.start( - serverOptions, - client.buildResults, - ); + final serverManager = await ServerManager.start(serverOptions, client); for (final server in serverManager.servers) { logWriter( @@ -210,7 +207,10 @@ class DevWorkflow { Map targetPorts, ) async { final workingDirectory = Directory.current.path; - final client = await _startBuildDaemon(workingDirectory, buildOptions); + final client = await _startBuildDaemon(workingDirectory, [ + ...buildOptions, + if (configuration.webHotReload) '--web-hot-reload', + ]); logWriter(logging.Level.INFO, 'Registering build targets...'); _registerBuildTargets(client, configuration, targetPorts); logWriter(logging.Level.INFO, 'Starting initial build...'); diff --git a/webdev/lib/src/serve/server_manager.dart b/webdev/lib/src/serve/server_manager.dart index 39e237dbd6..bd4fca7843 100644 --- a/webdev/lib/src/serve/server_manager.dart +++ b/webdev/lib/src/serve/server_manager.dart @@ -4,7 +4,7 @@ import 'dart:async'; -import 'package:build_daemon/data/build_status.dart'; +import 'package:build_daemon/client.dart'; import 'webdev_server.dart'; @@ -16,11 +16,11 @@ class ServerManager { static Future start( Set serverOptions, - Stream buildResults, + BuildDaemonClient client, ) async { final servers = {}; for (final options in serverOptions) { - servers.add(await WebDevServer.start(options, buildResults)); + servers.add(await WebDevServer.start(options, client.buildResults, client)); } return ServerManager._(servers); } diff --git a/webdev/lib/src/serve/webdev_server.dart b/webdev/lib/src/serve/webdev_server.dart index da1f7f2797..cfdaed15b2 100644 --- a/webdev/lib/src/serve/webdev_server.dart +++ b/webdev/lib/src/serve/webdev_server.dart @@ -6,6 +6,7 @@ import 'dart:async'; import 'dart:convert'; import 'dart:io'; +import 'package:build_daemon/client.dart'; import 'package:build_daemon/data/build_status.dart' as daemon; import 'package:dwds/data/build_result.dart'; import 'package:dwds/dwds.dart'; @@ -85,7 +86,7 @@ class WebDevServer { /// Can be null if client.js injection is disabled. final Dwds? dwds; - final ExpressionCompilerService? ddcService; + final ExpressionCompiler? ddcService; final String target; @@ -123,7 +124,10 @@ class WebDevServer { Future stop() async { await dwds?.stop(); - await ddcService?.stop(); + final service = ddcService; + if (service is ExpressionCompilerService) { + await service.stop(); + } await _server.close(force: true); _client.close(); } @@ -131,6 +135,7 @@ class WebDevServer { static Future start( ServerOptions options, Stream buildResults, + BuildDaemonClient daemonClient, ) async { final basePath = ''; var pipeline = const Pipeline(); @@ -211,7 +216,7 @@ class WebDevServer { ); Dwds? dwds; - ExpressionCompilerService? ddcService; + ExpressionCompiler? ddcService; if (options.configuration.enableInjectedClient) { final assetReader = ProxyServerAssetReader( options.daemonPort, @@ -239,7 +244,7 @@ class WebDevServer { findPackageConfigUri()!, useDebuggerModuleNames: false, ); - loadStrategy = FrontendServerDdcLibraryBundleStrategyProvider( + loadStrategy = FrontendServerBuildDaemonStrategyProvider( options.configuration.reload, assetReader, packageUriMapper, @@ -290,7 +295,13 @@ class WebDevServer { } if (options.configuration.enableExpressionEvaluation) { - if (isAotMode && !useAotDdc) { + if (options.configuration.webHotReload) { + // Use the daemon expression compiler when web hot reload is enabled + // to reuse the Frontend Server's in-memory state. + ddcService = DaemonExpressionCompiler((request) async { + return await daemonClient.sendRequest(request); + }); + } else if (isAotMode && !useAotDdc) { _logger.warning( 'Expression evaluation will be disabled in AOT mode because ' 'dartdevc_aot.dart.snapshot was not found in the SDK.', From 890f49bf6f1bd04e97d731d80b44c8c51b9b8394 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Mon, 4 May 2026 17:44:30 -0700 Subject: [PATCH 003/134] Adding support for FES port communications --- dwds/test/integration/fixtures/context.dart | 66 ++++++++++++++- webdev/lib/src/serve/dev_workflow.dart | 1 - webdev/lib/src/serve/webdev_server.dart | 92 ++++++++++++++++++++- 3 files changed, 156 insertions(+), 3 deletions(-) diff --git a/dwds/test/integration/fixtures/context.dart b/dwds/test/integration/fixtures/context.dart index 7cffde9a69..c95f24cc2e 100644 --- a/dwds/test/integration/fixtures/context.dart +++ b/dwds/test/integration/fixtures/context.dart @@ -520,7 +520,71 @@ class TestContext { if (testSettings.enableExpressionEvaluation) { expressionCompiler = DaemonExpressionCompiler((request) async { - return await _daemonClient!.sendRequest(request); + final file = File( + p.join( + project.absolutePackageDirectory, + '.dart_tool', + 'build', + 'fes_worker_port', + ), + ); + if (await file.exists()) { + final content = await file.readAsString(); + final port = int.tryParse(content.trim()); + if (port != null) { + final socket = await Socket.connect( + InternetAddress.loopbackIPv4, + port, + ); + try { + socket.writeln(jsonEncode(request)); + final responseStr = await socket + .cast>() + .transform(utf8.decoder) + .transform(const LineSplitter()) + .first; + final compileResult = jsonDecode(responseStr); + + if (compileResult is Map) { + if (compileResult.containsKey('error')) { + return { + 'result': compileResult['error'] as String, + 'isError': true, + }; + } + final errorCount = compileResult['errorCount'] as int?; + final expressionData = + compileResult['expressionData'] as String?; + + if (errorCount != null && errorCount > 0) { + return { + 'result': + compileResult['errorMessage'] as String? ?? + 'Unknown error', + 'isError': true, + }; + } + + if (expressionData != null) { + final decodedResult = utf8.decode( + base64.decode(expressionData), + ); + return {'result': decodedResult, 'isError': false}; + } + } + + return { + 'result': 'Failed to read evaluation result', + 'isError': true, + }; + } finally { + await socket.close(); + } + } + } + throw StateError( + 'FES port not found in .dart_tool/build/fes_worker_port', + ); }); } frontendServerFileSystem = const LocalFileSystem(); diff --git a/webdev/lib/src/serve/dev_workflow.dart b/webdev/lib/src/serve/dev_workflow.dart index 3c992c7d58..c85b3139b3 100644 --- a/webdev/lib/src/serve/dev_workflow.dart +++ b/webdev/lib/src/serve/dev_workflow.dart @@ -209,7 +209,6 @@ class DevWorkflow { final workingDirectory = Directory.current.path; final client = await _startBuildDaemon(workingDirectory, [ ...buildOptions, - if (configuration.webHotReload) '--web-hot-reload', ]); logWriter(logging.Level.INFO, 'Registering build targets...'); _registerBuildTargets(client, configuration, targetPorts); diff --git a/webdev/lib/src/serve/webdev_server.dart b/webdev/lib/src/serve/webdev_server.dart index cfdaed15b2..3a343bb33d 100644 --- a/webdev/lib/src/serve/webdev_server.dart +++ b/webdev/lib/src/serve/webdev_server.dart @@ -298,8 +298,98 @@ class WebDevServer { if (options.configuration.webHotReload) { // Use the daemon expression compiler when web hot reload is enabled // to reuse the Frontend Server's in-memory state. + int? cachedFesPort; + + Future> sendRequestToFes( + int port, + Map request, + ) async { + final socket = await Socket.connect( + InternetAddress.loopbackIPv4, + port, + ); + try { + socket.writeln(jsonEncode(request)); + final responseStr = await socket + .cast>() + .transform(utf8.decoder) + .transform(const LineSplitter()) + .first; + final compileResult = jsonDecode(responseStr); + + if (compileResult is Map) { + if (compileResult.containsKey('error')) { + return { + 'result': compileResult['error'] as String, + 'isError': true, + }; + } + final errorCount = compileResult['errorCount'] as int?; + final expressionData = + compileResult['expressionData'] as String?; + + if (errorCount != null && errorCount > 0) { + return { + 'result': + compileResult['errorMessage'] as String? ?? + 'Unknown error', + 'isError': true, + }; + } + + if (expressionData != null) { + final decodedResult = utf8.decode( + base64.decode(expressionData), + ); + return {'result': decodedResult, 'isError': false}; + } + } + + return { + 'result': 'Failed to read evaluation result', + 'isError': true, + }; + } finally { + await socket.close(); + } + } + ddcService = DaemonExpressionCompiler((request) async { - return await daemonClient.sendRequest(request); + if (cachedFesPort != null) { + try { + return await sendRequestToFes(cachedFesPort!, request); + } catch (e) { + _logger.warning( + 'Failed to connect to FES at $cachedFesPort, falling back to daemon', + e, + ); + cachedFesPort = null; + } + } + + try { + final file = File( + p.join('.dart_tool', 'build', 'fes_worker_port'), + ); + if (await file.exists()) { + final content = await file.readAsString(); + final port = int.tryParse(content.trim()); + if (port != null) { + cachedFesPort = port; + return await sendRequestToFes(port, request); + } + } + } catch (e) { + _logger.warning( + 'Failed to read FES port from .dart_tool/build/fes_worker_port', + e, + ); + } + return { + 'result': + 'InternalError: Failed to connect to Frontend Server worker.', + 'isError': true, + }; }); } else if (isAotMode && !useAotDdc) { _logger.warning( From 2fb3a67a9e68165428da6fa5bd189e6cab70c9f0 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 7 May 2026 14:24:54 -0700 Subject: [PATCH 004/134] Support fes_manager in tests. --- .../services/daemon_expression_compiler.dart | 2 +- dwds/test/integration/fixtures/context.dart | 60 ++++++++++++++++++- dwds/test/integration/fixtures/project.dart | 2 + webdev/lib/src/serve/dev_workflow.dart | 57 ++++++++++++++++-- 4 files changed, 114 insertions(+), 7 deletions(-) diff --git a/dwds/lib/src/services/daemon_expression_compiler.dart b/dwds/lib/src/services/daemon_expression_compiler.dart index 9ea74c22e1..8b35853ee1 100644 --- a/dwds/lib/src/services/daemon_expression_compiler.dart +++ b/dwds/lib/src/services/daemon_expression_compiler.dart @@ -29,7 +29,7 @@ class DaemonExpressionCompiler implements ExpressionCompiler { String expression, ) async { final requestJson = { - 'type': 'EvaluateExpressionRequest', + 'instruction': 'COMPILE_EXPRESSION_JS', 'isolateId': isolateId, 'libraryUri': libraryUri, 'scriptUri': scriptUri, diff --git a/dwds/test/integration/fixtures/context.dart b/dwds/test/integration/fixtures/context.dart index c95f24cc2e..5419e6876c 100644 --- a/dwds/test/integration/fixtures/context.dart +++ b/dwds/test/integration/fixtures/context.dart @@ -111,6 +111,7 @@ class TestContext { Process get chromeDriver => _chromeDriver!; Process? _chromeDriver; + Process? _fesProcess; WebkitDebugger get webkitDebugger => _webkitDebugger!; late WebkitDebugger? _webkitDebugger; @@ -481,6 +482,60 @@ class TestContext { 'build_web_compilers|ddc_modules=web-hot-reload=true', '--verbose', ]; + + if (testSettings.enableExpressionEvaluation) { + _logger.info('Starting Frontend Server Manager'); + final sdkDir = p.dirname(p.dirname(sdkLayout.dartPath)); + final packagesFile = p.join( + project.absolutePackageDirectory, + '.dart_tool', + 'package_config.json', + ); + + // Create a dedicated scratch space for Frontend Server tests + // with expression evaluation. We spin up the Frontend Server + // and build_runner separately, so we need to ensure both use the + // same scratch space. + final testScratchSpaceDir = Directory( + p.join( + project.absolutePackageDirectory, + '.dart_tool', + 'build', + 'test_scratch_space', + ), + ); + testScratchSpaceDir.createSync(recursive: true); + options.add( + '--define=build_web_compilers:ddc=scratch-space-dir=' + '${testScratchSpaceDir.path}', + ); + final args = [ + 'run', + 'build_frontend_server:fes_manager', + sdkDir, + p.toUri(testScratchSpaceDir.path).toString(), + p.toUri(packagesFile).toString(), + ]; + _fesProcess = await Process.start( + sdkLayout.dartPath, + args, + workingDirectory: project.absolutePackageDirectory, + ); + + final portFile = File( + p.join( + project.absolutePackageDirectory, + '.dart_tool', + 'build', + 'fes_worker_port', + ), + ); + // Wait for `fes_manager` to create the port file. + while (!await portFile.exists()) { + await Future.delayed(const Duration(milliseconds: 100)); + } + } + _daemonClient = await connectClient( sdkLayout.dartPath, project.absolutePackageDirectory, @@ -530,7 +585,9 @@ class TestContext { ); if (await file.exists()) { final content = await file.readAsString(); - final port = int.tryParse(content.trim()); + int? port; + final json = jsonDecode(content) as Map; + port = json['port'] as int?; if (port != null) { final socket = await Socket.connect( InternetAddress.loopbackIPv4, @@ -778,6 +835,7 @@ class TestContext { await ddcService?.stop(); await _testServer?.stop(); _client?.close(); + _fesProcess?.kill(); await _outputDir?.delete(recursive: true); stopLogWriter(); await project.tearDown(); diff --git a/dwds/test/integration/fixtures/project.dart b/dwds/test/integration/fixtures/project.dart index 3322800e2a..60d950b050 100644 --- a/dwds/test/integration/fixtures/project.dart +++ b/dwds/test/integration/fixtures/project.dart @@ -229,6 +229,8 @@ class TestProject { } } + await Process.run('dart', ['pub', 'get'], workingDirectory: newPath); + // Clean up the project. // Called when we need to rebuild sdk and the app from previous test // configurations. diff --git a/webdev/lib/src/serve/dev_workflow.dart b/webdev/lib/src/serve/dev_workflow.dart index c85b3139b3..5fe3b38350 100644 --- a/webdev/lib/src/serve/dev_workflow.dart +++ b/webdev/lib/src/serve/dev_workflow.dart @@ -15,6 +15,7 @@ import 'package:path/path.dart' as p; import '../command/configuration.dart'; import '../daemon_client.dart'; import '../logging.dart'; +import '../util.dart'; import 'chrome.dart'; import 'server_manager.dart'; import 'webdev_server.dart'; @@ -174,13 +175,19 @@ class DevWorkflow { final _doneCompleter = Completer(); final BuildDaemonClient _client; final Chrome? _chrome; + final Process? _fesProcess; final ServerManager serverManager; StreamSubscription? _resultsSub; final _wrapWidth = stdout.hasTerminal ? stdout.terminalColumns - 8 : 72; - DevWorkflow._(this._client, this._chrome, this.serverManager) { + DevWorkflow._( + this._client, + this._chrome, + this.serverManager, + this._fesProcess, + ) { _resultsSub = _client.buildResults.listen((data) { if (data.results.any( (result) => @@ -201,15 +208,54 @@ class DevWorkflow { Future get done => _doneCompleter.future; + static Future _startFesManager(String workingDirectory) async { + final sdkDir = p.dirname(p.dirname(dartPath)); + final tempDir = Directory.systemTemp.createTempSync('webdev_fes_'); + final packagesFile = p.join( + workingDirectory, + '.dart_tool', + 'package_config.json', + ); + + final args = [ + 'run', + 'build_frontend_server:fes_manager', + sdkDir, + tempDir.uri.toString(), + p.toUri(packagesFile).toString(), + ]; + + return await Process.start( + dartPath, + args, + workingDirectory: workingDirectory, + ); + } + + static Future _waitForFile(File file) async { + while (!await file.exists()) { + await Future.delayed(const Duration(milliseconds: 100)); + } + } + static Future start( Configuration configuration, List buildOptions, Map targetPorts, ) async { final workingDirectory = Directory.current.path; - final client = await _startBuildDaemon(workingDirectory, [ - ...buildOptions, - ]); + + Process? fesProcess; + if (configuration.webHotReload) { + logWriter(logging.Level.INFO, 'Starting Frontend Server Manager...'); + fesProcess = await _startFesManager(workingDirectory); + final portFile = File( + p.join(workingDirectory, '.dart_tool', 'build', 'fes_worker_port'), + ); + await _waitForFile(portFile); + } + + final client = await _startBuildDaemon(workingDirectory, [...buildOptions]); logWriter(logging.Level.INFO, 'Registering build targets...'); _registerBuildTargets(client, configuration, targetPorts); logWriter(logging.Level.INFO, 'Starting initial build...'); @@ -221,7 +267,7 @@ class DevWorkflow { client, ); final chrome = await _startChrome(configuration, serverManager, client); - return DevWorkflow._(client, chrome, serverManager); + return DevWorkflow._(client, chrome, serverManager, fesProcess); } Future shutDown() async { @@ -229,6 +275,7 @@ class DevWorkflow { await _chrome?.close(); await _client.close(); await serverManager.stop(); + _fesProcess?.kill(); if (!_doneCompleter.isCompleted) _doneCompleter.complete(); } } From e8a9d4474e0bdad4e64a075a87fa0c021a7fed89 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Wed, 13 May 2026 17:11:58 -0700 Subject: [PATCH 005/134] updating port file name --- dwds/test/integration/fixtures/context.dart | 24 ++++++++++++++------- webdev/lib/src/serve/dev_workflow.dart | 6 +++--- webdev/lib/src/serve/webdev_server.dart | 7 +++--- 3 files changed, 23 insertions(+), 14 deletions(-) diff --git a/dwds/test/integration/fixtures/context.dart b/dwds/test/integration/fixtures/context.dart index 5419e6876c..94fb002fab 100644 --- a/dwds/test/integration/fixtures/context.dart +++ b/dwds/test/integration/fixtures/context.dart @@ -321,7 +321,11 @@ class TestContext { _assetHandler = _createBuildRunnerProxyHandler(assetServerPort); if (testSettings.moduleFormat == ModuleFormat.ddc && buildSettings.canaryFeatures) { - _assetHandler = _handleReloadedSources(_assetHandler!); + _assetHandler = _createBuildRunnerDdcLibraryBundleAssetHandler( + assetServerPort, + ); + } else { + _assetHandler = _createBuildRunnerProxyHandler(assetServerPort); } assetReader = ProxyServerAssetReader( assetServerPort, @@ -522,16 +526,16 @@ class TestContext { workingDirectory: project.absolutePackageDirectory, ); - final portFile = File( + final configFile = File( p.join( project.absolutePackageDirectory, '.dart_tool', 'build', - 'fes_worker_port', + 'fes_manager_config', ), ); - // Wait for `fes_manager` to create the port file. - while (!await portFile.exists()) { + // Wait for `fes_manager` to create the config file. + while (!await configFile.exists()) { await Future.delayed(const Duration(milliseconds: 100)); } } @@ -566,7 +570,11 @@ class TestContext { _assetHandler = _createBuildRunnerProxyHandler(assetServerPort); if (testSettings.moduleFormat == ModuleFormat.ddc && buildSettings.canaryFeatures) { - _assetHandler = _handleReloadedSources(_assetHandler!); + _assetHandler = _createBuildRunnerDdcLibraryBundleAssetHandler( + assetServerPort, + ); + } else { + _assetHandler = _createBuildRunnerProxyHandler(assetServerPort); } assetReader = ProxyServerAssetReader( assetServerPort, @@ -580,7 +588,7 @@ class TestContext { project.absolutePackageDirectory, '.dart_tool', 'build', - 'fes_worker_port', + 'fes_manager_config', ), ); if (await file.exists()) { @@ -640,7 +648,7 @@ class TestContext { } } throw StateError( - 'FES port not found in .dart_tool/build/fes_worker_port', + 'FES port not found in .dart_tool/build/fes_manager_config', ); }); } diff --git a/webdev/lib/src/serve/dev_workflow.dart b/webdev/lib/src/serve/dev_workflow.dart index 5fe3b38350..afe0b146fb 100644 --- a/webdev/lib/src/serve/dev_workflow.dart +++ b/webdev/lib/src/serve/dev_workflow.dart @@ -249,10 +249,10 @@ class DevWorkflow { if (configuration.webHotReload) { logWriter(logging.Level.INFO, 'Starting Frontend Server Manager...'); fesProcess = await _startFesManager(workingDirectory); - final portFile = File( - p.join(workingDirectory, '.dart_tool', 'build', 'fes_worker_port'), + final configFile = File( + p.join(workingDirectory, '.dart_tool', 'build', 'fes_manager_config'), ); - await _waitForFile(portFile); + await _waitForFile(configFile); } final client = await _startBuildDaemon(workingDirectory, [...buildOptions]); diff --git a/webdev/lib/src/serve/webdev_server.dart b/webdev/lib/src/serve/webdev_server.dart index 3a343bb33d..61f5b5921e 100644 --- a/webdev/lib/src/serve/webdev_server.dart +++ b/webdev/lib/src/serve/webdev_server.dart @@ -369,11 +369,12 @@ class WebDevServer { try { final file = File( - p.join('.dart_tool', 'build', 'fes_worker_port'), + p.join('.dart_tool', 'build', 'fes_manager_config'), ); if (await file.exists()) { final content = await file.readAsString(); - final port = int.tryParse(content.trim()); + final json = jsonDecode(content) as Map; + final port = json['port'] as int?; if (port != null) { cachedFesPort = port; return await sendRequestToFes(port, request); @@ -381,7 +382,7 @@ class WebDevServer { } } catch (e) { _logger.warning( - 'Failed to read FES port from .dart_tool/build/fes_worker_port', + 'Failed to read FES config from .dart_tool/build/fes_manager_config', e, ); } From c6efb3cfc5bf7706867a3871594b40fcf2bcdc90 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Wed, 13 May 2026 17:16:38 -0700 Subject: [PATCH 006/134] formatting --- dwds/lib/src/loaders/frontend_server_strategy_provider.dart | 3 ++- webdev/lib/src/serve/server_manager.dart | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart index 2f555d8d3e..bc0f1bad9a 100644 --- a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart +++ b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart @@ -194,7 +194,7 @@ class FrontendServerBuildDaemonStrategyProvider String stripPrefix(String path) { if (path.startsWith('packages')) return path; final parts = path.split('/'); - + final appUri = _buildSettings.appEntrypoint; final validPrefixes = [ if (appUri != null && appUri.pathSegments.isNotEmpty) @@ -212,6 +212,7 @@ class FrontendServerBuildDaemonStrategyProvider _configuration, _moduleProvider, (_) => _digestsProvider(), + /// Looks up the module name for a given server path. (metadataProvider, sourcePath) async { var module = await _moduleForServerPath(metadataProvider, sourcePath); diff --git a/webdev/lib/src/serve/server_manager.dart b/webdev/lib/src/serve/server_manager.dart index bd4fca7843..cd708c3d6f 100644 --- a/webdev/lib/src/serve/server_manager.dart +++ b/webdev/lib/src/serve/server_manager.dart @@ -20,7 +20,9 @@ class ServerManager { ) async { final servers = {}; for (final options in serverOptions) { - servers.add(await WebDevServer.start(options, client.buildResults, client)); + servers.add( + await WebDevServer.start(options, client.buildResults, client), + ); } return ServerManager._(servers); } From ef4b320292fad80ebabe8dea5d227f392318b766 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 14 May 2026 12:55:08 -0700 Subject: [PATCH 007/134] adding local override --- webdev/pubspec.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webdev/pubspec.yaml b/webdev/pubspec.yaml index 95bb21c89a..420a3620da 100644 --- a/webdev/pubspec.yaml +++ b/webdev/pubspec.yaml @@ -58,6 +58,8 @@ executables: webdev: dependency_overrides: + dwds: + path: ../dwds dwds_test_common: git: url: https://github.com/dart-lang/sdk.git From f0086a1c44f35b1e25736ab47159c7412b39e8d4 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Fri, 15 May 2026 10:53:06 -0700 Subject: [PATCH 008/134] updating tests --- dwds/test/integration/fixtures/context.dart | 31 +++++++++++++++++---- dwds/test/integration/fixtures/project.dart | 21 +++++++++++++- 2 files changed, 46 insertions(+), 6 deletions(-) diff --git a/dwds/test/integration/fixtures/context.dart b/dwds/test/integration/fixtures/context.dart index 94fb002fab..96e38bf153 100644 --- a/dwds/test/integration/fixtures/context.dart +++ b/dwds/test/integration/fixtures/context.dart @@ -243,10 +243,17 @@ class TestContext { ); } - await Process.run(sdkLayout.dartPath, [ + final pubUpgradeResult = await Process.run(sdkLayout.dartPath, [ 'pub', 'upgrade', ], workingDirectory: project.absolutePackageDirectory); + if (pubUpgradeResult.exitCode != 0) { + _logger.severe( + '"dart pub upgrade" failed in ${project.absolutePackageDirectory}:', + ); + _logger.severe(pubUpgradeResult.stdout); + _logger.severe(pubUpgradeResult.stderr); + } ExpressionCompiler? expressionCompiler; AssetReader assetReader; @@ -515,7 +522,7 @@ class TestContext { ); final args = [ 'run', - 'build_frontend_server:fes_manager', + 'build_web_compilers:fes_manager', sdkDir, p.toUri(testScratchSpaceDir.path).toString(), p.toUri(packagesFile).toString(), @@ -526,6 +533,18 @@ class TestContext { workingDirectory: project.absolutePackageDirectory, ); + // Record the FES manager's output for debugging test issues. + _fesProcess!.stdout + .transform(utf8.decoder) + .transform(const LineSplitter()) + .listen((line) => _logger.info('FES Manager stdout: $line')); + _fesProcess!.stderr + .transform(utf8.decoder) + .transform(const LineSplitter()) + .listen( + (line) => _logger.warning('FES Manager stderr: $line'), + ); + final configFile = File( p.join( project.absolutePackageDirectory, @@ -1053,9 +1072,11 @@ 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); } diff --git a/dwds/test/integration/fixtures/project.dart b/dwds/test/integration/fixtures/project.dart index 60d950b050..71532e8b56 100644 --- a/dwds/test/integration/fixtures/project.dart +++ b/dwds/test/integration/fixtures/project.dart @@ -229,7 +229,26 @@ class TestProject { } } - await Process.run('dart', ['pub', 'get'], workingDirectory: newPath); + // Dynamically add pubspec overrides for test fixtures. + final overridesFile = File(p.join(newPath, 'pubspec_overrides.yaml')); + final buildRepoDir = p.join(p.dirname(projectRootDir), 'build'); + await overridesFile.writeAsString(''' +dependency_overrides: + build_web_compilers: + path: ${p.join(buildRepoDir, 'builder_pkgs', 'build_web_compilers')} + scratch_space: + path: ${p.join(buildRepoDir, 'builder_pkgs', 'scratch_space')} +'''); + + final pubGetResult = await Process.run('dart', [ + 'pub', + 'get', + ], workingDirectory: newPath); + if (pubGetResult.exitCode != 0) { + print('"dart pub get" failed in $newPath:'); + print(pubGetResult.stdout); + print(pubGetResult.stderr); + } // Clean up the project. // Called when we need to rebuild sdk and the app from previous test From 82ad3a478220ab668240c4f52d7315c6e989190e Mon Sep 17 00:00:00 2001 From: MarkZ Date: Fri, 15 May 2026 11:05:26 -0700 Subject: [PATCH 009/134] formatting --- dwds/test/integration/fixtures/context.dart | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/dwds/test/integration/fixtures/context.dart b/dwds/test/integration/fixtures/context.dart index 96e38bf153..6d065cd91d 100644 --- a/dwds/test/integration/fixtures/context.dart +++ b/dwds/test/integration/fixtures/context.dart @@ -1072,11 +1072,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); } From 6ace94cae18d07d288c667e2f19a4e0abf2f3868 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Fri, 15 May 2026 14:04:08 -0700 Subject: [PATCH 010/134] Merging --- webdev/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webdev/pubspec.yaml b/webdev/pubspec.yaml index 420a3620da..af5d874884 100644 --- a/webdev/pubspec.yaml +++ b/webdev/pubspec.yaml @@ -64,4 +64,4 @@ dependency_overrides: git: url: https://github.com/dart-lang/sdk.git ref: cc67fadefe24678e7f020fe42cbb41fed2cd6f0c - path: pkg/dwds_test_common \ No newline at end of file + path: pkg/dwds_test_common From 163b4b9526b2e40ef1e8d5b87d1bdb05f8388fc6 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Fri, 15 May 2026 14:04:34 -0700 Subject: [PATCH 011/134] Fixing override --- dwds/test/integration/fixtures/project.dart | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/dwds/test/integration/fixtures/project.dart b/dwds/test/integration/fixtures/project.dart index 71532e8b56..804c6cec0d 100644 --- a/dwds/test/integration/fixtures/project.dart +++ b/dwds/test/integration/fixtures/project.dart @@ -232,13 +232,27 @@ class TestProject { // Dynamically add pubspec overrides for test fixtures. final overridesFile = File(p.join(newPath, 'pubspec_overrides.yaml')); final buildRepoDir = p.join(p.dirname(projectRootDir), 'build'); - await overridesFile.writeAsString(''' + final buildWebCompilersPath = p.join( + buildRepoDir, + 'builder_pkgs', + 'build_web_compilers', + ); + final scratchSpacePath = p.join( + buildRepoDir, + 'builder_pkgs', + 'scratch_space', + ); + + if (Directory(buildWebCompilersPath).existsSync() && + Directory(scratchSpacePath).existsSync()) { + await overridesFile.writeAsString(''' dependency_overrides: build_web_compilers: - path: ${p.join(buildRepoDir, 'builder_pkgs', 'build_web_compilers')} + path: $buildWebCompilersPath scratch_space: - path: ${p.join(buildRepoDir, 'builder_pkgs', 'scratch_space')} + path: $scratchSpacePath '''); + } final pubGetResult = await Process.run('dart', [ 'pub', From 87822823634cf6aed889d4b585c30208dab7b464 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Mon, 18 May 2026 15:24:31 -0700 Subject: [PATCH 012/134] updating test pubspec --- dwds_test_common/fixtures/_experiment/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_circular1/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_circular2/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml | 4 ++++ dwds_test_common/fixtures/_test_hot_restart1/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_package/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_parts/pubspec.yaml | 2 +- dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml | 2 +- 9 files changed, 12 insertions(+), 8 deletions(-) diff --git a/dwds_test_common/fixtures/_experiment/pubspec.yaml b/dwds_test_common/fixtures/_experiment/pubspec.yaml index 3ee0f7b77d..6c54ae49a1 100644 --- a/dwds_test_common/fixtures/_experiment/pubspec.yaml +++ b/dwds_test_common/fixtures/_experiment/pubspec.yaml @@ -12,4 +12,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.4.12 + build_web_compilers: ^4.6.0 diff --git a/dwds_test_common/fixtures/_test_circular1/pubspec.yaml b/dwds_test_common/fixtures/_test_circular1/pubspec.yaml index 4006d5808e..186477a200 100644 --- a/dwds_test_common/fixtures/_test_circular1/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_circular1/pubspec.yaml @@ -14,4 +14,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.4.12 + build_web_compilers: ^4.6.0 diff --git a/dwds_test_common/fixtures/_test_circular2/pubspec.yaml b/dwds_test_common/fixtures/_test_circular2/pubspec.yaml index df300c144c..ac96e57a45 100644 --- a/dwds_test_common/fixtures/_test_circular2/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_circular2/pubspec.yaml @@ -12,4 +12,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.4.12 + build_web_compilers: ^4.6.0 diff --git a/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml b/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml index f91980fa04..d6fede505b 100644 --- a/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml @@ -8,4 +8,4 @@ environment: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.4.12 + build_web_compilers: ^4.6.0 diff --git a/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml b/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml index 7a2c88f4a3..c769e741da 100644 --- a/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml @@ -5,3 +5,7 @@ description: >- publish_to: none environment: sdk: ^3.10.0-0.0.dev + +dev_dependencies: + build_runner: ^2.5.0 + build_web_compilers: ^4.6.0 diff --git a/dwds_test_common/fixtures/_test_hot_restart1/pubspec.yaml b/dwds_test_common/fixtures/_test_hot_restart1/pubspec.yaml index c227c1d5f7..a631d86bb3 100644 --- a/dwds_test_common/fixtures/_test_hot_restart1/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_restart1/pubspec.yaml @@ -12,4 +12,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.4.12 + build_web_compilers: ^4.6.0 diff --git a/dwds_test_common/fixtures/_test_package/pubspec.yaml b/dwds_test_common/fixtures/_test_package/pubspec.yaml index 142c65c6a9..51127e0e8b 100644 --- a/dwds_test_common/fixtures/_test_package/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_package/pubspec.yaml @@ -12,4 +12,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.4.12 \ No newline at end of file + build_web_compilers: ^4.6.0 \ No newline at end of file diff --git a/dwds_test_common/fixtures/_test_parts/pubspec.yaml b/dwds_test_common/fixtures/_test_parts/pubspec.yaml index 57b92363cf..c8bb22303a 100644 --- a/dwds_test_common/fixtures/_test_parts/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_parts/pubspec.yaml @@ -12,4 +12,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.4.12 + build_web_compilers: ^4.6.0 diff --git a/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml b/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml index 6f16347647..4afbe97d0c 100644 --- a/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml +++ b/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml @@ -8,4 +8,4 @@ environment: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.4.12 + build_web_compilers: ^4.6.0 From e74fc12dad3578163b0d80927f66de3ad6fea192 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Tue, 19 May 2026 12:13:50 -0700 Subject: [PATCH 013/134] Updating test constraints --- webdev/lib/src/pubspec.dart | 2 +- webdev/test/integration_common.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/webdev/lib/src/pubspec.dart b/webdev/lib/src/pubspec.dart index b82d111bb5..06f31ae685 100644 --- a/webdev/lib/src/pubspec.dart +++ b/webdev/lib/src/pubspec.dart @@ -188,7 +188,7 @@ Future> _validateBuildDaemonVersion( } final buildRunnerConstraint = VersionConstraint.parse('^2.4.0'); -final buildWebCompilersConstraint = VersionConstraint.parse('^4.4.12'); +final buildWebCompilersConstraint = VersionConstraint.parse('^4.6.0'); // Note the minimum versions should never be dev versions as users will not // get them by default. diff --git a/webdev/test/integration_common.dart b/webdev/test/integration_common.dart index 629a2d1fc1..fd388d1c19 100644 --- a/webdev/test/integration_common.dart +++ b/webdev/test/integration_common.dart @@ -296,7 +296,7 @@ dependencies: } const _supportedBuildRunnerVersion = '2.4.0'; -const _supportedWebCompilersVersion = '4.4.12'; +const _supportedWebCompilersVersion = '4.6.0'; const _supportedBuildDaemonVersion = '4.0.0'; String _pubspecYaml = ''' From dc58b2a426449ff4e80859f3364c150e378534d8 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Tue, 19 May 2026 13:05:21 -0700 Subject: [PATCH 014/134] updating compilationMode checks --- dwds/test/integration/common/hot_restart_common.dart | 7 +++---- .../integration/common/hot_restart_correctness_common.dart | 5 ++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/dwds/test/integration/common/hot_restart_common.dart b/dwds/test/integration/common/hot_restart_common.dart index 580b6ed5ce..ffef21b261 100644 --- a/dwds/test/integration/common/hot_restart_common.dart +++ b/dwds/test/integration/common/hot_restart_common.dart @@ -34,10 +34,9 @@ void runTests({ tearDownAll(provider.dispose); Future recompile({bool hasEdits = false}) async { - if (compilationMode == CompilationMode.frontendServer) { + if (compilationMode.usesFrontendServer) { await context.recompile(fullRestart: true); } else { - assert(compilationMode == CompilationMode.buildDaemon); if (hasEdits) { // Only gets a new build if there were edits. await context.waitForSuccessfulBuild(); @@ -166,7 +165,7 @@ void runTests({ }); }, // `BuildResult`s are only ever emitted when using the build daemon. - skip: compilationMode == CompilationMode.buildDaemon ? null : true, + skip: compilationMode.usesBuildDaemon ? null : true, timeout: const Timeout.factor(2), ); @@ -563,7 +562,7 @@ void runTests({ }); }, // `BuildResult`s are only ever emitted when using the build daemon. - skip: compilationMode == CompilationMode.buildDaemon ? null : true, + skip: compilationMode.usesBuildDaemon ? null : true, timeout: const Timeout.factor(2), ); diff --git a/dwds/test/integration/common/hot_restart_correctness_common.dart b/dwds/test/integration/common/hot_restart_correctness_common.dart index dc37269678..5820cd8b4b 100644 --- a/dwds/test/integration/common/hot_restart_correctness_common.dart +++ b/dwds/test/integration/common/hot_restart_correctness_common.dart @@ -45,10 +45,9 @@ void runTests({ newString: newString, ), ]); - if (compilationMode == CompilationMode.frontendServer) { + if (compilationMode.usesFrontendServer) { await context.recompile(fullRestart: true); } else { - assert(compilationMode == CompilationMode.buildDaemon); await context.waitForSuccessfulBuild(propagateToBrowser: true); } } @@ -199,7 +198,7 @@ void runTests({ }); }, // `BuildResult`s are only ever emitted when using the build daemon. - skip: compilationMode == CompilationMode.buildDaemon ? null : true, + skip: compilationMode.usesBuildDaemon ? null : true, timeout: const Timeout.factor(2), ); } From 1d84f5ccae831735a1333dcb10e639a9297bed81 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Wed, 27 May 2026 21:50:21 -0700 Subject: [PATCH 015/134] Add hot reload + restart support --- dwds/lib/src/loaders/strategy.dart | 14 +- .../frontend_server_common/asset_server.dart | 25 +- .../common/hot_restart_common.dart | 6 +- .../hot_restart_correctness_common.dart | 7 +- dwds/test/integration/fixtures/context.dart | 518 +++++++++++++++--- dwds/test/integration/fixtures/project.dart | 11 +- dwds/test/integration/hot_reload_common.dart | 37 ++ .../_test_hot_reload_breakpoints/pubspec.yaml | 4 + example/pubspec.yaml | 2 +- webdev/lib/src/daemon/app_domain.dart | 18 +- webdev/lib/src/serve/webdev_server.dart | 2 +- webdev/test/daemon/app_domain_common.dart | 23 +- 12 files changed, 545 insertions(+), 122 deletions(-) diff --git a/dwds/lib/src/loaders/strategy.dart b/dwds/lib/src/loaders/strategy.dart index c4ccaa6aa9..27b0bfbd75 100644 --- a/dwds/lib/src/loaders/strategy.dart +++ b/dwds/lib/src/loaders/strategy.dart @@ -217,7 +217,19 @@ abstract class LoadStrategy { String entrypoint, Map reloadedModulesToLibraries, ) { - final provider = _providers[entrypoint]!; + var provider = _providers[entrypoint]; + if (provider == null) { + final normalized = entrypoint.startsWith('/') + ? entrypoint.substring(1) + : '/$entrypoint'; + provider = _providers[normalized] ?? _providers.values.firstOrNull; + if (provider == null) { + throw StateError( + 'No metadata provider found for entrypoint $entrypoint. ' + 'Available providers: ${_providers.keys.toList()}', + ); + } + } return provider.reinitializeAfterHotReload(reloadedModulesToLibraries); } } diff --git a/dwds/test/frontend_server_common/asset_server.dart b/dwds/test/frontend_server_common/asset_server.dart index ef39ff0b35..9b21ab456b 100644 --- a/dwds/test/frontend_server_common/asset_server.dart +++ b/dwds/test/frontend_server_common/asset_server.dart @@ -103,6 +103,19 @@ class TestAssetServer implements AssetReader { final headers = {}; + var lookupPath = requestPath; + if (lookupPath.startsWith('packages/')) { + final parts = lookupPath.split('/'); + if (parts.length > 2) { + final candidate = 'lib/${parts.sublist(2).join('/')}'; + if (_files.containsKey(candidate) || + _sourceMaps.containsKey('$candidate.map') || + _metadata.containsKey('$candidate.metadata')) { + lookupPath = candidate; + } + } + } + if (request.url.path.endsWith('.html')) { final indexFile = _fileSystem.file(_projectDirectory.resolve(index)); if (indexFile.existsSync()) { @@ -117,24 +130,24 @@ class TestAssetServer implements AssetReader { // If this is a JavaScript file, it must be in the in-memory cache. // Attempt to look up the file by URI. - if (hasFile(requestPath)) { - final List bytes = getFile(requestPath); + if (hasFile(lookupPath)) { + final List bytes = getFile(lookupPath); headers[HttpHeaders.contentLengthHeader] = bytes.length.toString(); headers[HttpHeaders.contentTypeHeader] = 'application/javascript'; return shelf.Response.ok(bytes, headers: headers); } // If this is a sourcemap file, then it might be in the in-memory cache. // Attempt to lookup the file by URI. - if (hasSourceMap(requestPath)) { - final List bytes = getSourceMap(requestPath); + if (hasSourceMap(lookupPath)) { + final List bytes = getSourceMap(lookupPath); headers[HttpHeaders.contentLengthHeader] = bytes.length.toString(); headers[HttpHeaders.contentTypeHeader] = 'application/json'; return shelf.Response.ok(bytes, headers: headers); } // If this is a metadata file, then it might be in the in-memory cache. // Attempt to lookup the file by URI. - if (hasMetadata(requestPath)) { - final List bytes = getMetadata(requestPath); + if (hasMetadata(lookupPath)) { + final List bytes = getMetadata(lookupPath); headers[HttpHeaders.contentLengthHeader] = bytes.length.toString(); headers[HttpHeaders.contentTypeHeader] = 'application/json'; return shelf.Response.ok(bytes, headers: headers); diff --git a/dwds/test/integration/common/hot_restart_common.dart b/dwds/test/integration/common/hot_restart_common.dart index ffef21b261..c486ddf449 100644 --- a/dwds/test/integration/common/hot_restart_common.dart +++ b/dwds/test/integration/common/hot_restart_common.dart @@ -34,13 +34,13 @@ void runTests({ tearDownAll(provider.dispose); Future recompile({bool hasEdits = false}) async { - if (compilationMode.usesFrontendServer) { - await context.recompile(fullRestart: true); - } else { + if (compilationMode.usesBuildDaemon) { if (hasEdits) { // Only gets a new build if there were edits. await context.waitForSuccessfulBuild(); } + } else if (compilationMode.usesFrontendServer) { + await context.recompile(fullRestart: true); } } diff --git a/dwds/test/integration/common/hot_restart_correctness_common.dart b/dwds/test/integration/common/hot_restart_correctness_common.dart index 5820cd8b4b..e85af538bd 100644 --- a/dwds/test/integration/common/hot_restart_correctness_common.dart +++ b/dwds/test/integration/common/hot_restart_correctness_common.dart @@ -45,14 +45,13 @@ void runTests({ newString: newString, ), ]); - if (compilationMode.usesFrontendServer) { - await context.recompile(fullRestart: true); - } else { + if (compilationMode.usesBuildDaemon) { await context.waitForSuccessfulBuild(propagateToBrowser: true); + } else if (compilationMode.usesFrontendServer) { + await context.recompile(fullRestart: true); } } - // Wait for `expectedString` to be printed to the console. Future waitForLog(String expectedString) async { final completer = Completer(); final subscription = context.webkitDebugger.onConsoleAPICalled.listen((e) { diff --git a/dwds/test/integration/fixtures/context.dart b/dwds/test/integration/fixtures/context.dart index 6d065cd91d..b566f0c5c9 100644 --- a/dwds/test/integration/fixtures/context.dart +++ b/dwds/test/integration/fixtures/context.dart @@ -7,6 +7,7 @@ import 'dart:async'; import 'dart:convert'; import 'dart:io'; +import 'dart:typed_data'; import 'package:build_daemon/client.dart'; import 'package:build_daemon/data/build_status.dart'; @@ -141,6 +142,11 @@ class TestContext { late LocalFileSystem frontendServerFileSystem; late String _hostname; + late TestSettings _testSettings; + + bool get _isFesWithExpressionEvaluation => + _testSettings.compilationMode.usesFrontendServer && + _testSettings.enableExpressionEvaluation; /// Internal VM service. /// @@ -159,6 +165,8 @@ class TestContext { TestDebugSettings debugSettings = const TestDebugSettings.noDevToolsLaunch(), }) async { + _testSettings = testSettings; + _reloadedSources.clear(); try { // Build settings to return from load strategy. final buildSettings = TestBuildSettings( @@ -297,6 +305,7 @@ class TestContext { 'build_web_compilers|entrypoint_marker=ddc-library-bundle=true', ], '--verbose', + '--build-filter=${project.directoryToServe}/**', ]; _daemonClient = await connectClient( sdkLayout.dartPath, @@ -307,16 +316,15 @@ class TestContext { final name = record.loggerName == '' ? '' : '${record.loggerName}: '; - _logger.log( - record.level, - '$name${record.message}', - record.error, - record.stackTrace, - ); + print('${record.level.name}: $name${record.message}'); }, ); daemonClient.registerBuildTarget( - DefaultBuildTarget((b) => b..target = project.directoryToServe), + DefaultBuildTarget( + (b) => b + ..target = project.directoryToServe + ..reportChangedAssets = true, + ), ); daemonClient.startBuild(); @@ -432,31 +440,33 @@ class TestContext { basePath = webRunner.devFS!.assetServer.basePath; assetReader = webRunner.devFS!.assetServer; _assetHandler = webRunner.devFS!.assetServer.handleRequest; - loadStrategy = switch (testSettings.moduleFormat) { - ModuleFormat.amd => FrontendServerRequireStrategyProvider( + loadStrategy = switch (( + testSettings.moduleFormat, + buildSettings.canaryFeatures, + )) { + (ModuleFormat.amd, _) => FrontendServerRequireStrategyProvider( + testSettings.reloadConfiguration, + assetReader, + packageUriMapper, + () async => {}, + buildSettings, + ).strategy, + (ModuleFormat.ddc, true) => + FrontendServerDdcLibraryBundleStrategyProvider( + testSettings.reloadConfiguration, + assetReader, + packageUriMapper, + () async => {}, + buildSettings, + reloadedSourcesUri: reloadedSourcesUri, + ).strategy, + (ModuleFormat.ddc, false) => FrontendServerDdcStrategyProvider( testSettings.reloadConfiguration, assetReader, packageUriMapper, () async => {}, buildSettings, ).strategy, - ModuleFormat.ddc => - buildSettings.canaryFeatures - ? FrontendServerDdcLibraryBundleStrategyProvider( - testSettings.reloadConfiguration, - assetReader, - packageUriMapper, - () async => {}, - buildSettings, - reloadedSourcesUri: reloadedSourcesUri, - ).strategy - : FrontendServerDdcStrategyProvider( - testSettings.reloadConfiguration, - assetReader, - packageUriMapper, - () async => {}, - buildSettings, - ).strategy, _ => throw Exception( 'Unsupported DDC module format ' '${testSettings.moduleFormat.name}.', @@ -467,6 +477,25 @@ class TestContext { break; case CompilationMode.buildDaemonAndFrontendServer: { + // Symmetrically terminate any leftover background Build Daemon processes + // from previous crashed runs to ensure the new daemon connects to the correct CWD. + try { + final result = Process.runSync('ps', ['aux']); + final lines = result.stdout.toString().split('\n'); + for (final line in lines) { + if (line.contains('build.dart.aot') || + line.contains('build_runner')) { + final parts = line.trim().split(RegExp(r'\s+')); + if (parts.length > 1) { + final targetPid = int.tryParse(parts[1]); + if (targetPid != null && targetPid != pid) { + Process.runSync('kill', ['-9', '$targetPid']); + } + } + } + } + } catch (_) {} + final options = [ if (testSettings.enableExpressionEvaluation) ...[ '--define', @@ -492,6 +521,7 @@ class TestContext { '--define', 'build_web_compilers|ddc_modules=web-hot-reload=true', '--verbose', + '--build-filter=${project.directoryToServe}/**', ]; if (testSettings.enableExpressionEvaluation) { @@ -507,6 +537,12 @@ class TestContext { // with expression evaluation. We spin up the Frontend Server // and build_runner separately, so we need to ensure both use the // same scratch space. + final buildDir = Directory( + p.join(project.absolutePackageDirectory, '.dart_tool', 'build'), + ); + if (buildDir.existsSync()) { + buildDir.deleteSync(recursive: true); + } final testScratchSpaceDir = Directory( p.join( project.absolutePackageDirectory, @@ -520,9 +556,29 @@ class TestContext { '--define=build_web_compilers:ddc=scratch-space-dir=' '${testScratchSpaceDir.path}', ); + final fesSnapshot = p.join( + project.absolutePackageDirectory, + '.dart_tool', + 'fes_manager.snapshot', + ); + final buildRepoDir = p.join(p.dirname(projectRootDir), 'build'); + final fesManagerPath = p.join( + buildRepoDir, + 'builder_pkgs', + 'build_web_compilers', + 'bin', + 'fes_manager.dart', + ); + await Process.run(sdkLayout.dartPath, [ + 'compile', + 'kernel', + '-o', + fesSnapshot, + fesManagerPath, + ]); + final args = [ - 'run', - 'build_web_compilers:fes_manager', + fesSnapshot, sdkDir, p.toUri(testScratchSpaceDir.path).toString(), p.toUri(packagesFile).toString(), @@ -537,13 +593,11 @@ class TestContext { _fesProcess!.stdout .transform(utf8.decoder) .transform(const LineSplitter()) - .listen((line) => _logger.info('FES Manager stdout: $line')); + .listen((line) => print('FES Manager stdout: $line')); _fesProcess!.stderr .transform(utf8.decoder) .transform(const LineSplitter()) - .listen( - (line) => _logger.warning('FES Manager stderr: $line'), - ); + .listen((line) => print('FES Manager stderr: $line')); final configFile = File( p.join( @@ -559,29 +613,56 @@ class TestContext { } } - _daemonClient = await connectClient( - sdkLayout.dartPath, - project.absolutePackageDirectory, - options, - (log) { - final record = log.toLogRecord(); - final name = record.loggerName == '' - ? '' - : '${record.loggerName}: '; - _logger.log( - record.level, - '$name${record.message}', - record.error, - record.stackTrace, + try { + _daemonClient = await connectClient( + sdkLayout.dartPath, + project.absolutePackageDirectory, + options, + (log) { + final record = log.toLogRecord(); + final name = record.loggerName == '' + ? '' + : '${record.loggerName}: '; + }, + ); + } catch (e) { + final daemonLogFile = File( + p.join( + project.absolutePackageDirectory, + '.dart_tool', + 'build', + 'daemon', + 'log', + ), + ); + if (daemonLogFile.existsSync()) { + print( + 'DAEMON STARTUP LOG CONTENT:\n${daemonLogFile.readAsStringSync()}', ); - }, - ); + } else { + print( + 'DAEMON STARTUP LOG FILE DOES NOT EXIST at: ${daemonLogFile.path}', + ); + } + rethrow; + } daemonClient.registerBuildTarget( - DefaultBuildTarget((b) => b..target = project.directoryToServe), + DefaultBuildTarget( + (b) => b + ..target = project.directoryToServe + ..outputLocation = OutputLocation( + (o) => o + ..output = outputDir.path + ..useSymlinks = true + ..hoist = true, + ).toBuilder() + ..reportChangedAssets = true, + ), ); + final buildFuture = waitForSuccessfulBuild(cleanStart: true); daemonClient.startBuild(); - await waitForSuccessfulBuild(); + await buildFuture; final assetServerPort = daemonPort( project.absolutePackageDirectory, @@ -595,10 +676,7 @@ class TestContext { } else { _assetHandler = _createBuildRunnerProxyHandler(assetServerPort); } - assetReader = ProxyServerAssetReader( - assetServerPort, - root: project.directoryToServe, - ); + assetReader = ProxyServerAssetReader.fromHandler(_assetHandler!); if (testSettings.enableExpressionEvaluation) { expressionCompiler = DaemonExpressionCompiler((request) async { @@ -680,8 +758,9 @@ class TestContext { loadStrategy = switch (( testSettings.moduleFormat, buildSettings.canaryFeatures, + testSettings.enableExpressionEvaluation, )) { - (ModuleFormat.ddc, true) => + (ModuleFormat.ddc, true, true) => FrontendServerBuildDaemonStrategyProvider( testSettings.reloadConfiguration, assetReader, @@ -691,12 +770,25 @@ class TestContext { injectScriptLoad: false, reloadedSourcesUri: reloadedSourcesUri, ).strategy, + (ModuleFormat.ddc, true, false) => + BuildRunnerDdcLibraryBundleStrategyProvider( + testSettings.reloadConfiguration, + assetReader, + buildSettings, + reloadedSourcesUri: reloadedSourcesUri, + ).strategy, _ => throw Exception( 'Unsupported DDC module format when compiling with Frontend ' 'Server + build_runner ${testSettings.moduleFormat.name}.', ), }; - buildResults = const Stream.empty(); + // If expression evaluation is disabled, the build daemon is + // responsible for triggering hot reloads/restarts via its + // buildResults stream. We must listen to it to prevent browser + // reload events from hanging. + buildResults = testSettings.enableExpressionEvaluation + ? const Stream.empty() + : daemonClient.buildResults; } break; } @@ -854,16 +946,80 @@ class TestContext { } Future tearDown() async { - await _webRunner?.stop(); - await _webDriver?.quit(closeSession: true); + try { + await _webRunner?.stop().timeout(const Duration(seconds: 5)); + } catch (_) {} + try { + await _webDriver + ?.quit(closeSession: true) + .timeout(const Duration(seconds: 5)); + } catch (_) {} _chromeDriver?.kill(); DartUri.currentDirectory = p.current; - await _daemonClient?.close(); - await ddcService?.stop(); - await _testServer?.stop(); - _client?.close(); - _fesProcess?.kill(); - await _outputDir?.delete(recursive: true); + try { + await _daemonClient?.close().timeout(const Duration(seconds: 5)); + } catch (_) {} + try { + await ddcService?.stop().timeout(const Duration(seconds: 5)); + } catch (_) {} + try { + await _testServer?.stop().timeout(const Duration(seconds: 5)); + } catch (_) {} + try { + _client?.close(); + } catch (_) {} + try { + _fesProcess?.kill(); + } catch (_) {} + final dir = _outputDir; + if (dir != null && dir.existsSync()) { + unawaited(dir.delete(recursive: true)); + } + + if (_testSettings.compilationMode.usesBuildDaemon) { + // Cleanly terminate any leftover background compiler processes + // spawned during this test case to prevent Dill cache locks. + try { + final result = Process.runSync('ps', ['aux']); + final lines = result.stdout.toString().split('\n'); + for (final line in lines) { + final isBuildDaemon = + line.contains('build.dart.aot') || line.contains('build_runner'); + final isStaleCompiler = + !isBuildDaemon && + (line.contains('frontend_server') || + (line.contains('dartaotruntime') && + line.contains('/folders/'))); + + if (isStaleCompiler) { + final parts = line.trim().split(RegExp(r'\s+')); + if (parts.length > 1) { + final targetPid = int.tryParse(parts[1]); + if (targetPid != null && targetPid != pid) { + Process.runSync('kill', ['-9', '$targetPid']); + } + } + } + } + } catch (_) {} + } + + // Wait for the build daemon process of this specific test case to fully exit naturally + // and release its global registry locks before allowing the next case to start. + if (_testSettings.compilationMode.usesBuildDaemon) { + final targetPath = project.absolutePackageDirectory; + for (var i = 0; i < 50; i++) { + final result = Process.runSync('ps', ['aux']); + final lines = result.stdout.toString().split('\n'); + final isStillRunning = lines.any( + (line) => + line.contains('build.dart.aot') && line.contains(targetPath), + ); + if (!isStillRunning) break; + await Future.delayed(const Duration(milliseconds: 100)); + } + } + stopLogWriter(); await project.tearDown(); @@ -891,10 +1047,8 @@ class TestContext { // timestamp that is guaranteed to be after the previous compile. // TODO(https://github.com/dart-lang/sdk/issues/51937): Remove once this bug // is fixed. - if (Platform.isWindows) { - await Future.delayed(const Duration(seconds: 1)); - } - _reloadedSources.clear(); + await Future.delayed(const Duration(seconds: 1)); + _invalidatedUris.clear(); for (var (:file, :originalString, :newString) in edits) { if (file == project.dartEntryFileName) { file = project.dartEntryFilePath; @@ -905,6 +1059,18 @@ class TestContext { final fileContents = f.readAsStringSync(); f.writeAsStringSync(fileContents.replaceAll(originalString, newString)); + final relativePath = p.relative( + f.path, + from: project.absolutePackageDirectory, + ); + final relativeUrl = p.toUri(relativePath).path; + if (relativeUrl.startsWith('lib/')) { + final pathInLib = relativeUrl.substring(4); + _invalidatedUris.add('package:${project.packageName}/$pathInLib'); + } else if (f.path == project.dartEntryFilePath) { + _invalidatedUris.add(project.dartEntryFilePackageUri.toString()); + } + _updateReloadedSources(file); } } @@ -932,10 +1098,14 @@ class TestContext { if (relativeUrl.startsWith('lib/')) { final pathInLib = relativeUrl.substring(4); + final pathWithoutExtension = p.withoutExtension(pathInLib); + final isFesJitOnly = + _testSettings.compilationMode.usesFrontendServer && + !_testSettings.compilationMode.usesBuildDaemon; moduleName = - 'packages/${project.packageName}/${p.withoutExtension(pathInLib)}'; + 'packages/${project.packageName}/${isFesJitOnly ? pathInLib : pathWithoutExtension}'; libUri = 'package:${project.packageName}/$pathInLib'; - srcPath = moduleName; + srcPath = 'packages/${project.packageName}/$pathWithoutExtension'; } else if (absolutePath == project.dartEntryFilePath) { moduleName = p.withoutExtension(relativeUrl); libUri = project.dartEntryFilePackageUri.toString(); @@ -964,11 +1134,8 @@ class TestContext { ); } - /// Contains contents of the reloaded_sources.json manifest file. - /// - /// Used by the DDC Library Bundle module system to record changed files for - /// hot restart/reload. final _reloadedSources = >[]; + final _invalidatedUris = []; void addLibraryFile({required String libFileName, required String contents}) { final file = File(project.dartLibFilePath(libFileName)); @@ -976,6 +1143,7 @@ class TestContext { file.createSync(recursive: true); file.writeAsStringSync(contents); _updateReloadedSources(file.path); + _invalidatedUris.add('package:${project.packageName}/$libFileName'); } Handler _createBuildRunnerProxyHandler(int assetServerPort) { @@ -1020,6 +1188,122 @@ class TestContext { return shelf.Response.ok(jsonEncode(_reloadedSources)); } + if (path.endsWith('.ddc_merged_metadata')) { + String? mergedContent; + final configFile = File( + p.join( + project.absolutePackageDirectory, + '.dart_tool', + 'build', + 'fes_manager_config', + ), + ); + if (configFile.existsSync()) { + try { + final configJson = jsonDecode(configFile.readAsStringSync()) as Map; + final port = configJson['port'] as int?; + if (port != null) { + final socket = await Socket.connect( + InternetAddress.loopbackIPv4, + port, + ); + try { + socket.writeln( + jsonEncode({'instruction': 'MERGE_ALL_METADATA'}), + ); + final responseStr = await socket + .cast>() + .transform(utf8.decoder) + .transform(const LineSplitter()) + .first; + final response = jsonDecode(responseStr) as Map; + mergedContent = response['content'] as String?; + } finally { + await socket.close(); + } + } + } catch (_) {} + } + + if (mergedContent != null) { + final bytes = Uint8List.fromList(utf8.encode(mergedContent)); + return shelf.Response.ok( + bytes, + headers: { + HttpHeaders.contentTypeHeader: 'application/json', + HttpHeaders.contentLengthHeader: bytes.length.toString(), + }, + ); + } + } + + // Remap and serve separate root package JIT assets directly from FES Manager's + // scratch space or in-memory JIT cache to bridge background daemon compilations. + final isMetadata = path.endsWith('.metadata'); + final isPackage = path.startsWith('packages/'); + if (isMetadata || + (isPackage && (path.endsWith('.js') || path.endsWith('.js.map')))) { + final isEntrypointMetadata = isMetadata && !isPackage; + String relativePath; + if (isPackage) { + final parts = path.split('/'); + if (parts.length > 2) { + relativePath = parts.sublist(2).join('/'); + } else { + relativePath = path; + } + } else { + relativePath = path; + } + + final scratchFile = File( + p.join( + project.absolutePackageDirectory, + '.dart_tool', + 'build', + 'test_scratch_space', + isPackage + ? 'lib' + : (isEntrypointMetadata ? project.directoryToServe : ''), + relativePath, + ), + ); + + final generatedFile = File( + p.join( + project.absolutePackageDirectory, + '.dart_tool', + 'build', + 'generated', + project.packageName, + isPackage + ? 'lib' + : (isEntrypointMetadata ? project.directoryToServe : ''), + relativePath, + ), + ); + + Uint8List? fileBytes; + if (scratchFile.existsSync()) { + fileBytes = scratchFile.readAsBytesSync(); + } else if (generatedFile.existsSync()) { + fileBytes = generatedFile.readAsBytesSync(); + } + + if (fileBytes != null) { + final mimeType = path.endsWith('.js') + ? 'application/javascript' + : 'application/json'; + return shelf.Response.ok( + fileBytes, + headers: { + HttpHeaders.contentTypeHeader: mimeType, + HttpHeaders.contentLengthHeader: fileBytes.length.toString(), + }, + ); + } + } + // Swap between [rootProxy] and [entrypointProxy] to handle path serving // differences for entrypoints vs library files. // @@ -1035,30 +1319,90 @@ class TestContext { path.startsWith('example/') ? rootProxy(request) : entrypointProxy(request)); + return response; }; } Future recompile({required bool fullRestart}) async { - await webRunner.rerun( - fullRestart: fullRestart, - fileServerUri: Uri.parse('http://${testServer.host}:${testServer.port}'), - ); - return; + final runner = _webRunner; + if (runner != null) { + await runner.rerun( + fullRestart: fullRestart, + fileServerUri: Uri.parse( + 'http://${testServer.host}:${testServer.port}', + ), + ); + return; + } + + // In Build Daemon + Frontend Server mode, the Build Daemon already compiles + // edited files automatically. We must await the successful build completion. + if (_testSettings.compilationMode.usesBuildDaemon) { + await waitForSuccessfulBuild(); + return; + } } Future waitForSuccessfulBuild({ Duration? timeout, bool propagateToBrowser = false, + bool cleanStart = false, }) async { - // Wait for the build until the timeout is reached: - await daemonClient.buildResults - .firstWhere( - (BuildResults results) => results.results.any( - (BuildResult result) => result.status == BuildStatus.succeeded, - ), - ) - .timeout(timeout ?? const Duration(seconds: 60)); + // Wait for the build until the timeout is reached using a double-completer + // pattern to avoid matching the replay-cached startup build success event, + // unless cleanStart is true to confirm any initial success. + final started = Completer(); + final succeeded = Completer(); + final subscription = daemonClient.buildResults.listen((results) { + final isStarted = results.results.any( + (r) => r.status == BuildStatus.started, + ); + final isSucceeded = results.results.any( + (r) => r.status == BuildStatus.succeeded, + ); + final isFailed = results.results.any( + (r) => r.status == BuildStatus.failed, + ); + + if (isStarted) { + if (!started.isCompleted) started.complete(); + } + if (isFailed) { + if (!succeeded.isCompleted) { + final failedResult = results.results.firstWhere( + (r) => r.status == BuildStatus.failed, + ); + final daemonError = + failedResult.error ?? 'Unknown daemon compilation error'; + succeeded.completeError( + StateError('Build daemon build failed.\nError: $daemonError'), + ); + } + } + if (cleanStart && isSucceeded) { + if (!succeeded.isCompleted) succeeded.complete(); + } else if (started.isCompleted && isSucceeded) { + if (!succeeded.isCompleted) succeeded.complete(); + } + }); + + try { + if (!cleanStart) { + try { + await started.future.timeout(const Duration(seconds: 5)); + } catch (e) { + if (e.runtimeType.toString().contains('TimeoutException')) { + // No build started (empty reload), return immediately. + return; + } + rethrow; + } + } + await succeeded.future.timeout(timeout ?? const Duration(minutes: 5)); + } finally { + await subscription.cancel(); + } if (propagateToBrowser) { // Allow change to propagate to the browser. diff --git a/dwds/test/integration/fixtures/project.dart b/dwds/test/integration/fixtures/project.dart index 804c6cec0d..2e7e3ec80e 100644 --- a/dwds/test/integration/fixtures/project.dart +++ b/dwds/test/integration/fixtures/project.dart @@ -1,7 +1,7 @@ // Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. - +import 'dart:async'; import 'dart:io'; import 'package:dwds_test_common/utilities.dart'; @@ -263,15 +263,6 @@ dependency_overrides: print(pubGetResult.stdout); print(pubGetResult.stderr); } - - // Clean up the project. - // Called when we need to rebuild sdk and the app from previous test - // configurations. - await Process.run('dart', [ - 'run', - 'build_runner', - 'clean', - ], workingDirectory: newPath); } Future setUp() async { diff --git a/dwds/test/integration/hot_reload_common.dart b/dwds/test/integration/hot_reload_common.dart index ebb780ea52..da0cdd6c4e 100644 --- a/dwds/test/integration/hot_reload_common.dart +++ b/dwds/test/integration/hot_reload_common.dart @@ -122,5 +122,42 @@ void runTests({ await callEvaluateAndWaitForLog(newString); }); + + test('can reject hot reload and recover with hot restart', () async { + final client = context.debugConnection.vmService; + + await context.makeEdits([ + ( + file: 'library1.dart', + originalString: newString, + newString: + ''' +$newString +class Bar {} +class Baz {} +class Foo extends Bar {} +''', + ), + ]); + await recompile(); + final vm = await client.getVM(); + final isolate = await client.getIsolate(vm.isolates!.first.id!); + var report = await fakeClient.reloadSources(isolate.id!); + expect(report.success, true); + + // Make an illegal edit. + await context.makeEdits([ + ( + file: 'library1.dart', + originalString: 'class Foo extends Bar', + newString: 'class Foo extends Baz', + ), + ]); + await recompile(); + report = await fakeClient.reloadSources(isolate.id!); + + expect(report.success, false); + await context.recompile(fullRestart: true); + }); }, timeout: const Timeout.factor(2)); } diff --git a/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml b/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml index 4bb8adf64b..f37304f5fb 100644 --- a/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml @@ -5,3 +5,7 @@ description: >- publish_to: none environment: sdk: ^3.10.0-0.0.dev + +dev_dependencies: + build_runner: ^2.5.0 + build_web_compilers: ^4.6.0 diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 15728a771f..1a7203c3b4 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -8,4 +8,4 @@ environment: dev_dependencies: build_runner: ^2.4.0 - build_web_compilers: ^4.4.12 + build_web_compilers: ^4.6.0 diff --git a/webdev/lib/src/daemon/app_domain.dart b/webdev/lib/src/daemon/app_domain.dart index eea0bee5cd..8fbbf817ac 100644 --- a/webdev/lib/src/daemon/app_domain.dart +++ b/webdev/lib/src/daemon/app_domain.dart @@ -176,7 +176,23 @@ class AppDomain extends Domain { } final fullRestart = getBoolArg(args, 'fullRestart') ?? false; if (!fullRestart) { - return {'code': 1, 'message': 'hot reload not yet supported by webdev'}; + try { + final vm = await appState.vmService!.getVM(); + final isolateId = vm.isolates!.first.id!; + final report = await appState.vmService!.reloadSources(isolateId); + + if (report.success!) { + return {'code': 0, 'message': 'Hot reload successful'}; + } else { + return { + 'code': 1, + 'message': 'Hot reload failed', + 'notices': report.toJson()['notices'], + }; + } + } catch (e) { + return {'code': 1, 'message': 'Hot reload failed: $e'}; + } } // TODO(grouma) - Support pauseAfterRestart. // var pauseAfterRestart = getBoolArg(args, 'pause') ?? false; diff --git a/webdev/lib/src/serve/webdev_server.dart b/webdev/lib/src/serve/webdev_server.dart index 61f5b5921e..4b07e9cc91 100644 --- a/webdev/lib/src/serve/webdev_server.dart +++ b/webdev/lib/src/serve/webdev_server.dart @@ -360,7 +360,7 @@ class WebDevServer { return await sendRequestToFes(cachedFesPort!, request); } catch (e) { _logger.warning( - 'Failed to connect to FES at $cachedFesPort, falling back to daemon', + 'Failed to connect to FES at $cachedFesPort, re-reading config file', e, ); cachedFesPort = null; diff --git a/webdev/test/daemon/app_domain_common.dart b/webdev/test/daemon/app_domain_common.dart index a6009ad55c..92b38a3bde 100644 --- a/webdev/test/daemon/app_domain_common.dart +++ b/webdev/test/daemon/app_domain_common.dart @@ -114,14 +114,21 @@ void appDomainTests({required TestRunner testRunner}) { '[{"method":"app.restart","id":0,' '"params" : { "appId" : "$appId", "fullRestart" : false}}]'; webdev.stdin.add(utf8.encode('$extensionCall\n')); - await expectLater( - webdev.stdout, - emitsThrough( - startsWith( - '[{"id":0,"result":{"code":1,"message":"hot reload not yet supported', - ), - ), - ); + + var success = false; + while (await webdev.stdout.hasNext) { + final line = await webdev.stdout.next; + if (line.startsWith('[{"id":0,')) { + final unwrapped = line.substring(1, line.length - 1); + final response = json.decode(unwrapped) as Map; + final result = response['result'] as Map; + expect(result['code'], equals(0)); + expect(result['message'], equals('Hot reload successful')); + success = true; + break; + } + } + expect(success, isTrue); await exitWebdev(webdev); }, timeout: const Timeout(Duration(minutes: 2))); From 67f91bc2ebde1566a4cf628990aef3c93678df02 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 11 Jun 2026 23:18:14 -0700 Subject: [PATCH 016/134] Fix DWDS test hangs by targeting specific web assets path --- dwds/test/integration/fixtures/context.dart | 77 ++++++++++++++------- 1 file changed, 53 insertions(+), 24 deletions(-) diff --git a/dwds/test/integration/fixtures/context.dart b/dwds/test/integration/fixtures/context.dart index b566f0c5c9..ac95eb84a4 100644 --- a/dwds/test/integration/fixtures/context.dart +++ b/dwds/test/integration/fixtures/context.dart @@ -144,10 +144,6 @@ class TestContext { late String _hostname; late TestSettings _testSettings; - bool get _isFesWithExpressionEvaluation => - _testSettings.compilationMode.usesFrontendServer && - _testSettings.enableExpressionEvaluation; - /// Internal VM service. /// /// Prefer using [vmService] instead in tests when possible, to include @@ -191,7 +187,7 @@ class TestContext { _logger.info('Packages: ${project.packageConfigFile}'); _logger.info('Entry: ${project.dartEntryFilePath}'); - configureLogWriter(); + setCurrentLogWriter(debug: true); _client = IOClient( HttpClient() @@ -322,7 +318,7 @@ class TestContext { daemonClient.registerBuildTarget( DefaultBuildTarget( (b) => b - ..target = project.directoryToServe + ..target = project.webAssetsPath ..reportChangedAssets = true, ), ); @@ -527,16 +523,6 @@ class TestContext { if (testSettings.enableExpressionEvaluation) { _logger.info('Starting Frontend Server Manager'); final sdkDir = p.dirname(p.dirname(sdkLayout.dartPath)); - final packagesFile = p.join( - project.absolutePackageDirectory, - '.dart_tool', - 'package_config.json', - ); - - // Create a dedicated scratch space for Frontend Server tests - // with expression evaluation. We spin up the Frontend Server - // and build_runner separately, so we need to ensure both use the - // same scratch space. final buildDir = Directory( p.join(project.absolutePackageDirectory, '.dart_tool', 'build'), ); @@ -552,6 +538,41 @@ class TestContext { ), ); testScratchSpaceDir.createSync(recursive: true); + + final sourcePackagesFile = File(p.join( + project.absolutePackageDirectory, + '.dart_tool', + 'package_config.json', + )); + final packagesFile = File(p.join( + testScratchSpaceDir.path, + '.dart_tool', + 'package_config.json', + )); + packagesFile.parent.createSync(recursive: true); + + // Make all relative rootUris absolute based on the original packagesFile location + // so they don't break when the file is moved to the test scratch space. + // Also map rootUri and packageUri to match ScratchSpace's hoisting layout. + final originalJson = jsonDecode(sourcePackagesFile.readAsStringSync()) as Map; + final packagesList = originalJson['packages'] as List; + final rootPackage = '_test_package'; + for (final package in packagesList) { + final packageMap = package as Map; + final name = packageMap['name'] as String; + if (name == rootPackage) { + packageMap['rootUri'] = 'org-dartlang-app:///'; + packageMap['packageUri'] = 'packages/$rootPackage/'; + } else { + var rootUri = Uri.parse(packageMap['rootUri'] as String); + if (!rootUri.isAbsolute) { + rootUri = sourcePackagesFile.parent.uri.resolveUri(rootUri); + } + packageMap['rootUri'] = rootUri.toString(); + } + } + packagesFile.writeAsStringSync(jsonEncode(originalJson)); + options.add( '--define=build_web_compilers:ddc=scratch-space-dir=' '${testScratchSpaceDir.path}', @@ -581,7 +602,7 @@ class TestContext { fesSnapshot, sdkDir, p.toUri(testScratchSpaceDir.path).toString(), - p.toUri(packagesFile).toString(), + p.toUri(packagesFile.path).toString(), ]; _fesProcess = await Process.start( sdkLayout.dartPath, @@ -589,15 +610,20 @@ class TestContext { workingDirectory: project.absolutePackageDirectory, ); - // Record the FES manager's output for debugging test issues. + final debugLog = File('/tmp/fes_manager_debug.log'); + if (debugLog.existsSync()) debugLog.deleteSync(); _fesProcess!.stdout .transform(utf8.decoder) .transform(const LineSplitter()) - .listen((line) => print('FES Manager stdout: $line')); + .listen((line) { + debugLog.writeAsStringSync('STDOUT: $line\n', mode: FileMode.append); + }); _fesProcess!.stderr .transform(utf8.decoder) .transform(const LineSplitter()) - .listen((line) => print('FES Manager stderr: $line')); + .listen((line) { + debugLog.writeAsStringSync('STDERR: $line\n', mode: FileMode.append); + }); final configFile = File( p.join( @@ -620,9 +646,12 @@ class TestContext { options, (log) { final record = log.toLogRecord(); - final name = record.loggerName == '' - ? '' - : '${record.loggerName}: '; + _logger.log( + record.level, + record.message, + record.error, + record.stackTrace, + ); }, ); } catch (e) { @@ -649,7 +678,7 @@ class TestContext { daemonClient.registerBuildTarget( DefaultBuildTarget( (b) => b - ..target = project.directoryToServe + ..target = project.webAssetsPath ..outputLocation = OutputLocation( (o) => o ..output = outputDir.path From 67bbfea57155596522a79ad965b07de9f7b8e422 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Mon, 15 Jun 2026 19:37:09 -0700 Subject: [PATCH 017/134] Extending tests --- ...t_breakpoints_ddc_library_bundle_test.dart | 7 ++++ .../hot_restart_ddc_library_bundle_test.dart | 15 ++++++++ ...ce_inspection_ddc_library_bundle_test.dart | 34 +++++++++++++++++++ ...arts_evaluate_ddc_library_bundle_test.dart | 8 +++++ 4 files changed, 64 insertions(+) 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 364a4112d4..5020f5695e 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 @@ -35,4 +35,11 @@ void main() { group('Build Daemon', () { runTests(provider: provider, compilationMode: CompilationMode.buildDaemon); }); + + group('Build Daemon and Frontend Server', () { + runTests( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); } 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 dacc2f86e7..c78304f1c4 100644 --- a/dwds/test/integration/hot_restart_ddc_library_bundle_test.dart +++ b/dwds/test/integration/hot_restart_ddc_library_bundle_test.dart @@ -51,4 +51,19 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: $canaryFeatures | Build Daemon and Frontend Server |', () { + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: moduleFormat, + ); + runTests( + provider: provider, + moduleFormat: moduleFormat, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } diff --git a/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart index 93e375d548..9cdcb00f4c 100644 --- a/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart @@ -34,4 +34,38 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemon; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } diff --git a/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart b/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart index 5085203e63..a06b7ab0ba 100644 --- a/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart +++ b/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart @@ -59,4 +59,12 @@ void main() async { } }); }); + + group('Build Daemon and Frontend Server |', () { + tearDownAll(provider.dispose); + testAll( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); } From a3f687e70bb3dbdcf70288959d8a4f4b99bc5d87 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Mon, 15 Jun 2026 21:14:02 -0700 Subject: [PATCH 018/134] updating dwds test utilities --- dwds_test_common/lib/utilities.dart | 47 +++++++++++++++-------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/dwds_test_common/lib/utilities.dart b/dwds_test_common/lib/utilities.dart index b3c10ac48f..ca61bc4058 100644 --- a/dwds_test_common/lib/utilities.dart +++ b/dwds_test_common/lib/utilities.dart @@ -32,33 +32,34 @@ String get fixturesPath { /// root in the local machine, e.g. 'webdev/dwds_test_common' or /// 'pkg/dwds_test_common'. String get _dwdsTestCommonPackageRoot { - final scriptPath = Platform.script.toFilePath(); - final isTest = scriptPath.contains('dart_test.kernel'); - if (isTest) { - // When running tests, p.current might be dwds, so we need to check - // if we're in webdev/dwds_test_common or pkg/dwds_test_common or need to - // navigate to it. - var current = p.current; - if (p.basename(current) == 'dwds') { - // Check if dwds_test_common exists as a sibling - final testCommonPath = p.join(p.dirname(current), 'dwds_test_common'); - if (Directory(testCommonPath).existsSync()) { - return testCommonPath; - } - } - return current; // p.current is the package root for tests - } - var current = p.dirname(scriptPath); + // Walk up from Platform.script first + try { + final scriptPath = Platform.script.toFilePath(); + final path = _findTestCommon(scriptPath); + if (path != null) return path; + } catch (_) {} + // Fallback to walking up from p.current + final path = _findTestCommon(p.current); + if (path != null) return path; + throw StateError( + 'Could not find `dwds_test_common` package root from ' + '${Platform.script.path} or ${p.current}.', + ); +} + +String? _findTestCommon(String startPath) { + var current = p.absolute(startPath); while (current != p.dirname(current)) { - if (File(p.join(current, 'pubspec.yaml')).existsSync()) { - return current; // This is the package root + if (p.basename(current) == 'dwds_test_common') { + return current; + } + final sibling = p.join(current, 'dwds_test_common'); + if (Directory(sibling).existsSync()) { + return sibling; } current = p.dirname(current); } - throw StateError( - 'Could not find `dwds_test_common` package root from ' - '${Platform.script.path}.', - ); + return null; } // Creates a path compatible for web. From 85a056b771209f028f9065507e2f907198c0cd3f Mon Sep 17 00:00:00 2001 From: MarkZ Date: Mon, 15 Jun 2026 21:49:27 -0700 Subject: [PATCH 019/134] Adding DdcUriTranslator --- .../lib/src/utilities/ddc_uri_translator.dart | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 dwds/lib/src/utilities/ddc_uri_translator.dart diff --git a/dwds/lib/src/utilities/ddc_uri_translator.dart b/dwds/lib/src/utilities/ddc_uri_translator.dart new file mode 100644 index 0000000000..00148ab16d --- /dev/null +++ b/dwds/lib/src/utilities/ddc_uri_translator.dart @@ -0,0 +1,96 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// The path format of the DDC application's served files. +enum AppUriLayout { + /// Used when compiling and serving directly with Frontend Server. + /// Preserves 'lib/' segments for package paths (e.g. packages/foo/lib/bar.dart). + frontendServerOnly, + + /// Used when compiling/serving with package:build. + /// Omits 'lib/' segments (e.g. packages/foo/bar.dart). + buildRunner, +} + +/// Translates paths across DDC, Frontend Server, DWDS, and package:build. +class DdcUriTranslator { + /// Translates a DDC app URI (any referenceable dart file) into a path + /// expected by its [layout]'s asset server. + /// + /// FES Only Layout: + /// `package:foo/bar.dart` -> `packages/foo/lib/bar.dart` + /// `org-dartlang-app:///foo/bar.dart` -> `foo/bar.dart` + /// + /// Build Runner Layout: + /// `package:foo/bar.dart` -> `packages/foo/bar.dart` + /// `org-dartlang-app:///packages/foo/bar.dart` -> `packages/foo/bar.dart` + /// `org-dartlang-app:///web/web/main.dart` ->`web/main.dart` + /// `org-dartlang-app:///foo/bar.dart` -> `bar.dart` + static String? translateAppUriToServerPath( + String appUrl, { + required AppUriLayout layout, + }) { + final appUri = Uri.parse(appUrl); + + if (appUri.isScheme('package')) { + final pathSegments = appUri.pathSegments; + if (pathSegments.isEmpty) { + throw FormatException('Invalid package URI with empty path: $appUrl'); + } + return switch (layout) { + AppUriLayout.frontendServerOnly => + 'packages/${pathSegments.first}/lib/${pathSegments.skip(1).join('/')}', + AppUriLayout.buildRunner => 'packages/${appUri.path}', + }; + } + + if (appUri.isScheme('org-dartlang-app')) { + final segments = appUri.pathSegments; + if (segments.isEmpty) { + throw FormatException( + 'Invalid org-dartlang-app URI with empty path: $appUrl', + ); + } + switch (layout) { + case AppUriLayout.frontendServerOnly: + return appUri.path.substring(1); + case AppUriLayout.buildRunner: + final first = segments.first; + if (first == 'packages') { + assert(segments.length >= 3, 'Invalid packages/ URI: $appUrl'); + return segments.join('/'); + } + + final isDuplicated = + segments.length > 2 && + first == segments[1] && + (first == 'web' || first == 'test'); + return segments.skip(isDuplicated ? 2 : 1).join('/'); + } + } + + return null; + } + + /// Translates a 'lib/' path to a package path. + /// + /// DDC generates source maps with relative paths from the generated output. + /// Files in the root package can resolve to 'lib/' references, so we prepend + /// `packages/[rootPackageName]/` to resolve them to a package URI. Example: + /// `lib/foo.dart` -> `packages/root_package/foo.dart` + static String translateLibPathToPackagePath( + String uri, + String? rootPackageName, + ) { + if (uri.startsWith('lib/')) { + if (rootPackageName == null || rootPackageName.isEmpty) { + throw StateError( + 'Cannot translate lib/ path without a root package name. URI: $uri', + ); + } + return 'packages/$rootPackageName/${uri.substring(4)}'; + } + return uri; + } +} From b0f17b609347ed3ee6d56a78842da02a72e152d2 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Mon, 15 Jun 2026 21:50:40 -0700 Subject: [PATCH 020/134] Using DdcUriTranslator --- .../build_runner_strategy_provider.dart | 14 +++---- .../frontend_server_strategy_provider.dart | 41 +++++-------------- dwds/lib/src/utilities/dart_uri.dart | 6 +++ 3 files changed, 22 insertions(+), 39 deletions(-) diff --git a/dwds/lib/src/loaders/build_runner_strategy_provider.dart b/dwds/lib/src/loaders/build_runner_strategy_provider.dart index ba776bda97..5d2c58f8ab 100644 --- a/dwds/lib/src/loaders/build_runner_strategy_provider.dart +++ b/dwds/lib/src/loaders/build_runner_strategy_provider.dart @@ -10,6 +10,7 @@ import 'package:dwds/src/loaders/require.dart'; import 'package:dwds/src/loaders/strategy.dart'; import 'package:dwds/src/readers/asset_reader.dart'; import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds/src/utilities/ddc_uri_translator.dart'; import 'package:logging/logging.dart'; import 'package:path/path.dart' as p; @@ -203,15 +204,10 @@ mixin BuildRunnerStrategyProviderMixin { } String? _serverPathForAppUri(String appUrl) { - final appUri = Uri.parse(appUrl); - if (appUri.isScheme('org-dartlang-app')) { - // We skip the root from which we are serving. - return appUri.pathSegments.skip(1).join('/'); - } - if (appUri.isScheme('package')) { - return '/packages/${appUri.path}'; - } - return null; + return DdcUriTranslator.translateAppUriToServerPath( + appUrl, + layout: AppUriLayout.buildRunner, + ); } Future> _moduleInfoForProvider( diff --git a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart index bc0f1bad9a..c1bf56ef84 100644 --- a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart +++ b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart @@ -9,6 +9,7 @@ import 'package:dwds/src/loaders/require.dart'; import 'package:dwds/src/loaders/strategy.dart'; import 'package:dwds/src/readers/asset_reader.dart'; import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds/src/utilities/ddc_uri_translator.dart'; import 'package:path/path.dart' as p; const _defaultWebDirs = ['web', 'test', 'example', 'benchmark']; @@ -16,7 +17,6 @@ const _defaultWebDirs = ['web', 'test', 'example', 'benchmark']; abstract class FrontendServerStrategyProvider { final ReloadConfiguration _configuration; final AssetReader _assetReader; - final PackageUriMapper _packageUriMapper; final Future> Function() _digestsProvider; final String _basePath; final BuildSettings _buildSettings; @@ -25,7 +25,6 @@ abstract class FrontendServerStrategyProvider { FrontendServerStrategyProvider( this._configuration, this._assetReader, - this._packageUriMapper, this._digestsProvider, this._buildSettings, { this._packageConfigPath, @@ -75,17 +74,10 @@ abstract class FrontendServerStrategyProvider { _addBasePath((await metadataProvider.moduleToSourceMap)[module] ?? ''); String? _serverPathForAppUri(String appUrl) { - final appUri = Uri.parse(appUrl); - if (appUri.isScheme('org-dartlang-app')) { - return _addBasePath(appUri.path); - } - if (appUri.isScheme('package')) { - final resolved = _packageUriMapper.packageUriToServerPath(appUri); - if (resolved != null) { - return resolved; - } - } - return null; + return DdcUriTranslator.translateAppUriToServerPath( + appUrl, + layout: AppUriLayout.frontendServerOnly, + ); } Future> _moduleInfoForProvider( @@ -127,7 +119,6 @@ class FrontendServerDdcStrategyProvider FrontendServerDdcStrategyProvider( super._configuration, super._assetReader, - super._packageUriMapper, super._digestsProvider, super._buildSettings, { super.packageConfigPath, @@ -146,7 +137,6 @@ class FrontendServerDdcLibraryBundleStrategyProvider FrontendServerDdcLibraryBundleStrategyProvider( super._configuration, super._assetReader, - super._packageUriMapper, super._digestsProvider, super._buildSettings, { super.packageConfigPath, @@ -184,7 +174,6 @@ class FrontendServerBuildDaemonStrategyProvider FrontendServerBuildDaemonStrategyProvider( super._configuration, super._assetReader, - super._packageUriMapper, super._digestsProvider, super._buildSettings, { super.packageConfigPath, @@ -242,19 +231,12 @@ class FrontendServerBuildDaemonStrategyProvider final stripped = stripPrefix(path); return stripped.replaceAll('.dart.lib', '.ddc'); }, - (appUrl) { - final appUri = Uri.parse(appUrl); - if (appUri.isScheme('org-dartlang-app')) { - final segments = appUri.pathSegments; - if (segments.length > 2 && - segments[0] == segments[1] && - (segments[0] == 'web' || segments[0] == 'test')) { - return segments.skip(2).join('/'); - } - return segments.skip(1).join('/'); - } - return _serverPathForAppUri(appUrl); - }, + (appUrl) => + DdcUriTranslator.translateAppUriToServerPath( + appUrl, + layout: AppUriLayout.buildRunner, + ) ?? + _serverPathForAppUri(appUrl), (metadataProvider) async { final moduleInfo = await _moduleInfoForProvider(metadataProvider); return moduleInfo.map((module, info) { @@ -300,7 +282,6 @@ class FrontendServerRequireStrategyProvider FrontendServerRequireStrategyProvider( super._configuration, super._assetReader, - super._packageUriMapper, super._digestsProvider, super._buildSettings, { super.packageConfigPath, diff --git a/dwds/lib/src/utilities/dart_uri.dart b/dwds/lib/src/utilities/dart_uri.dart index 3c0b6f9484..4171865636 100644 --- a/dwds/lib/src/utilities/dart_uri.dart +++ b/dwds/lib/src/utilities/dart_uri.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. import 'package:dwds/src/config/tool_configuration.dart'; +import 'package:dwds/src/utilities/ddc_uri_translator.dart'; import 'package:logging/logging.dart'; import 'package:package_config/package_config.dart'; import 'package:path/path.dart' as p; @@ -94,6 +95,11 @@ class DartUri { if (root != null) { return DartUri._fromRelativePath(p.url.join(root, uri)); } + + uri = DdcUriTranslator.translateLibPathToPackagePath( + uri, + globalToolConfiguration.appMetadata.workspaceName, + ); return DartUri._(uri); } From b41e58e9dd9a024e29fd878b6a93e874c90b5cec Mon Sep 17 00:00:00 2001 From: MarkZ Date: Mon, 15 Jun 2026 22:04:38 -0700 Subject: [PATCH 021/134] Add hotReloadResult vm service extension call --- dwds/web/reloader/ddc_library_bundle_restarter.dart | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/dwds/web/reloader/ddc_library_bundle_restarter.dart b/dwds/web/reloader/ddc_library_bundle_restarter.dart index 630890bb0c..817b3a4976 100644 --- a/dwds/web/reloader/ddc_library_bundle_restarter.dart +++ b/dwds/web/reloader/ddc_library_bundle_restarter.dart @@ -169,7 +169,18 @@ class DdcLibraryBundleRestarter implements Restarter, TwoPhaseRestarter { (JSFunction hotReloadEndCallback) { _capturedHotReloadEndCallback = hotReloadEndCallback; }.toJS; - await _dartDevEmbedder.hotReload(filesToLoad, librariesToReload).toDart; + final result = await _dartDevEmbedder + .hotReload(filesToLoad, librariesToReload) + .toDart; + _dartDevEmbedder.debugger.invokeExtension( + 'ext.dwds.sendEvent', + '{"type": "hotReloadResult", "result": "$result"}', + ); + if (result != null && + result.typeofEquals('boolean') && + !(result as JSBoolean).toDart) { + throw Exception('Hot reload rejected by DDC'); + } return srcModuleLibraries.jsify() as JSArray; } From cb923d69ee1d425baaed0ceee58baef01a35bc55 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Mon, 15 Jun 2026 22:15:21 -0700 Subject: [PATCH 022/134] fix expression eval in FES mode --- dwds/lib/src/debugging/location.dart | 56 ++++++++++++++----- .../frontend_server_common/asset_server.dart | 14 +++++ .../frontend_server_client.dart | 8 ++- 3 files changed, 61 insertions(+), 17 deletions(-) diff --git a/dwds/lib/src/debugging/location.dart b/dwds/lib/src/debugging/location.dart index 111fbc035c..1f4f69c652 100644 --- a/dwds/lib/src/debugging/location.dart +++ b/dwds/lib/src/debugging/location.dart @@ -194,6 +194,8 @@ class Locations { return _sourceToLocation[serverPath] ?? {}; } + Iterable keys() => _sourceToLocation.keys; + /// Returns all [Location] data for a provided JS server path. Future> locationsForUrl(String url) async { if (url.isEmpty) return {}; @@ -379,12 +381,8 @@ class Locations { } } for (final location in result) { - _sourceToLocation - .putIfAbsent( - location.dartLocation.uri.serverPath, - () => {}, - ) - .add(location); + final sp = location.dartLocation.uri.serverPath; + _sourceToLocation.putIfAbsent(sp, () => {}).add(location); } return _moduleToLocations[module] = result; }); @@ -401,15 +399,43 @@ class Locations { }) { final index = entry.sourceUrlId; if (index == null) return null; - // Source map URLS are relative to the script. They may have platform - // separators or they may use URL semantics. To be sure, we split and - // re-join them. - // This works on Windows because path treats both / and \ as separators. - // It will fail if the path has both separators in it. - final relativeSegments = p.split(sourceUrls[index]); - final path = p.url.normalize( - p.url.joinAll([scriptLocation, ...relativeSegments]), - ); + final sourceUrl = sourceUrls[index]; + String path; + if (Uri.tryParse(sourceUrl)?.isAbsolute == true) { + path = sourceUrl; + } else { + // Source map URLS are relative to the script. They may have platform + // separators or they may use URL semantics. To be sure, we split and + // re-join them. + // This works on Windows because path treats both / and \ as separators. + // It will fail if the path has both separators in it. + final relativeSegments = p.split(sourceUrl); + path = p.url.normalize( + p.url.joinAll([scriptLocation, ...relativeSegments]), + ); + + // Frontend Server emits source maps paths relative relative to the + // generated JS. If this is for a 'package:build' source, it may be in + // `.dart_tool/build/generated`, and relative path resolution might + // traverse beyond the package directory. We detect this and reconstruct + // the correct `org-dartlang-app:///` URI. + // + // For example: + // scriptLocation: `/packages/my_package/subdir/main.ddc.js` + // relativePath in source map: `../../../lib/src/library.dart` + // + // Joined path: + // BEFORE: `/lib/src/library.dart` (loses the package namespace `my_package`) + // AFTER: `org-dartlang-app:///packages/my_package/src/library.dart` + if (scriptLocation.startsWith('/packages/') && + !path.startsWith('/packages/')) { + final packageDir = scriptLocation.split('/').take(3).join('/'); + final relativePath = path.startsWith('/lib/') + ? path.substring('/lib/'.length) + : path.substring('/'.length); + path = 'org-dartlang-app://$packageDir/$relativePath'; + } + } try { final dartUri = DartUri(path, _root); diff --git a/dwds/test/frontend_server_common/asset_server.dart b/dwds/test/frontend_server_common/asset_server.dart index 9b21ab456b..7c2079f9b7 100644 --- a/dwds/test/frontend_server_common/asset_server.dart +++ b/dwds/test/frontend_server_common/asset_server.dart @@ -272,6 +272,17 @@ class TestAssetServer implements AssetReader { // Attempt to resolve `path` to a dart file. File _resolveDartFile(String path) { + // Expression evaluation and debugger requests may reference sources + // using `package:` URIs. Resolve them to files using the packageConfig. + if (path.startsWith('package:')) { + final resolved = _packageUriMapper.packageConfig.resolve(Uri.parse(path)); + if (resolved != null) { + final packageFile = _fileSystem.file(resolved); + if (packageFile.existsSync()) { + return packageFile; + } + } + } // If this is a dart file, it must be on the local file system and is // likely coming from a source map request. The tool doesn't currently // consider the case of Dart files as assets. @@ -357,6 +368,9 @@ class TestAssetServer implements AssetReader { String? _stripBasePath(String path, String basePath) { path = stripLeadingSlashes(path); + // Requests starting with 'packages/' are top-level and served relative + // to the root directory, so they don't contain the app's base path. + if (path.startsWith('packages/')) return path; if (path.startsWith(basePath)) { path = path.substring(basePath.length); } else { diff --git a/dwds/test/frontend_server_common/frontend_server_client.dart b/dwds/test/frontend_server_common/frontend_server_client.dart index b2b13c605f..b6a012f709 100644 --- a/dwds/test/frontend_server_common/frontend_server_client.dart +++ b/dwds/test/frontend_server_common/frontend_server_client.dart @@ -446,8 +446,12 @@ class ResidentCompiler { unawaited( server.exitCode.then((int code) { - if (code != 0) { - throw Exception('the Dart compiler exited unexpectedly.'); + // Ignore exit codes that signal expected process termination: + // -9 (SIGKILL), -15 (SIGTERM), and 255 (process killed). + if (code != 0 && code != -9 && code != -15 && code != 255) { + throw Exception( + 'the Dart compiler exited unexpectedly with exit code: $code.', + ); } }), ); From 4358d38a3d8fac7227205d47207b727ee93ffa5d Mon Sep 17 00:00:00 2001 From: MarkZ Date: Tue, 16 Jun 2026 01:12:50 -0700 Subject: [PATCH 023/134] Updating path resolution and FES-specific logic --- .../frontend_server_strategy_provider.dart | 173 +++++++++++------- .../lib/src/utilities/ddc_uri_translator.dart | 5 + webdev/lib/src/serve/webdev_server.dart | 8 - 3 files changed, 113 insertions(+), 73 deletions(-) diff --git a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart index c1bf56ef84..a2270c1d94 100644 --- a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart +++ b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart @@ -180,75 +180,15 @@ class FrontendServerBuildDaemonStrategyProvider Uri? reloadedSourcesUri, bool injectScriptLoad = true, }) { - String stripPrefix(String path) { - if (path.startsWith('packages')) return path; - final parts = path.split('/'); - - final appUri = _buildSettings.appEntrypoint; - final validPrefixes = [ - if (appUri != null && appUri.pathSegments.isNotEmpty) - appUri.pathSegments.first, - ..._defaultWebDirs, - ]; - - if (parts.length > 1 && validPrefixes.contains(parts[0])) { - return parts.skip(1).join('/'); - } - return path; - } - _libraryBundleStrategy = DdcLibraryBundleStrategy( _configuration, _moduleProvider, (_) => _digestsProvider(), - - /// Looks up the module name for a given server path. - (metadataProvider, sourcePath) async { - var module = await _moduleForServerPath(metadataProvider, sourcePath); - if (module != null) return module; - - final remappedPath = sourcePath.replaceAll('.ddc', '.dart.lib'); - module = await _moduleForServerPath(metadataProvider, remappedPath); - if (module != null) return module; - - final modulePathToModule = await metadataProvider.modulePathToModule; - for (final entry in modulePathToModule.entries) { - final key = entry.key; - final strippedKey = stripPrefix(key); - if (strippedKey == sourcePath || strippedKey == remappedPath) { - return entry.value; - } - } - return null; - }, - (metadataProvider, module) async { - final path = await _serverPathForModule(metadataProvider, module); - final stripped = stripPrefix(path); - return stripped.replaceAll('.dart.lib', '.ddc'); - }, - (metadataProvider, module) async { - final path = await _sourceMapPathForModule(metadataProvider, module); - final stripped = stripPrefix(path); - return stripped.replaceAll('.dart.lib', '.ddc'); - }, - (appUrl) => - DdcUriTranslator.translateAppUriToServerPath( - appUrl, - layout: AppUriLayout.buildRunner, - ) ?? - _serverPathForAppUri(appUrl), - (metadataProvider) async { - final moduleInfo = await _moduleInfoForProvider(metadataProvider); - return moduleInfo.map((module, info) { - return MapEntry( - module, - ModuleInfo( - info.fullDillPath.replaceAll('.dart.lib', '.ddc'), - info.summaryPath.replaceAll('.dart.lib', '.ddc'), - ), - ); - }); - }, + _moduleForServerPath, + _serverPathForModule, + _sourceMapPathForModule, + _serverPathForAppUri, + _moduleInfoForProvider, _assetReader, _buildSettings, (String _) => null, @@ -260,6 +200,109 @@ class FrontendServerBuildDaemonStrategyProvider @override DdcLibraryBundleStrategy get strategy => _libraryBundleStrategy; + + /// Strips the top-level web/entrypoint directory from a path. + /// + /// For example: + /// - `web/main.dart` -> `main.dart` + /// - `example/append_body/main.dart` -> `append_body/main.dart` + /// - `packages/path/path.dart` -> `packages/path/path.dart` + String _stripPrefix(String path) { + if (path.startsWith('packages')) return path; + final parts = path.split('/'); + + final appUri = _buildSettings.appEntrypoint; + final validPrefixes = [ + if (appUri != null && appUri.pathSegments.isNotEmpty) + appUri.pathSegments.first, + ..._defaultWebDirs, + ]; + + if (parts.length > 1 && validPrefixes.contains(parts[0])) { + return parts.skip(1).join('/'); + } + return path; + } + + /// Looks up the DDC module name for a served source file path while remapping + /// browser-requested DDC paths (containing '.ddc') to Frontend Server-served + /// paths (containing '.dart.lib'). + /// + /// Requested paths can originate from different contexts at runtime, so we + /// perform several runtime lookups: + /// 1) Frontend Server uses '.dart.lib.js' and is referenced by expression + /// evaluation requests, metadata files, stack traces, and sourcemaps. + /// 2) Build daemon serves with '.ddc.js' and is referenced by Chrome file + /// requests and Chrome DevTools protocol script URLs. + @override + Future _moduleForServerPath( + MetadataProvider metadataProvider, + String serverPath, + ) async { + final remappedPath = serverPath.replaceAll('.ddc', '.dart.lib'); + final module = await super._moduleForServerPath( + metadataProvider, + remappedPath, + ); + if (module != null) return module; + + // Strip the top-level served directory prefix (e.g. 'web/') from root + // modules to match the served path. Package dependencies ('packages/') + // are not modified. + final modulePathToModule = await metadataProvider.modulePathToModule; + for (final entry in modulePathToModule.entries) { + final strippedKey = _stripPrefix(entry.key); + if (strippedKey == serverPath || strippedKey == remappedPath) { + return entry.value; + } + } + return null; + } + + @override + Future _serverPathForModule( + MetadataProvider metadataProvider, + String module, + ) async { + final path = await super._serverPathForModule(metadataProvider, module); + final stripped = _stripPrefix(path); + return DdcUriTranslator.translateFesToBuildRunnerPath(stripped); + } + + @override + Future _sourceMapPathForModule( + MetadataProvider metadataProvider, + String module, + ) async { + final path = await super._sourceMapPathForModule(metadataProvider, module); + final stripped = _stripPrefix(path); + return DdcUriTranslator.translateFesToBuildRunnerPath(stripped); + } + + @override + String? _serverPathForAppUri(String appUrl) { + return DdcUriTranslator.translateAppUriToServerPath( + appUrl, + layout: AppUriLayout.buildRunner, + ) ?? + super._serverPathForAppUri(appUrl); + } + + @override + Future> _moduleInfoForProvider( + MetadataProvider metadataProvider, + ) async { + final moduleInfo = await super._moduleInfoForProvider(metadataProvider); + return moduleInfo.map((module, info) { + return MapEntry( + module, + ModuleInfo( + DdcUriTranslator.translateFesToBuildRunnerPath(info.fullDillPath), + DdcUriTranslator.translateFesToBuildRunnerPath(info.summaryPath), + ), + ); + }); + } } /// Provides a [RequireStrategy] suitable for use with Frontend Server. diff --git a/dwds/lib/src/utilities/ddc_uri_translator.dart b/dwds/lib/src/utilities/ddc_uri_translator.dart index 00148ab16d..b76d6dcbbb 100644 --- a/dwds/lib/src/utilities/ddc_uri_translator.dart +++ b/dwds/lib/src/utilities/ddc_uri_translator.dart @@ -93,4 +93,9 @@ class DdcUriTranslator { } return uri; } + + /// Maps '.dart.lib' (FES suffix) to '.ddc' (package:build suffix). + static String translateFesToBuildRunnerPath(String path) { + return path.replaceAll('.dart.lib', '.ddc'); + } } diff --git a/webdev/lib/src/serve/webdev_server.dart b/webdev/lib/src/serve/webdev_server.dart index 4b07e9cc91..c3a84df8e0 100644 --- a/webdev/lib/src/serve/webdev_server.dart +++ b/webdev/lib/src/serve/webdev_server.dart @@ -10,7 +10,6 @@ import 'package:build_daemon/client.dart'; import 'package:build_daemon/data/build_status.dart' as daemon; import 'package:dwds/data/build_result.dart'; import 'package:dwds/dwds.dart'; -import 'package:file/local.dart'; import 'package:http/http.dart' as http; import 'package:http/io_client.dart'; import 'package:http_multi_server/http_multi_server.dart'; @@ -238,16 +237,9 @@ class WebDevServer { final LoadStrategy loadStrategy; if (options.configuration.webHotReload) { - final frontendServerFileSystem = LocalFileSystem(); - final packageUriMapper = await PackageUriMapper.create( - frontendServerFileSystem, - findPackageConfigUri()!, - useDebuggerModuleNames: false, - ); loadStrategy = FrontendServerBuildDaemonStrategyProvider( options.configuration.reload, assetReader, - packageUriMapper, () async => {}, buildSettings, packageConfigPath: findPackageConfigFilePath(), From 79b7fa253a4aa4b22b11b990737c438bd58e4dc7 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Tue, 16 Jun 2026 01:40:16 -0700 Subject: [PATCH 024/134] Finalizing test fixture serving logic and adding cleanup --- dwds/lib/src/handlers/injected_client_js.dart | 1226 ++++++++++------- dwds/test/integration/fixtures/context.dart | 294 ++-- dwds/test/integration/fixtures/utilities.dart | 128 +- webdev/lib/src/serve/webdev_server.dart | 2 +- 4 files changed, 934 insertions(+), 716 deletions(-) diff --git a/dwds/lib/src/handlers/injected_client_js.dart b/dwds/lib/src/handlers/injected_client_js.dart index 78ae20d65d..c055db9f92 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.cbba25adcb0765b7d4f44f79f146ac4b6018eb45.\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" @@ -235,6 +235,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " getNativeInterceptor(object) {\n" " var proto, objectProto, \$constructor, interceptor, t1,\n" +" _s9_ = \"_\$dart_js\",\n" " record = object[init.dispatchPropertyName];\n" " if (record == null)\n" " if (\$.initNativeDispatchFlag == null) {\n" @@ -259,7 +260,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " else {\n" " t1 = \$._JS_INTEROP_INTERCEPTOR_TAG;\n" " if (t1 == null)\n" -" t1 = \$._JS_INTEROP_INTERCEPTOR_TAG = init.getIsolateTag(\"_\$dart_js\");\n" +" t1 = \$._JS_INTEROP_INTERCEPTOR_TAG = A.getIsolateAffinityTag(_s9_);\n" " interceptor = \$constructor[t1];\n" " }\n" " if (interceptor != null)\n" @@ -277,7 +278,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " if (typeof \$constructor == \"function\") {\n" " t1 = \$._JS_INTEROP_INTERCEPTOR_TAG;\n" " if (t1 == null)\n" -" t1 = \$._JS_INTEROP_INTERCEPTOR_TAG = init.getIsolateTag(\"_\$dart_js\");\n" +" t1 = \$._JS_INTEROP_INTERCEPTOR_TAG = A.getIsolateAffinityTag(_s9_);\n" " Object.defineProperty(\$constructor, t1, {value: B.UnknownJavaScriptObject_methods, enumerable: false, writable: true, configurable: true});\n" " return B.UnknownJavaScriptObject_methods;\n" " }\n" @@ -890,16 +891,14 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this.__internal\$_source = t0;\n" " this.\$ti = t1;\n" " },\n" -" _CastListBase: function _CastListBase() {\n" -" },\n" -" _CastListBase_sort_closure: function _CastListBase_sort_closure(t0, t1) {\n" -" this.\$this = t0;\n" -" this.compare = t1;\n" -" },\n" " CastList: function CastList(t0, t1) {\n" " this.__internal\$_source = t0;\n" " this.\$ti = t1;\n" " },\n" +" CastList_sort_closure: function CastList_sort_closure(t0, t1) {\n" +" this.\$this = t0;\n" +" this.compare = t1;\n" +" },\n" " CastMap: function CastMap(t0, t1) {\n" " this.__internal\$_source = t0;\n" " this.\$ti = t1;\n" @@ -1036,13 +1035,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this.__internal\$_source = t0;\n" " this.\$ti = t1;\n" " },\n" -" __CastListBase__CastIterableBase_ListMixin: function __CastListBase__CastIterableBase_ListMixin() {\n" +" _CastList__CastIterableBase_ListMixin: function _CastList__CastIterableBase_ListMixin() {\n" " },\n" " ConstantMap__throwUnmodifiable() {\n" " throw A.wrapException(A.UnsupportedError\$(\"Cannot modify unmodifiable Map\"));\n" " },\n" " unminifyOrTag(rawClassName) {\n" -" var preserved = init.mangledGlobalNames[rawClassName];\n" +" var preserved = A.unmangleGlobalNameIfPreservedAnyways(rawClassName);\n" " if (preserved != null)\n" " return preserved;\n" " return rawClassName;\n" @@ -1511,7 +1510,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " case 4:\n" " return closure.call\$4(arg1, arg2, arg3, arg4);\n" " }\n" -" throw A.wrapException(new A._Exception(\"Unsupported number of arguments for wrapped closure\"));\n" +" throw A.wrapException(A.Exception_Exception(\"Unsupported number of arguments for wrapped closure\"));\n" " },\n" " convertDartClosureToJS(closure, arity) {\n" " var \$function = closure.\$identity;\n" @@ -2972,7 +2971,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return \"?\";\n" " },\n" " _unminifyOrTag(rawClassName) {\n" -" var preserved = init.mangledGlobalNames[rawClassName];\n" +" var preserved = A.unmangleGlobalNameIfPreservedAnyways(rawClassName);\n" " if (preserved != null)\n" " return preserved;\n" " return rawClassName;\n" @@ -3013,7 +3012,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " probe = cache.get(recipe);\n" " if (probe != null)\n" " return probe;\n" -" rti = A._Parser_parse(A._Parser_create(universe, null, recipe, false));\n" +" rti = A._Universe__parseRecipe(universe, null, recipe, false);\n" " cache.set(recipe, rti);\n" " return rti;\n" " },\n" @@ -3025,7 +3024,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " probe = cache.get(recipe);\n" " if (probe != null)\n" " return probe;\n" -" rti = A._Parser_parse(A._Parser_create(universe, environment, recipe, true));\n" +" rti = A._Universe__parseRecipe(universe, environment, recipe, true);\n" " cache.set(recipe, rti);\n" " return rti;\n" " },\n" @@ -3042,6 +3041,9 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " cache.set(argumentsRecipe, rti);\n" " return rti;\n" " },\n" +" _Universe__parseRecipe(universe, environment, recipe, normalize) {\n" +" return A._Parser_parse(A._Parser_create(universe, environment, recipe, normalize));\n" +" },\n" " _Universe__installTypeTests(universe, rti) {\n" " rti._as = A._installSpecializedAsCheck;\n" " rti._is = A._installSpecializedIsTest;\n" @@ -3886,6 +3888,78 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }(\$function, 1);\n" " return \$.Zone__current.registerBinaryCallback\$3\$1(new A._wrapJsFunctionForAsync_closure(\$protected), type\$.void, type\$.int, type\$.dynamic);\n" " },\n" +" _asyncStarHelper(object, bodyFunctionOrErrorCode, controller) {\n" +" var t1, t2, t3,\n" +" _s10_ = \"controller\";\n" +" if (bodyFunctionOrErrorCode === 0) {\n" +" t1 = controller.cancelationFuture;\n" +" if (t1 != null)\n" +" t1._completeWithValue\$1(null);\n" +" else {\n" +" t1 = controller.___AsyncStarStreamController_controller_A;\n" +" t1 === \$ && A.throwLateFieldNI(_s10_);\n" +" t1.close\$0();\n" +" }\n" +" return;\n" +" } else if (bodyFunctionOrErrorCode === 1) {\n" +" t1 = controller.cancelationFuture;\n" +" if (t1 != null) {\n" +" t2 = A.unwrapException(object);\n" +" t3 = A.getTraceFromException(object);\n" +" t1._completeErrorObject\$1(new A.AsyncError(t2, t3));\n" +" } else {\n" +" t1 = A.unwrapException(object);\n" +" t2 = A.getTraceFromException(object);\n" +" t3 = controller.___AsyncStarStreamController_controller_A;\n" +" t3 === \$ && A.throwLateFieldNI(_s10_);\n" +" t3.addError\$2(t1, t2);\n" +" controller.___AsyncStarStreamController_controller_A.close\$0();\n" +" }\n" +" return;\n" +" }\n" +" type\$.void_Function_int_dynamic._as(bodyFunctionOrErrorCode);\n" +" if (object instanceof A._IterationMarker) {\n" +" if (controller.cancelationFuture != null) {\n" +" bodyFunctionOrErrorCode.call\$2(2, null);\n" +" return;\n" +" }\n" +" t1 = object.state;\n" +" if (t1 === 0) {\n" +" t1 = object.value;\n" +" t2 = controller.___AsyncStarStreamController_controller_A;\n" +" t2 === \$ && A.throwLateFieldNI(_s10_);\n" +" t2.add\$1(0, controller.\$ti._precomputed1._as(t1));\n" +" A.scheduleMicrotask(new A._asyncStarHelper_closure(controller, bodyFunctionOrErrorCode));\n" +" return;\n" +" } else if (t1 === 1) {\n" +" t1 = controller.\$ti._eval\$1(\"Stream<1>\")._as(type\$.Stream_dynamic._as(object.value));\n" +" t2 = controller.___AsyncStarStreamController_controller_A;\n" +" t2 === \$ && A.throwLateFieldNI(_s10_);\n" +" t2.addStream\$2\$cancelOnError(t1, false).then\$1\$1(new A._asyncStarHelper_closure0(controller, bodyFunctionOrErrorCode), type\$.Null);\n" +" return;\n" +" }\n" +" }\n" +" A._awaitOnObject(object, bodyFunctionOrErrorCode);\n" +" },\n" +" _streamOfController(controller) {\n" +" var t1 = controller.___AsyncStarStreamController_controller_A;\n" +" t1 === \$ && A.throwLateFieldNI(\"controller\");\n" +" return new A._ControllerStream(t1, A._instanceType(t1)._eval\$1(\"_ControllerStream<1>\"));\n" +" },\n" +" _AsyncStarStreamController\$(body, \$T) {\n" +" var t1 = new A._AsyncStarStreamController(\$T._eval\$1(\"_AsyncStarStreamController<0>\"));\n" +" t1._AsyncStarStreamController\$1(body, \$T);\n" +" return t1;\n" +" },\n" +" _makeAsyncStarStreamController(body, \$T) {\n" +" return A._AsyncStarStreamController\$(body, \$T);\n" +" },\n" +" _IterationMarker_yieldStar(values) {\n" +" return new A._IterationMarker(values, 1);\n" +" },\n" +" _IterationMarker_yieldSingle(value) {\n" +" return new A._IterationMarker(value, 0);\n" +" },\n" " AsyncError_defaultStackTrace(error) {\n" " var stackTrace;\n" " if (type\$.Error._is(error)) {\n" @@ -4197,9 +4271,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " A.checkNotNullable(stream, \"stream\", type\$.Object);\n" " return new A._StreamIterator(\$T._eval\$1(\"_StreamIterator<0>\"));\n" " },\n" -" StreamController_StreamController(\$T) {\n" -" var _null = null;\n" -" return new A._AsyncStreamController(_null, _null, _null, _null, \$T._eval\$1(\"_AsyncStreamController<0>\"));\n" +" StreamController_StreamController(onCancel, onListen, onResume, \$T) {\n" +" return new A._AsyncStreamController(onListen, null, onResume, onCancel, \$T._eval\$1(\"_AsyncStreamController<0>\"));\n" " },\n" " _runGuarded(notificationHandler) {\n" " var e, s, exception;\n" @@ -4213,6 +4286,9 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " \$.Zone__current.handleUncaughtError\$2(e, s);\n" " }\n" " },\n" +" _AddStreamState_makeErrorHandler(controller) {\n" +" return new A._AddStreamState_makeErrorHandler_closure(controller);\n" +" },\n" " _BufferingStreamSubscription__registerDataHandler(zone, handleData, \$T) {\n" " var t1 = handleData == null ? A.async___nullDataHandler\$closure() : handleData;\n" " return zone.registerUnaryCallback\$2\$1(t1, type\$.void, \$T);\n" @@ -4432,6 +4508,45 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _wrapJsFunctionForAsync_closure: function _wrapJsFunctionForAsync_closure(t0) {\n" " this.\$protected = t0;\n" " },\n" +" _asyncStarHelper_closure: function _asyncStarHelper_closure(t0, t1) {\n" +" this.controller = t0;\n" +" this.bodyFunction = t1;\n" +" },\n" +" _asyncStarHelper_closure0: function _asyncStarHelper_closure0(t0, t1) {\n" +" this.controller = t0;\n" +" this.bodyFunction = t1;\n" +" },\n" +" _AsyncStarStreamController: function _AsyncStarStreamController(t0) {\n" +" var _ = this;\n" +" _.___AsyncStarStreamController_controller_A = \$;\n" +" _.isSuspended = false;\n" +" _.cancelationFuture = null;\n" +" _.\$ti = t0;\n" +" },\n" +" _AsyncStarStreamController__resumeBody: function _AsyncStarStreamController__resumeBody(t0) {\n" +" this.body = t0;\n" +" },\n" +" _AsyncStarStreamController__resumeBody_closure: function _AsyncStarStreamController__resumeBody_closure(t0) {\n" +" this.body = t0;\n" +" },\n" +" _AsyncStarStreamController_closure0: function _AsyncStarStreamController_closure0(t0) {\n" +" this._resumeBody = t0;\n" +" },\n" +" _AsyncStarStreamController_closure1: function _AsyncStarStreamController_closure1(t0, t1) {\n" +" this.\$this = t0;\n" +" this._resumeBody = t1;\n" +" },\n" +" _AsyncStarStreamController_closure: function _AsyncStarStreamController_closure(t0, t1) {\n" +" this.\$this = t0;\n" +" this.body = t1;\n" +" },\n" +" _AsyncStarStreamController__closure: function _AsyncStarStreamController__closure(t0) {\n" +" this.body = t0;\n" +" },\n" +" _IterationMarker: function _IterationMarker(t0, t1) {\n" +" this.value = t0;\n" +" this.state = t1;\n" +" },\n" " AsyncError: function AsyncError(t0, t1) {\n" " this.error = t0;\n" " this.stackTrace = t1;\n" @@ -4591,6 +4706,21 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this._async\$_target = t0;\n" " this.\$ti = t1;\n" " },\n" +" _AddStreamState: function _AddStreamState() {\n" +" },\n" +" _AddStreamState_makeErrorHandler_closure: function _AddStreamState_makeErrorHandler_closure(t0) {\n" +" this.controller = t0;\n" +" },\n" +" _AddStreamState_cancel_closure: function _AddStreamState_cancel_closure(t0) {\n" +" this.\$this = t0;\n" +" },\n" +" _StreamControllerAddStreamState: function _StreamControllerAddStreamState(t0, t1, t2, t3) {\n" +" var _ = this;\n" +" _._varData = t0;\n" +" _.addStreamFuture = t1;\n" +" _.addSubscription = t2;\n" +" _.\$ti = t3;\n" +" },\n" " _BufferingStreamSubscription: function _BufferingStreamSubscription() {\n" " },\n" " _BufferingStreamSubscription_asFuture_closure: function _BufferingStreamSubscription_asFuture_closure(t0, t1) {\n" @@ -4653,26 +4783,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _EmptyStream: function _EmptyStream(t0) {\n" " this.\$ti = t0;\n" " },\n" -" _MultiStream: function _MultiStream(t0, t1, t2) {\n" -" this.isBroadcast = t0;\n" -" this._onListen = t1;\n" -" this.\$ti = t2;\n" -" },\n" -" _MultiStream_listen_closure: function _MultiStream_listen_closure(t0, t1) {\n" -" this.\$this = t0;\n" -" this.controller = t1;\n" -" },\n" -" _MultiStreamController: function _MultiStreamController(t0, t1, t2, t3, t4) {\n" -" var _ = this;\n" -" _._varData = null;\n" -" _._state = 0;\n" -" _._doneFuture = null;\n" -" _.onListen = t0;\n" -" _.onPause = t1;\n" -" _.onResume = t2;\n" -" _.onCancel = t3;\n" -" _.\$ti = t4;\n" -" },\n" " _cancelAndValue_closure: function _cancelAndValue_closure(t0, t1) {\n" " this.future = t0;\n" " this.value = t1;\n" @@ -5431,6 +5541,9 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " ConcurrentModificationError\$(modifiedObject) {\n" " return new A.ConcurrentModificationError(modifiedObject);\n" " },\n" +" Exception_Exception(message) {\n" +" return new A._Exception(message);\n" +" },\n" " FormatException\$(message, source, offset) {\n" " return new A.FormatException(message, source, offset);\n" " },\n" @@ -7485,35 +7598,35 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " BaseResponse: function BaseResponse() {\n" " },\n" -" _toClientException(e, request) {\n" -" var message;\n" -" if (type\$.JSObject._is(e) && \"AbortError\" === A._asString(e.name))\n" -" return new A.RequestAbortedException(\"Request aborted by `abortTrigger`\", request.url);\n" +" _rethrowAsClientException(e, st, request) {\n" +" var t1, message;\n" +" if (type\$.JSObject._is(e))\n" +" t1 = A._asString(e.name) === \"AbortError\";\n" +" else\n" +" t1 = false;\n" +" if (t1)\n" +" A.Error_throwWithStackTrace(new A.RequestAbortedException(\"Request aborted by `abortTrigger`\", request.url), st);\n" " if (!(e instanceof A.ClientException)) {\n" " message = J.toString\$0\$(e);\n" " if (B.JSString_methods.startsWith\$1(message, \"TypeError: \"))\n" " message = B.JSString_methods.substring\$1(message, 11);\n" " e = new A.ClientException(message, request.url);\n" " }\n" -" return e;\n" +" A.Error_throwWithStackTrace(e, st);\n" " },\n" -" _rethrowAsClientException(e, st, request) {\n" -" A.Error_throwWithStackTrace(A._toClientException(e, request), st);\n" -" },\n" -" _bodyToStream(request, response) {\n" -" return new A._MultiStream(false, new A._bodyToStream_closure(request, response), type\$._MultiStream_List_int);\n" +" _readBody(request, response) {\n" +" return A._readBody\$body(request, response);\n" " },\n" -" _readStreamBody(request, response, controller) {\n" -" return A._readStreamBody\$body(request, response, controller);\n" -" },\n" -" _readStreamBody\$body(request, response, controller) {\n" -" var \$async\$goto = 0,\n" -" \$async\$completer = A._makeAsyncAwaitCompleter(type\$.void),\n" -" \$async\$returnValue, \$async\$handler = 2, \$async\$errorStack = [], chunk, e, s, t2, t3, t4, t5, t6, t7, exception, varData, t8, t9, _box_0, t1, reader, \$async\$exception;\n" -" var \$async\$_readStreamBody = A._wrapJsFunctionForAsync(function(\$async\$errorCode, \$async\$result) {\n" -" if (\$async\$errorCode === 1) {\n" -" \$async\$errorStack.push(\$async\$result);\n" -" \$async\$goto = \$async\$handler;\n" +" _readBody\$body(request, response) {\n" +" var \$async\$_readBody = A._wrapJsFunctionForAsync(function(\$async\$errorCode, \$async\$result) {\n" +" switch (\$async\$errorCode) {\n" +" case 2:\n" +" \$async\$next = \$async\$nextWhenCanceled;\n" +" \$async\$goto = \$async\$next.pop();\n" +" break;\n" +" case 1:\n" +" \$async\$errorStack.push(\$async\$result);\n" +" \$async\$goto = \$async\$handler;\n" " }\n" " for (;;)\n" " switch (\$async\$goto) {\n" @@ -7521,133 +7634,114 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " // Function start\n" " _box_0 = {};\n" " t1 = A._asJSObjectQ(response.body);\n" -" reader = t1 == null ? null : A._asJSObject(t1.getReader());\n" -" \$async\$goto = reader == null ? 3 : 4;\n" -" break;\n" -" case 3:\n" -" // then\n" -" \$async\$goto = 5;\n" -" return A._asyncAwait(controller.close\$0(), \$async\$_readStreamBody);\n" -" case 5:\n" -" // returning from await.\n" -" // goto return\n" -" \$async\$goto = 1;\n" -" break;\n" -" case 4:\n" -" // join\n" -" _box_0.resumeSignal = null;\n" -" _box_0.hadError = _box_0.cancelled = false;\n" -" controller.set\$onResume(new A._readStreamBody_closure(_box_0));\n" -" controller.set\$onCancel(new A._readStreamBody_closure0(_box_0, reader, request));\n" -" t1 = type\$.NativeUint8List, t2 = controller.\$ti, t3 = t2._precomputed1, t4 = type\$.JSObject, t2 = t2._eval\$1(\"_ControllerSubscription<1>\"), t5 = type\$._StreamControllerAddStreamState_nullable_Object, t6 = type\$._Future_void, t7 = type\$._AsyncCompleter_void;\n" -" case 6:\n" +" bodyStreamReader = t1 == null ? null : A._asJSObject(t1.getReader());\n" +" if (bodyStreamReader == null) {\n" +" // goto return\n" +" \$async\$goto = 1;\n" +" break;\n" +" }\n" +" isDone = false;\n" +" _box_0.isError = false;\n" +" \$async\$handler = 4;\n" +" t1 = type\$.NativeUint8List, t2 = type\$.JSObject;\n" +" case 7:\n" " // for condition\n" " // trivial condition\n" -" chunk = null;\n" -" \$async\$handler = 9;\n" -" \$async\$goto = 12;\n" -" return A._asyncAwait(A.promiseToFuture(A._asJSObject(reader.read()), t4), \$async\$_readStreamBody);\n" -" case 12:\n" +" \$async\$goto = 9;\n" +" return A._asyncStarHelper(A.promiseToFuture(A._asJSObject(bodyStreamReader.read()), t2), \$async\$_readBody, \$async\$controller);\n" +" case 9:\n" " // returning from await.\n" " chunk = \$async\$result;\n" -" \$async\$handler = 2;\n" -" // goto after finally\n" -" \$async\$goto = 11;\n" +" if (A._asBool(chunk.done)) {\n" +" isDone = true;\n" +" // goto after for\n" +" \$async\$goto = 8;\n" +" break;\n" +" }\n" +" t3 = chunk.value;\n" +" t3.toString;\n" +" \$async\$goto = 10;\n" +" \$async\$nextWhenCanceled = [1, 5];\n" +" return A._asyncStarHelper(A._IterationMarker_yieldSingle(t1._as(t3)), \$async\$_readBody, \$async\$controller);\n" +" case 10:\n" +" // after yield\n" +" // goto for condition\n" +" \$async\$goto = 7;\n" " break;\n" -" case 9:\n" +" case 8:\n" +" // after for\n" +" \$async\$next.push(6);\n" +" // goto finally\n" +" \$async\$goto = 5;\n" +" break;\n" +" case 4:\n" " // catch\n" -" \$async\$handler = 8;\n" +" \$async\$handler = 3;\n" " \$async\$exception = \$async\$errorStack.pop();\n" " e = A.unwrapException(\$async\$exception);\n" -" s = A.getTraceFromException(\$async\$exception);\n" -" \$async\$goto = !_box_0.cancelled ? 13 : 14;\n" +" st = A.getTraceFromException(\$async\$exception);\n" +" _box_0.isError = true;\n" +" A._rethrowAsClientException(e, st, request);\n" +" \$async\$next.push(6);\n" +" // goto finally\n" +" \$async\$goto = 5;\n" " break;\n" -" case 13:\n" +" case 3:\n" +" // uncaught\n" +" \$async\$next = [2];\n" +" case 5:\n" +" // finally\n" +" \$async\$handler = 2;\n" +" \$async\$goto = !isDone ? 11 : 12;\n" +" break;\n" +" case 11:\n" " // then\n" -" _box_0.hadError = true;\n" -" t1 = A._toClientException(e, request);\n" -" t3 = type\$.nullable_StackTrace._as(s);\n" -" t4 = controller._state;\n" -" if (t4 >= 4)\n" -" A.throwExpression(controller._badEventState\$0());\n" -" if ((t4 & 1) !== 0) {\n" -" varData = controller._varData;\n" -" t6 = t2._as((t4 & 8) !== 0 ? t5._as(varData).get\$_varData() : varData);\n" -" t6._addError\$2(t1, t3 == null ? B._StringStackTrace_OdL : t3);\n" -" }\n" -" \$async\$goto = 15;\n" -" return A._asyncAwait(controller.close\$0(), \$async\$_readStreamBody);\n" -" case 15:\n" +" \$async\$handler = 14;\n" +" \$async\$goto = 17;\n" +" return A._asyncStarHelper(A.promiseToFuture(A._asJSObject(bodyStreamReader.cancel()), type\$.nullable_Object).catchError\$2\$test(new A._readBody_closure(), new A._readBody_closure0(_box_0)), \$async\$_readBody, \$async\$controller);\n" +" case 17:\n" " // returning from await.\n" -" case 14:\n" -" // join\n" -" // goto after for\n" -" \$async\$goto = 7;\n" +" \$async\$handler = 2;\n" +" // goto after finally\n" +" \$async\$goto = 16;\n" " break;\n" +" case 14:\n" +" // catch\n" +" \$async\$handler = 13;\n" +" \$async\$exception1 = \$async\$errorStack.pop();\n" +" e0 = A.unwrapException(\$async\$exception1);\n" +" st0 = A.getTraceFromException(\$async\$exception1);\n" +" if (!_box_0.isError)\n" +" A._rethrowAsClientException(e0, st0, request);\n" " // goto after finally\n" -" \$async\$goto = 11;\n" +" \$async\$goto = 16;\n" " break;\n" -" case 8:\n" +" case 13:\n" " // uncaught\n" " // goto rethrow\n" " \$async\$goto = 2;\n" " break;\n" -" case 11:\n" -" // after finally\n" -" if (A._asBool(chunk.done)) {\n" -" controller.closeSync\$0();\n" -" // goto after for\n" -" \$async\$goto = 7;\n" -" break;\n" -" } else {\n" -" t8 = chunk.value;\n" -" t8.toString;\n" -" t8 = t3._as(t1._as(t8));\n" -" t9 = controller._state;\n" -" if (t9 >= 4)\n" -" A.throwExpression(controller._badEventState\$0());\n" -" if ((t9 & 1) !== 0) {\n" -" varData = controller._varData;\n" -" t2._as((t9 & 8) !== 0 ? t5._as(varData).get\$_varData() : varData)._add\$1(t8);\n" -" }\n" -" }\n" -" t8 = controller._state;\n" -" if ((t8 & 1) !== 0) {\n" -" varData = controller._varData;\n" -" t9 = (t2._as((t8 & 8) !== 0 ? t5._as(varData).get\$_varData() : varData)._state & 4) !== 0;\n" -" t8 = t9;\n" -" } else\n" -" t8 = (t8 & 2) === 0;\n" -" \$async\$goto = t8 ? 16 : 17;\n" -" break;\n" " case 16:\n" -" // then\n" -" t8 = _box_0.resumeSignal;\n" -" \$async\$goto = 18;\n" -" return A._asyncAwait((t8 == null ? _box_0.resumeSignal = new A._AsyncCompleter(new A._Future(\$.Zone__current, t6), t7) : t8).future, \$async\$_readStreamBody);\n" -" case 18:\n" -" // returning from await.\n" -" case 17:\n" +" // after finally\n" +" case 12:\n" " // join\n" -" if ((controller._state & 1) === 0) {\n" -" // goto after for\n" -" \$async\$goto = 7;\n" -" break;\n" -" }\n" -" // goto for condition\n" -" \$async\$goto = 6;\n" +" // goto the next finally handler\n" +" \$async\$goto = \$async\$next.pop();\n" " break;\n" -" case 7:\n" -" // after for\n" +" case 6:\n" +" // after finally\n" " case 1:\n" " // return\n" -" return A._asyncReturn(\$async\$returnValue, \$async\$completer);\n" +" return A._asyncStarHelper(null, 0, \$async\$controller);\n" " case 2:\n" " // rethrow\n" -" return A._asyncRethrow(\$async\$errorStack.at(-1), \$async\$completer);\n" +" return A._asyncStarHelper(\$async\$errorStack.at(-1), 1, \$async\$controller);\n" " }\n" " });\n" -" return A._asyncStartSync(\$async\$_readStreamBody, \$async\$completer);\n" +" var \$async\$goto = 0,\n" +" \$async\$controller = A._makeAsyncStarStreamController(\$async\$_readBody, type\$.List_int),\n" +" \$async\$nextWhenCanceled, \$async\$handler = 2, \$async\$errorStack = [], \$async\$next = [], isDone, chunk, e, st, e0, st0, t2, t3, exception, _box_0, t1, bodyStreamReader, \$async\$exception, \$async\$exception1;\n" +" return A._streamOfController(\$async\$controller);\n" " },\n" " BrowserClient: function BrowserClient(t0) {\n" " this.withCredentials = false;\n" @@ -7656,17 +7750,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " BrowserClient_send_closure: function BrowserClient_send_closure(t0) {\n" " this.headers = t0;\n" " },\n" -" _bodyToStream_closure: function _bodyToStream_closure(t0, t1) {\n" -" this.request = t0;\n" -" this.response = t1;\n" -" },\n" -" _readStreamBody_closure: function _readStreamBody_closure(t0) {\n" -" this._box_0 = t0;\n" +" _readBody_closure: function _readBody_closure() {\n" " },\n" -" _readStreamBody_closure0: function _readStreamBody_closure0(t0, t1, t2) {\n" +" _readBody_closure0: function _readBody_closure0(t0) {\n" " this._box_0 = t0;\n" -" this.reader = t1;\n" -" this.request = t2;\n" " },\n" " ByteStream: function ByteStream(t0) {\n" " this._stream = t0;\n" @@ -8253,10 +8340,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _.text = t3;\n" " },\n" " SseClient\$(serverUrl, debugKey) {\n" -" var t3, t4, t5,\n" +" var t3, t4, t5, _null = null,\n" " t1 = type\$.String,\n" -" t2 = A.StreamController_StreamController(t1);\n" -" t1 = A.StreamController_StreamController(t1);\n" +" t2 = A.StreamController_StreamController(_null, _null, _null, t1);\n" +" t1 = A.StreamController_StreamController(_null, _null, _null, t1);\n" " t3 = A.Logger_Logger(\"SseClient\");\n" " t4 = \$.Zone__current;\n" " t5 = A.generateId();\n" @@ -8371,7 +8458,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t1 = type\$.JSArray_nullable_Object._as(new t1());\n" " webSocket = A._asJSObject(new t2(t3, t1));\n" " webSocket.binaryType = \"arraybuffer\";\n" -" browserSocket = new A.BrowserWebSocket(webSocket, A.StreamController_StreamController(type\$.WebSocketEvent));\n" +" browserSocket = new A.BrowserWebSocket(webSocket, A.StreamController_StreamController(null, null, null, type\$.WebSocketEvent));\n" " t1 = new A._Future(\$.Zone__current, type\$._Future_BrowserWebSocket);\n" " webSocketConnected = new A._AsyncCompleter(t1, type\$._AsyncCompleter_BrowserWebSocket);\n" " if (A._asInt(webSocket.readyState) === 1)\n" @@ -9085,6 +9172,9 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " JSArrayExtension_toDartIterable_closure: function JSArrayExtension_toDartIterable_closure(t0) {\n" " this.T = t0;\n" " },\n" +" unmangleGlobalNameIfPreservedAnyways(\$name) {\n" +" return init.mangledGlobalNames[\$name];\n" +" },\n" " printString(string) {\n" " if (typeof dartPrint == \"function\") {\n" " dartPrint(string);\n" @@ -10172,7 +10262,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " };\n" " A._EfficientLengthCastIterable.prototype = {\$isEfficientLengthIterable: 1};\n" -" A._CastListBase.prototype = {\n" +" A.CastList.prototype = {\n" +" cast\$1\$0(_, \$R) {\n" +" return new A.CastList(this.__internal\$_source, this.\$ti._eval\$1(\"@<1>\")._bind\$1(\$R)._eval\$1(\"CastList<1,2>\"));\n" +" },\n" " \$index(_, index) {\n" " return this.\$ti._rest[1]._as(J.\$index\$asx(this.__internal\$_source, index));\n" " },\n" @@ -10190,16 +10283,19 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " sort\$1(_, compare) {\n" " var t1;\n" " this.\$ti._eval\$1(\"int(2,2)?\")._as(compare);\n" -" t1 = compare == null ? null : new A._CastListBase_sort_closure(this, compare);\n" +" t1 = compare == null ? null : new A.CastList_sort_closure(this, compare);\n" " J.sort\$1\$ax(this.__internal\$_source, t1);\n" " },\n" " fillRange\$3(_, start, end, fillValue) {\n" " J.fillRange\$3\$ax(this.__internal\$_source, start, end, this.\$ti._precomputed1._as(fillValue));\n" " },\n" " \$isEfficientLengthIterable: 1,\n" -" \$isList: 1\n" +" \$isList: 1,\n" +" get\$__internal\$_source() {\n" +" return this.__internal\$_source;\n" +" }\n" " };\n" -" A._CastListBase_sort_closure.prototype = {\n" +" A.CastList_sort_closure.prototype = {\n" " call\$2(v1, v2) {\n" " var t1 = this.\$this.\$ti,\n" " t2 = t1._precomputed1;\n" @@ -10212,14 +10308,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return this.\$this.\$ti._eval\$1(\"int(1,1)\");\n" " }\n" " };\n" -" A.CastList.prototype = {\n" -" cast\$1\$0(_, \$R) {\n" -" return new A.CastList(this.__internal\$_source, this.\$ti._eval\$1(\"@<1>\")._bind\$1(\$R)._eval\$1(\"CastList<1,2>\"));\n" -" },\n" -" get\$__internal\$_source() {\n" -" return this.__internal\$_source;\n" -" }\n" -" };\n" " A.CastMap.prototype = {\n" " cast\$2\$0(_, \$RK, \$RV) {\n" " return new A.CastMap(this.__internal\$_source, this.\$ti._eval\$1(\"@<1,2>\")._bind\$1(\$RK)._bind\$1(\$RV)._eval\$1(\"CastMap<1,2,3,4>\"));\n" @@ -10287,7 +10375,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$0() {\n" " return A.Future_Future\$value(null, type\$.void);\n" " },\n" -" \$signature: 6\n" +" \$signature: 9\n" " };\n" " A.SentinelValue.prototype = {};\n" " A.EfficientLengthIterable.prototype = {};\n" @@ -10742,7 +10830,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return t2.elementAt\$1(t1, t2.get\$length(t1) - 1 - index);\n" " }\n" " };\n" -" A.__CastListBase__CastIterableBase_ListMixin.prototype = {};\n" +" A._CastList__CastIterableBase_ListMixin.prototype = {};\n" " A._Record_2.prototype = {\$recipe: \"+(1,2)\", \$shape: 1};\n" " A.ConstantMap.prototype = {\n" " cast\$2\$0(_, \$RK, \$RV) {\n" @@ -11012,7 +11100,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " var rest = this.__js_helper\$_rest;\n" " if (rest == null)\n" " return false;\n" -" return this.internalFindBucketIndex\$2(rest[this.internalComputeHashCode\$1(key)], key) >= 0;\n" +" return this.internalFindBucketIndex\$2(this.__js_helper\$_getBucket\$2(rest, key), key) >= 0;\n" " },\n" " \$index(_, key) {\n" " var strings, cell, t1, nums, _null = null;\n" @@ -11038,7 +11126,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " rest = this.__js_helper\$_rest;\n" " if (rest == null)\n" " return null;\n" -" bucket = rest[this.internalComputeHashCode\$1(key)];\n" +" bucket = this.__js_helper\$_getBucket\$2(rest, key);\n" " index = this.internalFindBucketIndex\$2(bucket, key);\n" " if (index < 0)\n" " return null;\n" @@ -11136,6 +11224,9 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " internalComputeHashCode\$1(key) {\n" " return J.get\$hashCode\$(key) & 1073741823;\n" " },\n" +" __js_helper\$_getBucket\$2(table, key) {\n" +" return table[this.internalComputeHashCode\$1(key)];\n" +" },\n" " internalFindBucketIndex\$2(bucket, key) {\n" " var \$length, i;\n" " if (bucket == null)\n" @@ -11289,13 +11380,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$2(o, tag) {\n" " return this.getUnknownTag(o, tag);\n" " },\n" -" \$signature: 58\n" +" \$signature: 31\n" " };\n" " A.initHooks_closure1.prototype = {\n" " call\$1(tag) {\n" " return this.prototypeForTag(A._asString(tag));\n" " },\n" -" \$signature: 55\n" +" \$signature: 30\n" " };\n" " A._Record.prototype = {\n" " get\$runtimeType(_) {\n" @@ -11803,7 +11894,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t1.storedCallback = null;\n" " f.call\$0();\n" " },\n" -" \$signature: 8\n" +" \$signature: 4\n" " };\n" " A._AsyncRun__initializeScheduleImmediate_closure.prototype = {\n" " call\$1(callback) {\n" @@ -11813,7 +11904,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t2 = this.span;\n" " t1.firstChild ? t1.removeChild(t2) : t1.appendChild(t2);\n" " },\n" -" \$signature: 90\n" +" \$signature: 49\n" " };\n" " A._AsyncRun__scheduleImmediateJsOverride_internalCallback.prototype = {\n" " call\$0() {\n" @@ -11913,55 +12004,140 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(result) {\n" " return this.bodyFunction.call\$2(0, result);\n" " },\n" -" \$signature: 4\n" +" \$signature: 5\n" " };\n" " A._awaitOnObject_closure0.prototype = {\n" " call\$2(error, stackTrace) {\n" " this.bodyFunction.call\$2(1, new A.ExceptionAndStackTrace(error, type\$.StackTrace._as(stackTrace)));\n" " },\n" -" \$signature: 41\n" +" \$signature: 54\n" " };\n" " A._wrapJsFunctionForAsync_closure.prototype = {\n" " call\$2(errorCode, result) {\n" " this.\$protected(A._asInt(errorCode), result);\n" " },\n" -" \$signature: 43\n" -" };\n" -" A.AsyncError.prototype = {\n" -" toString\$0(_) {\n" -" return A.S(this.error);\n" -" },\n" -" \$isError: 1,\n" -" get\$stackTrace() {\n" -" return this.stackTrace;\n" -" }\n" +" \$signature: 59\n" " };\n" -" A.Future_Future\$microtask_closure.prototype = {\n" +" A._asyncStarHelper_closure.prototype = {\n" " call\$0() {\n" -" var e, s, exception, t1, t2, t3, computationResult = null;\n" -" try {\n" -" computationResult = this.computation.call\$0();\n" -" } catch (exception) {\n" -" e = A.unwrapException(exception);\n" -" s = A.getTraceFromException(exception);\n" -" t1 = e;\n" -" t2 = s;\n" -" t3 = A._interceptError(t1, t2);\n" -" if (t3 == null)\n" -" t1 = new A.AsyncError(t1, t2);\n" -" else\n" -" t1 = t3;\n" -" this.result._completeErrorObject\$1(t1);\n" +" var t3,\n" +" t1 = this.controller,\n" +" t2 = t1.___AsyncStarStreamController_controller_A;\n" +" t2 === \$ && A.throwLateFieldNI(\"controller\");\n" +" t3 = t2._state;\n" +" if ((t3 & 1) !== 0 ? (t2.get\$_subscription()._state & 4) !== 0 : (t3 & 2) === 0) {\n" +" t1.isSuspended = true;\n" " return;\n" " }\n" -" this.result._complete\$1(computationResult);\n" +" t1 = t1.cancelationFuture != null ? 2 : 0;\n" +" this.bodyFunction.call\$2(t1, null);\n" " },\n" " \$signature: 0\n" " };\n" -" A.Future_Future\$delayed_closure.prototype = {\n" -" call\$0() {\n" -" this.T._as(null);\n" -" this.result._complete\$1(null);\n" +" A._asyncStarHelper_closure0.prototype = {\n" +" call\$1(__wc0_formal) {\n" +" var errorCode = this.controller.cancelationFuture != null ? 2 : 0;\n" +" this.bodyFunction.call\$2(errorCode, null);\n" +" },\n" +" \$signature: 4\n" +" };\n" +" A._AsyncStarStreamController.prototype = {\n" +" _AsyncStarStreamController\$1(body, \$T) {\n" +" var _this = this,\n" +" t1 = new A._AsyncStarStreamController__resumeBody(body);\n" +" _this.___AsyncStarStreamController_controller_A = _this.\$ti._eval\$1(\"StreamController<1>\")._as(A.StreamController_StreamController(new A._AsyncStarStreamController_closure(_this, body), new A._AsyncStarStreamController_closure0(t1), new A._AsyncStarStreamController_closure1(_this, t1), \$T));\n" +" }\n" +" };\n" +" A._AsyncStarStreamController__resumeBody.prototype = {\n" +" call\$0() {\n" +" A.scheduleMicrotask(new A._AsyncStarStreamController__resumeBody_closure(this.body));\n" +" },\n" +" \$signature: 1\n" +" };\n" +" A._AsyncStarStreamController__resumeBody_closure.prototype = {\n" +" call\$0() {\n" +" this.body.call\$2(0, null);\n" +" },\n" +" \$signature: 0\n" +" };\n" +" A._AsyncStarStreamController_closure0.prototype = {\n" +" call\$0() {\n" +" this._resumeBody.call\$0();\n" +" },\n" +" \$signature: 0\n" +" };\n" +" A._AsyncStarStreamController_closure1.prototype = {\n" +" call\$0() {\n" +" var t1 = this.\$this;\n" +" if (t1.isSuspended) {\n" +" t1.isSuspended = false;\n" +" this._resumeBody.call\$0();\n" +" }\n" +" },\n" +" \$signature: 0\n" +" };\n" +" A._AsyncStarStreamController_closure.prototype = {\n" +" call\$0() {\n" +" var t1 = this.\$this,\n" +" t2 = t1.___AsyncStarStreamController_controller_A;\n" +" t2 === \$ && A.throwLateFieldNI(\"controller\");\n" +" if ((t2._state & 4) === 0) {\n" +" t1.cancelationFuture = new A._Future(\$.Zone__current, type\$._Future_dynamic);\n" +" if (t1.isSuspended) {\n" +" t1.isSuspended = false;\n" +" A.scheduleMicrotask(new A._AsyncStarStreamController__closure(this.body));\n" +" }\n" +" return t1.cancelationFuture;\n" +" }\n" +" },\n" +" \$signature: 60\n" +" };\n" +" A._AsyncStarStreamController__closure.prototype = {\n" +" call\$0() {\n" +" this.body.call\$2(2, null);\n" +" },\n" +" \$signature: 0\n" +" };\n" +" A._IterationMarker.prototype = {\n" +" toString\$0(_) {\n" +" return \"IterationMarker(\" + this.state + \", \" + A.S(this.value) + \")\";\n" +" }\n" +" };\n" +" A.AsyncError.prototype = {\n" +" toString\$0(_) {\n" +" return A.S(this.error);\n" +" },\n" +" \$isError: 1,\n" +" get\$stackTrace() {\n" +" return this.stackTrace;\n" +" }\n" +" };\n" +" A.Future_Future\$microtask_closure.prototype = {\n" +" call\$0() {\n" +" var e, s, exception, t1, t2, t3, computationResult = null;\n" +" try {\n" +" computationResult = this.computation.call\$0();\n" +" } catch (exception) {\n" +" e = A.unwrapException(exception);\n" +" s = A.getTraceFromException(exception);\n" +" t1 = e;\n" +" t2 = s;\n" +" t3 = A._interceptError(t1, t2);\n" +" if (t3 == null)\n" +" t1 = new A.AsyncError(t1, t2);\n" +" else\n" +" t1 = t3;\n" +" this.result._completeErrorObject\$1(t1);\n" +" return;\n" +" }\n" +" this.result._complete\$1(computationResult);\n" +" },\n" +" \$signature: 0\n" +" };\n" +" A.Future_Future\$delayed_closure.prototype = {\n" +" call\$0() {\n" +" this.T._as(null);\n" +" this.result._complete\$1(null);\n" " },\n" " \$signature: 0\n" " };\n" @@ -12070,15 +12246,24 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this._addListener\$1(new A._FutureListener(result, 19, f, onError, t1._eval\$1(\"@<1>\")._bind\$1(\$E)._eval\$1(\"_FutureListener<1,2>\")));\n" " return result;\n" " },\n" -" catchError\$1(onError) {\n" -" var t1 = this.\$ti,\n" -" t2 = \$.Zone__current,\n" -" result = new A._Future(t2, t1);\n" -" if (t2 !== B.C__RootZone)\n" +" catchError\$2\$test(onError, test) {\n" +" var t1, t2, result;\n" +" type\$.nullable_bool_Function_Object._as(test);\n" +" t1 = this.\$ti;\n" +" t2 = \$.Zone__current;\n" +" result = new A._Future(t2, t1);\n" +" if (t2 !== B.C__RootZone) {\n" " onError = A._registerErrorHandler(onError, t2);\n" -" this._addListener\$1(new A._FutureListener(result, 2, null, onError, t1._eval\$1(\"_FutureListener<1,1>\")));\n" +" if (test != null)\n" +" test = t2.registerUnaryCallback\$2\$1(test, type\$.bool, type\$.Object);\n" +" }\n" +" t2 = test == null ? 2 : 6;\n" +" this._addListener\$1(new A._FutureListener(result, t2, test, onError, t1._eval\$1(\"_FutureListener<1,1>\")));\n" " return result;\n" " },\n" +" catchError\$1(onError) {\n" +" return this.catchError\$2\$test(onError, null);\n" +" },\n" " whenComplete\$1(action) {\n" " var t1, t2, result;\n" " type\$.dynamic_Function._as(action);\n" @@ -12321,7 +12506,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(__wc0_formal) {\n" " this.joinedResult._completeWithResultOf\$1(this.originalSource);\n" " },\n" -" \$signature: 8\n" +" \$signature: 4\n" " };\n" " A._Future__propagateToListeners_handleWhenCompleteCallback_closure0.prototype = {\n" " call\$2(e, s) {\n" @@ -12500,10 +12685,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " if ((_this._state & 8) === 0)\n" " return A._instanceType(_this)._eval\$1(\"_PendingEvents<1>?\")._as(_this._varData);\n" " t1 = A._instanceType(_this);\n" -" return t1._eval\$1(\"_PendingEvents<1>?\")._as(t1._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(_this._varData).get\$_varData());\n" +" return t1._eval\$1(\"_PendingEvents<1>?\")._as(t1._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(_this._varData)._varData);\n" " },\n" " _ensurePendingEvents\$0() {\n" -" var events, t1, _this = this;\n" +" var events, t1, state, _this = this;\n" " if ((_this._state & 8) === 0) {\n" " events = _this._varData;\n" " if (events == null)\n" @@ -12511,13 +12696,16 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return A._instanceType(_this)._eval\$1(\"_PendingEvents<1>\")._as(events);\n" " }\n" " t1 = A._instanceType(_this);\n" -" events = t1._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(_this._varData).get\$_varData();\n" +" state = t1._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(_this._varData);\n" +" events = state._varData;\n" +" if (events == null)\n" +" events = state._varData = new A._PendingEvents(t1._eval\$1(\"_PendingEvents<1>\"));\n" " return t1._eval\$1(\"_PendingEvents<1>\")._as(events);\n" " },\n" " get\$_subscription() {\n" " var varData = this._varData;\n" " if ((this._state & 8) !== 0)\n" -" varData = type\$._StreamControllerAddStreamState_nullable_Object._as(varData).get\$_varData();\n" +" varData = type\$._StreamControllerAddStreamState_nullable_Object._as(varData)._varData;\n" " return A._instanceType(this)._eval\$1(\"_ControllerSubscription<1>\")._as(varData);\n" " },\n" " _badEventState\$0() {\n" @@ -12525,6 +12713,31 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return new A.StateError(\"Cannot add event after closing\");\n" " return new A.StateError(\"Cannot add event while adding a stream\");\n" " },\n" +" addStream\$2\$cancelOnError(source, cancelOnError) {\n" +" var t2, t3, t4, t5, t6, _this = this,\n" +" t1 = A._instanceType(_this);\n" +" t1._eval\$1(\"Stream<1>\")._as(source);\n" +" t2 = _this._state;\n" +" if (t2 >= 4)\n" +" throw A.wrapException(_this._badEventState\$0());\n" +" if ((t2 & 2) !== 0) {\n" +" t1 = new A._Future(\$.Zone__current, type\$._Future_dynamic);\n" +" t1._asyncComplete\$1(null);\n" +" return t1;\n" +" }\n" +" t2 = _this._varData;\n" +" t3 = cancelOnError === true;\n" +" t4 = new A._Future(\$.Zone__current, type\$._Future_dynamic);\n" +" t5 = t1._eval\$1(\"~(1)\")._as(_this.get\$_add());\n" +" t6 = t3 ? A._AddStreamState_makeErrorHandler(_this) : _this.get\$_addError();\n" +" t6 = source.listen\$4\$cancelOnError\$onDone\$onError(t5, t3, _this.get\$_close(), t6);\n" +" t3 = _this._state;\n" +" if ((t3 & 1) !== 0 ? (_this.get\$_subscription()._state & 4) !== 0 : (t3 & 2) === 0)\n" +" t6.pause\$0();\n" +" _this._varData = new A._StreamControllerAddStreamState(t2, t4, t6, t1._eval\$1(\"_StreamControllerAddStreamState<1>\"));\n" +" _this._state |= 8;\n" +" return t4;\n" +" },\n" " _ensureDoneFuture\$0() {\n" " var t1 = this._doneFuture;\n" " if (t1 == null)\n" @@ -12538,6 +12751,16 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " throw A.wrapException(_this._badEventState\$0());\n" " _this._add\$1(value);\n" " },\n" +" addError\$2(error, stackTrace) {\n" +" var _0_0;\n" +" if (this._state >= 4)\n" +" throw A.wrapException(this._badEventState\$0());\n" +" _0_0 = A._interceptUserError(error, stackTrace);\n" +" this._addError\$2(_0_0.error, _0_0.stackTrace);\n" +" },\n" +" addError\$1(error) {\n" +" return this.addError\$2(error, null);\n" +" },\n" " close\$0() {\n" " var _this = this,\n" " t1 = _this._state;\n" @@ -12565,6 +12788,23 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " else if ((t2 & 3) === 0)\n" " _this._ensurePendingEvents\$0().add\$1(0, new A._DelayedData(value, t1._eval\$1(\"_DelayedData<1>\")));\n" " },\n" +" _addError\$2(error, stackTrace) {\n" +" var t1;\n" +" A._asObject(error);\n" +" type\$.StackTrace._as(stackTrace);\n" +" t1 = this._state;\n" +" if ((t1 & 1) !== 0)\n" +" this._sendError\$2(error, stackTrace);\n" +" else if ((t1 & 3) === 0)\n" +" this._ensurePendingEvents\$0().add\$1(0, new A._DelayedError(error, stackTrace));\n" +" },\n" +" _close\$0() {\n" +" var _this = this,\n" +" addState = A._instanceType(_this)._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(_this._varData);\n" +" _this._varData = addState._varData;\n" +" _this._state &= 4294967287;\n" +" addState.addStreamFuture._asyncComplete\$1(null);\n" +" },\n" " _subscribe\$4(onData, onError, onDone, cancelOnError) {\n" " var t2, t3, t4, t5, t6, t7, subscription, pendingEvents, addState, _this = this,\n" " t1 = A._instanceType(_this);\n" @@ -12582,8 +12822,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " pendingEvents = _this.get\$_pendingEvents();\n" " if (((_this._state |= 1) & 8) !== 0) {\n" " addState = t1._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(_this._varData);\n" -" addState.set\$_varData(subscription);\n" -" addState.resume\$0();\n" +" addState._varData = subscription;\n" +" addState.addSubscription.resume\$0();\n" " } else\n" " _this._varData = subscription;\n" " subscription._setPendingEvents\$1(pendingEvents);\n" @@ -12627,12 +12867,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " set\$onListen(onListen) {\n" " this.onListen = type\$.nullable_void_Function._as(onListen);\n" " },\n" -" set\$onResume(onResume) {\n" -" this.onResume = type\$.nullable_void_Function._as(onResume);\n" -" },\n" -" set\$onCancel(onCancel) {\n" -" this.onCancel = type\$.nullable_void_Function._as(onCancel);\n" -" },\n" " \$isStreamSink: 1,\n" " \$isStreamController: 1,\n" " \$is_StreamControllerLifecycle: 1,\n" @@ -12655,7 +12889,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._AsyncStreamControllerDispatch.prototype = {\n" " _sendData\$1(data) {\n" -" var t1 = A._instanceType(this);\n" +" var t1 = this.\$ti;\n" " t1._precomputed1._as(data);\n" " this.get\$_subscription()._addPending\$1(new A._DelayedData(data, t1._eval\$1(\"_DelayedData<1>\")));\n" " },\n" @@ -12688,7 +12922,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t2 = A._instanceType(t1);\n" " t2._eval\$1(\"StreamSubscription<1>\")._as(this);\n" " if ((t1._state & 8) !== 0)\n" -" t2._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(t1._varData).pause\$0();\n" +" t2._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(t1._varData).addSubscription.pause\$0();\n" " A._runGuarded(t1.onPause);\n" " },\n" " _onResume\$0() {\n" @@ -12696,11 +12930,32 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t2 = A._instanceType(t1);\n" " t2._eval\$1(\"StreamSubscription<1>\")._as(this);\n" " if ((t1._state & 8) !== 0)\n" -" t2._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(t1._varData).resume\$0();\n" +" t2._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(t1._varData).addSubscription.resume\$0();\n" " A._runGuarded(t1.onResume);\n" " }\n" " };\n" " A._StreamSinkWrapper.prototype = {\$isStreamSink: 1};\n" +" A._AddStreamState.prototype = {\n" +" cancel\$0() {\n" +" var cancel = this.addSubscription.cancel\$0();\n" +" return cancel.whenComplete\$1(new A._AddStreamState_cancel_closure(this));\n" +" }\n" +" };\n" +" A._AddStreamState_makeErrorHandler_closure.prototype = {\n" +" call\$2(e, s) {\n" +" var t1 = this.controller;\n" +" t1._addError\$2(A._asObject(e), type\$.StackTrace._as(s));\n" +" t1._close\$0();\n" +" },\n" +" \$signature: 3\n" +" };\n" +" A._AddStreamState_cancel_closure.prototype = {\n" +" call\$0() {\n" +" this.\$this.addStreamFuture._asyncComplete\$1(null);\n" +" },\n" +" \$signature: 1\n" +" };\n" +" A._StreamControllerAddStreamState.prototype = {};\n" " A._BufferingStreamSubscription.prototype = {\n" " _setPendingEvents\$1(pendingEvents) {\n" " var _this = this;\n" @@ -13164,44 +13419,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return this.listen\$4\$cancelOnError\$onDone\$onError(onData, cancelOnError, onDone, null);\n" " }\n" " };\n" -" A._MultiStream.prototype = {\n" -" listen\$4\$cancelOnError\$onDone\$onError(onData, cancelOnError, onDone, onError) {\n" -" var controller, _null = null,\n" -" t1 = this.\$ti;\n" -" t1._eval\$1(\"~(1)?\")._as(onData);\n" -" type\$.nullable_void_Function._as(onDone);\n" -" controller = new A._MultiStreamController(_null, _null, _null, _null, t1._eval\$1(\"_MultiStreamController<1>\"));\n" -" controller.set\$onListen(new A._MultiStream_listen_closure(this, controller));\n" -" return controller._subscribe\$4(onData, onError, onDone, cancelOnError === true);\n" -" },\n" -" listen\$3\$onDone\$onError(onData, onDone, onError) {\n" -" return this.listen\$4\$cancelOnError\$onDone\$onError(onData, null, onDone, onError);\n" -" },\n" -" listen\$3\$cancelOnError\$onDone(onData, cancelOnError, onDone) {\n" -" return this.listen\$4\$cancelOnError\$onDone\$onError(onData, cancelOnError, onDone, null);\n" -" }\n" -" };\n" -" A._MultiStream_listen_closure.prototype = {\n" -" call\$0() {\n" -" this.\$this._onListen.call\$1(this.controller);\n" -" },\n" -" \$signature: 0\n" -" };\n" -" A._MultiStreamController.prototype = {\n" -" closeSync\$0() {\n" -" var _this = this,\n" -" t1 = _this._state;\n" -" if ((t1 & 4) !== 0)\n" -" return;\n" -" if (t1 >= 4)\n" -" throw A.wrapException(_this._badEventState\$0());\n" -" t1 |= 4;\n" -" _this._state = t1;\n" -" if ((t1 & 1) !== 0)\n" -" _this.get\$_subscription()._close\$0();\n" -" },\n" -" \$isMultiStreamController: 1\n" -" };\n" " A._cancelAndValue_closure.prototype = {\n" " call\$0() {\n" " return this.future._complete\$1(this.value);\n" @@ -13766,7 +13983,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t2._processUncaughtError\$3(zone, A._asObject(e), t1._as(s));\n" " }\n" " },\n" -" \$signature: 31\n" +" \$signature: 42\n" " };\n" " A._ZoneDelegate.prototype = {\$isZoneDelegate: 1};\n" " A._rootHandleError_closure.prototype = {\n" @@ -14040,7 +14257,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(v) {\n" " return this.K._is(v);\n" " },\n" -" \$signature: 32\n" +" \$signature: 44\n" " };\n" " A._HashSet.prototype = {\n" " get\$iterator(_) {\n" @@ -14263,6 +14480,21 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " take\$1(receiver, count) {\n" " return A.SubListIterable\$(receiver, 0, A.checkNotNullable(count, \"count\", type\$.int), A.instanceType(receiver)._eval\$1(\"ListBase.E\"));\n" " },\n" +" toList\$1\$growable(receiver, growable) {\n" +" var t1, first, result, i, _this = this;\n" +" if (_this.get\$isEmpty(receiver)) {\n" +" t1 = J.JSArray_JSArray\$growable(0, A.instanceType(receiver)._eval\$1(\"ListBase.E\"));\n" +" return t1;\n" +" }\n" +" first = _this.\$index(receiver, 0);\n" +" result = A.List_List\$filled(_this.get\$length(receiver), first, true, A.instanceType(receiver)._eval\$1(\"ListBase.E\"));\n" +" for (i = 1; i < _this.get\$length(receiver); ++i)\n" +" B.JSArray_methods.\$indexSet(result, i, _this.\$index(receiver, i));\n" +" return result;\n" +" },\n" +" toList\$0(receiver) {\n" +" return this.toList\$1\$growable(receiver, true);\n" +" },\n" " add\$1(receiver, element) {\n" " var t1;\n" " A.instanceType(receiver)._eval\$1(\"ListBase.E\")._as(element);\n" @@ -14369,7 +14601,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t2 = A.S(v);\n" " t1._contents += t2;\n" " },\n" -" \$signature: 18\n" +" \$signature: 17\n" " };\n" " A._UnmodifiableMapMixin.prototype = {\n" " \$indexSet(_, key, value) {\n" @@ -14977,7 +15209,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " return null;\n" " },\n" -" \$signature: 19\n" +" \$signature: 18\n" " };\n" " A._Utf8Decoder__decoderNonfatal_closure.prototype = {\n" " call\$0() {\n" @@ -14989,7 +15221,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " return null;\n" " },\n" -" \$signature: 19\n" +" \$signature: 18\n" " };\n" " A.AsciiCodec.prototype = {\n" " encode\$1(source) {\n" @@ -15422,7 +15654,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " B.JSArray_methods.\$indexSet(t1, t2.i++, key);\n" " B.JSArray_methods.\$indexSet(t1, t2.i++, value);\n" " },\n" -" \$signature: 18\n" +" \$signature: 17\n" " };\n" " A._JsonStringStringifier.prototype = {\n" " get\$_partialResult() {\n" @@ -16172,7 +16404,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$2(msg, position) {\n" " throw A.wrapException(A.FormatException\$(\"Illegal IPv6 address, \" + msg, this.host, position));\n" " },\n" -" \$signature: 48\n" +" \$signature: 56\n" " };\n" " A._Uri.prototype = {\n" " get\$_text() {\n" @@ -16472,7 +16704,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(s) {\n" " return A._Uri__uriEncode(64, A._asString(s), B.C_Utf8Codec, false);\n" " },\n" -" \$signature: 9\n" +" \$signature: 10\n" " };\n" " A.UriData.prototype = {\n" " get\$uri() {\n" @@ -16804,7 +17036,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " var t1 = type\$.JavaScriptFunction;\n" " this._this.then\$1\$2\$onError(new A.FutureOfJSAnyToJSPromise_get_toJS__closure(t1._as(resolve)), new A.FutureOfJSAnyToJSPromise_get_toJS__closure0(t1._as(reject)), type\$.nullable_Object);\n" " },\n" -" \$signature: 20\n" +" \$signature: 19\n" " };\n" " A.FutureOfJSAnyToJSPromise_get_toJS__closure.prototype = {\n" " call\$1(value) {\n" @@ -16812,7 +17044,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t1.call(t1, value);\n" " return value;\n" " },\n" -" \$signature: 10\n" +" \$signature: 11\n" " };\n" " A.FutureOfJSAnyToJSPromise_get_toJS__closure0.prototype = {\n" " call\$2(error, stackTrace) {\n" @@ -16830,21 +17062,21 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t1.call(t1, wrapper);\n" " return wrapper;\n" " },\n" -" \$signature: 59\n" +" \$signature: 68\n" " };\n" " A.FutureOfVoidToJSPromise_get_toJS_closure.prototype = {\n" " call\$2(resolve, reject) {\n" " var t1 = type\$.JavaScriptFunction;\n" " this._this.then\$1\$2\$onError(new A.FutureOfVoidToJSPromise_get_toJS__closure(t1._as(resolve)), new A.FutureOfVoidToJSPromise_get_toJS__closure0(t1._as(reject)), type\$.nullable_Object);\n" " },\n" -" \$signature: 20\n" +" \$signature: 19\n" " };\n" " A.FutureOfVoidToJSPromise_get_toJS__closure.prototype = {\n" " call\$1(__wc0_formal) {\n" " var t1 = this.resolve;\n" " return t1.call(t1);\n" " },\n" -" \$signature: 67\n" +" \$signature: 74\n" " };\n" " A.FutureOfVoidToJSPromise_get_toJS__closure0.prototype = {\n" " call\$2(error, stackTrace) {\n" @@ -16887,13 +17119,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " } else\n" " return o;\n" " },\n" -" \$signature: 10\n" +" \$signature: 11\n" " };\n" " A.promiseToFuture_closure.prototype = {\n" " call\$1(r) {\n" " return this.completer.complete\$1(this.T._eval\$1(\"0/?\")._as(r));\n" " },\n" -" \$signature: 4\n" +" \$signature: 5\n" " };\n" " A.promiseToFuture_closure0.prototype = {\n" " call\$1(e) {\n" @@ -16901,7 +17133,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return this.completer.completeError\$1(new A.NullRejectionException(e === undefined));\n" " return this.completer.completeError\$1(e);\n" " },\n" -" \$signature: 4\n" +" \$signature: 5\n" " };\n" " A.dartify_convert.prototype = {\n" " call\$1(o) {\n" @@ -16953,7 +17185,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " return o;\n" " },\n" -" \$signature: 10\n" +" \$signature: 11\n" " };\n" " A._JSRandom.prototype = {\n" " nextInt\$1(max) {\n" @@ -17369,13 +17601,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(e) {\n" " return type\$.BuildStatus._as(e)._name === this.json;\n" " },\n" -" \$signature: 73\n" +" \$signature: 75\n" " };\n" " A.BuildStatus_BuildStatus\$fromJson_closure0.prototype = {\n" " call\$0() {\n" " throw A.wrapException(A.ArgumentError\$(\"Unknown BuildStatus: \" + this.json, null));\n" " },\n" -" \$signature: 74\n" +" \$signature: 90\n" " };\n" " A.BuildResult.prototype = {\n" " toJson\$0() {\n" @@ -17451,7 +17683,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(e) {\n" " return type\$.DebugEvent._as(e).toJson\$0();\n" " },\n" -" \$signature: 89\n" +" \$signature: 91\n" " };\n" " A.DebugInfo.prototype = {\n" " toJson\$0() {\n" @@ -17829,13 +18061,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$0() {\n" " return true;\n" " },\n" -" \$signature: 21\n" +" \$signature: 20\n" " };\n" " A.BatchedStreamController__hasEventDuring_closure.prototype = {\n" " call\$0() {\n" " return false;\n" " },\n" -" \$signature: 21\n" +" \$signature: 20\n" " };\n" " A.SocketClient.prototype = {};\n" " A.SseSocketClient.prototype = {\n" @@ -17864,14 +18096,14 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(o) {\n" " return J.toString\$0\$(o);\n" " },\n" -" \$signature: 30\n" +" \$signature: 29\n" " };\n" " A.PersistentWebSocket.prototype = {\n" " get\$_incomingStreamController() {\n" " var result, _this = this,\n" " value = _this.__PersistentWebSocket__incomingStreamController_FI;\n" " if (value === \$) {\n" -" result = A.StreamController_StreamController(type\$.dynamic);\n" +" result = A.StreamController_StreamController(null, null, null, type\$.dynamic);\n" " result.set\$onListen(_this.get\$_listenWithRetry());\n" " _this.__PersistentWebSocket__incomingStreamController_FI !== \$ && A.throwLateFieldADI(\"_incomingStreamController\");\n" " _this.__PersistentWebSocket__incomingStreamController_FI = result;\n" @@ -18041,9 +18273,9 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(socket) {\n" " var _this = this;\n" " type\$.WebSocket._as(socket);\n" -" return new A.PersistentWebSocket(_this.logger, _this.debugName, _this.maxRetryAttempts, new A._AsyncCompleter(new A._Future(\$.Zone__current, type\$._Future_void), type\$._AsyncCompleter_void), _this.uri, _this.onReconnect, socket, A.StreamController_StreamController(type\$.dynamic));\n" +" return new A.PersistentWebSocket(_this.logger, _this.debugName, _this.maxRetryAttempts, new A._AsyncCompleter(new A._Future(\$.Zone__current, type\$._Future_void), type\$._AsyncCompleter_void), _this.uri, _this.onReconnect, socket, A.StreamController_StreamController(null, null, null, type\$.dynamic));\n" " },\n" -" \$signature: 29\n" +" \$signature: 32\n" " };\n" " A.PersistentWebSocket__listenWithRetry_attemptRetry.prototype = {\n" " call\$1(message) {\n" @@ -18070,7 +18302,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " });\n" " return A._asyncStartSync(\$async\$call\$1, \$async\$completer);\n" " },\n" -" \$signature: 22\n" +" \$signature: 21\n" " };\n" " A.PersistentWebSocket__listenWithRetry_closure.prototype = {\n" " call\$1(e) {\n" @@ -18137,7 +18369,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " });\n" " return A._asyncStartSync(\$async\$call\$1, \$async\$completer);\n" " },\n" -" \$signature: 33\n" +" \$signature: 34\n" " };\n" " A._PersistentWebSocket_Object_StreamChannelMixin.prototype = {};\n" " A.safeUnawaited_closure.prototype = {\n" @@ -18146,7 +18378,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: 7\n" +" \$signature: 6\n" " };\n" " A.Uuid.prototype = {\n" " v4\$0() {\n" @@ -18215,13 +18447,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$2(key1, key2) {\n" " return A._asString(key1).toLowerCase() === A._asString(key2).toLowerCase();\n" " },\n" -" \$signature: 34\n" +" \$signature: 35\n" " };\n" " A.BaseRequest_closure0.prototype = {\n" " call\$1(key) {\n" " return B.JSString_methods.get\$hashCode(A._asString(key).toLowerCase());\n" " },\n" -" \$signature: 35\n" +" \$signature: 36\n" " };\n" " A.BaseResponse.prototype = {\n" " BaseResponse\$7\$contentLength\$headers\$isRedirect\$persistentConnection\$reasonPhrase\$request(statusCode, contentLength, headers, isRedirect, persistentConnection, reasonPhrase, request) {\n" @@ -18316,7 +18548,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }(A._callDartFunctionFast3, t2);\n" " result[\$.\$get\$DART_CLOSURE_DART_JSINTEROP_PROPERTY_NAME()] = t2;\n" " t1.forEach(result);\n" -" t1 = A._bodyToStream(request, response);\n" +" t1 = A._readBody(request, response);\n" " t2 = A._asInt(response.status);\n" " t4 = headers;\n" " t5 = contentLength0;\n" @@ -18375,77 +18607,20 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$2(value, header) {\n" " return this.call\$3(value, header, null);\n" " },\n" -" \$signature: 36\n" -" };\n" -" A._bodyToStream_closure.prototype = {\n" -" call\$1(listener) {\n" -" return A._readStreamBody(this.request, this.response, type\$.MultiStreamController_List_int._as(listener));\n" -" },\n" " \$signature: 37\n" " };\n" -" A._readStreamBody_closure.prototype = {\n" -" call\$0() {\n" -" var t1 = this._box_0,\n" -" _0_0 = t1.resumeSignal;\n" -" if (_0_0 != null) {\n" -" t1.resumeSignal = null;\n" -" _0_0.complete\$0();\n" -" }\n" +" A._readBody_closure.prototype = {\n" +" call\$1(_) {\n" +" return null;\n" " },\n" -" \$signature: 0\n" +" \$signature: 4\n" " };\n" -" A._readStreamBody_closure0.prototype = {\n" -" call\$0() {\n" -" var \$async\$goto = 0,\n" -" \$async\$completer = A._makeAsyncAwaitCompleter(type\$.void),\n" -" \$async\$handler = 1, \$async\$errorStack = [], \$async\$self = this, e, s, exception, \$async\$exception;\n" -" var \$async\$call\$0 = A._wrapJsFunctionForAsync(function(\$async\$errorCode, \$async\$result) {\n" -" if (\$async\$errorCode === 1) {\n" -" \$async\$errorStack.push(\$async\$result);\n" -" \$async\$goto = \$async\$handler;\n" -" }\n" -" for (;;)\n" -" switch (\$async\$goto) {\n" -" case 0:\n" -" // Function start\n" -" \$async\$handler = 3;\n" -" \$async\$self._box_0.cancelled = true;\n" -" \$async\$goto = 6;\n" -" return A._asyncAwait(A.promiseToFuture(A._asJSObject(\$async\$self.reader.cancel()), type\$.nullable_Object), \$async\$call\$0);\n" -" case 6:\n" -" // returning from await.\n" -" \$async\$handler = 1;\n" -" // goto after finally\n" -" \$async\$goto = 5;\n" -" break;\n" -" case 3:\n" -" // catch\n" -" \$async\$handler = 2;\n" -" \$async\$exception = \$async\$errorStack.pop();\n" -" e = A.unwrapException(\$async\$exception);\n" -" s = A.getTraceFromException(\$async\$exception);\n" -" if (!\$async\$self._box_0.hadError)\n" -" A._rethrowAsClientException(e, s, \$async\$self.request);\n" -" // goto after finally\n" -" \$async\$goto = 5;\n" -" break;\n" -" case 2:\n" -" // uncaught\n" -" // goto rethrow\n" -" \$async\$goto = 1;\n" -" break;\n" -" case 5:\n" -" // after finally\n" -" // implicit return\n" -" return A._asyncReturn(null, \$async\$completer);\n" -" case 1:\n" -" // rethrow\n" -" return A._asyncRethrow(\$async\$errorStack.at(-1), \$async\$completer);\n" -" }\n" -" });\n" -" return A._asyncStartSync(\$async\$call\$0, \$async\$completer);\n" +" A._readBody_closure0.prototype = {\n" +" call\$1(_) {\n" +" A._asObject(_);\n" +" return this._box_0.isError;\n" " },\n" -" \$signature: 6\n" +" \$signature: 38\n" " };\n" " A.ByteStream.prototype = {\n" " toBytes\$0() {\n" @@ -18460,7 +18635,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(bytes) {\n" " return this.completer.complete\$1(new Uint8Array(A._ensureNativeList(type\$.List_int._as(bytes))));\n" " },\n" -" \$signature: 38\n" +" \$signature: 39\n" " };\n" " A.ClientException.prototype = {\n" " toString\$0(_) {\n" @@ -18548,7 +18723,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " scanner.expectDone\$0();\n" " return A.MediaType\$(t4, t5, parameters);\n" " },\n" -" \$signature: 39\n" +" \$signature: 40\n" " };\n" " A.MediaType_toString_closure.prototype = {\n" " call\$2(attribute, value) {\n" @@ -18567,13 +18742,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " } else\n" " t1._contents = t3 + value;\n" " },\n" -" \$signature: 40\n" +" \$signature: 41\n" " };\n" " A.MediaType_toString__closure.prototype = {\n" " call\$1(match) {\n" " return \"\\\\\" + A.S(match.\$index(0, 0));\n" " },\n" -" \$signature: 23\n" +" \$signature: 22\n" " };\n" " A.expectQuotedString_closure.prototype = {\n" " call\$1(match) {\n" @@ -18581,7 +18756,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t1.toString;\n" " return t1;\n" " },\n" -" \$signature: 23\n" +" \$signature: 22\n" " };\n" " A.Level.prototype = {\n" " \$eq(_, other) {\n" @@ -18670,7 +18845,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " \$parent._children.\$indexSet(0, thisName, t1);\n" " return t1;\n" " },\n" -" \$signature: 42\n" +" \$signature: 43\n" " };\n" " A.Context.prototype = {\n" " absolute\$15(part1, part2, part3, part4, part5, part6, part7, part8, part9, part10, part11, part12, part13, part14, part15) {\n" @@ -18904,20 +19079,20 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(part) {\n" " return A._asString(part) !== \"\";\n" " },\n" -" \$signature: 24\n" +" \$signature: 23\n" " };\n" " A.Context_split_closure.prototype = {\n" " call\$1(part) {\n" " return A._asString(part).length !== 0;\n" " },\n" -" \$signature: 24\n" +" \$signature: 23\n" " };\n" " A._validateArgList_closure.prototype = {\n" " call\$1(arg) {\n" " A._asStringQ(arg);\n" " return arg == null ? \"null\" : '\"' + arg + '\"';\n" " },\n" -" \$signature: 44\n" +" \$signature: 45\n" " };\n" " A.InternalStyle.prototype = {\n" " getRoot\$1(path) {\n" @@ -19371,7 +19546,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " var t1 = this.\$this;\n" " t1._onReleaseCompleters.removeFirst\$0().complete\$1(new A.PoolResource(t1));\n" " },\n" -" \$signature: 45\n" +" \$signature: 46\n" " };\n" " A.Pool__runOnRelease_closure0.prototype = {\n" " call\$2(error, stackTrace) {\n" @@ -19389,27 +19564,23 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " get\$lines() {\n" " return this._lineStarts.length;\n" " },\n" -" SourceFile\$_fromList\$2\$url(decodedChars, url) {\n" -" var t1, t2, t3, t4, t5, t6, i, c, j, t7;\n" -" for (t1 = this._decodedChars, t2 = t1.length, t3 = decodedChars.__internal\$_string, t4 = t3.length, t5 = t1.\$flags | 0, t6 = this._lineStarts, i = 0; i < t2; ++i) {\n" -" if (!(i < t4))\n" -" return A.ioore(t3, i);\n" -" c = t3.charCodeAt(i);\n" -" t5 & 2 && A.throwUnsupportedOperation(t1);\n" -" t1[i] = c;\n" +" SourceFile\$decoded\$2\$url(decodedChars, url) {\n" +" var t1, t2, t3, i, c, j, t4;\n" +" for (t1 = this._decodedChars, t2 = t1.length, t3 = this._lineStarts, i = 0; i < t2; ++i) {\n" +" c = t1[i];\n" " if (c === 13) {\n" " j = i + 1;\n" -" if (j < t4) {\n" -" if (!(j < t4))\n" -" return A.ioore(t3, j);\n" -" t7 = t3.charCodeAt(j) !== 10;\n" +" if (j < t2) {\n" +" if (!(j < t2))\n" +" return A.ioore(t1, j);\n" +" t4 = t1[j] !== 10;\n" " } else\n" -" t7 = true;\n" -" if (t7)\n" +" t4 = true;\n" +" if (t4)\n" " c = 10;\n" " }\n" " if (c === 10)\n" -" B.JSArray_methods.add\$1(t6, i + 1);\n" +" B.JSArray_methods.add\$1(t3, i + 1);\n" " }\n" " },\n" " getLine\$1(offset) {\n" @@ -19815,7 +19986,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$0() {\n" " return this.color;\n" " },\n" -" \$signature: 46\n" +" \$signature: 47\n" " };\n" " A.Highlighter\$__closure.prototype = {\n" " call\$1(line) {\n" @@ -19823,7 +19994,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t2 = A._arrayInstanceType(t1);\n" " return new A.WhereIterable(t1, t2._eval\$1(\"bool(1)\")._as(new A.Highlighter\$___closure()), t2._eval\$1(\"WhereIterable<1>\")).get\$length(0);\n" " },\n" -" \$signature: 47\n" +" \$signature: 48\n" " };\n" " A.Highlighter\$___closure.prototype = {\n" " call\$1(highlight) {\n" @@ -19836,21 +20007,21 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(line) {\n" " return type\$._Line._as(line).url;\n" " },\n" -" \$signature: 49\n" +" \$signature: 50\n" " };\n" " A.Highlighter__collateLines_closure.prototype = {\n" " call\$1(highlight) {\n" " var t1 = type\$._Highlight._as(highlight).span.get\$sourceUrl();\n" " return t1 == null ? new A.Object() : t1;\n" " },\n" -" \$signature: 50\n" +" \$signature: 51\n" " };\n" " A.Highlighter__collateLines_closure0.prototype = {\n" " call\$2(highlight1, highlight2) {\n" " var t1 = type\$._Highlight;\n" " return t1._as(highlight1).span.compareTo\$1(0, t1._as(highlight2).span);\n" " },\n" -" \$signature: 51\n" +" \$signature: 52\n" " };\n" " A.Highlighter__collateLines_closure1.prototype = {\n" " call\$1(entry) {\n" @@ -19893,7 +20064,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " return lines;\n" " },\n" -" \$signature: 52\n" +" \$signature: 53\n" " };\n" " A.Highlighter__collateLines__closure.prototype = {\n" " call\$1(highlight) {\n" @@ -20004,7 +20175,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t2._contents = t4;\n" " return t4.length - t3.length;\n" " },\n" -" \$signature: 25\n" +" \$signature: 24\n" " };\n" " A.Highlighter__writeIndicator_closure0.prototype = {\n" " call\$0() {\n" @@ -20024,7 +20195,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t1._writeArrow\$3\$beginning(_this.line, Math.max(_this.highlight.span.get\$end().get\$column() - 1, 0), false);\n" " return t2._contents.length - t3.length;\n" " },\n" -" \$signature: 25\n" +" \$signature: 24\n" " };\n" " A.Highlighter__writeSidebar_closure.prototype = {\n" " call\$0() {\n" @@ -20060,7 +20231,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " return A._Highlight__normalizeEndOfLine(A._Highlight__normalizeTrailingNewline(A._Highlight__normalizeNewlines(newSpan)));\n" " },\n" -" \$signature: 54\n" +" \$signature: 55\n" " };\n" " A._Line.prototype = {\n" " toString\$0(_) {\n" @@ -20273,18 +20444,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _this._outgoingController.close\$0();\n" " },\n" " _closeWithError\$1(error) {\n" -" var _0_0, error0, stackTrace, t2,\n" -" t1 = this._incomingController;\n" -" if (t1._state >= 4)\n" -" A.throwExpression(t1._badEventState\$0());\n" -" _0_0 = A._interceptUserError(error, null);\n" -" error0 = _0_0.error;\n" -" stackTrace = _0_0.stackTrace;\n" -" t2 = t1._state;\n" -" if ((t2 & 1) !== 0)\n" -" t1._sendError\$2(error0, stackTrace);\n" -" else if ((t2 & 3) === 0)\n" -" t1._ensurePendingEvents\$0().add\$1(0, new A._DelayedError(error0, stackTrace));\n" +" var t1;\n" +" this._incomingController.addError\$1(error);\n" " this.close\$0();\n" " t1 = this._onConnected;\n" " if ((t1.future._state & 30) === 0)\n" @@ -20438,7 +20599,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " });\n" " return A._asyncStartSync(\$async\$call\$0, \$async\$completer);\n" " },\n" -" \$signature: 57\n" +" \$signature: 58\n" " };\n" " A.StreamChannelMixin.prototype = {};\n" " A.StringScannerException.prototype = {\n" @@ -20485,7 +20646,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this._fail\$1(\"no more input\");\n" " },\n" " error\$3\$length\$position(message, \$length, position) {\n" -" var t2, t3, end, sourceFile, end0,\n" +" var t2, t3, t4, t5, sourceFile, end,\n" " t1 = this.string;\n" " if (position < 0)\n" " A.throwExpression(A.RangeError\$(\"position must be greater than or equal to 0.\"));\n" @@ -20495,16 +20656,17 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " if (t2)\n" " A.throwExpression(A.RangeError\$(\"position plus length must not go beyond the end of the string.\"));\n" " t2 = this.sourceUrl;\n" -" t3 = A._setArrayType([0], type\$.JSArray_int);\n" -" end = t1.length;\n" -" sourceFile = new A.SourceFile(t2, t3, new Uint32Array(end));\n" -" sourceFile.SourceFile\$_fromList\$2\$url(new A.CodeUnits(t1), t2);\n" -" end0 = position + \$length;\n" -" if (end0 > end)\n" -" A.throwExpression(A.RangeError\$(\"End \" + end0 + string\$.x20must_ + sourceFile.get\$length(0) + \".\"));\n" +" t3 = new A.CodeUnits(t1);\n" +" t4 = A._setArrayType([0], type\$.JSArray_int);\n" +" t5 = new Uint32Array(A._ensureNativeList(t3.toList\$0(t3)));\n" +" sourceFile = new A.SourceFile(t2, t4, t5);\n" +" sourceFile.SourceFile\$decoded\$2\$url(t3, t2);\n" +" end = position + \$length;\n" +" if (end > t5.length)\n" +" A.throwExpression(A.RangeError\$(\"End \" + end + string\$.x20must_ + sourceFile.get\$length(0) + \".\"));\n" " else if (position < 0)\n" " A.throwExpression(A.RangeError\$(\"Start may not be negative, was \" + position + \".\"));\n" -" throw A.wrapException(new A.StringScannerException(t1, message, new A._FileSpan(sourceFile, position, end0)));\n" +" throw A.wrapException(new A.StringScannerException(t1, message, new A._FileSpan(sourceFile, position, end)));\n" " },\n" " _fail\$1(\$name) {\n" " this.error\$3\$length\$position(\"expected \" + \$name + \".\", 0, this._string_scanner\$_position);\n" @@ -20810,8 +20972,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " 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" -" t5 = A.StreamController_StreamController(type\$.List_DebugEvent);\n" +" t4 = A.StreamController_StreamController(null, null, null, type\$.DebugEvent);\n" +" t5 = A.StreamController_StreamController(null, null, null, type\$.List_DebugEvent);\n" " debugEventController = new A.BatchedStreamController(t3, 1000, t4, t5, new A._AsyncCompleter(new A._Future(t2, type\$._Future_bool), type\$._AsyncCompleter_bool), type\$.BatchedStreamController_DebugEvent);\n" " t2 = A.List_List\$filled(A.QueueList__computeInitialCapacity(null), null, false, type\$.nullable_Result_DebugEvent);\n" " t3 = A.ListQueue\$(type\$._EventRequest_dynamic);\n" @@ -20833,7 +20995,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " });\n" " return A._asyncStartSync(\$async\$call\$0, \$async\$completer);\n" " },\n" -" \$signature: 6\n" +" \$signature: 9\n" " };\n" " A.main__closure.prototype = {\n" " call\$0() {\n" @@ -20841,13 +21003,13 @@ 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: 5\n" +" \$signature: 7\n" " };\n" " A.main__closure0.prototype = {\n" " call\$0() {\n" " return A.FutureOfVoidToJSPromise_get_toJS(this.manager.hotReloadEnd\$0());\n" " },\n" -" \$signature: 5\n" +" \$signature: 7\n" " };\n" " A.main__closure1.prototype = {\n" " call\$0() {\n" @@ -20855,7 +21017,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " path.toString;\n" " return A.FutureOfJSAnyToJSPromise_get_toJS(this.manager.hotRestartBegin\$1(path), type\$.JSArray_nullable_Object);\n" " },\n" -" \$signature: 5\n" +" \$signature: 7\n" " };\n" " A.main__closure2.prototype = {\n" " call\$2(runId, pauseIsolatesOnStart) {\n" @@ -20875,7 +21037,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(runId) {\n" " return this.call\$2(runId, null);\n" " },\n" -" \$signature: 60\n" +" \$signature: 93\n" " };\n" " A.main__closure3.prototype = {\n" " call\$1(runId) {\n" @@ -20884,7 +21046,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t1 = type\$.dynamic;\n" " A._trySendEvent(this.client.get\$sink(), B.C_JsonCodec.encode\$2\$toEncodable(A._setArrayType([\"HotRestartRequest\", A.LinkedHashMap_LinkedHashMap\$_literal([\"id\", runId], type\$.String, t1)], type\$.JSArray_Object), null), t1);\n" " },\n" -" \$signature: 17\n" +" \$signature: 25\n" " };\n" " A.main__closure4.prototype = {\n" " call\$0() {\n" @@ -20905,7 +21067,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " if (A._asBool(init.G.\$dartEmitDebugEvents))\n" " A._trySendEvent(this.client.get\$sink(), B.C_JsonCodec.encode\$2\$toEncodable(A._setArrayType([\"BatchedDebugEvents\", new A.BatchedDebugEvents(events).toJson\$0()], type\$.JSArray_Object), null), type\$.dynamic);\n" " },\n" -" \$signature: 62\n" +" \$signature: 63\n" " };\n" " A.main__closure6.prototype = {\n" " call\$2(kind, eventData) {\n" @@ -20917,14 +21079,14 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " A._trySendEvent(new A._StreamSinkWrapper(t1, A._instanceType(t1)._eval\$1(\"_StreamSinkWrapper<1>\")), new A.DebugEvent(kind, eventData, Date.now()), type\$.DebugEvent);\n" " }\n" " },\n" -" \$signature: 63\n" +" \$signature: 64\n" " };\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" +" \$signature: 25\n" " };\n" " A.main__closure8.prototype = {\n" " call\$0() {\n" @@ -21128,12 +21290,12 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " });\n" " return A._asyncStartSync(\$async\$call\$1, \$async\$completer);\n" " },\n" -" \$signature: 22\n" +" \$signature: 21\n" " };\n" " A.main__closure10.prototype = {\n" " call\$1(error) {\n" " },\n" -" \$signature: 8\n" +" \$signature: 4\n" " };\n" " A.main__closure11.prototype = {\n" " call\$1(e) {\n" @@ -21152,25 +21314,25 @@ 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: 7\n" +" \$signature: 6\n" " };\n" " A._handleAuthRequest_closure.prototype = {\n" " call\$1(isAuthenticated) {\n" " return A._dispatchEvent(\"dart-auth-response\", \"\" + A._asBool(isAuthenticated));\n" " },\n" -" \$signature: 64\n" +" \$signature: 65\n" " };\n" " A._sendHotReloadResponse_closure.prototype = {\n" " call\$3(id, success, errorMessage) {\n" " return new A.HotReloadResponse(id, success, errorMessage);\n" " },\n" -" \$signature: 65\n" +" \$signature: 66\n" " };\n" " A._sendHotRestartResponse_closure.prototype = {\n" " call\$3(id, success, errorMessage) {\n" " return new A.HotRestartResponse(id, success, errorMessage);\n" " },\n" -" \$signature: 66\n" +" \$signature: 67\n" " };\n" " A.DdcLibraryBundleRestarter.prototype = {\n" " _runMainWhenReady\$2(readyToRunMain, runMain) {\n" @@ -21315,7 +21477,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " hotReloadStart\$1(reloadedSourcesPath) {\n" " var \$async\$goto = 0,\n" " \$async\$completer = A._makeAsyncAwaitCompleter(type\$.JSArray_nullable_Object),\n" -" \$async\$returnValue, \$async\$self = this, t3, t4, t5, t6, srcModuleLibraryCast, src, libraries, t7, t8, t9, t1, t2, filesToLoad, librariesToReload, srcModuleLibraries;\n" +" \$async\$returnValue, \$async\$self = this, t3, t4, t5, t6, srcModuleLibraryCast, src, libraries, t7, t8, t9, result, t1, t2, filesToLoad, librariesToReload, srcModuleLibraries;\n" " var \$async\$hotReloadStart\$1 = A._wrapJsFunctionForAsync(function(\$async\$errorCode, \$async\$result) {\n" " if (\$async\$errorCode === 1)\n" " return A._asyncRethrow(\$async\$result, \$async\$completer);\n" @@ -21349,6 +21511,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return A._asyncAwait(A.promiseToFuture(A._asJSObject(A._asJSObject(t1.dartDevEmbedder).hotReload(filesToLoad, librariesToReload)), type\$.nullable_Object), \$async\$hotReloadStart\$1);\n" " case 4:\n" " // returning from await.\n" +" result = \$async\$result;\n" +" A._asJSObject(A._asJSObject(A._asJSObject(t1.dartDevEmbedder).debugger).invokeExtension(\"ext.dwds.sendEvent\", '{\"type\": \"hotReloadResult\", \"result\": \"' + A.S(result) + '\"}'));\n" +" if (result != null && typeof result === \"boolean\" && !A._asBool(result))\n" +" throw A.wrapException(A.Exception_Exception(\"Hot reload rejected by DDC\"));\n" " \$async\$returnValue = t2._as(A.jsify(srcModuleLibraries));\n" " // goto return\n" " \$async\$goto = 1;\n" @@ -21537,7 +21703,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this.sub.cancel\$0();\n" " return value;\n" " },\n" -" \$signature: 68\n" +" \$signature: 69\n" " };\n" " A.ReloadingManager.prototype = {\n" " hotRestart\$3\$readyToRunMain\$reloadedSourcesPath\$runId(readyToRunMain, reloadedSourcesPath, runId) {\n" @@ -21890,7 +22056,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _reload\$body\$RequireRestarter(modules) {\n" " var \$async\$goto = 0,\n" " \$async\$completer = A._makeAsyncAwaitCompleter(type\$.bool),\n" -" \$async\$returnValue, \$async\$handler = 2, \$async\$errorStack = [], \$async\$self = this, reloadedModules, moduleId, parentIds, e, _box_0, t4, t5, t6, t7, t8, t9, t10, _this, parentIds0, result, exception, t1, t2, dart, t3, \$async\$exception;\n" +" \$async\$returnValue, \$async\$handler = 2, \$async\$errorStack = [], \$async\$self = this, reloadedModules, moduleId, parentIds, e, _box_0, t4, t5, t6, t7, t8, t9, _this, parentIds0, exception, t1, t2, dart, t3, \$async\$exception;\n" " var \$async\$_reload\$1 = A._wrapJsFunctionForAsync(function(\$async\$errorCode, \$async\$result) {\n" " if (\$async\$errorCode === 1) {\n" " \$async\$errorStack.push(\$async\$result);\n" @@ -21926,57 +22092,48 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t3 === \$ && A.throwLateFieldNI(\"_dirtyModules\");\n" " t3.addAll\$1(0, modules);\n" " _box_0.previousModuleId = null;\n" -" t3 = \$async\$self.get\$_moduleTopologicalCompare(), t4 = type\$.String, t5 = type\$.nullable_JSArray_nullable_Object, t6 = type\$.JSArray_String, t7 = A._callDartFunctionFast0;\n" +" t3 = \$async\$self.get\$_moduleTopologicalCompare(), t4 = type\$.String, t5 = type\$.nullable_JSArray_nullable_Object, t6 = type\$.JSArray_String;\n" " case 10:\n" " // for condition\n" -" if (!(t8 = \$async\$self.__RequireRestarter__dirtyModules_A, t9 = t8._root, t10 = t9 == null, !t10)) {\n" +" if (!(t7 = \$async\$self.__RequireRestarter__dirtyModules_A, t8 = t7._root, t9 = t8 == null, !t9)) {\n" " // goto after for\n" " \$async\$goto = 11;\n" " break;\n" " }\n" -" if (t10)\n" +" if (t9)\n" " A.throwExpression(A.IterableElementError_noElement());\n" -" t9 = t8._splayMin\$1(t9);\n" -" t8._root = t9;\n" -" moduleId = t9.key;\n" +" t8 = t7._splayMin\$1(t8);\n" +" t7._root = t8;\n" +" moduleId = t8.key;\n" " \$async\$self.__RequireRestarter__dirtyModules_A.remove\$1(0, moduleId);\n" " _this = A._asString(moduleId);\n" -" t9 = t5._as(t2._as(t2._as(t1.\$requireLoader).moduleParentsGraph).get(_this));\n" -" if (t9 == null)\n" +" t8 = t5._as(t2._as(t2._as(t1.\$requireLoader).moduleParentsGraph).get(_this));\n" +" if (t8 == null)\n" " parentIds0 = null;\n" " else {\n" -" t8 = A.JSArrayExtension_toDartIterable(t9, t4);\n" -" t8 = A.List_List\$_of(t8, t8.\$ti._eval\$1(\"ListIterable.E\"));\n" -" parentIds0 = t8;\n" +" t7 = A.JSArrayExtension_toDartIterable(t8, t4);\n" +" t7 = A.List_List\$_of(t7, t7.\$ti._eval\$1(\"ListIterable.E\"));\n" +" parentIds0 = t7;\n" " }\n" " parentIds = parentIds0 == null ? A._setArrayType([], t6) : parentIds0;\n" " \$async\$goto = J.get\$length\$asx(parentIds) === 0 ? 12 : 14;\n" " break;\n" " case 12:\n" " // then\n" -" t8 = new A.RequireRestarter__reload_closure(_box_0, dart);\n" -" if (typeof t8 == \"function\")\n" -" A.throwExpression(A.ArgumentError\$(\"Attempting to rewrap a JS function.\", null));\n" -" result = function(_call, f) {\n" -" return function() {\n" -" return _call(f);\n" -" };\n" -" }(t7, t8);\n" -" result[\$.\$get\$DART_CLOSURE_DART_JSINTEROP_PROPERTY_NAME()] = t8;\n" -" t1.\$dartRunMain = result;\n" +" t1.\$dartRunMain = A._functionToJS0(new A.RequireRestarter__reload_closure(_box_0, dart));\n" " // goto join\n" " \$async\$goto = 13;\n" " break;\n" " case 14:\n" " // else\n" -" t8 = reloadedModules;\n" -" if (typeof t8 !== \"number\") {\n" -" \$async\$returnValue = t8.\$add();\n" +" t7 = reloadedModules;\n" +" if (typeof t7 !== \"number\") {\n" +" \$async\$returnValue = t7.\$add();\n" " // goto return\n" " \$async\$goto = 1;\n" " break;\n" " }\n" -" reloadedModules = t8 + 1;\n" +" reloadedModules = t7 + 1;\n" " \$async\$goto = 15;\n" " return A._asyncAwait(\$async\$self._reloadModule\$1(moduleId), \$async\$_reload\$1);\n" " case 15:\n" @@ -22077,7 +22234,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(e) {\n" " this.completer.completeError\$2(new A.HotReloadFailedException(A._asString(type\$.JavaScriptObject._as(e).message)), this.stackTrace);\n" " },\n" -" \$signature: 71\n" +" \$signature: 72\n" " };\n" " A._createScript_closure.prototype = {\n" " call\$0() {\n" @@ -22086,13 +22243,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return new A._createScript__closure();\n" " return new A._createScript__closure0(nonce);\n" " },\n" -" \$signature: 72\n" +" \$signature: 73\n" " };\n" " A._createScript__closure.prototype = {\n" " call\$0() {\n" " return A._asJSObject(A._asJSObject(init.G.document).createElement(\"script\"));\n" " },\n" -" \$signature: 5\n" +" \$signature: 7\n" " };\n" " A._createScript__closure0.prototype = {\n" " call\$0() {\n" @@ -22100,7 +22257,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " scriptElement.setAttribute(\"nonce\", this.nonce);\n" " return scriptElement;\n" " },\n" -" \$signature: 5\n" +" \$signature: 7\n" " };\n" " A.runMain_closure.prototype = {\n" " call\$0() {\n" @@ -22145,44 +22302,47 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _instance_0_u = hunkHelpers._instance_0u,\n" " _instance_1_i = hunkHelpers._instance_1i;\n" " _static_2(J, \"_interceptors_JSArray__compareAny\$closure\", \"JSArray__compareAny\", 27);\n" -" _instance_1_u(A.CastStreamSubscription.prototype, \"get\$__internal\$_onData\", \"__internal\$_onData\$1\", 11);\n" +" _instance_1_u(A.CastStreamSubscription.prototype, \"get\$__internal\$_onData\", \"__internal\$_onData\$1\", 8);\n" " _static_1(A, \"async__AsyncRun__scheduleImmediateJsOverride\$closure\", \"_AsyncRun__scheduleImmediateJsOverride\", 14);\n" " _static_1(A, \"async__AsyncRun__scheduleImmediateWithSetImmediate\$closure\", \"_AsyncRun__scheduleImmediateWithSetImmediate\", 14);\n" " _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\", 7);\n" +" _static_1(A, \"async___nullDataHandler\$closure\", \"_nullDataHandler\", 5);\n" +" _static_2(A, \"async___nullErrorHandler\$closure\", \"_nullErrorHandler\", 6);\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___rootHandleUncaughtError\$closure\", 5, null, [\"call\$5\"], [\"_rootHandleUncaughtError\"], 76, 0);\n" " _static(A, \"async___rootRun\$closure\", 4, null, [\"call\$1\$4\", \"call\$4\"], [\"_rootRun\", function(\$self, \$parent, zone, f) {\n" " return A._rootRun(\$self, \$parent, zone, f, type\$.dynamic);\n" -" }], 76, 0);\n" +" }], 77, 0);\n" " _static(A, \"async___rootRunUnary\$closure\", 5, null, [\"call\$2\$5\", \"call\$5\"], [\"_rootRunUnary\", function(\$self, \$parent, zone, f, arg) {\n" " var t1 = type\$.dynamic;\n" " return A._rootRunUnary(\$self, \$parent, zone, f, arg, t1, t1);\n" -" }], 77, 0);\n" -" _static(A, \"async___rootRunBinary\$closure\", 6, null, [\"call\$3\$6\"], [\"_rootRunBinary\"], 78, 0);\n" +" }], 78, 0);\n" +" _static(A, \"async___rootRunBinary\$closure\", 6, null, [\"call\$3\$6\"], [\"_rootRunBinary\"], 79, 0);\n" " _static(A, \"async___rootRegisterCallback\$closure\", 4, null, [\"call\$1\$4\", \"call\$4\"], [\"_rootRegisterCallback\", function(\$self, \$parent, zone, f) {\n" " return A._rootRegisterCallback(\$self, \$parent, zone, f, type\$.dynamic);\n" -" }], 79, 0);\n" +" }], 80, 0);\n" " _static(A, \"async___rootRegisterUnaryCallback\$closure\", 4, null, [\"call\$2\$4\", \"call\$4\"], [\"_rootRegisterUnaryCallback\", function(\$self, \$parent, zone, f) {\n" " var t1 = type\$.dynamic;\n" " return A._rootRegisterUnaryCallback(\$self, \$parent, zone, f, t1, t1);\n" -" }], 80, 0);\n" +" }], 81, 0);\n" " _static(A, \"async___rootRegisterBinaryCallback\$closure\", 4, null, [\"call\$3\$4\", \"call\$4\"], [\"_rootRegisterBinaryCallback\", function(\$self, \$parent, zone, f) {\n" " var t1 = type\$.dynamic;\n" " return A._rootRegisterBinaryCallback(\$self, \$parent, zone, f, t1, t1, t1);\n" -" }], 81, 0);\n" -" _static(A, \"async___rootErrorCallback\$closure\", 5, null, [\"call\$5\"], [\"_rootErrorCallback\"], 82, 0);\n" -" _static(A, \"async___rootScheduleMicrotask\$closure\", 4, null, [\"call\$4\"], [\"_rootScheduleMicrotask\"], 83, 0);\n" -" _static(A, \"async___rootCreateTimer\$closure\", 5, null, [\"call\$5\"], [\"_rootCreateTimer\"], 84, 0);\n" -" _static(A, \"async___rootCreatePeriodicTimer\$closure\", 5, null, [\"call\$5\"], [\"_rootCreatePeriodicTimer\"], 85, 0);\n" -" _static(A, \"async___rootPrint\$closure\", 4, null, [\"call\$4\"], [\"_rootPrint\"], 86, 0);\n" -" _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\", 7);\n" +" }], 82, 0);\n" +" _static(A, \"async___rootErrorCallback\$closure\", 5, null, [\"call\$5\"], [\"_rootErrorCallback\"], 83, 0);\n" +" _static(A, \"async___rootScheduleMicrotask\$closure\", 4, null, [\"call\$4\"], [\"_rootScheduleMicrotask\"], 84, 0);\n" +" _static(A, \"async___rootCreateTimer\$closure\", 5, null, [\"call\$5\"], [\"_rootCreateTimer\"], 85, 0);\n" +" _static(A, \"async___rootCreatePeriodicTimer\$closure\", 5, null, [\"call\$5\"], [\"_rootCreatePeriodicTimer\"], 86, 0);\n" +" _static(A, \"async___rootPrint\$closure\", 4, null, [\"call\$4\"], [\"_rootPrint\"], 87, 0);\n" +" _static_1(A, \"async___printToZone\$closure\", \"_printToZone0\", 88);\n" +" _static(A, \"async___rootFork\$closure\", 5, null, [\"call\$5\"], [\"_rootFork\"], 89, 0);\n" +" _instance(A._Completer.prototype, \"get\$completeError\", 0, 1, null, [\"call\$2\", \"call\$1\"], [\"completeError\$2\", \"completeError\$1\"], 62, 0, 0);\n" +" _instance_2_u(A._Future.prototype, \"get\$_completeError\", \"_completeError\$2\", 6);\n" " var _;\n" +" _instance_1_u(_ = A._StreamController.prototype, \"get\$_add\", \"_add\$1\", 8);\n" +" _instance_2_u(_, \"get\$_addError\", \"_addError\$2\", 6);\n" +" _instance_0_u(_, \"get\$_close\", \"_close\$0\", 0);\n" " _instance_0_u(_ = A._ControllerSubscription.prototype, \"get\$_onPause\", \"_onPause\$0\", 0);\n" " _instance_0_u(_, \"get\$_onResume\", \"_onResume\$0\", 0);\n" " _instance_0_u(_ = A._BufferingStreamSubscription.prototype, \"get\$_onPause\", \"_onPause\$0\", 0);\n" @@ -22190,59 +22350,58 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _instance_0_u(A._DoneStreamSubscription.prototype, \"get\$_onMicrotask\", \"_onMicrotask\$0\", 0);\n" " _instance_0_u(_ = A._ForwardingStreamSubscription.prototype, \"get\$_onPause\", \"_onPause\$0\", 0);\n" " _instance_0_u(_, \"get\$_onResume\", \"_onResume\$0\", 0);\n" -" _instance_1_u(_, \"get\$_handleData\", \"_handleData\$1\", 11);\n" -" _instance_2_u(_, \"get\$_handleError\", \"_handleError\$2\", 92);\n" +" _instance_1_u(_, \"get\$_handleData\", \"_handleData\$1\", 8);\n" +" _instance_2_u(_, \"get\$_handleError\", \"_handleError\$2\", 33);\n" " _instance_0_u(_, \"get\$_handleDone\", \"_handleDone\$0\", 0);\n" " _static_2(A, \"collection___defaultEquals\$closure\", \"_defaultEquals0\", 28);\n" " _static_1(A, \"collection___defaultHashCode\$closure\", \"_defaultHashCode\", 15);\n" " _static_2(A, \"collection_ListBase__compareAny\$closure\", \"ListBase__compareAny\", 27);\n" " _static_1(A, \"convert___defaultToEncodable\$closure\", \"_defaultToEncodable\", 16);\n" -" _instance_1_i(_ = A._ByteCallbackSink.prototype, \"get\$add\", \"add\$1\", 11);\n" +" _instance_1_i(_ = A._ByteCallbackSink.prototype, \"get\$add\", \"add\$1\", 8);\n" " _instance_0_u(_, \"get\$close\", \"close\$0\", 0);\n" " _static_1(A, \"core__identityHashCode\$closure\", \"identityHashCode\", 15);\n" " _static_2(A, \"core__identical\$closure\", \"identical\", 28);\n" -" _static_1(A, \"core_Uri_decodeComponent\$closure\", \"Uri_decodeComponent\", 9);\n" +" _static_1(A, \"core_Uri_decodeComponent\$closure\", \"Uri_decodeComponent\", 10);\n" " _static(A, \"math__max\$closure\", 2, null, [\"call\$1\$2\", \"call\$2\"], [\"max\", function(a, b) {\n" " 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\", 6);\n" -" _static_1(A, \"case_insensitive_map_CaseInsensitiveMap__canonicalizer\$closure\", \"CaseInsensitiveMap__canonicalizer\", 9);\n" +" }], 92, 0);\n" +" _instance_1_u(_ = A.PersistentWebSocket.prototype, \"get\$_writeToWebSocket\", \"_writeToWebSocket\$1\", 5);\n" +" _instance_0_u(_, \"get\$_listenWithRetry\", \"_listenWithRetry\$0\", 9);\n" +" _static_1(A, \"case_insensitive_map_CaseInsensitiveMap__canonicalizer\$closure\", \"CaseInsensitiveMap__canonicalizer\", 10);\n" " _instance_1_u(_ = A.SseClient.prototype, \"get\$_onIncomingControlMessage\", \"_onIncomingControlMessage\$1\", 2);\n" " _instance_1_u(_, \"get\$_onIncomingMessage\", \"_onIncomingMessage\$1\", 2);\n" " _instance_0_u(_, \"get\$_onOutgoingDone\", \"_onOutgoingDone\$0\", 0);\n" -" _instance_1_u(_, \"get\$_onOutgoingMessage\", \"_onOutgoingMessage\$1\", 56);\n" +" _instance_1_u(_, \"get\$_onOutgoingMessage\", \"_onOutgoingMessage\$1\", 57);\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" +" _instance_1_u(_ = A.RequireRestarter.prototype, \"get\$_moduleParents\", \"_moduleParents\$1\", 70);\n" +" _instance_2_u(_, \"get\$_moduleTopologicalCompare\", \"_moduleTopologicalCompare\$2\", 71);\n" " })();\n" " (function inheritance() {\n" " var _mixin = hunkHelpers.mixin,\n" " _inherit = hunkHelpers.inherit,\n" " _inheritMany = hunkHelpers.inheritMany;\n" " _inherit(A.Object, null);\n" -" _inheritMany(A.Object, [A.JS_CONST, J.Interceptor, A.SafeToStringHook, J.ArrayIterator, A.Stream, A.CastStreamSubscription, A.Iterable, A.CastIterator, A.Closure, A.MapBase, A.Error, A.ListBase, A.SentinelValue, A.ListIterator, A.MappedIterator, A.WhereIterator, A.ExpandIterator, A.TakeIterator, A.SkipIterator, A.EmptyIterator, A.WhereTypeIterator, A.FixedLengthListMixin, A.UnmodifiableListMixin, A._Record, A.ConstantMap, A._KeysOrValuesOrElementsIterator, A.TypeErrorDecoder, A.NullThrownFromJavaScriptException, A.ExceptionAndStackTrace, A._StackTrace, A.LinkedHashMapCell, A.LinkedHashMapKeyIterator, A.LinkedHashMapValueIterator, A.LinkedHashMapEntryIterator, A.JSSyntaxRegExp, A._MatchImplementation, A._AllMatchesIterator, A.StringMatch, A._StringAllMatchesIterator, A._Cell, A._UnmodifiableNativeByteBufferView, A.Rti, A._FunctionParameters, A._Type, A._TimerImpl, A._AsyncAwaitCompleter, A.AsyncError, A._Completer, A._FutureListener, A._Future, A._AsyncCallbackEntry, A._StreamController, A._AsyncStreamControllerDispatch, A._BufferingStreamSubscription, A._StreamSinkWrapper, A._DelayedEvent, A._DelayedDone, A._PendingEvents, A._DoneStreamSubscription, A._StreamIterator, A._ZoneFunction, A._Zone, A._ZoneDelegate, A._ZoneSpecification, A._HashMapKeyIterator, A.SetBase, A._HashSetIterator, A._UnmodifiableMapMixin, A.MapView, A._ListQueueIterator, A._SplayTreeNode, A._SplayTree, A._SplayTreeIterator, A.Codec, A.Converter, A.ByteConversionSink, A._JsonStringifier, A._Utf8Encoder, A._Utf8Decoder, A.DateTime, A.Duration, A._Enum, A.OutOfMemoryError, A.StackOverflowError, A._Exception, A.FormatException, A.MapEntry, A.Null, A._StringStackTrace, A.StringBuffer, A._Uri, A.UriData, A._SimpleUri, A.NullRejectionException, A._JSRandom, A._JSSecureRandom, A.AsyncMemoizer, A.ErrorResult, A.ValueResult, A.StreamQueue, A._NextRequest, A._HasNextRequest, A.CanonicalizedMap, A._QueueList_Object_ListMixin, A.BuildResult, A.ConnectRequest, A.DebugEvent, A.BatchedDebugEvents, A.DebugInfo, A.DevToolsRequest, A.DevToolsResponse, A.ErrorResponse, A.HotReloadRequest, A.HotReloadResponse, A.HotRestartRequest, A.HotRestartResponse, A.PingRequest, A.RegisterEvent, A.RunRequest, A.ServiceExtensionRequest, A.ServiceExtensionResponse, A.BatchedStreamController, A.SocketClient, A._PersistentWebSocket_Object_StreamChannelMixin, A.Uuid, A._StackState, A.ClientException, A.BaseClient, A.BaseRequest, A.BaseResponse, A.MediaType, A.Level, A.LogRecord, A.Logger, A.Context, A.Style, A.ParsedPath, A.PathException, A.Pool, A.PoolResource, A.SourceFile, A.SourceLocationMixin, A.SourceSpanMixin, A.Highlighter, A._Highlight, A._Line, A.SourceLocation, A.SourceSpanException, A.StreamChannelMixin, A.StringScanner, A.EventStreamProvider, A._EventStreamSubscription, A.BrowserWebSocket, A.WebSocketEvent, A.WebSocketException, A.DdcLibraryBundleRestarter, A.DdcRestarter, A.ReloadingManager, A.HotReloadFailedException, A.RequireRestarter]);\n" +" _inheritMany(A.Object, [A.JS_CONST, J.Interceptor, A.SafeToStringHook, J.ArrayIterator, A.Stream, A.CastStreamSubscription, A.Iterable, A.CastIterator, A.Closure, A.MapBase, A.Error, A.ListBase, A.SentinelValue, A.ListIterator, A.MappedIterator, A.WhereIterator, A.ExpandIterator, A.TakeIterator, A.SkipIterator, A.EmptyIterator, A.WhereTypeIterator, A.FixedLengthListMixin, A.UnmodifiableListMixin, A._Record, A.ConstantMap, A._KeysOrValuesOrElementsIterator, A.TypeErrorDecoder, A.NullThrownFromJavaScriptException, A.ExceptionAndStackTrace, A._StackTrace, A.LinkedHashMapCell, A.LinkedHashMapKeyIterator, A.LinkedHashMapValueIterator, A.LinkedHashMapEntryIterator, A.JSSyntaxRegExp, A._MatchImplementation, A._AllMatchesIterator, A.StringMatch, A._StringAllMatchesIterator, A._Cell, A._UnmodifiableNativeByteBufferView, A.Rti, A._FunctionParameters, A._Type, A._TimerImpl, A._AsyncAwaitCompleter, A._AsyncStarStreamController, A._IterationMarker, A.AsyncError, A._Completer, A._FutureListener, A._Future, A._AsyncCallbackEntry, A._StreamController, A._AsyncStreamControllerDispatch, A._BufferingStreamSubscription, A._StreamSinkWrapper, A._AddStreamState, A._DelayedEvent, A._DelayedDone, A._PendingEvents, A._DoneStreamSubscription, A._StreamIterator, A._ZoneFunction, A._Zone, A._ZoneDelegate, A._ZoneSpecification, A._HashMapKeyIterator, A.SetBase, A._HashSetIterator, A._UnmodifiableMapMixin, A.MapView, A._ListQueueIterator, A._SplayTreeNode, A._SplayTree, A._SplayTreeIterator, A.Codec, A.Converter, A.ByteConversionSink, A._JsonStringifier, A._Utf8Encoder, A._Utf8Decoder, A.DateTime, A.Duration, A._Enum, A.OutOfMemoryError, A.StackOverflowError, A._Exception, A.FormatException, A.MapEntry, A.Null, A._StringStackTrace, A.StringBuffer, A._Uri, A.UriData, A._SimpleUri, A.NullRejectionException, A._JSRandom, A._JSSecureRandom, A.AsyncMemoizer, A.ErrorResult, A.ValueResult, A.StreamQueue, A._NextRequest, A._HasNextRequest, A.CanonicalizedMap, A._QueueList_Object_ListMixin, A.BuildResult, A.ConnectRequest, A.DebugEvent, A.BatchedDebugEvents, A.DebugInfo, A.DevToolsRequest, A.DevToolsResponse, A.ErrorResponse, A.HotReloadRequest, A.HotReloadResponse, A.HotRestartRequest, A.HotRestartResponse, A.PingRequest, A.RegisterEvent, A.RunRequest, A.ServiceExtensionRequest, A.ServiceExtensionResponse, A.BatchedStreamController, A.SocketClient, A._PersistentWebSocket_Object_StreamChannelMixin, A.Uuid, A._StackState, A.ClientException, A.BaseClient, A.BaseRequest, A.BaseResponse, A.MediaType, A.Level, A.LogRecord, A.Logger, A.Context, A.Style, A.ParsedPath, A.PathException, A.Pool, A.PoolResource, A.SourceFile, A.SourceLocationMixin, A.SourceSpanMixin, A.Highlighter, A._Highlight, A._Line, A.SourceLocation, A.SourceSpanException, A.StreamChannelMixin, A.StringScanner, A.EventStreamProvider, A._EventStreamSubscription, A.BrowserWebSocket, A.WebSocketEvent, A.WebSocketException, A.DdcLibraryBundleRestarter, A.DdcRestarter, A.ReloadingManager, A.HotReloadFailedException, A.RequireRestarter]);\n" " _inheritMany(J.Interceptor, [J.JSBool, J.JSNull, J.JavaScriptObject, J.JavaScriptBigInt, J.JavaScriptSymbol, J.JSNumber, J.JSString]);\n" " _inheritMany(J.JavaScriptObject, [J.LegacyJavaScriptObject, J.JSArray, A.NativeByteBuffer, A.NativeTypedData]);\n" " _inheritMany(J.LegacyJavaScriptObject, [J.PlainJavaScriptObject, J.UnknownJavaScriptObject, J.JavaScriptFunction]);\n" " _inherit(J.JSArraySafeToStringHook, A.SafeToStringHook);\n" " _inherit(J.JSUnmodifiableArray, J.JSArray);\n" " _inheritMany(J.JSNumber, [J.JSInt, J.JSNumNotInt]);\n" -" _inheritMany(A.Stream, [A.CastStream, A.StreamView, A._StreamImpl, A._EmptyStream, A._MultiStream, A._ForwardingStream, A._EventStream]);\n" +" _inheritMany(A.Stream, [A.CastStream, A.StreamView, A._StreamImpl, A._EmptyStream, A._ForwardingStream, A._EventStream]);\n" " _inheritMany(A.Iterable, [A._CastIterableBase, A.EfficientLengthIterable, A.MappedIterable, A.WhereIterable, A.ExpandIterable, A.TakeIterable, A.SkipIterable, A.WhereTypeIterable, A._KeysOrValues, A._AllMatchesIterable, A._StringAllMatchesIterable]);\n" -" _inheritMany(A._CastIterableBase, [A.CastIterable, A.__CastListBase__CastIterableBase_ListMixin]);\n" +" _inheritMany(A._CastIterableBase, [A.CastIterable, A._CastList__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__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" +" _inherit(A.CastList, A._CastList__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._asyncStarHelper_closure0, 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._readBody_closure, A._readBody_closure0, 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.CastList_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._AddStreamState_makeErrorHandler_closure, 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" " _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__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.Closure0Args, [A.nullFuture_closure, A._AsyncRun__scheduleImmediateJsOverride_internalCallback, A._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, A._TimerImpl_internalCallback, A._TimerImpl\$periodic_closure, A._asyncStarHelper_closure, A._AsyncStarStreamController__resumeBody, A._AsyncStarStreamController__resumeBody_closure, A._AsyncStarStreamController_closure0, A._AsyncStarStreamController_closure1, A._AsyncStarStreamController_closure, A._AsyncStarStreamController__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._AddStreamState_cancel_closure, A._BufferingStreamSubscription_asFuture_closure, A._BufferingStreamSubscription_asFuture__closure, A._BufferingStreamSubscription__sendError_sendError, A._BufferingStreamSubscription__sendDone_sendDone, A._PendingEvents_schedule_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.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" @@ -22269,8 +22428,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _inherit(A._AsyncStreamController, A._StreamController);\n" " _inherit(A._ControllerStream, A._StreamImpl);\n" " _inheritMany(A._BufferingStreamSubscription, [A._ControllerSubscription, A._ForwardingStreamSubscription]);\n" +" _inherit(A._StreamControllerAddStreamState, A._AddStreamState);\n" " _inheritMany(A._DelayedEvent, [A._DelayedData, A._DelayedError]);\n" -" _inherit(A._MultiStreamController, A._AsyncStreamController);\n" " _inherit(A._MapStream, A._ForwardingStream);\n" " _inheritMany(A._Zone, [A._CustomZone, A._RootZone]);\n" " _inherit(A._IdentityHashMap, A._HashMap);\n" @@ -22316,7 +22475,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _inheritMany(A.WebSocketEvent, [A.TextDataReceived, A.BinaryDataReceived, A.CloseReceived]);\n" " _inherit(A.WebSocketConnectionClosed, A.WebSocketException);\n" " _mixin(A.UnmodifiableListBase, A.UnmodifiableListMixin);\n" -" _mixin(A.__CastListBase__CastIterableBase_ListMixin, A.ListBase);\n" +" _mixin(A._CastList__CastIterableBase_ListMixin, A.ListBase);\n" " _mixin(A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin, A.ListBase);\n" " _mixin(A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin, A.FixedLengthListMixin);\n" " _mixin(A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin, A.ListBase);\n" @@ -22333,7 +22492,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)\", \"~(@)\", \"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" +" types: [\"~()\", \"Null()\", \"~(JSObject)\", \"Null(Object,StackTrace)\", \"Null(@)\", \"~(@)\", \"~(Object,StackTrace)\", \"JSObject()\", \"~(Object?)\", \"Future<~>()\", \"String(String)\", \"Object?(Object?)\", \"bool(_Highlight)\", \"Null(JSObject)\", \"~(~())\", \"int(Object?)\", \"@(@)\", \"~(Object?,Object?)\", \"@()\", \"Null(JavaScriptFunction,JavaScriptFunction)\", \"bool()\", \"Future<~>(String)\", \"String(Match)\", \"bool(String)\", \"int()\", \"Null(String)\", \"Null(JavaScriptFunction)\", \"int(@,@)\", \"bool(Object?,Object?)\", \"String(@)\", \"@(String)\", \"@(@,String)\", \"PersistentWebSocket(WebSocket)\", \"~(@,StackTrace)\", \"Future<~>(WebSocketEvent)\", \"bool(String,String)\", \"int(String)\", \"Null(String,String[Object?])\", \"bool(Object)\", \"~(List)\", \"MediaType()\", \"~(String,String)\", \"~(Zone,ZoneDelegate,Zone,Object,StackTrace)\", \"Logger()\", \"bool(Object?)\", \"String(String?)\", \"Null(~)\", \"String?()\", \"int(_Line)\", \"Null(~())\", \"Object(_Line)\", \"Object(_Highlight)\", \"int(_Highlight,_Highlight)\", \"List<_Line>(MapEntry>)\", \"Null(@,StackTrace)\", \"SourceSpanWithContext()\", \"0&(String,int?)\", \"~(String?)\", \"Future()\", \"~(int,@)\", \"_Future<@>?()\", \"~(StreamSink<@>)\", \"~(Object[StackTrace?])\", \"~(List)\", \"Null(String,String)\", \"~(bool)\", \"HotReloadResponse(String,bool,String?)\", \"HotRestartResponse(String,bool,String?)\", \"JSObject(Object,StackTrace)\", \"bool(bool)\", \"List(String)\", \"int(String,String)\", \"Null(JavaScriptObject)\", \"JSObject()()\", \"Object?(~)\", \"bool(BuildStatus)\", \"~(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?)\", \"0&()\", \"Map(DebugEvent)\", \"0^(0^,0^)\", \"JSObject(String[bool?])\"],\n" " interceptorsByTag: null,\n" " leafTags: null,\n" " arrayRti: Symbol(\"\$ti\"),\n" @@ -22341,8 +22500,8 @@ 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\":{\"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" +" 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\"},\"CastList\":{\"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\":[]},\"_Future\":{\"Future\":[\"1\"]},\"_TimerImpl\":{\"Timer\":[]},\"_AsyncAwaitCompleter\":{\"Completer\":[\"1\"]},\"_Completer\":{\"Completer\":[\"1\"]},\"_AsyncCompleter\":{\"_Completer\":[\"1\"],\"Completer\":[\"1\"]},\"_SyncCompleter\":{\"_Completer\":[\"1\"],\"Completer\":[\"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\"]},\"_StreamControllerAddStreamState\":{\"_AddStreamState\":[\"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\"},\"_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,\"_CastList__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" " x20must_: \" must not be greater than the number of characters in the file, \",\n" @@ -22417,7 +22576,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " Map_dynamic_dynamic: findType(\"Map<@,@>\"),\n" " MappedListIterable_String_dynamic: findType(\"MappedListIterable\"),\n" " MediaType: findType(\"MediaType\"),\n" -" MultiStreamController_List_int: findType(\"MultiStreamController>\"),\n" " NativeArrayBuffer: findType(\"NativeArrayBuffer\"),\n" " NativeTypedArrayOfInt: findType(\"NativeTypedArrayOfInt\"),\n" " NativeUint8List: findType(\"NativeUint8List\"),\n" @@ -22439,6 +22597,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " SplayTreeSet_String: findType(\"SplayTreeSet\"),\n" " StackTrace: findType(\"StackTrace\"),\n" " StreamQueue_DebugEvent: findType(\"StreamQueue\"),\n" +" Stream_dynamic: findType(\"Stream<@>\"),\n" " StreamedResponse: findType(\"StreamedResponse\"),\n" " String: findType(\"String\"),\n" " String_Function_Match: findType(\"String(Match)\"),\n" @@ -22478,7 +22637,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _Highlight: findType(\"_Highlight\"),\n" " _IdentityHashMap_of_nullable_Object_and_nullable_Object: findType(\"_IdentityHashMap\"),\n" " _Line: findType(\"_Line\"),\n" -" _MultiStream_List_int: findType(\"_MultiStream>\"),\n" " _StreamControllerAddStreamState_nullable_Object: findType(\"_StreamControllerAddStreamState\"),\n" " _SyncCompleter_PoolResource: findType(\"_SyncCompleter\"),\n" " _ZoneFunction_of_void_Function_Zone_ZoneDelegate_Zone_Object_StackTrace: findType(\"_ZoneFunction<~(Zone,ZoneDelegate,Zone,Object,StackTrace)>\"),\n" @@ -22511,6 +22669,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " nullable__FutureListener_dynamic_dynamic: findType(\"_FutureListener<@,@>?\"),\n" " nullable__Highlight: findType(\"_Highlight?\"),\n" " nullable_bool: findType(\"bool?\"),\n" +" nullable_bool_Function_Object: findType(\"bool(Object)?\"),\n" " nullable_double: findType(\"double?\"),\n" " nullable_int: findType(\"int?\"),\n" " nullable_num: findType(\"num?\"),\n" @@ -22523,7 +22682,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " void_Function_Object: findType(\"~(Object)\"),\n" " void_Function_Object_StackTrace: findType(\"~(Object,StackTrace)\"),\n" " void_Function_String_dynamic: findType(\"~(String,@)\"),\n" -" void_Function_Timer: findType(\"~(Timer)\")\n" +" void_Function_Timer: findType(\"~(Timer)\"),\n" +" void_Function_int_dynamic: findType(\"~(int,@)\")\n" " };\n" " })();\n" " (function constants() {\n" diff --git a/dwds/test/integration/fixtures/context.dart b/dwds/test/integration/fixtures/context.dart index ac95eb84a4..8357ec232b 100644 --- a/dwds/test/integration/fixtures/context.dart +++ b/dwds/test/integration/fixtures/context.dart @@ -26,6 +26,7 @@ import 'package:dwds/src/services/daemon_expression_compiler.dart'; import 'package:dwds/src/services/expression_compiler.dart'; import 'package:dwds/src/services/expression_compiler_service.dart'; import 'package:dwds/src/utilities/dart_uri.dart'; +import 'package:dwds/src/utilities/ddc_uri_translator.dart'; import 'package:dwds/src/utilities/server.dart'; import 'package:dwds_test_common/logging.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; @@ -443,7 +444,6 @@ class TestContext { (ModuleFormat.amd, _) => FrontendServerRequireStrategyProvider( testSettings.reloadConfiguration, assetReader, - packageUriMapper, () async => {}, buildSettings, ).strategy, @@ -451,7 +451,6 @@ class TestContext { FrontendServerDdcLibraryBundleStrategyProvider( testSettings.reloadConfiguration, assetReader, - packageUriMapper, () async => {}, buildSettings, reloadedSourcesUri: reloadedSourcesUri, @@ -459,7 +458,6 @@ class TestContext { (ModuleFormat.ddc, false) => FrontendServerDdcStrategyProvider( testSettings.reloadConfiguration, assetReader, - packageUriMapper, () async => {}, buildSettings, ).strategy, @@ -538,38 +536,41 @@ class TestContext { ), ); testScratchSpaceDir.createSync(recursive: true); - - final sourcePackagesFile = File(p.join( - project.absolutePackageDirectory, - '.dart_tool', - 'package_config.json', - )); - final packagesFile = File(p.join( - testScratchSpaceDir.path, - '.dart_tool', - 'package_config.json', - )); + + // Build daemon requires a package config inside its scratch + // space directory to resolve package paths during compilation. + // We read the original package config from [sourcePackagesFile], + // make all relative package paths absolute, then write the + // resolved config to [packagesFile] inside [testScratchSpaceDir]. + final sourcePackagesFile = File( + p.join( + project.absolutePackageDirectory, + '.dart_tool', + 'package_config.json', + ), + ); + final packagesFile = File( + p.join( + testScratchSpaceDir.path, + '.dart_tool', + 'package_config.json', + ), + ); packagesFile.parent.createSync(recursive: true); // Make all relative rootUris absolute based on the original packagesFile location // so they don't break when the file is moved to the test scratch space. - // Also map rootUri and packageUri to match ScratchSpace's hoisting layout. - final originalJson = jsonDecode(sourcePackagesFile.readAsStringSync()) as Map; + final originalJson = jsonDecode( + sourcePackagesFile.readAsStringSync(), + ) as Map; final packagesList = originalJson['packages'] as List; - final rootPackage = '_test_package'; for (final package in packagesList) { final packageMap = package as Map; - final name = packageMap['name'] as String; - if (name == rootPackage) { - packageMap['rootUri'] = 'org-dartlang-app:///'; - packageMap['packageUri'] = 'packages/$rootPackage/'; - } else { - var rootUri = Uri.parse(packageMap['rootUri'] as String); - if (!rootUri.isAbsolute) { - rootUri = sourcePackagesFile.parent.uri.resolveUri(rootUri); - } - packageMap['rootUri'] = rootUri.toString(); + var rootUri = Uri.parse(packageMap['rootUri'] as String); + if (!rootUri.isAbsolute) { + rootUri = sourcePackagesFile.parent.uri.resolveUri(rootUri); } + packageMap['rootUri'] = rootUri.toString(); } packagesFile.writeAsStringSync(jsonEncode(originalJson)); @@ -590,13 +591,21 @@ class TestContext { 'bin', 'fes_manager.dart', ); - await Process.run(sdkLayout.dartPath, [ + final compileResult = await Process.run(sdkLayout.dartPath, [ 'compile', 'kernel', '-o', fesSnapshot, fesManagerPath, ]); + if (compileResult.exitCode != 0) { + _logger.severe( + 'Failed to compile Frontend Server Manager:\n' + 'Exit code: ${compileResult.exitCode}\n' + 'Stdout: ${compileResult.stdout}\n' + 'Stderr: ${compileResult.stderr}', + ); + } final args = [ fesSnapshot, @@ -616,13 +625,19 @@ class TestContext { .transform(utf8.decoder) .transform(const LineSplitter()) .listen((line) { - debugLog.writeAsStringSync('STDOUT: $line\n', mode: FileMode.append); + debugLog.writeAsStringSync( + 'STDOUT: $line\n', + mode: FileMode.append, + ); }); _fesProcess!.stderr .transform(utf8.decoder) .transform(const LineSplitter()) .listen((line) { - debugLog.writeAsStringSync('STDERR: $line\n', mode: FileMode.append); + debugLog.writeAsStringSync( + 'STDERR: $line\n', + mode: FileMode.append, + ); }); final configFile = File( @@ -665,12 +680,12 @@ class TestContext { ), ); if (daemonLogFile.existsSync()) { - print( - 'DAEMON STARTUP LOG CONTENT:\n${daemonLogFile.readAsStringSync()}', + _logger.warning( + 'Daemon startup log content:\n${daemonLogFile.readAsStringSync()}', ); } else { - print( - 'DAEMON STARTUP LOG FILE DOES NOT EXIST at: ${daemonLogFile.path}', + _logger.warning( + 'Daemon startup log file does not exist at: ${daemonLogFile.path}', ); } rethrow; @@ -793,7 +808,6 @@ class TestContext { FrontendServerBuildDaemonStrategyProvider( testSettings.reloadConfiguration, assetReader, - packageUriMapper, () async => {}, buildSettings, injectScriptLoad: false, @@ -877,7 +891,11 @@ class TestContext { assetHandler: assetHandler, assetReader: assetReader, strategy: loadStrategy, - target: project.directoryToServe, + // Build daemon serves assets relative to the web root (e.g. 'web/'), + // but standalone FES serves assets relative to the target directory. + target: testSettings.compilationMode.usesBuildDaemon + ? project.webAssetsPath + : project.directoryToServe, buildResults: buildResults, chromeConnection: () async => connection, httpServer: httpServer, @@ -1197,10 +1215,17 @@ class TestContext { /// Returns a handler for build runner + the DDC Library Bundle module /// system. /// - /// This handler: - /// - serves the reloaded_sources.json file for reloads/restarts. - /// - serves the application directory and entrypoint from - /// `project.directoryToServe`. + /// This handler intercepts specific asset requests to coordinate Frontend + /// Server outputs with the Build Daemon asset server: + /// + /// 1. Remaps the FES-suffixed request path ('.dart.lib') to a Build Daemon + /// suffixed path ('.ddc') if necessary. + /// 2. Serves reloaded source logs (`reloaded_sources.json`) for hot + /// restart/reload. + /// 3. Resolves compiled files (.js, .js.map, .metadata, .dill) from either + /// the local scratch space or the build cache. + /// 4. Proxies asset requests (entrypoints, source maps, merged metadata) + /// to the build daemon. Handler _createBuildRunnerDdcLibraryBundleAssetHandler(int assetServerPort) { final rootProxy = proxyHandler( 'http://localhost:$assetServerPort/', @@ -1213,11 +1238,104 @@ class TestContext { return (request) async { final path = request.url.path; - if (path.endsWith(WebDevFS.reloadedSourcesFileName)) { + var newPath = path; + + // Translate FES paths to package:build paths. + newPath = DdcUriTranslator.translateFesToBuildRunnerPath(newPath); + var requestToProxy = request; + if (newPath != path) { + requestToProxy = shelf.Request( + request.method, + request.requestedUri.replace(path: newPath), + headers: request.headers, + body: request.read(), + context: request.context, + ); + } + + // Serve reloaded_sources.json. + if (newPath.endsWith(WebDevFS.reloadedSourcesFileName)) { return shelf.Response.ok(jsonEncode(_reloadedSources)); } - if (path.endsWith('.ddc_merged_metadata')) { + // Resolve compiled files (.js, .js.map, .metadata, .dill, .full.dill) + // from either the test scratch space or the build cache. + final isDill = + newPath.endsWith('.dill') || newPath.endsWith('.full.dill'); + final isMetadata = newPath.endsWith('.metadata'); + final isPackage = newPath.startsWith('packages/'); + final isJsOrMap = newPath.endsWith('.js') || newPath.endsWith('.js.map'); + + if (isDill || isMetadata || (isPackage && isJsOrMap)) { + String relativePath; + if (isPackage) { + final parts = newPath.split('/'); + relativePath = parts.length > 2 + ? parts.sublist(2).join('/') + : newPath; + } else { + final prefix = '${project.directoryToServe}/'; + relativePath = newPath.startsWith(prefix) + ? newPath.substring(prefix.length) + : newPath; + } + + final subDir = isPackage ? 'lib' : project.directoryToServe; + + final scratchFile = File( + p.join( + project.absolutePackageDirectory, + '.dart_tool', + 'build', + 'test_scratch_space', + subDir, + relativePath, + ), + ); + + final generatedFile = File( + p.join( + project.absolutePackageDirectory, + '.dart_tool', + 'build', + 'generated', + project.packageName, + subDir, + relativePath, + ), + ); + + Uint8List? fileBytes; + if (scratchFile.existsSync()) { + fileBytes = scratchFile.readAsBytesSync(); + } else if (generatedFile.existsSync()) { + fileBytes = generatedFile.readAsBytesSync(); + } + + if (fileBytes != null) { + final String mimeType; + if (newPath.endsWith('.js')) { + mimeType = 'application/javascript'; + } else if (newPath.endsWith('.json') || + newPath.endsWith('.map') || + newPath.endsWith('.metadata')) { + mimeType = 'application/json'; + } else { + mimeType = 'application/octet-stream'; + } + + return shelf.Response.ok( + fileBytes, + headers: { + HttpHeaders.contentTypeHeader: mimeType, + HttpHeaders.contentLengthHeader: fileBytes.length.toString(), + }, + ); + } + } + + // Serve the DDC merged metadata. Merging is done by the FES manager. + if (newPath.endsWith('.ddc_merged_metadata')) { String? mergedContent; final configFile = File( p.join( @@ -1251,7 +1369,10 @@ class TestContext { await socket.close(); } } - } catch (_) {} + } catch (_) { + // Ignore socket or parsing errors, letting the request fail + // gracefully or fall through. + } } if (mergedContent != null) { @@ -1266,73 +1387,6 @@ class TestContext { } } - // Remap and serve separate root package JIT assets directly from FES Manager's - // scratch space or in-memory JIT cache to bridge background daemon compilations. - final isMetadata = path.endsWith('.metadata'); - final isPackage = path.startsWith('packages/'); - if (isMetadata || - (isPackage && (path.endsWith('.js') || path.endsWith('.js.map')))) { - final isEntrypointMetadata = isMetadata && !isPackage; - String relativePath; - if (isPackage) { - final parts = path.split('/'); - if (parts.length > 2) { - relativePath = parts.sublist(2).join('/'); - } else { - relativePath = path; - } - } else { - relativePath = path; - } - - final scratchFile = File( - p.join( - project.absolutePackageDirectory, - '.dart_tool', - 'build', - 'test_scratch_space', - isPackage - ? 'lib' - : (isEntrypointMetadata ? project.directoryToServe : ''), - relativePath, - ), - ); - - final generatedFile = File( - p.join( - project.absolutePackageDirectory, - '.dart_tool', - 'build', - 'generated', - project.packageName, - isPackage - ? 'lib' - : (isEntrypointMetadata ? project.directoryToServe : ''), - relativePath, - ), - ); - - Uint8List? fileBytes; - if (scratchFile.existsSync()) { - fileBytes = scratchFile.readAsBytesSync(); - } else if (generatedFile.existsSync()) { - fileBytes = generatedFile.readAsBytesSync(); - } - - if (fileBytes != null) { - final mimeType = path.endsWith('.js') - ? 'application/javascript' - : 'application/json'; - return shelf.Response.ok( - fileBytes, - headers: { - HttpHeaders.contentTypeHeader: mimeType, - HttpHeaders.contentLengthHeader: fileBytes.length.toString(), - }, - ); - } - } - // Swap between [rootProxy] and [entrypointProxy] to handle path serving // differences for entrypoints vs library files. // @@ -1342,13 +1396,19 @@ class TestContext { // Use [entrypointProxy] for files requested at the root (e.g. 'main.dart' // or 'index.html'), These implicitly prepend [directoryToServe]. final prefix = '${project.directoryToServe}/'; - final response = - await (path.startsWith(prefix) || - path.startsWith('packages/') || - path.startsWith('example/') - ? rootProxy(request) - : entrypointProxy(request)); + var requestToProxyFinal = requestToProxy; + if (newPath.startsWith(prefix)) { + requestToProxyFinal = requestToProxy.change( + path: project.directoryToServe, + ); + } + final response = + await (newPath.startsWith(prefix) || + newPath.startsWith('packages/') || + newPath.startsWith('example/') + ? rootProxy(requestToProxyFinal) + : entrypointProxy(requestToProxyFinal)); return response; }; } @@ -1448,7 +1508,7 @@ class TestContext { final process = await Process.run('tool/build_extension.sh', [ 'prod', ], workingDirectory: absolutePath(pathFromDwds: 'debug_extension')); - print(process.stdout); + _logger.info(process.stdout); } Future _fetchDartDebugExtensionTab( diff --git a/dwds/test/integration/fixtures/utilities.dart b/dwds/test/integration/fixtures/utilities.dart index 7ca72445b1..0e618e7623 100644 --- a/dwds/test/integration/fixtures/utilities.dart +++ b/dwds/test/integration/fixtures/utilities.dart @@ -4,6 +4,8 @@ // @skip_package_deps_validation +import 'dart:async'; +import 'dart:convert'; import 'dart:io'; import 'package:build_daemon/client.dart'; @@ -24,13 +26,67 @@ Future connectClient( String workingDirectory, List options, void Function(ServerLog) logHandler, -) => BuildDaemonClient.connect(workingDirectory, [ - dartPath, - 'run', - 'build_runner', - 'daemon', - ...options, -], logHandler: logHandler); +) async { + final process = await Process.start(dartPath, [ + 'run', + 'build_runner', + 'daemon', + ...options, + ], workingDirectory: workingDirectory); + + final stdoutBuffer = []; + final stderrBuffer = []; + final daemonStartup = Completer(); + + process.stdout.transform(utf8.decoder).transform(const LineSplitter()).listen( + (line) { + stdoutBuffer.add(line); + if (line == readyToConnectLog || + line == versionSkew || + line == optionsSkew) { + if (!daemonStartup.isCompleted) { + daemonStartup.complete(line); + } + } + }, + ); + + process.stderr + .transform(utf8.decoder) + .transform(const LineSplitter()) + .listen((line) => stderrBuffer.add(line)); + + final result = await Future.any([ + daemonStartup.future, + Future.delayed( + const Duration(seconds: 45), + () => 'Timed out waiting for daemon to start up.', + ), + ]); + + if (result == readyToConnectLog) { + return BuildDaemonClient.connectUnchecked( + workingDirectory, + logHandler: logHandler, + ); + } + + process.kill(); + final exitCode = await process.exitCode.timeout( + const Duration(seconds: 5), + onTimeout: () => -1, + ); + + final details = [ + 'Command: dart run build_runner daemon ${options.join(' ')}', + 'Working Directory: $workingDirectory', + 'Exit Code: $exitCode', + if (stdoutBuffer.isNotEmpty) 'Stdout:\n${stdoutBuffer.join('\n')}', + if (stderrBuffer.isNotEmpty) 'Stderr:\n${stderrBuffer.join('\n')}', + ].join('\n'); + + throw StateError('Failed to start build daemon (result: $result).\n$details'); +} /// Returns the port of the daemon asset server. int daemonPort(String workingDirectory) { @@ -44,64 +100,6 @@ int daemonPort(String workingDirectory) { String _assetServerPortFilePath(String workingDirectory) => '${daemonWorkspace(workingDirectory)}/.asset_server_port'; -/// Retries a callback function with a delay until the result is the -/// [expectedResult] (if provided) or is not null. -Future retryFn( - T Function() callback, { - int retryCount = 3, - int delayInMs = 1000, - String failureMessage = 'Function did not succeed after retries.', - T? expectedResult, -}) async { - if (retryCount == 0) { - throw Exception(failureMessage); - } - - await Future.delayed(Duration(milliseconds: delayInMs)); - try { - final result = callback(); - if (expectedResult != null && result == expectedResult) return result; - if (expectedResult == null && result != null) return result; - } catch (_) { - // Ignore any exceptions. - } - - return retryFn( - callback, - retryCount: retryCount - 1, - delayInMs: delayInMs, - failureMessage: failureMessage, - ); -} - -/// Retries an asynchronous callback function with a delay until the result is -/// non-null. -Future retryFnAsync( - Future Function() callback, { - int retryCount = 3, - int delayInMs = 1000, - String failureMessage = 'Function did not succeed after retries.', -}) async { - if (retryCount == 0) { - throw Exception(failureMessage); - } - - await Future.delayed(Duration(milliseconds: delayInMs)); - try { - final result = await callback(); - if (result != null) return result; - } catch (_) { - // Ignore any exceptions. - } - - return retryFnAsync( - callback, - retryCount: retryCount - 1, - delayInMs: delayInMs, - failureMessage: failureMessage, - ); -} - class TestDebugSettings extends DebugSettings { TestDebugSettings.withDevToolsLaunch( TestContext context, { diff --git a/webdev/lib/src/serve/webdev_server.dart b/webdev/lib/src/serve/webdev_server.dart index c3a84df8e0..153268bd67 100644 --- a/webdev/lib/src/serve/webdev_server.dart +++ b/webdev/lib/src/serve/webdev_server.dart @@ -23,7 +23,7 @@ import '../command/configuration.dart'; import '../util.dart'; import 'chrome.dart'; import 'handlers/favicon_handler.dart'; -import 'utils.dart' show findPackageConfigFilePath, findPackageConfigUri; +import 'utils.dart' show findPackageConfigFilePath; Logger _logger = Logger('WebDevServer'); From b87fbcea449aef339ded04286203472e764ee890 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Tue, 16 Jun 2026 03:03:13 -0700 Subject: [PATCH 025/134] Cleaning up unused or debug code --- dwds/test/integration/fixtures/context.dart | 77 +++++-------------- dwds/test/integration/fixtures/project.dart | 25 ------ dwds/test/integration/fixtures/utilities.dart | 2 +- 3 files changed, 19 insertions(+), 85 deletions(-) diff --git a/dwds/test/integration/fixtures/context.dart b/dwds/test/integration/fixtures/context.dart index 8357ec232b..4d224d60d9 100644 --- a/dwds/test/integration/fixtures/context.dart +++ b/dwds/test/integration/fixtures/context.dart @@ -471,25 +471,6 @@ class TestContext { break; case CompilationMode.buildDaemonAndFrontendServer: { - // Symmetrically terminate any leftover background Build Daemon processes - // from previous crashed runs to ensure the new daemon connects to the correct CWD. - try { - final result = Process.runSync('ps', ['aux']); - final lines = result.stdout.toString().split('\n'); - for (final line in lines) { - if (line.contains('build.dart.aot') || - line.contains('build_runner')) { - final parts = line.trim().split(RegExp(r'\s+')); - if (parts.length > 1) { - final targetPid = int.tryParse(parts[1]); - if (targetPid != null && targetPid != pid) { - Process.runSync('kill', ['-9', '$targetPid']); - } - } - } - } - } catch (_) {} - final options = [ if (testSettings.enableExpressionEvaluation) ...[ '--define', @@ -1023,39 +1004,12 @@ class TestContext { unawaited(dir.delete(recursive: true)); } - if (_testSettings.compilationMode.usesBuildDaemon) { - // Cleanly terminate any leftover background compiler processes - // spawned during this test case to prevent Dill cache locks. - try { - final result = Process.runSync('ps', ['aux']); - final lines = result.stdout.toString().split('\n'); - for (final line in lines) { - final isBuildDaemon = - line.contains('build.dart.aot') || line.contains('build_runner'); - final isStaleCompiler = - !isBuildDaemon && - (line.contains('frontend_server') || - (line.contains('dartaotruntime') && - line.contains('/folders/'))); - - if (isStaleCompiler) { - final parts = line.trim().split(RegExp(r'\s+')); - if (parts.length > 1) { - final targetPid = int.tryParse(parts[1]); - if (targetPid != null && targetPid != pid) { - Process.runSync('kill', ['-9', '$targetPid']); - } - } - } - } - } catch (_) {} - } - - // Wait for the build daemon process of this specific test case to fully exit naturally - // and release its global registry locks before allowing the next case to start. + // Wait for the build daemon process to fully exit before starting the next + // test case. if (_testSettings.compilationMode.usesBuildDaemon) { final targetPath = project.absolutePackageDirectory; - for (var i = 0; i < 50; i++) { + final retries = 50; + for (var i = 0; i < retries; i++) { final result = Process.runSync('ps', ['aux']); final lines = result.stdout.toString().split('\n'); final isStillRunning = lines.any( @@ -1094,7 +1048,6 @@ class TestContext { // timestamp that is guaranteed to be after the previous compile. // TODO(https://github.com/dart-lang/sdk/issues/51937): Remove once this bug // is fixed. - await Future.delayed(const Duration(seconds: 1)); _invalidatedUris.clear(); for (var (:file, :originalString, :newString) in edits) { if (file == project.dartEntryFileName) { @@ -1112,7 +1065,7 @@ class TestContext { ); final relativeUrl = p.toUri(relativePath).path; if (relativeUrl.startsWith('lib/')) { - final pathInLib = relativeUrl.substring(4); + final pathInLib = relativeUrl.substring('lib/'.length); _invalidatedUris.add('package:${project.packageName}/$pathInLib'); } else if (f.path == project.dartEntryFilePath) { _invalidatedUris.add(project.dartEntryFilePackageUri.toString()); @@ -1144,13 +1097,13 @@ class TestContext { String srcPath; if (relativeUrl.startsWith('lib/')) { - final pathInLib = relativeUrl.substring(4); + final pathInLib = relativeUrl.substring('lib/'.length); final pathWithoutExtension = p.withoutExtension(pathInLib); - final isFesJitOnly = + final fesOnly = _testSettings.compilationMode.usesFrontendServer && !_testSettings.compilationMode.usesBuildDaemon; moduleName = - 'packages/${project.packageName}/${isFesJitOnly ? pathInLib : pathWithoutExtension}'; + 'packages/${project.packageName}/${fesOnly ? pathInLib : pathWithoutExtension}'; libUri = 'package:${project.packageName}/$pathInLib'; srcPath = 'packages/${project.packageName}/$pathWithoutExtension'; } else if (absolutePath == project.dartEntryFilePath) { @@ -1438,9 +1391,16 @@ class TestContext { bool propagateToBrowser = false, bool cleanStart = false, }) async { - // Wait for the build until the timeout is reached using a double-completer - // pattern to avoid matching the replay-cached startup build success event, - // unless cleanStart is true to confirm any initial success. + // When a client connects or registers a target, build daemon broadcasts the + // current build state over the socket. If the initial build is already done, + // it immediately fires a cached `BuildStatus.succeeded` event. + // + // To ensure the test waits for a *new* compile cycle instead of instantly returning + // on the cached event: + // 1. Wait for `BuildStatus.started` (confirming a new build has begun) + // 2. Wait for `BuildStatus.succeeded` (but only if we've already seen `started`) + // + // Unless `cleanStart` is specified - then we want to accept the cached success event. final started = Completer(); final succeeded = Completer(); final subscription = daemonClient.buildResults.listen((results) { @@ -1482,7 +1442,6 @@ class TestContext { await started.future.timeout(const Duration(seconds: 5)); } catch (e) { if (e.runtimeType.toString().contains('TimeoutException')) { - // No build started (empty reload), return immediately. return; } rethrow; diff --git a/dwds/test/integration/fixtures/project.dart b/dwds/test/integration/fixtures/project.dart index 2e7e3ec80e..fa5d3f2712 100644 --- a/dwds/test/integration/fixtures/project.dart +++ b/dwds/test/integration/fixtures/project.dart @@ -229,31 +229,6 @@ class TestProject { } } - // Dynamically add pubspec overrides for test fixtures. - final overridesFile = File(p.join(newPath, 'pubspec_overrides.yaml')); - final buildRepoDir = p.join(p.dirname(projectRootDir), 'build'); - final buildWebCompilersPath = p.join( - buildRepoDir, - 'builder_pkgs', - 'build_web_compilers', - ); - final scratchSpacePath = p.join( - buildRepoDir, - 'builder_pkgs', - 'scratch_space', - ); - - if (Directory(buildWebCompilersPath).existsSync() && - Directory(scratchSpacePath).existsSync()) { - await overridesFile.writeAsString(''' -dependency_overrides: - build_web_compilers: - path: $buildWebCompilersPath - scratch_space: - path: $scratchSpacePath -'''); - } - final pubGetResult = await Process.run('dart', [ 'pub', 'get', diff --git a/dwds/test/integration/fixtures/utilities.dart b/dwds/test/integration/fixtures/utilities.dart index 0e618e7623..febdf3ab04 100644 --- a/dwds/test/integration/fixtures/utilities.dart +++ b/dwds/test/integration/fixtures/utilities.dart @@ -78,7 +78,7 @@ Future connectClient( ); final details = [ - 'Command: dart run build_runner daemon ${options.join(' ')}', + 'Command: $dartPath run build_runner daemon ${options.join(' ')}', 'Working Directory: $workingDirectory', 'Exit Code: $exitCode', if (stdoutBuffer.isNotEmpty) 'Stdout:\n${stdoutBuffer.join('\n')}', From 0486e4d66e37629a0b8a8b2b53485cea28da9040 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Tue, 16 Jun 2026 03:03:41 -0700 Subject: [PATCH 026/134] Bumping build web compilers to 4.8.2 --- dwds_test_common/fixtures/_experiment/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_circular1/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_circular2/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml | 2 +- .../fixtures/_test_hot_reload_breakpoints/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_package/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_parts/pubspec.yaml | 2 +- dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml | 2 +- example/pubspec.yaml | 2 +- webdev/lib/src/pubspec.dart | 2 +- webdev/test/integration_common.dart | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dwds_test_common/fixtures/_experiment/pubspec.yaml b/dwds_test_common/fixtures/_experiment/pubspec.yaml index 6c54ae49a1..26303809f3 100644 --- a/dwds_test_common/fixtures/_experiment/pubspec.yaml +++ b/dwds_test_common/fixtures/_experiment/pubspec.yaml @@ -12,4 +12,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.6.0 + build_web_compilers: ^4.8.2 diff --git a/dwds_test_common/fixtures/_test_circular1/pubspec.yaml b/dwds_test_common/fixtures/_test_circular1/pubspec.yaml index 186477a200..264137f6de 100644 --- a/dwds_test_common/fixtures/_test_circular1/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_circular1/pubspec.yaml @@ -14,4 +14,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.6.0 + build_web_compilers: ^4.8.2 diff --git a/dwds_test_common/fixtures/_test_circular2/pubspec.yaml b/dwds_test_common/fixtures/_test_circular2/pubspec.yaml index ac96e57a45..535eab1366 100644 --- a/dwds_test_common/fixtures/_test_circular2/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_circular2/pubspec.yaml @@ -12,4 +12,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.6.0 + build_web_compilers: ^4.8.2 diff --git a/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml b/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml index d6fede505b..6ea0d18da3 100644 --- a/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml @@ -8,4 +8,4 @@ environment: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.6.0 + build_web_compilers: ^4.8.2 diff --git a/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml b/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml index c769e741da..ff5d0397a9 100644 --- a/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml @@ -8,4 +8,4 @@ environment: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.6.0 + build_web_compilers: ^4.8.2 diff --git a/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml b/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml index f37304f5fb..2806431f87 100644 --- a/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml @@ -8,4 +8,4 @@ environment: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.6.0 + build_web_compilers: ^4.8.2 diff --git a/dwds_test_common/fixtures/_test_package/pubspec.yaml b/dwds_test_common/fixtures/_test_package/pubspec.yaml index 51127e0e8b..e9806f94b9 100644 --- a/dwds_test_common/fixtures/_test_package/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_package/pubspec.yaml @@ -12,4 +12,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.6.0 \ No newline at end of file + build_web_compilers: ^4.8.2 \ No newline at end of file diff --git a/dwds_test_common/fixtures/_test_parts/pubspec.yaml b/dwds_test_common/fixtures/_test_parts/pubspec.yaml index c8bb22303a..7c825e5693 100644 --- a/dwds_test_common/fixtures/_test_parts/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_parts/pubspec.yaml @@ -12,4 +12,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.6.0 + build_web_compilers: ^4.8.2 diff --git a/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml b/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml index 4afbe97d0c..69a8501453 100644 --- a/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml +++ b/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml @@ -8,4 +8,4 @@ environment: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.6.0 + build_web_compilers: ^4.8.2 diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 1a7203c3b4..bb908f707a 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -8,4 +8,4 @@ environment: dev_dependencies: build_runner: ^2.4.0 - build_web_compilers: ^4.6.0 + build_web_compilers: ^4.8.2 diff --git a/webdev/lib/src/pubspec.dart b/webdev/lib/src/pubspec.dart index 06f31ae685..324b78f6c4 100644 --- a/webdev/lib/src/pubspec.dart +++ b/webdev/lib/src/pubspec.dart @@ -188,7 +188,7 @@ Future> _validateBuildDaemonVersion( } final buildRunnerConstraint = VersionConstraint.parse('^2.4.0'); -final buildWebCompilersConstraint = VersionConstraint.parse('^4.6.0'); +final buildWebCompilersConstraint = VersionConstraint.parse('^4.8.2'); // Note the minimum versions should never be dev versions as users will not // get them by default. diff --git a/webdev/test/integration_common.dart b/webdev/test/integration_common.dart index fd388d1c19..d65815d236 100644 --- a/webdev/test/integration_common.dart +++ b/webdev/test/integration_common.dart @@ -296,7 +296,7 @@ dependencies: } const _supportedBuildRunnerVersion = '2.4.0'; -const _supportedWebCompilersVersion = '4.6.0'; +const _supportedWebCompilersVersion = '4.8.2'; const _supportedBuildDaemonVersion = '4.0.0'; String _pubspecYaml = ''' From 292ca0050cddfb6bb7b3d8f6a1ada9586e722b76 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Tue, 16 Jun 2026 03:11:58 -0700 Subject: [PATCH 027/134] Reverting unused test code --- dwds/test/integration/fixtures/project.dart | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/dwds/test/integration/fixtures/project.dart b/dwds/test/integration/fixtures/project.dart index fa5d3f2712..5f04dc20cf 100644 --- a/dwds/test/integration/fixtures/project.dart +++ b/dwds/test/integration/fixtures/project.dart @@ -229,15 +229,14 @@ class TestProject { } } - final pubGetResult = await Process.run('dart', [ - 'pub', - 'get', + // Clean up the project. + // Called when we need to rebuild sdk and the app from previous test + // configurations. + await Process.run('dart', [ + 'run', + 'build_runner', + 'clean', ], workingDirectory: newPath); - if (pubGetResult.exitCode != 0) { - print('"dart pub get" failed in $newPath:'); - print(pubGetResult.stdout); - print(pubGetResult.stderr); - } } Future setUp() async { From 0967e597d02f00f82b3d85714244be61e77d70d3 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Tue, 16 Jun 2026 12:26:45 -0700 Subject: [PATCH 028/134] Fixing fes_manager resolution --- dwds/test/integration/fixtures/context.dart | 40 ++++++++++++++++----- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/dwds/test/integration/fixtures/context.dart b/dwds/test/integration/fixtures/context.dart index 4d224d60d9..8365872e0b 100644 --- a/dwds/test/integration/fixtures/context.dart +++ b/dwds/test/integration/fixtures/context.dart @@ -564,17 +564,41 @@ class TestContext { '.dart_tool', 'fes_manager.snapshot', ); - final buildRepoDir = p.join(p.dirname(projectRootDir), 'build'); - final fesManagerPath = p.join( - buildRepoDir, - 'builder_pkgs', - 'build_web_compilers', - 'bin', - 'fes_manager.dart', - ); + // Resolve the path to `fes_manager.dart`. + // Consult the test project's package config to resolve + // build_web_compilers, but fall back to a checkout of + // package:build. + final buildWebCompilers = packagesList.firstWhere( + (pkg) => (pkg as Map)['name'] == 'build_web_compilers', + orElse: () => null, + ) as Map?; + String fesManagerPath; + if (buildWebCompilers != null) { + final pkgRootUri = Uri.parse( + buildWebCompilers['rootUri'] as String, + ); + fesManagerPath = p.join( + pkgRootUri.toFilePath(), + 'bin', + 'fes_manager.dart', + ); + } else { + final localBuildRepoDir = p.join( + p.dirname(projectRootDir), + 'build', + ); + fesManagerPath = p.join( + localBuildRepoDir, + 'builder_pkgs', + 'build_web_compilers', + 'bin', + 'fes_manager.dart', + ); + } final compileResult = await Process.run(sdkLayout.dartPath, [ 'compile', 'kernel', + '--packages=${sourcePackagesFile.path}', '-o', fesSnapshot, fesManagerPath, From d1a6baa8e86483fcdc732c02edf78b78685a363a Mon Sep 17 00:00:00 2001 From: MarkZ Date: Tue, 16 Jun 2026 16:59:34 -0700 Subject: [PATCH 029/134] Update URI translation --- dwds/lib/src/readers/asset_reader.dart | 35 +++++------- .../readers/frontend_server_asset_reader.dart | 36 +++++++++--- dwds/lib/src/utilities/dart_uri.dart | 43 ++++++++++---- .../lib/src/utilities/ddc_uri_translator.dart | 56 +++++++++++++++---- dwds/lib/src/utilities/shared.dart | 7 +++ 5 files changed, 126 insertions(+), 51 deletions(-) diff --git a/dwds/lib/src/readers/asset_reader.dart b/dwds/lib/src/readers/asset_reader.dart index 5bec51e490..6730be91fb 100644 --- a/dwds/lib/src/readers/asset_reader.dart +++ b/dwds/lib/src/readers/asset_reader.dart @@ -3,9 +3,12 @@ // BSD-style license that can be found in the LICENSE file. import 'package:collection/collection.dart'; +import 'package:dwds/src/utilities/ddc_uri_translator.dart'; +import 'package:dwds/src/utilities/shared.dart'; import 'package:file/file.dart'; import 'package:logging/logging.dart'; import 'package:package_config/package_config.dart'; +export 'package:dwds/src/utilities/shared.dart' show stripLeadingSlashes; /// A reader for Dart sources and related source maps. abstract class AssetReader { @@ -90,36 +93,28 @@ class PackageUriMapper { return null; } - /// Compute resolved file uri for a server path. + /// Compute resolved file URI for a server path. + /// + /// Frontend Server serves package URIs with 'lib' intact, representing their + /// on-disk structure. For example, 'package:foo/bar.dart' would be served at + /// 'packages/foo/lib/bar.dart'. + /// + /// Build runner serves package URIs from a flattened 'packages' directory. + /// For example, 'package:foo/bar.dart' would be served at + /// 'packages/foo/bar.dart'. Uri? serverPathToResolvedUri(String serverPath) { serverPath = stripLeadingSlashes(serverPath); final segments = serverPath.split('/'); if (segments.first == 'packages') { - if (!useDebuggerModuleNames) { - return packageConfig.resolve( - Uri(scheme: 'package', pathSegments: segments.skip(1)), - ); - } - final relativeRoot = segments.skip(1).first; - final relativeUrl = segments.skip(2).join('/'); - final package = packageConfig.packages.firstWhere( - (Package p) => _getRelativeRoot(p.root) == relativeRoot, + final packagePath = DdcUriTranslator.translatePackagesPathToPackageUri( + serverPath, ); - final resolvedUri = package.root.resolve(relativeUrl); - - return resolvedUri; + return packageConfig.resolve(Uri.parse(packagePath)); } _logger.severe('Expected "packages/" path, but found $serverPath'); return null; } } -String stripLeadingSlashes(String path) { - while (path.startsWith('/') || path.startsWith('\\')) { - path = path.substring(1); - } - return path; -} - String? _getRelativeRoot(Uri root) => root.pathSegments.lastWhereOrNull((segment) => segment.isNotEmpty); diff --git a/dwds/lib/src/readers/frontend_server_asset_reader.dart b/dwds/lib/src/readers/frontend_server_asset_reader.dart index a87b459f3f..9385c8009d 100644 --- a/dwds/lib/src/readers/frontend_server_asset_reader.dart +++ b/dwds/lib/src/readers/frontend_server_asset_reader.dart @@ -6,6 +6,7 @@ import 'dart:convert'; import 'dart:io'; import 'package:dwds/src/readers/asset_reader.dart'; +import 'package:dwds/src/utilities/ddc_uri_translator.dart'; import 'package:logging/logging.dart'; import 'package:package_config/package_config.dart'; import 'package:path/path.dart' as p; @@ -61,13 +62,15 @@ class FrontendServerAssetReader implements AssetReader { Future dartSourceContents(String serverPath) async { if (serverPath.endsWith('.dart')) { final packageConfig = await _packageConfig; - + var strippedPath = _stripBasePath(serverPath); Uri? fileUri; - if (serverPath.startsWith('packages/')) { - final packagePath = serverPath.replaceFirst('packages/', 'package:'); + if (strippedPath.startsWith('packages/')) { + final packagePath = DdcUriTranslator.translatePackagesPathToPackageUri( + strippedPath, + ); fileUri = packageConfig.resolve(Uri.parse(packagePath)); } else { - fileUri = p.toUri(p.join(_packageRoot, serverPath)); + fileUri = p.toUri(p.join(_packageRoot, strippedPath)); } if (fileUri != null) { final source = File(fileUri.toFilePath()); @@ -81,11 +84,12 @@ class FrontendServerAssetReader implements AssetReader { @override Future sourceMapContents(String serverPath) async { if (serverPath.endsWith('lib.js.map')) { - if (!serverPath.startsWith('/')) serverPath = '/$serverPath'; + var strippedPath = _stripBasePath(serverPath); + if (!strippedPath.startsWith('/')) strippedPath = '/$strippedPath'; // Strip the .map, sources are looked up by their js path. - serverPath = p.withoutExtension(serverPath); - if (_mapContents.containsKey(serverPath)) { - return _mapContents[serverPath]; + strippedPath = p.withoutExtension(strippedPath); + if (_mapContents.containsKey(strippedPath)) { + return _mapContents[strippedPath]; } } _logger.severe('Cannot find source map contents for $serverPath'); @@ -128,6 +132,22 @@ class FrontendServerAssetReader implements AssetReader { throw UnimplementedError(); } + /// Strips the [_basePath] prefix from the [serverPath]. + /// + /// Example (if [_basePath] is 'foo/bar'): + /// - 'foo/bar/packages/path/src/utils.dart' -> 'packages/path/src/utils.dart' + String _stripBasePath(String serverPath) { + var strippedPath = stripLeadingSlashes(serverPath); + final strippedBasePath = stripLeadingSlashes(_basePath); + if (strippedBasePath.isNotEmpty && + strippedPath.startsWith(strippedBasePath)) { + strippedPath = stripLeadingSlashes( + strippedPath.substring(strippedBasePath.length), + ); + } + return strippedPath; + } + @override Future close() async {} } diff --git a/dwds/lib/src/utilities/dart_uri.dart b/dwds/lib/src/utilities/dart_uri.dart index 4171865636..f2daaf8400 100644 --- a/dwds/lib/src/utilities/dart_uri.dart +++ b/dwds/lib/src/utilities/dart_uri.dart @@ -4,6 +4,7 @@ import 'package:dwds/src/config/tool_configuration.dart'; import 'package:dwds/src/utilities/ddc_uri_translator.dart'; +import 'package:dwds/src/utilities/shared.dart'; import 'package:logging/logging.dart'; import 'package:package_config/package_config.dart'; import 'package:path/path.dart' as p; @@ -39,23 +40,27 @@ class DartUri { if (uri.startsWith('file:')) { return DartUri._fromFileUri(uri, root: root); } - if (uri.startsWith('packages/') || uri.startsWith('/packages/')) { - return DartUri._fromRelativePath(uri, root: root); + if (uri.endsWith('.dart') && + (uri.startsWith('packages/') || uri.startsWith('/packages/'))) { + final path = stripLeadingSlashes(uri); + final packageUri = DdcUriTranslator.translatePackagesPathToPackageUri( + path, + ); + return DartUri._fromPackageUri(packageUri, root: root); } if (uri.startsWith('/')) { - return DartUri._fromRelativePath(uri); + return DartUri._fromRelativePath(uri, root: root); } if (uri.startsWith('http:') || uri.startsWith('https:')) { - return DartUri(Uri.parse(uri).path); + return DartUri(Uri.parse(uri).path, root); } - - throw FormatException('Unsupported URI form: $uri'); + return DartUri._fromRelativePath(uri, root: root); } @override String toString() => 'DartUri: $serverPath'; - /// Construct from a package: URI + /// Construct from an app URI factory DartUri._fromDartLangUri(String uri) { var serverPath = globalToolConfiguration.loadStrategy.serverPathForAppUri( uri, @@ -88,18 +93,32 @@ class DartUri { } /// Construct from a path, relative to the directory being served. + /// + /// [root] is the directory the app is served from (such as 'web') and is used + /// to translate served URI paths to their on-disk paths. factory DartUri._fromRelativePath(String uri, {String? root}) { - uri = uri[0] == '.' ? uri.substring(1) : uri; - uri = uri[0] == '/' ? uri.substring(1) : uri; - - if (root != null) { - return DartUri._fromRelativePath(p.url.join(root, uri)); + if (uri.startsWith('.')) uri = uri.substring(1); + if (uri.startsWith('/')) uri = uri.substring(1); + // Strip the [root] if provided. For example, with '/abc' as root: + // abc/packages/foo/bar.dart -> DartUri('packages/foo/bar.dart', '/abc') + if (root != null && root.isNotEmpty) { + final cleanRoot = stripLeadingSlashes(root); + if (cleanRoot.isNotEmpty) { + final rootPrefix = cleanRoot.endsWith('/') ? cleanRoot : '$cleanRoot/'; + if (uri.startsWith(rootPrefix)) { + final stripped = uri.substring(rootPrefix.length); + return DartUri(stripped, root); + } + } } uri = DdcUriTranslator.translateLibPathToPackagePath( uri, globalToolConfiguration.appMetadata.workspaceName, ); + if (root != null) { + uri = p.url.join(root, uri); + } return DartUri._(uri); } diff --git a/dwds/lib/src/utilities/ddc_uri_translator.dart b/dwds/lib/src/utilities/ddc_uri_translator.dart index b76d6dcbbb..86c19136a2 100644 --- a/dwds/lib/src/utilities/ddc_uri_translator.dart +++ b/dwds/lib/src/utilities/ddc_uri_translator.dart @@ -32,36 +32,35 @@ class DdcUriTranslator { required AppUriLayout layout, }) { final appUri = Uri.parse(appUrl); - if (appUri.isScheme('package')) { final pathSegments = appUri.pathSegments; if (pathSegments.isEmpty) { throw FormatException('Invalid package URI with empty path: $appUrl'); } + final buildRunnerPath = 'packages/${appUri.path}'; return switch (layout) { - AppUriLayout.frontendServerOnly => - 'packages/${pathSegments.first}/lib/${pathSegments.skip(1).join('/')}', - AppUriLayout.buildRunner => 'packages/${appUri.path}', + AppUriLayout.frontendServerOnly => addLibSegment(buildRunnerPath), + AppUriLayout.buildRunner => buildRunnerPath, }; } if (appUri.isScheme('org-dartlang-app')) { final segments = appUri.pathSegments; if (segments.isEmpty) { - throw FormatException( - 'Invalid org-dartlang-app URI with empty path: $appUrl', - ); + throw FormatException('Invalid org-dartlang-app URI: $appUrl'); } switch (layout) { case AppUriLayout.frontendServerOnly: - return appUri.path.substring(1); + return addLibSegment(appUri.path.substring(1)); case AppUriLayout.buildRunner: final first = segments.first; if (first == 'packages') { - assert(segments.length >= 3, 'Invalid packages/ URI: $appUrl'); + if (segments.length < 3) { + throw FormatException('Invalid packages URI: $appUrl'); + } return segments.join('/'); } - + // Dedupe 'web/'web or 'test/test' paths. final isDuplicated = segments.length > 2 && first == segments[1] && @@ -73,6 +72,41 @@ class DdcUriTranslator { return null; } + /// Adds 'lib' to a package server path. + /// + /// Example: packages/foo/bar.dart -> packages/foo/lib/bar.dart + static String addLibSegment(String serverPath) { + if (!serverPath.startsWith('packages/')) return serverPath; + final segments = serverPath.split('/'); + if (segments.length > 2 && segments[2] != 'lib') { + return 'packages/${segments[1]}/lib/${segments.skip(2).join('/')}'; + } + return serverPath; + } + + /// Removes 'lib' from a package server path. + /// + /// Example: packages/foo/lib/bar.dart packages/foo/bar.dart + static String removeLibSegment(String serverPath) { + if (!serverPath.startsWith('packages/')) return serverPath; + final segments = serverPath.split('/'); + if (segments.length > 2 && segments[2] == 'lib') { + return 'packages/${segments[1]}/${segments.skip(3).join('/')}'; + } + return serverPath; + } + + /// Translates a served `packages/` path back to a `package:` URI path. + /// + /// Examples: + /// - `packages/foo/lib/bar.dart` -> `package:foo/bar.dart` + /// - `packages/foo/bar.dart` -> `package:foo/bar.dart` + static String translatePackagesPathToPackageUri(String serverPath) { + if (!serverPath.startsWith('packages/')) return serverPath; + final pathWithoutLib = removeLibSegment(serverPath); + return pathWithoutLib.replaceFirst('packages/', 'package:'); + } + /// Translates a 'lib/' path to a package path. /// /// DDC generates source maps with relative paths from the generated output. @@ -89,7 +123,7 @@ class DdcUriTranslator { 'Cannot translate lib/ path without a root package name. URI: $uri', ); } - return 'packages/$rootPackageName/${uri.substring(4)}'; + return 'packages/$rootPackageName/${uri.substring('lib/'.length)}'; } return uri; } diff --git a/dwds/lib/src/utilities/shared.dart b/dwds/lib/src/utilities/shared.dart index ba866644c8..206bd0098d 100644 --- a/dwds/lib/src/utilities/shared.dart +++ b/dwds/lib/src/utilities/shared.dart @@ -45,3 +45,10 @@ Future wrapInErrorHandlerAsync( ); }, test: (e) => e is! RPCError && e is! SentinelException); } + +String stripLeadingSlashes(String path) { + while (path.startsWith('/') || path.startsWith('\\')) { + path = path.substring(1); + } + return path; +} From eb304ae512e3c21b79ba06989b6ee0c7471b19e5 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Tue, 16 Jun 2026 17:00:09 -0700 Subject: [PATCH 030/134] Updating versions --- dwds_test_common/fixtures/_experiment/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_circular1/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_circular2/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml | 2 +- .../fixtures/_test_hot_reload_breakpoints/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_package/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_parts/pubspec.yaml | 2 +- dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml | 2 +- dwds_test_common/lib/utilities.dart | 4 +++- example/pubspec.yaml | 2 +- webdev/lib/src/pubspec.dart | 2 +- webdev/test/integration_common.dart | 2 +- 13 files changed, 15 insertions(+), 13 deletions(-) diff --git a/dwds_test_common/fixtures/_experiment/pubspec.yaml b/dwds_test_common/fixtures/_experiment/pubspec.yaml index 26303809f3..98e44a9d62 100644 --- a/dwds_test_common/fixtures/_experiment/pubspec.yaml +++ b/dwds_test_common/fixtures/_experiment/pubspec.yaml @@ -12,4 +12,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.2 + build_web_compilers: ^4.8.4 diff --git a/dwds_test_common/fixtures/_test_circular1/pubspec.yaml b/dwds_test_common/fixtures/_test_circular1/pubspec.yaml index 264137f6de..02cb06c6e6 100644 --- a/dwds_test_common/fixtures/_test_circular1/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_circular1/pubspec.yaml @@ -14,4 +14,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.2 + build_web_compilers: ^4.8.4 diff --git a/dwds_test_common/fixtures/_test_circular2/pubspec.yaml b/dwds_test_common/fixtures/_test_circular2/pubspec.yaml index 535eab1366..90f0b5ff0c 100644 --- a/dwds_test_common/fixtures/_test_circular2/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_circular2/pubspec.yaml @@ -12,4 +12,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.2 + build_web_compilers: ^4.8.4 diff --git a/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml b/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml index 6ea0d18da3..b4e6297de2 100644 --- a/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml @@ -8,4 +8,4 @@ environment: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.2 + build_web_compilers: ^4.8.4 diff --git a/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml b/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml index ff5d0397a9..dbb20a97c9 100644 --- a/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml @@ -8,4 +8,4 @@ environment: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.2 + build_web_compilers: ^4.8.4 diff --git a/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml b/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml index 2806431f87..91fdc2af59 100644 --- a/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml @@ -8,4 +8,4 @@ environment: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.2 + build_web_compilers: ^4.8.4 diff --git a/dwds_test_common/fixtures/_test_package/pubspec.yaml b/dwds_test_common/fixtures/_test_package/pubspec.yaml index e9806f94b9..f25661adf3 100644 --- a/dwds_test_common/fixtures/_test_package/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_package/pubspec.yaml @@ -12,4 +12,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.2 \ No newline at end of file + build_web_compilers: ^4.8.4 \ No newline at end of file diff --git a/dwds_test_common/fixtures/_test_parts/pubspec.yaml b/dwds_test_common/fixtures/_test_parts/pubspec.yaml index 7c825e5693..abb3be48c9 100644 --- a/dwds_test_common/fixtures/_test_parts/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_parts/pubspec.yaml @@ -12,4 +12,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.2 + build_web_compilers: ^4.8.4 diff --git a/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml b/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml index 69a8501453..9326a9daec 100644 --- a/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml +++ b/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml @@ -8,4 +8,4 @@ environment: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.2 + build_web_compilers: ^4.8.4 diff --git a/dwds_test_common/lib/utilities.dart b/dwds_test_common/lib/utilities.dart index ca61bc4058..1760ae1285 100644 --- a/dwds_test_common/lib/utilities.dart +++ b/dwds_test_common/lib/utilities.dart @@ -51,7 +51,9 @@ String? _findTestCommon(String startPath) { var current = p.absolute(startPath); while (current != p.dirname(current)) { if (p.basename(current) == 'dwds_test_common') { - return current; + if (Directory(current).existsSync()) { + return current; + } } final sibling = p.join(current, 'dwds_test_common'); if (Directory(sibling).existsSync()) { diff --git a/example/pubspec.yaml b/example/pubspec.yaml index bb908f707a..bb21cc460a 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -8,4 +8,4 @@ environment: dev_dependencies: build_runner: ^2.4.0 - build_web_compilers: ^4.8.2 + build_web_compilers: ^4.8.4 diff --git a/webdev/lib/src/pubspec.dart b/webdev/lib/src/pubspec.dart index 324b78f6c4..a8ad562dc2 100644 --- a/webdev/lib/src/pubspec.dart +++ b/webdev/lib/src/pubspec.dart @@ -188,7 +188,7 @@ Future> _validateBuildDaemonVersion( } final buildRunnerConstraint = VersionConstraint.parse('^2.4.0'); -final buildWebCompilersConstraint = VersionConstraint.parse('^4.8.2'); +final buildWebCompilersConstraint = VersionConstraint.parse('^4.8.4'); // Note the minimum versions should never be dev versions as users will not // get them by default. diff --git a/webdev/test/integration_common.dart b/webdev/test/integration_common.dart index d65815d236..11fb9be91b 100644 --- a/webdev/test/integration_common.dart +++ b/webdev/test/integration_common.dart @@ -296,7 +296,7 @@ dependencies: } const _supportedBuildRunnerVersion = '2.4.0'; -const _supportedWebCompilersVersion = '4.8.2'; +const _supportedWebCompilersVersion = '4.8.4'; const _supportedBuildDaemonVersion = '4.0.0'; String _pubspecYaml = ''' From b3991f2dd41d4a4748568725c19fa4c6b3bd9e24 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Tue, 16 Jun 2026 19:36:02 -0700 Subject: [PATCH 031/134] Readding uri roots --- dwds/lib/src/utilities/dart_uri.dart | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dwds/lib/src/utilities/dart_uri.dart b/dwds/lib/src/utilities/dart_uri.dart index f2daaf8400..3314325897 100644 --- a/dwds/lib/src/utilities/dart_uri.dart +++ b/dwds/lib/src/utilities/dart_uri.dart @@ -31,7 +31,11 @@ class DartUri { factory DartUri(String uri, [String? root]) { // TODO(annagrin): Support creating DartUris from `dart:` uris. // Issue: https://github.com/dart-lang/webdev/issues/1584 - if (uri.startsWith('org-dartlang-app:') || uri.startsWith('google3:')) { + if (uri.startsWith('org-dartlang-app:')) { + return DartUri._fromDartLangUri(uri, root: root); + } + if (uri.startsWith('google3:')) { + // TODO(markzipan): Determine if google3 needs [root] to be passed. return DartUri._fromDartLangUri(uri); } if (uri.startsWith('package:')) { @@ -61,7 +65,7 @@ class DartUri { String toString() => 'DartUri: $serverPath'; /// Construct from an app URI - factory DartUri._fromDartLangUri(String uri) { + factory DartUri._fromDartLangUri(String uri, {String? root}) { var serverPath = globalToolConfiguration.loadStrategy.serverPathForAppUri( uri, ); @@ -69,7 +73,7 @@ class DartUri { _logger.severe('Cannot find server path for $uri'); serverPath = uri; } - return DartUri._(serverPath); + return DartUri._fromRelativePath(serverPath, root: root); } /// Construct from a package: URI From 503cff92865e9ef056aa8def49e5bb1512efa2a8 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Wed, 17 Jun 2026 01:18:33 -0700 Subject: [PATCH 032/134] Updating hot reload error signalling in tests --- .../frontend_server_common/asset_server.dart | 5 +++ dwds/test/frontend_server_common/devfs.dart | 1 + .../frontend_server_client.dart | 1 + dwds/test/integration/fixtures/context.dart | 40 +++++++++++-------- dwds/test/integration/hot_reload_common.dart | 29 ++++++++++---- 5 files changed, 52 insertions(+), 24 deletions(-) diff --git a/dwds/test/frontend_server_common/asset_server.dart b/dwds/test/frontend_server_common/asset_server.dart index 7c2079f9b7..d160f7a3f6 100644 --- a/dwds/test/frontend_server_common/asset_server.dart +++ b/dwds/test/frontend_server_common/asset_server.dart @@ -186,6 +186,11 @@ class TestAssetServer implements AssetReader { _files[filePath] = Uint8List.fromList(utf8.encode(contents)); } + /// Delete a single file from the in-memory cache. + void deleteFile(String filePath) { + _files.remove(filePath); + } + /// Update the in-memory asset server with the provided source and manifest /// files. /// diff --git a/dwds/test/frontend_server_common/devfs.dart b/dwds/test/frontend_server_common/devfs.dart index 1f7c018145..37d0497ce9 100644 --- a/dwds/test/frontend_server_common/devfs.dart +++ b/dwds/test/frontend_server_common/devfs.dart @@ -192,6 +192,7 @@ class WebDevFS { recompileRestart: fullRestart, ); if (compilerOutput == null || compilerOutput.errorCount > 0) { + assetServer.deleteFile('reloaded_sources.json'); return UpdateFSReport(success: false); } sources = compilerOutput.sources; diff --git a/dwds/test/frontend_server_common/frontend_server_client.dart b/dwds/test/frontend_server_common/frontend_server_client.dart index b6a012f709..9f73175f5f 100644 --- a/dwds/test/frontend_server_common/frontend_server_client.dart +++ b/dwds/test/frontend_server_common/frontend_server_client.dart @@ -411,6 +411,7 @@ class ResidentCompiler { for (final experiment in compilerOptions.experiments) '--enable-experiment=$experiment', if (compilerOptions.canaryFeatures) '--dartdevc-canary', + '--no-js-strongly-connected-components', if (verbose) '--verbose', if (compilerOptions.moduleFormat == ModuleFormat.ddc) '--dartdevc-module-format=ddc', diff --git a/dwds/test/integration/fixtures/context.dart b/dwds/test/integration/fixtures/context.dart index 8365872e0b..e75b899023 100644 --- a/dwds/test/integration/fixtures/context.dart +++ b/dwds/test/integration/fixtures/context.dart @@ -114,6 +114,7 @@ class TestContext { Process get chromeDriver => _chromeDriver!; Process? _chromeDriver; Process? _fesProcess; + bool _lastBuildFailed = false; WebkitDebugger get webkitDebugger => _webkitDebugger!; late WebkitDebugger? _webkitDebugger; @@ -1177,18 +1178,6 @@ class TestContext { ); } - /// Wraps a handler to serve the reloaded_sources.json file for - /// reloads/restarts in the DDC Library Bundle module system. - Handler _handleReloadedSources(Handler proxy) { - return (request) { - final path = request.url.path; - if (path.endsWith(WebDevFS.reloadedSourcesFileName)) { - return shelf.Response.ok(jsonEncode(_reloadedSources)); - } - return proxy(request); - }; - } - /// Returns a handler for build runner + the DDC Library Bundle module /// system. /// @@ -1232,6 +1221,11 @@ class TestContext { // Serve reloaded_sources.json. if (newPath.endsWith(WebDevFS.reloadedSourcesFileName)) { + if (_lastBuildFailed) { + return shelf.Response.internalServerError( + body: 'Last build failed, no reloaded sources.', + ); + } return shelf.Response.ok(jsonEncode(_reloadedSources)); } @@ -1390,7 +1384,10 @@ class TestContext { }; } - Future recompile({required bool fullRestart}) async { + Future recompile({ + required bool fullRestart, + bool allowFailure = false, + }) async { final runner = _webRunner; if (runner != null) { await runner.rerun( @@ -1405,7 +1402,7 @@ class TestContext { // In Build Daemon + Frontend Server mode, the Build Daemon already compiles // edited files automatically. We must await the successful build completion. if (_testSettings.compilationMode.usesBuildDaemon) { - await waitForSuccessfulBuild(); + await waitForSuccessfulBuild(allowFailure: allowFailure); return; } } @@ -1414,6 +1411,7 @@ class TestContext { Duration? timeout, bool propagateToBrowser = false, bool cleanStart = false, + bool allowFailure = false, }) async { // When a client connects or registers a target, build daemon broadcasts the // current build state over the socket. If the initial build is already done, @@ -1441,16 +1439,24 @@ class TestContext { if (isStarted) { if (!started.isCompleted) started.complete(); } + if (isSucceeded) { + _lastBuildFailed = false; + } if (isFailed) { + _lastBuildFailed = true; if (!succeeded.isCompleted) { final failedResult = results.results.firstWhere( (r) => r.status == BuildStatus.failed, ); final daemonError = failedResult.error ?? 'Unknown daemon compilation error'; - succeeded.completeError( - StateError('Build daemon build failed.\nError: $daemonError'), - ); + if (allowFailure) { + succeeded.complete(); + } else { + succeeded.completeError( + StateError('Build daemon build failed.\nError: $daemonError'), + ); + } } } if (cleanStart && isSucceeded) { diff --git a/dwds/test/integration/hot_reload_common.dart b/dwds/test/integration/hot_reload_common.dart index da0cdd6c4e..6a2a05374f 100644 --- a/dwds/test/integration/hot_reload_common.dart +++ b/dwds/test/integration/hot_reload_common.dart @@ -15,6 +15,7 @@ import 'fixtures/utilities.dart'; const originalString = 'Hello World!'; const newString = 'Bonjour le monde!'; +const anotherString = 'Hola Mundo!'; void runTests({ required TestSdkConfigurationProvider provider, @@ -71,6 +72,7 @@ void runTests({ await context.setUp( testSettings: TestSettings( enableExpressionEvaluation: true, + verboseCompiler: true, compilationMode: compilationMode, moduleFormat: provider.ddcModuleFormat, canaryFeatures: provider.canaryFeatures, @@ -89,10 +91,21 @@ void runTests({ await makeEditAndRecompile(); final vm = await client.getVM(); final isolate = await client.getIsolate(vm.isolates!.first.id!); - final report = await fakeClient.reloadSources(isolate.id!); + var report = await fakeClient.reloadSources(isolate.id!); expect(report.success, true); - await callEvaluateAndWaitForLog(newString); + await context.makeEdits([ + ( + file: 'library1.dart', + originalString: newString, + newString: anotherString, + ), + ]); + await recompile(); + report = await fakeClient.reloadSources(isolate.id!); + expect(report.success, true); + + await callEvaluateAndWaitForLog(anotherString); }); test('can hot reload with no changes, hot reload with changes, and ' @@ -129,10 +142,10 @@ void runTests({ await context.makeEdits([ ( file: 'library1.dart', - originalString: newString, + originalString: "String get reloadValue => '$originalString';", newString: ''' -$newString +String get reloadValue => '$newString'; class Bar {} class Baz {} class Foo extends Bar {} @@ -150,14 +163,16 @@ class Foo extends Bar {} ( file: 'library1.dart', originalString: 'class Foo extends Bar', - newString: 'class Foo extends Baz', + newString: 'class Foo extends Bar', ), ]); - await recompile(); + await context.recompile(fullRestart: false, allowFailure: true); report = await fakeClient.reloadSources(isolate.id!); - expect(report.success, false); + + // Successfully recover with hot restart. await context.recompile(fullRestart: true); + await callEvaluateAndWaitForLog(newString); }); }, timeout: const Timeout.factor(2)); } From 5bec8250e2d717673abf4647d67aace8a1d5cd9c Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 18 Jun 2026 00:54:42 -0700 Subject: [PATCH 033/134] Updating uri tests --- dwds/test/integration/dart_uri_test.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dwds/test/integration/dart_uri_test.dart b/dwds/test/integration/dart_uri_test.dart index 9a0d5babdc..f4d963f414 100644 --- a/dwds/test/integration/dart_uri_test.dart +++ b/dwds/test/integration/dart_uri_test.dart @@ -61,12 +61,12 @@ void main() { test('parses org-dartlang-app paths', () { final uri = DartUri('org-dartlang-app:///blah/main.dart'); - expect(uri.serverPath, '/blah/main.dart'); + expect(uri.serverPath, 'blah/main.dart'); }); test('parses google3 paths', () { final uri = DartUri('google3:///blah/main.dart'); - expect(uri.serverPath, '/blah/main.dart'); + expect(uri.serverPath, 'blah/main.dart'); }); test('parses packages paths', () { From 5ab44e9d3f00c3a985f253f9816f80273b882df7 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Wed, 1 Jul 2026 16:23:33 -0700 Subject: [PATCH 034/134] Add useDebuggerModuleNames support --- .../src/loaders/frontend_server_strategy_provider.dart | 1 + dwds/lib/src/loaders/strategy.dart | 2 ++ dwds/lib/src/utilities/ddc_uri_translator.dart | 9 +++++++-- .../frontend_server_common/frontend_server_client.dart | 4 +++- dwds/test/integration/fixtures/context.dart | 1 + dwds/test/integration/fixtures/utilities.dart | 4 ++++ 6 files changed, 18 insertions(+), 3 deletions(-) diff --git a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart index a2270c1d94..8a3bd4875c 100644 --- a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart +++ b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart @@ -77,6 +77,7 @@ abstract class FrontendServerStrategyProvider { return DdcUriTranslator.translateAppUriToServerPath( appUrl, layout: AppUriLayout.frontendServerOnly, + useDebuggerModuleNames: _buildSettings.useDebuggerModuleNames, ); } diff --git a/dwds/lib/src/loaders/strategy.dart b/dwds/lib/src/loaders/strategy.dart index 27b0bfbd75..d06bad1475 100644 --- a/dwds/lib/src/loaders/strategy.dart +++ b/dwds/lib/src/loaders/strategy.dart @@ -247,11 +247,13 @@ class BuildSettings { final bool canaryFeatures; final bool isFlutterApp; final List experiments; + final bool useDebuggerModuleNames; const BuildSettings({ this.appEntrypoint, this.canaryFeatures = false, this.isFlutterApp = true, this.experiments = const [], + this.useDebuggerModuleNames = true, }); } diff --git a/dwds/lib/src/utilities/ddc_uri_translator.dart b/dwds/lib/src/utilities/ddc_uri_translator.dart index 86c19136a2..2fa57cf1a1 100644 --- a/dwds/lib/src/utilities/ddc_uri_translator.dart +++ b/dwds/lib/src/utilities/ddc_uri_translator.dart @@ -30,6 +30,7 @@ class DdcUriTranslator { static String? translateAppUriToServerPath( String appUrl, { required AppUriLayout layout, + bool useDebuggerModuleNames = true, }) { final appUri = Uri.parse(appUrl); if (appUri.isScheme('package')) { @@ -39,7 +40,9 @@ class DdcUriTranslator { } final buildRunnerPath = 'packages/${appUri.path}'; return switch (layout) { - AppUriLayout.frontendServerOnly => addLibSegment(buildRunnerPath), + AppUriLayout.frontendServerOnly => useDebuggerModuleNames + ? addLibSegment(buildRunnerPath) + : buildRunnerPath, AppUriLayout.buildRunner => buildRunnerPath, }; } @@ -51,7 +54,9 @@ class DdcUriTranslator { } switch (layout) { case AppUriLayout.frontendServerOnly: - return addLibSegment(appUri.path.substring(1)); + return useDebuggerModuleNames + ? addLibSegment(appUri.path.substring(1)) + : removeLibSegment(appUri.path.substring(1)); case AppUriLayout.buildRunner: final first = segments.first; if (first == 'packages') { diff --git a/dwds/test/frontend_server_common/frontend_server_client.dart b/dwds/test/frontend_server_common/frontend_server_client.dart index 9f73175f5f..a1ae0c8030 100644 --- a/dwds/test/frontend_server_common/frontend_server_client.dart +++ b/dwds/test/frontend_server_common/frontend_server_client.dart @@ -414,7 +414,9 @@ class ResidentCompiler { '--no-js-strongly-connected-components', if (verbose) '--verbose', if (compilerOptions.moduleFormat == ModuleFormat.ddc) - '--dartdevc-module-format=ddc', + '--dartdevc-module-format=ddc' + else if (compilerOptions.moduleFormat == ModuleFormat.amd) + '--dartdevc-module-format=amd', ]; _logger.info(args.join(' ')); final workingDirectory = projectDirectory.toFilePath(); diff --git a/dwds/test/integration/fixtures/context.dart b/dwds/test/integration/fixtures/context.dart index e75b899023..3e3c88ef2e 100644 --- a/dwds/test/integration/fixtures/context.dart +++ b/dwds/test/integration/fixtures/context.dart @@ -172,6 +172,7 @@ class TestContext { canaryFeatures: testSettings.canaryFeatures, isFlutterApp: testSettings.isFlutterApp, experiments: testSettings.experiments, + useDebuggerModuleNames: testSettings.useDebuggerModuleNames, ); // Make sure configuration was created correctly. diff --git a/dwds/test/integration/fixtures/utilities.dart b/dwds/test/integration/fixtures/utilities.dart index febdf3ab04..952cb3949a 100644 --- a/dwds/test/integration/fixtures/utilities.dart +++ b/dwds/test/integration/fixtures/utilities.dart @@ -287,6 +287,7 @@ class TestBuildSettings extends BuildSettings { super.canaryFeatures, super.isFlutterApp, super.experiments, + super.useDebuggerModuleNames, }); const TestBuildSettings.dart({Uri? appEntrypoint}) @@ -300,11 +301,14 @@ class TestBuildSettings extends BuildSettings { bool? canaryFeatures, bool? isFlutterApp, List? experiments, + bool? useDebuggerModuleNames, }) => TestBuildSettings( appEntrypoint: appEntrypoint ?? this.appEntrypoint, canaryFeatures: canaryFeatures ?? this.canaryFeatures, isFlutterApp: isFlutterApp ?? this.isFlutterApp, experiments: experiments ?? this.experiments, + useDebuggerModuleNames: + useDebuggerModuleNames ?? this.useDebuggerModuleNames, ); } From 16c1e6f1dcf5e24c1f648d7961131614d85c4dd3 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Wed, 8 Jul 2026 15:29:10 -0700 Subject: [PATCH 035/134] Splitting more dwds tests between ddc module systems --- .../dart_uri_file_uri_amd_test.dart | 36 ++++++ .../integration/dart_uri_file_uri_common.dart | 99 ++++++++++++++ ..._uri_file_uri_ddc_library_bundle_test.dart | 44 +++++++ .../integration/dart_uri_file_uri_test.dart | 109 ---------------- dwds/test/integration/events_amd_test.dart | 7 - dwds/test/integration/fixtures/context.dart | 5 +- .../hot_restart_breakpoints_amd_test.dart | 36 ++++++ .../hot_restart_breakpoints_common.dart | 24 ---- dwds/test/integration/inspector_amd_test.dart | 36 ++++++ ...pector_test.dart => inspector_common.dart} | 52 ++++---- .../inspector_ddc_library_bundle_test.dart | 44 +++++++ dwds/test/integration/listviews_amd_test.dart | 36 ++++++ ...tviews_test.dart => listviews_common.dart} | 20 +-- .../listviews_ddc_library_bundle_test.dart | 44 +++++++ .../integration/load_strategy_amd_test.dart | 42 ++++++ ...gy_test.dart => load_strategy_common.dart} | 121 +++++++++--------- ...load_strategy_ddc_library_bundle_test.dart | 50 ++++++++ .../sdk_configuration_amd_test.dart | 25 ++++ ...est.dart => sdk_configuration_common.dart} | 11 +- ...configuration_ddc_library_bundle_test.dart | 26 ++++ .../fixtures/_test/example/scopes/main.dart | 2 + webdev/lib/src/serve/webdev_server.dart | 2 +- 22 files changed, 627 insertions(+), 244 deletions(-) create mode 100644 dwds/test/integration/dart_uri_file_uri_amd_test.dart create mode 100644 dwds/test/integration/dart_uri_file_uri_common.dart create mode 100644 dwds/test/integration/dart_uri_file_uri_ddc_library_bundle_test.dart delete mode 100644 dwds/test/integration/dart_uri_file_uri_test.dart create mode 100644 dwds/test/integration/hot_restart_breakpoints_amd_test.dart create mode 100644 dwds/test/integration/inspector_amd_test.dart rename dwds/test/integration/{inspector_test.dart => inspector_common.dart} (90%) create mode 100644 dwds/test/integration/inspector_ddc_library_bundle_test.dart create mode 100644 dwds/test/integration/listviews_amd_test.dart rename dwds/test/integration/{listviews_test.dart => listviews_common.dart} (74%) create mode 100644 dwds/test/integration/listviews_ddc_library_bundle_test.dart create mode 100644 dwds/test/integration/load_strategy_amd_test.dart rename dwds/test/integration/{load_strategy_test.dart => load_strategy_common.dart} (61%) create mode 100644 dwds/test/integration/load_strategy_ddc_library_bundle_test.dart create mode 100644 dwds/test/integration/sdk_configuration_amd_test.dart rename dwds/test/integration/{sdk_configuration_test.dart => sdk_configuration_common.dart} (96%) create mode 100644 dwds/test/integration/sdk_configuration_ddc_library_bundle_test.dart diff --git a/dwds/test/integration/dart_uri_file_uri_amd_test.dart b/dwds/test/integration/dart_uri_file_uri_amd_test.dart new file mode 100644 index 0000000000..88df58d541 --- /dev/null +++ b/dwds/test/integration/dart_uri_file_uri_amd_test.dart @@ -0,0 +1,36 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +import 'dart_uri_file_uri_common.dart'; +import 'fixtures/context.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + runTests(provider: provider, compilationMode: CompilationMode.buildDaemon); + }); + + group('Frontend Server |', () { + runTests( + provider: provider, + compilationMode: CompilationMode.frontendServer, + ); + }); +} diff --git a/dwds/test/integration/dart_uri_file_uri_common.dart b/dwds/test/integration/dart_uri_file_uri_common.dart new file mode 100644 index 0000000000..1c239dcd5b --- /dev/null +++ b/dwds/test/integration/dart_uri_file_uri_common.dart @@ -0,0 +1,99 @@ +// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:dwds/src/utilities/dart_uri.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:path/path.dart' as p; +import 'package:test/test.dart'; + +import 'fixtures/context.dart'; +import 'fixtures/project.dart'; +import 'fixtures/utilities.dart'; + +// This tests converting file Uris into our internal paths. +// +// These tests are separated out because we need a running isolate in order to +// look up packages. +void runTests({ + required TestSdkConfigurationProvider provider, + required CompilationMode compilationMode, +}) { + final testProject = TestProject.test; + final testPackageProject = TestProject.testPackage(); + + final context = TestContext(testPackageProject, provider); + + for (final useDebuggerModuleNames in [false, true]) { + group('Debugger module names: $useDebuggerModuleNames |', () { + final appServerPath = compilationMode.usesFrontendServer + ? 'web/main.dart' + : 'main.dart'; + + final serverPath = + compilationMode.usesFrontendServer && useDebuggerModuleNames + ? 'packages/${testPackageProject.packageDirectory}/lib/test_library.dart' + : 'packages/${testPackageProject.packageName}/test_library.dart'; + + final anotherServerPath = + compilationMode.usesFrontendServer && useDebuggerModuleNames + ? 'packages/${testProject.packageDirectory}/lib/library.dart' + : 'packages/${testProject.packageName}/library.dart'; + + setUpAll(() async { + await context.setUp( + testSettings: TestSettings( + compilationMode: compilationMode, + useDebuggerModuleNames: useDebuggerModuleNames, + ), + ); + }); + + tearDownAll(() async { + await context.tearDown(); + }); + + test('file path to org-dartlang-app', () { + final webMain = Uri.file( + p.join( + // The directory for the _testPackage package which imports + // _test. + testPackageProject.absolutePackageDirectory, + 'web', + 'main.dart', + ), + ); + final uri = DartUri('$webMain'); + expect(uri.serverPath, appServerPath); + }); + + test('file path to this package', () { + final testPackageLib = Uri.file( + p.join( + testPackageProject.absolutePackageDirectory, + 'lib', + 'test_library.dart', + ), + ); + final uri = DartUri('$testPackageLib'); + expect(uri.serverPath, serverPath); + }); + + test('file path to another package', () { + final testLib = Uri.file( + p.join( + // The directory for the general _test package. This is going to + // be relative to the project in the `TestContext`. + testPackageProject.absolutePackageDirectory, + '..', + testProject.packageDirectory, + 'lib', + 'library.dart', + ), + ); + final dartUri = DartUri('$testLib'); + expect(dartUri.serverPath, anotherServerPath); + }); + }); + } +} diff --git a/dwds/test/integration/dart_uri_file_uri_ddc_library_bundle_test.dart b/dwds/test/integration/dart_uri_file_uri_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..e6dd1986ca --- /dev/null +++ b/dwds/test/integration/dart_uri_file_uri_ddc_library_bundle_test.dart @@ -0,0 +1,44 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +import 'dart_uri_file_uri_common.dart'; +import 'fixtures/context.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + runTests(provider: provider, compilationMode: CompilationMode.buildDaemon); + }); + + group('Build Daemon and Frontend Server |', () { + runTests( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); + + group('Frontend Server |', () { + runTests( + provider: provider, + compilationMode: CompilationMode.frontendServer, + ); + }); +} diff --git a/dwds/test/integration/dart_uri_file_uri_test.dart b/dwds/test/integration/dart_uri_file_uri_test.dart deleted file mode 100644 index c06a40cc7d..0000000000 --- a/dwds/test/integration/dart_uri_file_uri_test.dart +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -@TestOn('vm') -@Timeout(Duration(minutes: 2)) -library; - -import 'package:dwds/src/utilities/dart_uri.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; -import 'package:path/path.dart' as p; -import 'package:test/test.dart'; - -import 'fixtures/context.dart'; -import 'fixtures/project.dart'; -import 'fixtures/utilities.dart'; - -// This tests converting file Uris into our internal paths. -// -// These tests are separated out because we need a running isolate in order to -// look up packages. -void main() { - final provider = TestSdkConfigurationProvider(); - tearDownAll(provider.dispose); - - final testProject = TestProject.test; - final testPackageProject = TestProject.testPackage(); - - final context = TestContext(testPackageProject, provider); - - for (final compilationMode in CompilationMode.values.where( - (mode) => !mode.usesDdcModulesOnly, - )) { - group('$compilationMode |', () { - for (final useDebuggerModuleNames in [false, true]) { - group('Debugger module names: $useDebuggerModuleNames |', () { - final appServerPath = compilationMode.usesFrontendServer - ? 'web/main.dart' - : 'main.dart'; - - final serverPath = - compilationMode.usesFrontendServer && useDebuggerModuleNames - ? 'packages/${testPackageProject.packageDirectory}/lib/test_library.dart' - : 'packages/${testPackageProject.packageName}/test_library.dart'; - - final anotherServerPath = - compilationMode.usesFrontendServer && useDebuggerModuleNames - ? 'packages/${testProject.packageDirectory}/lib/library.dart' - : 'packages/${testProject.packageName}/library.dart'; - - setUpAll(() async { - await context.setUp( - testSettings: TestSettings( - compilationMode: compilationMode, - useDebuggerModuleNames: useDebuggerModuleNames, - ), - ); - }); - - tearDownAll(() async { - await context.tearDown(); - }); - - test('file path to org-dartlang-app', () { - final webMain = Uri.file( - p.join( - // The directory for the _testPackage package which imports - // _test. - testPackageProject.absolutePackageDirectory, - 'web', - 'main.dart', - ), - ); - final uri = DartUri('$webMain'); - expect(uri.serverPath, appServerPath); - }); - - test('file path to this package', () { - final testPackageLib = Uri.file( - p.join( - testPackageProject.absolutePackageDirectory, - 'lib', - 'test_library.dart', - ), - ); - final uri = DartUri('$testPackageLib'); - expect(uri.serverPath, serverPath); - }); - - test('file path to another package', () { - final testLib = Uri.file( - p.join( - // The directory for the general _test package. This is going to - // be relative to the project in the `TestContext`. - testPackageProject.absolutePackageDirectory, - '..', - testProject.packageDirectory, - 'lib', - 'library.dart', - ), - ); - final dartUri = DartUri('$testLib'); - expect(dartUri.serverPath, anotherServerPath); - }); - }); - } - }); - } -} diff --git a/dwds/test/integration/events_amd_test.dart b/dwds/test/integration/events_amd_test.dart index db87a0df45..e098986f7c 100644 --- a/dwds/test/integration/events_amd_test.dart +++ b/dwds/test/integration/events_amd_test.dart @@ -78,13 +78,6 @@ void main() { }); }); - group('Frontend Server', () { - testWithDwds( - provider: provider, - compilationMode: CompilationMode.frontendServer, - ); - }); - group('Build Daemon', () { testWithDwds( provider: provider, diff --git a/dwds/test/integration/fixtures/context.dart b/dwds/test/integration/fixtures/context.dart index 3e3c88ef2e..231cf5253d 100644 --- a/dwds/test/integration/fixtures/context.dart +++ b/dwds/test/integration/fixtures/context.dart @@ -710,7 +710,7 @@ class TestContext { ..reportChangedAssets = true, ), ); - final buildFuture = waitForSuccessfulBuild(cleanStart: true); + final buildFuture = waitForSuccessfulBuild(); daemonClient.startBuild(); await buildFuture; @@ -1427,6 +1427,9 @@ class TestContext { final started = Completer(); final succeeded = Completer(); final subscription = daemonClient.buildResults.listen((results) { + print( + 'DEBUG: Received build results: ${results.results.map((r) => '${r.target}: ${r.status}')}', + ); final isStarted = results.results.any( (r) => r.status == BuildStatus.started, ); diff --git a/dwds/test/integration/hot_restart_breakpoints_amd_test.dart b/dwds/test/integration/hot_restart_breakpoints_amd_test.dart new file mode 100644 index 0000000000..b2c7936e63 --- /dev/null +++ b/dwds/test/integration/hot_restart_breakpoints_amd_test.dart @@ -0,0 +1,36 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 5)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +import 'fixtures/context.dart'; +import 'hot_restart_breakpoints_common.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + runTests(provider: provider, compilationMode: CompilationMode.buildDaemon); + }); + + group('Frontend Server |', () { + runTests( + provider: provider, + compilationMode: CompilationMode.frontendServer, + ); + }); +} diff --git a/dwds/test/integration/hot_restart_breakpoints_common.dart b/dwds/test/integration/hot_restart_breakpoints_common.dart index e9991c5497..5732563eb4 100644 --- a/dwds/test/integration/hot_restart_breakpoints_common.dart +++ b/dwds/test/integration/hot_restart_breakpoints_common.dart @@ -4,7 +4,6 @@ import 'dart:async'; -import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/logging.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; @@ -16,29 +15,6 @@ import 'fixtures/context.dart'; import 'fixtures/project.dart'; import 'fixtures/utilities.dart'; -void main() { - // Enable verbose logging for debugging. - const debug = false; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: true, - ddcModuleFormat: ModuleFormat.ddc, - ); - - tearDownAll(provider.dispose); - - group('Frontend Server', () { - runTests( - provider: provider, - compilationMode: CompilationMode.frontendServer, - ); - }); - - group('Build Daemon', () { - runTests(provider: provider, compilationMode: CompilationMode.buildDaemon); - }); -} - void runTests({ required TestSdkConfigurationProvider provider, required CompilationMode compilationMode, diff --git a/dwds/test/integration/inspector_amd_test.dart b/dwds/test/integration/inspector_amd_test.dart new file mode 100644 index 0000000000..cddd268687 --- /dev/null +++ b/dwds/test/integration/inspector_amd_test.dart @@ -0,0 +1,36 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +import 'fixtures/context.dart'; +import 'inspector_common.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + runTests(provider: provider, compilationMode: CompilationMode.buildDaemon); + }); + + group('Frontend Server |', () { + runTests( + provider: provider, + compilationMode: CompilationMode.frontendServer, + ); + }); +} diff --git a/dwds/test/integration/inspector_test.dart b/dwds/test/integration/inspector_common.dart similarity index 90% rename from dwds/test/integration/inspector_test.dart rename to dwds/test/integration/inspector_common.dart index 3cc765d15c..9b34735511 100644 --- a/dwds/test/integration/inspector_test.dart +++ b/dwds/test/integration/inspector_common.dart @@ -2,12 +2,8 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -@TestOn('vm') -@Timeout(Duration(minutes: 2)) -library; - import 'package:dwds/dwds.dart'; -import 'package:dwds/src/config/tool_configuration.dart'; +import 'package:dwds/expression_compiler.dart'; import 'package:dwds/src/debugging/chrome_inspector.dart'; import 'package:dwds/src/utilities/conversions.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; @@ -17,17 +13,24 @@ import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart'; import 'fixtures/context.dart'; import 'fixtures/project.dart'; +import 'fixtures/utilities.dart'; -void main() { - final provider = TestSdkConfigurationProvider(); - tearDownAll(provider.dispose); - +void runTests({ + required TestSdkConfigurationProvider provider, + required CompilationMode compilationMode, +}) { final context = TestContext(TestProject.testScopes, provider); late ChromeAppInspector inspector; setUpAll(() async { - await context.setUp(); + await context.setUp( + testSettings: TestSettings( + compilationMode: compilationMode, + moduleFormat: provider.ddcModuleFormat, + canaryFeatures: provider.canaryFeatures, + ), + ); final service = context.service; inspector = service.inspector; }); @@ -38,15 +41,11 @@ void main() { final url = 'org-dartlang-app:///example/scopes/main.dart'; - /// A convenient way to get a library variable without boilerplate. - String libraryVariableExpression(String variable) => - '${globalToolConfiguration.loadStrategy.loadModuleSnippet}("dart_sdk").dart.getModuleLibraries("example/scopes/main")["$url"]["$variable"];'; - Future libraryPublicFinal() => - inspector.jsEvaluate(libraryVariableExpression('libraryPublicFinal')); + inspector.invoke(url, 'getLibraryPublicFinal'); Future libraryPrivate() => - inspector.jsEvaluate(libraryVariableExpression('_libraryPrivate')); + inspector.invoke(url, 'getLibraryPrivate'); group('jsEvaluate', () { test('no error', () async { @@ -103,26 +102,32 @@ void main() { }); group('mapExceptionStackTrace', () { + final skipFrontendServerAmd = + compilationMode == CompilationMode.frontendServer && + provider.ddcModuleFormat == ModuleFormat.amd + ? 'Stack trace mapping not supported in this configuration' + : null; + test('multi-line exception with a stack trace', () async { final result = await inspector.mapExceptionStackTrace( jsMultiLineExceptionWithStackTrace, ); expect(result, equals(formattedMultiLineExceptionWithStackTrace)); - }); + }, skip: skipFrontendServerAmd); test('multi-line exception without a stack trace', () async { final result = await inspector.mapExceptionStackTrace( jsMultiLineExceptionNoStackTrace, ); expect(result, equals(formattedMultiLineExceptionNoStackTrace)); - }); + }, skip: skipFrontendServerAmd); test('single-line exception with a stack trace', () async { final result = await inspector.mapExceptionStackTrace( jsSingleLineExceptionWithStackTrace, ); expect(result, equals(formattedSingleLineExceptionWithStackTrace)); - }); + }, skip: skipFrontendServerAmd); }); test('send toString', () async { @@ -163,10 +168,10 @@ void main() { test('properties', () async { final remoteObject = await libraryPublicFinal(); final properties = await inspector.getProperties(remoteObject.objectId!); - final names = properties - .map((p) => p.name) - .where((x) => x != '__proto__') - .toList(); + final names = + properties.map((p) => p.name).where((x) => x != '__proto__').toList() + ..removeWhere((name) => name == r'$ti'); + names.sort(); final expected = [ '_privateField', 'abstractField', @@ -177,7 +182,6 @@ void main() { 'notFinal', 'tornOff', ]; - names.sort(); expect(names, expected); }); diff --git a/dwds/test/integration/inspector_ddc_library_bundle_test.dart b/dwds/test/integration/inspector_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..f45d95568e --- /dev/null +++ b/dwds/test/integration/inspector_ddc_library_bundle_test.dart @@ -0,0 +1,44 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +import 'fixtures/context.dart'; +import 'inspector_common.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + runTests(provider: provider, compilationMode: CompilationMode.buildDaemon); + }); + + group('Build Daemon and Frontend Server |', () { + runTests( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); + + group('Frontend Server |', () { + runTests( + provider: provider, + compilationMode: CompilationMode.frontendServer, + ); + }); +} diff --git a/dwds/test/integration/listviews_amd_test.dart b/dwds/test/integration/listviews_amd_test.dart new file mode 100644 index 0000000000..d04aa8f3e0 --- /dev/null +++ b/dwds/test/integration/listviews_amd_test.dart @@ -0,0 +1,36 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +import 'fixtures/context.dart'; +import 'listviews_common.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + runTests(provider: provider, compilationMode: CompilationMode.buildDaemon); + }); + + group('Frontend Server |', () { + runTests( + provider: provider, + compilationMode: CompilationMode.frontendServer, + ); + }); +} diff --git a/dwds/test/integration/listviews_test.dart b/dwds/test/integration/listviews_common.dart similarity index 74% rename from dwds/test/integration/listviews_test.dart rename to dwds/test/integration/listviews_common.dart index a9a63b1310..85b2cd3f7d 100644 --- a/dwds/test/integration/listviews_test.dart +++ b/dwds/test/integration/listviews_common.dart @@ -2,23 +2,27 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -@Timeout(Duration(minutes: 2)) -library; - import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; import 'fixtures/context.dart'; import 'fixtures/project.dart'; +import 'fixtures/utilities.dart'; -void main() { - final provider = TestSdkConfigurationProvider(); - tearDownAll(provider.dispose); - +void runTests({ + required TestSdkConfigurationProvider provider, + required CompilationMode compilationMode, +}) { final context = TestContext(TestProject.test, provider); setUpAll(() async { - await context.setUp(); + await context.setUp( + testSettings: TestSettings( + compilationMode: compilationMode, + moduleFormat: provider.ddcModuleFormat, + canaryFeatures: provider.canaryFeatures, + ), + ); }); tearDownAll(() async { diff --git a/dwds/test/integration/listviews_ddc_library_bundle_test.dart b/dwds/test/integration/listviews_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..71cefbccc0 --- /dev/null +++ b/dwds/test/integration/listviews_ddc_library_bundle_test.dart @@ -0,0 +1,44 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +import 'fixtures/context.dart'; +import 'listviews_common.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + runTests(provider: provider, compilationMode: CompilationMode.buildDaemon); + }); + + group('Build Daemon and Frontend Server |', () { + runTests( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); + + group('Frontend Server |', () { + runTests( + provider: provider, + compilationMode: CompilationMode.frontendServer, + ); + }); +} diff --git a/dwds/test/integration/load_strategy_amd_test.dart b/dwds/test/integration/load_strategy_amd_test.dart new file mode 100644 index 0000000000..fbcdc37214 --- /dev/null +++ b/dwds/test/integration/load_strategy_amd_test.dart @@ -0,0 +1,42 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +import 'fixtures/context.dart'; +import 'load_strategy_common.dart'; + +void main() { + // Run independent tests once. + runIndependentTests(); + + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + runDependentTests( + provider: provider, + compilationMode: CompilationMode.buildDaemon, + ); + }); + + group('Frontend Server |', () { + runDependentTests( + provider: provider, + compilationMode: CompilationMode.frontendServer, + ); + }); +} diff --git a/dwds/test/integration/load_strategy_test.dart b/dwds/test/integration/load_strategy_common.dart similarity index 61% rename from dwds/test/integration/load_strategy_test.dart rename to dwds/test/integration/load_strategy_common.dart index 6ca17eba9b..55d1177557 100644 --- a/dwds/test/integration/load_strategy_test.dart +++ b/dwds/test/integration/load_strategy_common.dart @@ -2,10 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -@TestOn('vm') -@Timeout(Duration(minutes: 1)) -library; - import 'package:dwds/dwds.dart'; import 'package:dwds/src/config/tool_configuration.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; @@ -17,17 +13,8 @@ import 'fixtures/fakes.dart'; import 'fixtures/project.dart'; import 'fixtures/utilities.dart'; -void main() { - group('Load Strategy', () { - final project = TestProject.test; - final provider = TestSdkConfigurationProvider(); - tearDownAll(provider.dispose); - - final context = TestContext(project, provider); - - setUpAll(context.setUp); - tearDownAll(context.tearDown); - +void runIndependentTests() { + group('Fake Strategy', () { group( 'When the packageConfigLocator does not specify a package config path', () { @@ -111,62 +98,72 @@ void main() { expect(strategy.buildSettings.experiments, experiments); }); }); + }); +} - group('Global load strategy with default build settings', () { - test('provides build settings', () { - final loadStrategy = globalToolConfiguration.loadStrategy; - expect( - loadStrategy.buildSettings.appEntrypoint, - project.dartEntryFilePackageUri, - ); - expect(loadStrategy.buildSettings.canaryFeatures, isFalse); - expect(loadStrategy.buildSettings.isFlutterApp, isFalse); - expect(loadStrategy.buildSettings.experiments, isEmpty); - }); +void runDependentTests({ + required TestSdkConfigurationProvider provider, + required CompilationMode compilationMode, +}) { + final project = TestProject.test; + final context = TestContext(project, provider); + + group('Global load Strategy with default build settings', () { + setUpAll(() async { + await context.setUp( + testSettings: TestSettings( + compilationMode: compilationMode, + moduleFormat: provider.ddcModuleFormat, + canaryFeatures: provider.canaryFeatures, + ), + ); + }); + + tearDownAll(context.tearDown); + + test('provides build settings', () { + final loadStrategy = globalToolConfiguration.loadStrategy; + expect( + loadStrategy.buildSettings.appEntrypoint, + project.dartEntryFilePackageUri, + ); + expect( + loadStrategy.buildSettings.canaryFeatures, + provider.canaryFeatures, + ); + expect(loadStrategy.buildSettings.isFlutterApp, isFalse); + expect(loadStrategy.buildSettings.experiments, isEmpty); }); }); group('Global load Strategy with custom build settings ', () { - final canaryFeatures = true; + final canaryFeatures = provider.canaryFeatures; final isFlutterApp = true; final experiments = ['records']; - final project = TestProject.test; - final provider = TestSdkConfigurationProvider( - canaryFeatures: canaryFeatures, - ); - tearDownAll(provider.dispose); - - final context = TestContext(project, provider); - - for (final compilationMode in CompilationMode.values.where( - (mode) => !mode.usesDdcModulesOnly, - )) { - group('compiled with ${compilationMode.name}', () { - setUpAll(() async { - await context.setUp( - testSettings: TestSettings( - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - isFlutterApp: isFlutterApp, - experiments: experiments, - ), - ); - }); + setUpAll(() async { + await context.setUp( + testSettings: TestSettings( + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + isFlutterApp: isFlutterApp, + experiments: experiments, + moduleFormat: provider.ddcModuleFormat, + ), + ); + }); - tearDownAll(context.tearDown); + tearDownAll(context.tearDown); - test('provides custom build settings', () { - final loadStrategy = globalToolConfiguration.loadStrategy; - expect( - loadStrategy.buildSettings.appEntrypoint, - project.dartEntryFilePackageUri, - ); - expect(loadStrategy.buildSettings.canaryFeatures, canaryFeatures); - expect(loadStrategy.buildSettings.isFlutterApp, isFlutterApp); - expect(loadStrategy.buildSettings.experiments, experiments); - }); - }); - } + test('provides custom build settings', () { + final loadStrategy = globalToolConfiguration.loadStrategy; + expect( + loadStrategy.buildSettings.appEntrypoint, + project.dartEntryFilePackageUri, + ); + expect(loadStrategy.buildSettings.canaryFeatures, canaryFeatures); + expect(loadStrategy.buildSettings.isFlutterApp, isFlutterApp); + expect(loadStrategy.buildSettings.experiments, experiments); + }); }); } diff --git a/dwds/test/integration/load_strategy_ddc_library_bundle_test.dart b/dwds/test/integration/load_strategy_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..e8f9cb6205 --- /dev/null +++ b/dwds/test/integration/load_strategy_ddc_library_bundle_test.dart @@ -0,0 +1,50 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +import 'fixtures/context.dart'; +import 'load_strategy_common.dart'; + +void main() { + // Run independent tests once. + runIndependentTests(); + + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + runDependentTests( + provider: provider, + compilationMode: CompilationMode.buildDaemon, + ); + }); + + group('Build Daemon and Frontend Server |', () { + runDependentTests( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); + + group('Frontend Server |', () { + runDependentTests( + provider: provider, + compilationMode: CompilationMode.frontendServer, + ); + }); +} diff --git a/dwds/test/integration/sdk_configuration_amd_test.dart b/dwds/test/integration/sdk_configuration_amd_test.dart new file mode 100644 index 0000000000..9e965433ed --- /dev/null +++ b/dwds/test/integration/sdk_configuration_amd_test.dart @@ -0,0 +1,25 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +import 'sdk_configuration_common.dart'; + +void main() { + // Run independent tests once. + runIndependentTests(); + + final provider = TestSdkConfigurationProvider( + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runDependentTests(provider: provider); +} diff --git a/dwds/test/integration/sdk_configuration_test.dart b/dwds/test/integration/sdk_configuration_common.dart similarity index 96% rename from dwds/test/integration/sdk_configuration_test.dart rename to dwds/test/integration/sdk_configuration_common.dart index b8d645588a..d9cc69bb0b 100644 --- a/dwds/test/integration/sdk_configuration_test.dart +++ b/dwds/test/integration/sdk_configuration_common.dart @@ -2,10 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -@TestOn('vm') -@Timeout(Duration(minutes: 2)) -library; - import 'dart:io'; import 'package:dwds/src/utilities/sdk_configuration.dart'; @@ -22,7 +18,7 @@ var _throwsDoesNotExistException = throwsA( ), ); -void main() { +void runIndependentTests() { group('Basic configuration', () { test('Can validate default configuration layout', () async { final defaultConfiguration = @@ -118,11 +114,10 @@ void main() { sdkConfiguration.validate(fileSystem: fs); }); }); +} +void runDependentTests({required TestSdkConfigurationProvider provider}) { group('Test configuration', () { - final provider = TestSdkConfigurationProvider(); - tearDownAll(provider.dispose); - test('Can validate configuration layout with generated assets', () async { final sdkConfiguration = await provider.configuration; sdkConfiguration.validateSdkDir(); diff --git a/dwds/test/integration/sdk_configuration_ddc_library_bundle_test.dart b/dwds/test/integration/sdk_configuration_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..243f9c6d52 --- /dev/null +++ b/dwds/test/integration/sdk_configuration_ddc_library_bundle_test.dart @@ -0,0 +1,26 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +import 'sdk_configuration_common.dart'; + +void main() { + // Run independent tests once. + runIndependentTests(); + + final provider = TestSdkConfigurationProvider( + ddcModuleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ); + tearDownAll(provider.dispose); + + runDependentTests(provider: provider); +} diff --git a/dwds_test_common/fixtures/_test/example/scopes/main.dart b/dwds_test_common/fixtures/_test/example/scopes/main.dart index 4744a2d387..7bcf86d05a 100644 --- a/dwds_test_common/fixtures/_test/example/scopes/main.dart +++ b/dwds_test_common/fixtures/_test/example/scopes/main.dart @@ -25,6 +25,8 @@ final stream = Stream.value(1); MyTestClass getLibraryPublicFinal() => libraryPublicFinal; +List getLibraryPrivate() => _libraryPrivate; + List getLibraryPublic() => libraryPublic; Map getMap() => map; diff --git a/webdev/lib/src/serve/webdev_server.dart b/webdev/lib/src/serve/webdev_server.dart index 153268bd67..af81a53b2a 100644 --- a/webdev/lib/src/serve/webdev_server.dart +++ b/webdev/lib/src/serve/webdev_server.dart @@ -531,7 +531,7 @@ String ddcUriToSourceUrl(String basePath, String target, Uri uri) { /// returns package:some_package/src/sub_dir/file.dart String ddcUriToLibraryId(Uri uri) { final jsPath = uri.isScheme('package') - ? 'package:${uri.path}' + ? 'packages/${uri.path}' : '$multiRootScheme:///${uri.path}'; final prefix = jsPath.substring( 0, From 035c94bce96ef5a0fce591323a8627cd0010d6ff Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 9 Jul 2026 13:03:20 -0700 Subject: [PATCH 036/134] formatting --- dwds/lib/src/utilities/ddc_uri_translator.dart | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dwds/lib/src/utilities/ddc_uri_translator.dart b/dwds/lib/src/utilities/ddc_uri_translator.dart index 2fa57cf1a1..67fa831843 100644 --- a/dwds/lib/src/utilities/ddc_uri_translator.dart +++ b/dwds/lib/src/utilities/ddc_uri_translator.dart @@ -40,9 +40,10 @@ class DdcUriTranslator { } final buildRunnerPath = 'packages/${appUri.path}'; return switch (layout) { - AppUriLayout.frontendServerOnly => useDebuggerModuleNames - ? addLibSegment(buildRunnerPath) - : buildRunnerPath, + AppUriLayout.frontendServerOnly => + useDebuggerModuleNames + ? addLibSegment(buildRunnerPath) + : buildRunnerPath, AppUriLayout.buildRunner => buildRunnerPath, }; } From 5669ced406931a00e3a2b00ee4fdc07b6c4ac037 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 9 Jul 2026 17:34:03 -0700 Subject: [PATCH 037/134] Reading entrypoints from .web.entrypoint.json and cleaning up test scopes --- .../integration/load_strategy_common.dart | 2 +- webdev/lib/src/serve/dev_workflow.dart | 10 +-- webdev/lib/src/serve/webdev_server.dart | 71 ++++++++++++++++++- webdev/lib/src/util.dart | 4 +- webdev/test/e2e_common.dart | 33 +++++---- 5 files changed, 93 insertions(+), 27 deletions(-) diff --git a/dwds/test/integration/load_strategy_common.dart b/dwds/test/integration/load_strategy_common.dart index 55d1177557..8f76ac287d 100644 --- a/dwds/test/integration/load_strategy_common.dart +++ b/dwds/test/integration/load_strategy_common.dart @@ -23,7 +23,7 @@ void runIndependentTests() { test('defaults to "./dart_tool/package_config.json"', () { expect( p.split(strategy.packageConfigPath).join('/'), - endsWith('_test/.dart_tool/package_config.json'), + endsWith('.dart_tool/package_config.json'), ); }); }, diff --git a/webdev/lib/src/serve/dev_workflow.dart b/webdev/lib/src/serve/dev_workflow.dart index afe0b146fb..b905b7e46e 100644 --- a/webdev/lib/src/serve/dev_workflow.dart +++ b/webdev/lib/src/serve/dev_workflow.dart @@ -210,7 +210,6 @@ class DevWorkflow { static Future _startFesManager(String workingDirectory) async { final sdkDir = p.dirname(p.dirname(dartPath)); - final tempDir = Directory.systemTemp.createTempSync('webdev_fes_'); final packagesFile = p.join( workingDirectory, '.dart_tool', @@ -219,9 +218,9 @@ class DevWorkflow { final args = [ 'run', - 'build_frontend_server:fes_manager', + 'build_web_compilers:fes_manager', sdkDir, - tempDir.uri.toString(), + p.toUri(workingDirectory).toString(), p.toUri(packagesFile).toString(), ]; @@ -248,10 +247,13 @@ class DevWorkflow { Process? fesProcess; if (configuration.webHotReload) { logWriter(logging.Level.INFO, 'Starting Frontend Server Manager...'); - fesProcess = await _startFesManager(workingDirectory); final configFile = File( p.join(workingDirectory, '.dart_tool', 'build', 'fes_manager_config'), ); + if (await configFile.exists()) { + await configFile.delete(); + } + fesProcess = await _startFesManager(workingDirectory); await _waitForFile(configFile); } diff --git a/webdev/lib/src/serve/webdev_server.dart b/webdev/lib/src/serve/webdev_server.dart index af81a53b2a..3fc20ec37b 100644 --- a/webdev/lib/src/serve/webdev_server.dart +++ b/webdev/lib/src/serve/webdev_server.dart @@ -222,13 +222,32 @@ class WebDevServer { root: options.target, ); + // Read the entrypoint metadata generated by build_web_compilers if + // available. This avoids having to hard code 'main.dart' and allows us + // to initialize the frontend server if the build is fully cached. + String? canonicalUri; + if (options.configuration.webHotReload && + !options.configuration.release) { + final entrypointJsonStr = await assetReader.dartSourceContents( + '.web.entrypoint.json', + ); + if (entrypointJsonStr != null) { + try { + final json = jsonDecode(entrypointJsonStr) as Map; + canonicalUri = json['canonicalUri'] as String?; + } catch (e) { + _logger.warning('Failed to parse .web.entrypoint.json', e); + } + } + } + // TODO(https://github.com/flutter/devtools/issues/5350): Figure out how // to determine the build settings from the build. // Can we save build metadata in build_web_compilers and and read it in // the load strategy? final buildSettings = BuildSettings( appEntrypoint: Uri.parse( - '$multiRootScheme:///${options.target}/main.dart', + canonicalUri ?? '$multiRootScheme:///${options.target}/main.dart', ), canaryFeatures: options.configuration.canaryFeatures, isFlutterApp: false, @@ -236,7 +255,8 @@ class WebDevServer { ); final LoadStrategy loadStrategy; - if (options.configuration.webHotReload) { + if (options.configuration.webHotReload && + !options.configuration.release) { loadStrategy = FrontendServerBuildDaemonStrategyProvider( options.configuration.reload, assetReader, @@ -287,11 +307,56 @@ class WebDevServer { } if (options.configuration.enableExpressionEvaluation) { - if (options.configuration.webHotReload) { + if (options.configuration.webHotReload && + !options.configuration.release) { // Use the daemon expression compiler when web hot reload is enabled // to reuse the Frontend Server's in-memory state. int? cachedFesPort; + // Try to read port from config file early. + try { + final file = File( + p.join('.dart_tool', 'build', 'fes_manager_config'), + ); + if (await file.exists()) { + final content = await file.readAsString(); + final json = jsonDecode(content) as Map; + cachedFesPort = json['port'] as int?; + } + } catch (e) { + _logger.warning('Failed to read FES config', e); + } + + // Pre-initialize the Frontend Server if a port and canonical URI + // are found. Required for cached builds. + if (cachedFesPort != null && canonicalUri != null) { + _logger.info( + 'Early initializing Frontend Server with $canonicalUri', + ); + try { + final socket = await Socket.connect( + InternetAddress.loopbackIPv4, + cachedFesPort!, + ); + socket.writeln( + jsonEncode({ + 'instruction': 'COMPILE', + 'entrypoint': canonicalUri, + }), + ); + await socket.flush(); + final responseStr = await socket + .cast>() + .transform(utf8.decoder) + .transform(const LineSplitter()) + .first; + _logger.fine('Early initialization response: $responseStr'); + await socket.close(); + } catch (e) { + _logger.warning('Failed to early initialize FES', e); + } + } + Future> sendRequestToFes( int port, Map request, diff --git a/webdev/lib/src/util.dart b/webdev/lib/src/util.dart index 47033d5469..e241fbe69a 100644 --- a/webdev/lib/src/util.dart +++ b/webdev/lib/src/util.dart @@ -30,12 +30,12 @@ void serveHttpRequests( final String _sdkDir = (() { // The Dart executable is in "/path/to/sdk/bin/dart", so two levels up is // "/path/to/sdk". - final String dartExecutable = Platform.isWindows + final dartExecutable = Platform.isWindows // Use 'where.exe' to support powershell as well ? (Process.runSync('where.exe', ['dart.exe']).stdout as String) .split(RegExp('(\r\n|\r|\n)')) .first - : Process.runSync('which', ['dart']).stdout; + : (Process.runSync('which', ['dart']).stdout as String).trim(); final aboveExecutable = p.dirname(p.dirname(dartExecutable)); assert(FileSystemEntity.isFileSync(p.join(aboveExecutable, 'version'))); return aboveExecutable; diff --git a/webdev/test/e2e_common.dart b/webdev/test/e2e_common.dart index 9a3f242319..b8a34ad8fd 100644 --- a/webdev/test/e2e_common.dart +++ b/webdev/test/e2e_common.dart @@ -44,23 +44,20 @@ void e2eTests({required TestRunner testRunner}) { setUpAll(() async { configureLogWriter(debug); await testRunner.setUpAll(); - exampleDirectory = p.absolute( - p.join(p.current, '..', 'dwds_test_common', 'fixtures', '_webdev_smoke'), - ); - - final process = await TestProcess.start( - dartPath, - ['pub', 'upgrade'], - workingDirectory: exampleDirectory, - environment: getPubEnvironment(), - ); - - await process.shouldExit(0); - - await d - .file('.dart_tool/package_config.json', isNotEmpty) - .validate(exampleDirectory); - await d.file('pubspec.lock', isNotEmpty).validate(exampleDirectory); + exampleDirectory = await testRunner.prepareWorkspace(); + // Delete files other than main.dart and index.html to ensure a single + // entrypoint exists. + final webDir = Directory(p.join(exampleDirectory, 'web')); + if (await webDir.exists()) { + await for (final entity in webDir.list()) { + if (entity is File) { + final name = p.basename(entity.path); + if (name != 'main.dart' && name != 'index.html') { + await entity.delete(); + } + } + } + } }); tearDownAll(testRunner.tearDownAll); @@ -406,6 +403,7 @@ void e2eTests({required TestRunner testRunner}) { 'daemon', 'web:$openPort', '--enable-expression-evaluation', + '--null-safety=sound', '--verbose', ]; final process = await testRunner.runWebDev( @@ -481,6 +479,7 @@ void e2eTests({required TestRunner testRunner}) { 'daemon', 'web:$openPort', '--enable-expression-evaluation', + '--null-safety=sound', '--verbose', ]; final process = await testRunner.runWebDev( From 06cee25507c8b87c2daa259c98cee0ee2ef52d07 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Mon, 13 Jul 2026 16:48:55 -0700 Subject: [PATCH 038/134] Updating uri tests --- dwds/test/integration/dart_uri_file_uri_common.dart | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dwds/test/integration/dart_uri_file_uri_common.dart b/dwds/test/integration/dart_uri_file_uri_common.dart index 1c239dcd5b..244bcb0745 100644 --- a/dwds/test/integration/dart_uri_file_uri_common.dart +++ b/dwds/test/integration/dart_uri_file_uri_common.dart @@ -26,17 +26,17 @@ void runTests({ for (final useDebuggerModuleNames in [false, true]) { group('Debugger module names: $useDebuggerModuleNames |', () { - final appServerPath = compilationMode.usesFrontendServer + final appServerPath = compilationMode == CompilationMode.frontendServer ? 'web/main.dart' : 'main.dart'; final serverPath = - compilationMode.usesFrontendServer && useDebuggerModuleNames + compilationMode == CompilationMode.frontendServer && useDebuggerModuleNames ? 'packages/${testPackageProject.packageDirectory}/lib/test_library.dart' : 'packages/${testPackageProject.packageName}/test_library.dart'; final anotherServerPath = - compilationMode.usesFrontendServer && useDebuggerModuleNames + compilationMode == CompilationMode.frontendServer && useDebuggerModuleNames ? 'packages/${testProject.packageDirectory}/lib/library.dart' : 'packages/${testProject.packageName}/library.dart'; @@ -45,6 +45,8 @@ void runTests({ testSettings: TestSettings( compilationMode: compilationMode, useDebuggerModuleNames: useDebuggerModuleNames, + moduleFormat: provider.ddcModuleFormat, + canaryFeatures: provider.canaryFeatures, ), ); }); From 6ceb90cb2cff9fb78756b1b228436f08764604c1 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Tue, 14 Jul 2026 11:17:16 -0700 Subject: [PATCH 039/134] bumping fixtures to dwds 4.8.7 --- dwds/test/integration/fixtures/project.dart | 17 +++++++++++++++++ .../fixtures/_experiment/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test/pubspec.yaml | 2 +- .../fixtures/_test_circular1/pubspec.yaml | 2 +- .../fixtures/_test_circular2/pubspec.yaml | 2 +- .../fixtures/_test_dot_shorthands/pubspec.yaml | 2 +- .../fixtures/_test_hot_reload/pubspec.yaml | 6 +++++- .../_test_hot_reload_breakpoints/pubspec.yaml | 2 +- .../fixtures/_test_hot_restart2/pubspec.yaml | 2 +- .../_test_hot_restart_breakpoints/pubspec.yaml | 2 +- .../fixtures/_test_package/pubspec.yaml | 2 +- .../fixtures/_test_parts/pubspec.yaml | 2 +- .../fixtures/_webdev_smoke/pubspec.yaml | 2 +- example/pubspec.yaml | 2 +- webdev/lib/src/pubspec.dart | 2 +- webdev/test/integration_common.dart | 2 +- 16 files changed, 36 insertions(+), 15 deletions(-) diff --git a/dwds/test/integration/fixtures/project.dart b/dwds/test/integration/fixtures/project.dart index 5f04dc20cf..43b4abfb1b 100644 --- a/dwds/test/integration/fixtures/project.dart +++ b/dwds/test/integration/fixtures/project.dart @@ -203,6 +203,20 @@ class TestProject { Directory(newPath).createSync(); copyPathSync(currentPath, newPath); copiedPackageDirectories.add(packageDirectory); + final buildRepoDir = p.join(p.dirname(projectRootDir), 'build'); + final buildWebCompilersPath = p.join( + buildRepoDir, + 'builder_pkgs', + 'build_web_compilers', + ); + if (Directory(buildWebCompilersPath).existsSync()) { + final overridesFile = File(p.join(newPath, 'pubspec_overrides.yaml')); + overridesFile.writeAsStringSync(''' +dependency_overrides: + build_web_compilers: + path: $buildWebCompilersPath +'''); + } final pubspec = loadYaml( File(p.join(currentPath, 'pubspec.yaml')).readAsStringSync(), ) as Map; @@ -229,6 +243,9 @@ class TestProject { } } + // Run pub get to regenerate package_config.json using the overrides file. + await Process.run('dart', ['pub', 'get'], workingDirectory: newPath); + // Clean up the project. // Called when we need to rebuild sdk and the app from previous test // configurations. diff --git a/dwds_test_common/fixtures/_experiment/pubspec.yaml b/dwds_test_common/fixtures/_experiment/pubspec.yaml index 98e44a9d62..750c59877d 100644 --- a/dwds_test_common/fixtures/_experiment/pubspec.yaml +++ b/dwds_test_common/fixtures/_experiment/pubspec.yaml @@ -12,4 +12,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.4 + build_web_compilers: ^4.8.7 diff --git a/dwds_test_common/fixtures/_test/pubspec.yaml b/dwds_test_common/fixtures/_test/pubspec.yaml index f82c911b58..8f8e9fa01e 100644 --- a/dwds_test_common/fixtures/_test/pubspec.yaml +++ b/dwds_test_common/fixtures/_test/pubspec.yaml @@ -12,5 +12,5 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.1 + build_web_compilers: ^4.8.7 diff --git a/dwds_test_common/fixtures/_test_circular1/pubspec.yaml b/dwds_test_common/fixtures/_test_circular1/pubspec.yaml index 02cb06c6e6..a579372d4a 100644 --- a/dwds_test_common/fixtures/_test_circular1/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_circular1/pubspec.yaml @@ -14,4 +14,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.4 + build_web_compilers: ^4.8.7 diff --git a/dwds_test_common/fixtures/_test_circular2/pubspec.yaml b/dwds_test_common/fixtures/_test_circular2/pubspec.yaml index 90f0b5ff0c..cc86627d95 100644 --- a/dwds_test_common/fixtures/_test_circular2/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_circular2/pubspec.yaml @@ -12,4 +12,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.4 + build_web_compilers: ^4.8.7 diff --git a/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml b/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml index b4e6297de2..61349dd7f0 100644 --- a/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml @@ -8,4 +8,4 @@ environment: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.4 + build_web_compilers: ^4.8.7 diff --git a/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml b/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml index dbb20a97c9..c1d108badd 100644 --- a/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml @@ -8,4 +8,8 @@ environment: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.4 + build_web_compilers: ^4.8.7 + +dependency_overrides: + build_web_compilers: + path: /Users/markzipan/Projects/build/builder_pkgs/build_web_compilers diff --git a/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml b/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml index 91fdc2af59..acc153b2eb 100644 --- a/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml @@ -8,4 +8,4 @@ environment: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.4 + build_web_compilers: ^4.8.7 diff --git a/dwds_test_common/fixtures/_test_hot_restart2/pubspec.yaml b/dwds_test_common/fixtures/_test_hot_restart2/pubspec.yaml index 7110d83e71..48b3add867 100644 --- a/dwds_test_common/fixtures/_test_hot_restart2/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_restart2/pubspec.yaml @@ -14,4 +14,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.1 + build_web_compilers: ^4.8.7 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 b05e96d62c..abcc424e8d 100644 --- a/dwds_test_common/fixtures/_test_hot_restart_breakpoints/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_restart_breakpoints/pubspec.yaml @@ -8,5 +8,5 @@ environment: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.1 + build_web_compilers: ^4.8.7 diff --git a/dwds_test_common/fixtures/_test_package/pubspec.yaml b/dwds_test_common/fixtures/_test_package/pubspec.yaml index f25661adf3..a1e51b2c20 100644 --- a/dwds_test_common/fixtures/_test_package/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_package/pubspec.yaml @@ -12,4 +12,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.4 \ No newline at end of file + build_web_compilers: ^4.8.7 \ No newline at end of file diff --git a/dwds_test_common/fixtures/_test_parts/pubspec.yaml b/dwds_test_common/fixtures/_test_parts/pubspec.yaml index abb3be48c9..cd1a740975 100644 --- a/dwds_test_common/fixtures/_test_parts/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_parts/pubspec.yaml @@ -12,4 +12,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.4 + build_web_compilers: ^4.8.7 diff --git a/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml b/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml index 9326a9daec..037047e98b 100644 --- a/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml +++ b/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml @@ -8,4 +8,4 @@ environment: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.4 + build_web_compilers: ^4.8.7 diff --git a/example/pubspec.yaml b/example/pubspec.yaml index bb21cc460a..ad2a061f7d 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -8,4 +8,4 @@ environment: dev_dependencies: build_runner: ^2.4.0 - build_web_compilers: ^4.8.4 + build_web_compilers: ^4.8.7 diff --git a/webdev/lib/src/pubspec.dart b/webdev/lib/src/pubspec.dart index a8ad562dc2..f671698c38 100644 --- a/webdev/lib/src/pubspec.dart +++ b/webdev/lib/src/pubspec.dart @@ -188,7 +188,7 @@ Future> _validateBuildDaemonVersion( } final buildRunnerConstraint = VersionConstraint.parse('^2.4.0'); -final buildWebCompilersConstraint = VersionConstraint.parse('^4.8.4'); +final buildWebCompilersConstraint = VersionConstraint.parse('^4.8.7'); // Note the minimum versions should never be dev versions as users will not // get them by default. diff --git a/webdev/test/integration_common.dart b/webdev/test/integration_common.dart index 11fb9be91b..61bed96e83 100644 --- a/webdev/test/integration_common.dart +++ b/webdev/test/integration_common.dart @@ -296,7 +296,7 @@ dependencies: } const _supportedBuildRunnerVersion = '2.4.0'; -const _supportedWebCompilersVersion = '4.8.4'; +const _supportedWebCompilersVersion = '4.8.7'; const _supportedBuildDaemonVersion = '4.0.0'; String _pubspecYaml = ''' From 7ba2c1fe79f02f39e2e0a535429cee46b250a68b Mon Sep 17 00:00:00 2001 From: MarkZ Date: Tue, 14 Jul 2026 11:47:46 -0700 Subject: [PATCH 040/134] Fixing analysis issues --- dwds/test/integration/dart_uri_file_uri_common.dart | 9 ++++++--- webdev/lib/src/serve/webdev_server.dart | 2 +- webdev/test/e2e_common.dart | 2 -- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/dwds/test/integration/dart_uri_file_uri_common.dart b/dwds/test/integration/dart_uri_file_uri_common.dart index 244bcb0745..283292a7db 100644 --- a/dwds/test/integration/dart_uri_file_uri_common.dart +++ b/dwds/test/integration/dart_uri_file_uri_common.dart @@ -31,12 +31,15 @@ void runTests({ : 'main.dart'; final serverPath = - compilationMode == CompilationMode.frontendServer && useDebuggerModuleNames - ? 'packages/${testPackageProject.packageDirectory}/lib/test_library.dart' + compilationMode == CompilationMode.frontendServer && + useDebuggerModuleNames + ? 'packages/${testPackageProject.packageDirectory}' + '/lib/test_library.dart' : 'packages/${testPackageProject.packageName}/test_library.dart'; final anotherServerPath = - compilationMode == CompilationMode.frontendServer && useDebuggerModuleNames + compilationMode == CompilationMode.frontendServer && + useDebuggerModuleNames ? 'packages/${testProject.packageDirectory}/lib/library.dart' : 'packages/${testProject.packageName}/library.dart'; diff --git a/webdev/lib/src/serve/webdev_server.dart b/webdev/lib/src/serve/webdev_server.dart index 3fc20ec37b..bbadc8113c 100644 --- a/webdev/lib/src/serve/webdev_server.dart +++ b/webdev/lib/src/serve/webdev_server.dart @@ -336,7 +336,7 @@ class WebDevServer { try { final socket = await Socket.connect( InternetAddress.loopbackIPv4, - cachedFesPort!, + cachedFesPort, ); socket.writeln( jsonEncode({ diff --git a/webdev/test/e2e_common.dart b/webdev/test/e2e_common.dart index 1b7a740e19..a3d08a8d35 100644 --- a/webdev/test/e2e_common.dart +++ b/webdev/test/e2e_common.dart @@ -14,13 +14,11 @@ import 'package:path/path.dart' as p; import 'package:pub_semver/pub_semver.dart'; import 'package:test/test.dart'; import 'package:test_descriptor/test_descriptor.dart' as d; -import 'package:test_process/test_process.dart'; import 'package:vm_service/vm_service.dart'; import 'package:vm_service/vm_service_io.dart'; import 'package:webdev/src/logging.dart'; import 'package:webdev/src/pubspec.dart'; import 'package:webdev/src/serve/utils.dart'; -import 'package:webdev/src/util.dart'; import 'package:yaml/yaml.dart'; import 'daemon/utils.dart'; From 10302f8c60e000c50347da5358a51723568f8f19 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Tue, 14 Jul 2026 14:08:32 -0700 Subject: [PATCH 041/134] code cleanup + adding comments --- .../frontend_server_common/asset_server.dart | 3 + dwds/test/integration/fixtures/context.dart | 304 ++++++++---------- 2 files changed, 143 insertions(+), 164 deletions(-) diff --git a/dwds/test/frontend_server_common/asset_server.dart b/dwds/test/frontend_server_common/asset_server.dart index d160f7a3f6..b242c8cc4f 100644 --- a/dwds/test/frontend_server_common/asset_server.dart +++ b/dwds/test/frontend_server_common/asset_server.dart @@ -104,6 +104,9 @@ class TestAssetServer implements AssetReader { final headers = {}; var lookupPath = requestPath; + // Frontend Server tests may cache files under their 'lib/' path instead + // of their fully qualified served path. + // E.g., "packages/foo/bar.dart" and "lib/bar.dart". if (lookupPath.startsWith('packages/')) { final parts = lookupPath.split('/'); if (parts.length > 2) { diff --git a/dwds/test/integration/fixtures/context.dart b/dwds/test/integration/fixtures/context.dart index f0991f4224..0dc7dc26e3 100644 --- a/dwds/test/integration/fixtures/context.dart +++ b/dwds/test/integration/fixtures/context.dart @@ -155,6 +155,15 @@ class TestContext { /// External VM service. VmService get vmService => debugConnection.vmService; + File get _fesManagerConfigFile => File( + p.join( + project.absolutePackageDirectory, + '.dart_tool', + 'build', + 'fes_manager_config', + ), + ); + TestContext(this.project, this.sdkConfigurationProvider); Future setUp({ @@ -332,15 +341,16 @@ class TestContext { final assetServerPort = daemonPort( project.absolutePackageDirectory, ); - _assetHandler = _createBuildRunnerProxyHandler(assetServerPort); - if (testSettings.moduleFormat == ModuleFormat.ddc && - buildSettings.canaryFeatures) { - _assetHandler = _createBuildRunnerDdcLibraryBundleAssetHandler( - assetServerPort, - ); - } else { - _assetHandler = _createBuildRunnerProxyHandler(assetServerPort); - } + _assetHandler = switch (( + testSettings.moduleFormat, + buildSettings.canaryFeatures, + )) { + (ModuleFormat.ddc, true) => + _createBuildRunnerDdcLibraryBundleAssetHandler( + assetServerPort, + ), + _ => _createBuildRunnerProxyHandler(assetServerPort), + }; assetReader = ProxyServerAssetReader( assetServerPort, root: project.directoryToServe, @@ -626,8 +636,6 @@ class TestContext { workingDirectory: project.absolutePackageDirectory, ); - final debugLog = File('/tmp/fes_manager_debug.log'); - if (debugLog.existsSync()) debugLog.deleteSync(); _fesProcess!.stdout .transform(utf8.decoder) .transform(const LineSplitter()) @@ -647,14 +655,7 @@ class TestContext { ); }); - final configFile = File( - p.join( - project.absolutePackageDirectory, - '.dart_tool', - 'build', - 'fes_manager_config', - ), - ); + final configFile = _fesManagerConfigFile; // Wait for `fes_manager` to create the config file. while (!await configFile.exists()) { await Future.delayed(const Duration(milliseconds: 100)); @@ -718,87 +719,20 @@ class TestContext { final assetServerPort = daemonPort( project.absolutePackageDirectory, ); - _assetHandler = _createBuildRunnerProxyHandler(assetServerPort); - if (testSettings.moduleFormat == ModuleFormat.ddc && - buildSettings.canaryFeatures) { - _assetHandler = _createBuildRunnerDdcLibraryBundleAssetHandler( - assetServerPort, - ); - } else { - _assetHandler = _createBuildRunnerProxyHandler(assetServerPort); - } + _assetHandler = switch (( + testSettings.moduleFormat, + buildSettings.canaryFeatures, + )) { + (ModuleFormat.ddc, true) => + _createBuildRunnerDdcLibraryBundleAssetHandler( + assetServerPort, + ), + _ => _createBuildRunnerProxyHandler(assetServerPort), + }; assetReader = ProxyServerAssetReader.fromHandler(_assetHandler!); if (testSettings.enableExpressionEvaluation) { - expressionCompiler = DaemonExpressionCompiler((request) async { - final file = File( - p.join( - project.absolutePackageDirectory, - '.dart_tool', - 'build', - 'fes_manager_config', - ), - ); - if (await file.exists()) { - final content = await file.readAsString(); - int? port; - final json = jsonDecode(content) as Map; - port = json['port'] as int?; - if (port != null) { - final socket = await Socket.connect( - InternetAddress.loopbackIPv4, - port, - ); - try { - socket.writeln(jsonEncode(request)); - final responseStr = await socket - .cast>() - .transform(utf8.decoder) - .transform(const LineSplitter()) - .first; - final compileResult = jsonDecode(responseStr); - - if (compileResult is Map) { - if (compileResult.containsKey('error')) { - return { - 'result': compileResult['error'] as String, - 'isError': true, - }; - } - final errorCount = compileResult['errorCount'] as int?; - final expressionData = - compileResult['expressionData'] as String?; - - if (errorCount != null && errorCount > 0) { - return { - 'result': - compileResult['errorMessage'] as String? ?? - 'Unknown error', - 'isError': true, - }; - } - - if (expressionData != null) { - final decodedResult = utf8.decode( - base64.decode(expressionData), - ); - return {'result': decodedResult, 'isError': false}; - } - } - - return { - 'result': 'Failed to read evaluation result', - 'isError': true, - }; - } finally { - await socket.close(); - } - } - } - throw StateError( - 'FES port not found in .dart_tool/build/fes_manager_config', - ); - }); + expressionCompiler = DaemonExpressionCompiler(_compileExpressionWithDaemon); } frontendServerFileSystem = const LocalFileSystem(); final packageUriMapper = await PackageUriMapper.create( @@ -992,25 +926,14 @@ class TestContext { } Future tearDown() async { - try { - await _webRunner?.stop().timeout(const Duration(seconds: 5)); - } catch (_) {} - try { - await _webDriver - ?.quit(closeSession: true) - .timeout(const Duration(seconds: 5)); - } catch (_) {} + await _safeAwait(_webRunner?.stop()); + await _safeAwait(_webDriver?.quit(closeSession: true)); _chromeDriver?.kill(); DartUri.currentDirectory = p.current; - try { - await _daemonClient?.close().timeout(const Duration(seconds: 5)); - } catch (_) {} - try { - await ddcService?.stop().timeout(const Duration(seconds: 5)); - } catch (_) {} - try { - await _testServer?.stop().timeout(const Duration(seconds: 5)); - } catch (_) {} + await _safeAwait(_daemonClient?.close()); + await _safeAwait(ddcService?.stop()); + await _safeAwait(_testServer?.stop()); + try { _client?.close(); } catch (_) {} @@ -1053,6 +976,72 @@ class TestContext { _outputDir = null; } + /// Forwards expression compilation requests to the persistent Frontend Server + /// process via socket. + Future> _compileExpressionWithDaemon( + Map request, + ) async { + final file = _fesManagerConfigFile; + if (!await file.exists()) { + throw StateError('FES port not found in ${file.path}'); + } + + final content = await file.readAsString(); + final json = jsonDecode(content) as Map; + final port = json['port'] as int?; + if (port == null) { + throw StateError('FES port not found in ${file.path}'); + } + + final socket = await Socket.connect(InternetAddress.loopbackIPv4, port); + try { + socket.writeln(jsonEncode(request)); + final responseStr = await socket + .cast>() + .transform(utf8.decoder) + .transform(const LineSplitter()) + .first; + final compileResult = jsonDecode(responseStr); + + if (compileResult is! Map) { + return {'result': 'Failed to read evaluation result', 'isError': true}; + } + + if (compileResult.containsKey('error')) { + return { + 'result': compileResult['error'] as String, + 'isError': true, + }; + } + + final errorCount = compileResult['errorCount'] as int?; + if (errorCount != null && errorCount > 0) { + return { + 'result': compileResult['errorMessage'] as String? ?? 'Unknown error', + 'isError': true, + }; + } + + final expressionData = compileResult['expressionData'] as String?; + if (expressionData != null) { + final decodedResult = utf8.decode(base64.decode(expressionData)); + return {'result': decodedResult, 'isError': false}; + } + + return {'result': 'Failed to read evaluation result', 'isError': true}; + } finally { + await socket.close(); + } + } + + /// Awaits [future] with a timeout, swallowing errors to avoid test failures. + Future _safeAwait(Future? future) async { + if (future == null) return; + try { + await future.timeout(const Duration(seconds: 5)); + } catch (_) {} + } + /// Given a list of edits, use file IO to write them to the file system. /// /// If `file` has the same name as the project's entry file name, that file @@ -1301,17 +1290,10 @@ class TestContext { // Serve the DDC merged metadata. Merging is done by the FES manager. if (newPath.endsWith('.ddc_merged_metadata')) { String? mergedContent; - final configFile = File( - p.join( - project.absolutePackageDirectory, - '.dart_tool', - 'build', - 'fes_manager_config', - ), - ); - if (configFile.existsSync()) { + final configFile = _fesManagerConfigFile; + if (await configFile.exists()) { try { - final configJson = jsonDecode(configFile.readAsStringSync()) as Map; + final configJson = jsonDecode(await configFile.readAsString()) as Map; final port = configJson['port'] as int?; if (port != null) { final socket = await Socket.connect( @@ -1400,80 +1382,74 @@ class TestContext { } } + /// Waits for a build to complete. + /// + /// If `allowFailure` is true, the test will continue even if the build + /// fails. Future waitForSuccessfulBuild({ Duration? timeout, bool propagateToBrowser = false, - bool cleanStart = false, bool allowFailure = false, }) async { - // When a client connects or registers a target, build daemon broadcasts the - // current build state over the socket. If the initial build is already done, - // it immediately fires a cached `BuildStatus.succeeded` event. - // - // To ensure the test waits for a *new* compile cycle instead of instantly returning - // on the cached event: + // Build daemon immediately sends a cached `BuildStatus.succeeded` event if + // its initial build is already done. To ensure test waits for a new compile + // cycle (instead of instantly finishing), we: // 1. Wait for `BuildStatus.started` (confirming a new build has begun) - // 2. Wait for `BuildStatus.succeeded` (but only if we've already seen `started`) - // - // Unless `cleanStart` is specified - then we want to accept the cached success event. - final started = Completer(); - final succeeded = Completer(); + // 2. Wait for `BuildStatus.succeeded` (only if we've already seen `started`) + final buildStartCompleter = Completer(); + final buildSuccessCompleter = Completer(); final subscription = daemonClient.buildResults.listen((results) { - print( - 'DEBUG: Received build results: ${results.results.map((r) => '${r.target}: ${r.status}')}', - ); - final isStarted = results.results.any( + final isStartedEvent = results.results.any( (r) => r.status == BuildStatus.started, ); - final isSucceeded = results.results.any( + final isSucceededEvent = results.results.any( (r) => r.status == BuildStatus.succeeded, ); - final isFailed = results.results.any( + final isFailedEvent = results.results.any( (r) => r.status == BuildStatus.failed, ); - if (isStarted) { - if (!started.isCompleted) started.complete(); + if (isStartedEvent) { + if (!buildStartCompleter.isCompleted) buildStartCompleter.complete(); } - if (isSucceeded) { + if (isSucceededEvent) { _lastBuildFailed = false; } - if (isFailed) { + if (isFailedEvent) { _lastBuildFailed = true; - if (!succeeded.isCompleted) { + if (!buildSuccessCompleter.isCompleted) { final failedResult = results.results.firstWhere( (r) => r.status == BuildStatus.failed, ); final daemonError = failedResult.error ?? 'Unknown daemon compilation error'; if (allowFailure) { - succeeded.complete(); + buildSuccessCompleter.complete(); } else { - succeeded.completeError( + buildSuccessCompleter.completeError( StateError('Build daemon build failed.\nError: $daemonError'), ); } } } - if (cleanStart && isSucceeded) { - if (!succeeded.isCompleted) succeeded.complete(); - } else if (started.isCompleted && isSucceeded) { - if (!succeeded.isCompleted) succeeded.complete(); + if (buildStartCompleter.isCompleted && isSucceededEvent) { + if (!buildSuccessCompleter.isCompleted) buildSuccessCompleter.complete(); } }); + var isWaitingForSuccess = false; try { - if (!cleanStart) { - try { - await started.future.timeout(const Duration(seconds: 5)); - } catch (e) { - if (e.runtimeType.toString().contains('TimeoutException')) { - return; - } - rethrow; - } - } - await succeeded.future.timeout(timeout ?? const Duration(minutes: 5)); + // Give the build daemon a few seconds to start the build. + await buildStartCompleter.future.timeout(const Duration(seconds: 5)); + isWaitingForSuccess = true; + await buildSuccessCompleter.future.timeout( + timeout ?? const Duration(seconds: 60), + ); + } on TimeoutException { + // Return if an edit did not trigger a rebuild/recompile. + if (!isWaitingForSuccess) return; + // If the build started but never finished, the test has likely hung. + rethrow; } finally { await subscription.cancel(); } From f074c928aee06c644cc358b67547f3334da96309 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Tue, 14 Jul 2026 14:17:04 -0700 Subject: [PATCH 042/134] Removing extraneous debug code --- dwds/test/integration/fixtures/project.dart | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/dwds/test/integration/fixtures/project.dart b/dwds/test/integration/fixtures/project.dart index 43b4abfb1b..de42e6c874 100644 --- a/dwds/test/integration/fixtures/project.dart +++ b/dwds/test/integration/fixtures/project.dart @@ -1,7 +1,6 @@ // Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:async'; import 'dart:io'; import 'package:dwds_test_common/utilities.dart'; @@ -203,20 +202,6 @@ class TestProject { Directory(newPath).createSync(); copyPathSync(currentPath, newPath); copiedPackageDirectories.add(packageDirectory); - final buildRepoDir = p.join(p.dirname(projectRootDir), 'build'); - final buildWebCompilersPath = p.join( - buildRepoDir, - 'builder_pkgs', - 'build_web_compilers', - ); - if (Directory(buildWebCompilersPath).existsSync()) { - final overridesFile = File(p.join(newPath, 'pubspec_overrides.yaml')); - overridesFile.writeAsStringSync(''' -dependency_overrides: - build_web_compilers: - path: $buildWebCompilersPath -'''); - } final pubspec = loadYaml( File(p.join(currentPath, 'pubspec.yaml')).readAsStringSync(), ) as Map; @@ -243,9 +228,6 @@ dependency_overrides: } } - // Run pub get to regenerate package_config.json using the overrides file. - await Process.run('dart', ['pub', 'get'], workingDirectory: newPath); - // Clean up the project. // Called when we need to rebuild sdk and the app from previous test // configurations. From 56a50bd792447453df8e7e38d32ef2f2d2467e45 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Tue, 14 Jul 2026 14:40:02 -0700 Subject: [PATCH 043/134] Code cleanup --- dwds/lib/src/debugging/location.dart | 10 ++-- .../lib/src/utilities/ddc_uri_translator.dart | 34 ++++++++------ dwds/test/integration/fixtures/context.dart | 47 ++++++++----------- 3 files changed, 44 insertions(+), 47 deletions(-) diff --git a/dwds/lib/src/debugging/location.dart b/dwds/lib/src/debugging/location.dart index 1f4f69c652..d292cb60d7 100644 --- a/dwds/lib/src/debugging/location.dart +++ b/dwds/lib/src/debugging/location.dart @@ -381,8 +381,10 @@ class Locations { } } for (final location in result) { - final sp = location.dartLocation.uri.serverPath; - _sourceToLocation.putIfAbsent(sp, () => {}).add(location); + final serverPath = location.dartLocation.uri.serverPath; + _sourceToLocation + .putIfAbsent(serverPath, () => {}) + .add(location); } return _moduleToLocations[module] = result; }); @@ -425,8 +427,8 @@ class Locations { // relativePath in source map: `../../../lib/src/library.dart` // // Joined path: - // BEFORE: `/lib/src/library.dart` (loses the package namespace `my_package`) - // AFTER: `org-dartlang-app:///packages/my_package/src/library.dart` + // Before: `/lib/src/library.dart` (loses `my_package`) + // After: `org-dartlang-app:///packages/my_package/src/library.dart` if (scriptLocation.startsWith('/packages/') && !path.startsWith('/packages/')) { final packageDir = scriptLocation.split('/').take(3).join('/'); diff --git a/dwds/lib/src/utilities/ddc_uri_translator.dart b/dwds/lib/src/utilities/ddc_uri_translator.dart index 67fa831843..312cef0661 100644 --- a/dwds/lib/src/utilities/ddc_uri_translator.dart +++ b/dwds/lib/src/utilities/ddc_uri_translator.dart @@ -25,7 +25,8 @@ class DdcUriTranslator { /// Build Runner Layout: /// `package:foo/bar.dart` -> `packages/foo/bar.dart` /// `org-dartlang-app:///packages/foo/bar.dart` -> `packages/foo/bar.dart` - /// `org-dartlang-app:///web/web/main.dart` ->`web/main.dart` + /// `org-dartlang-app:///web/web/main.dart` -> `main.dart` (deduped) + /// `org-dartlang-app:///web/main.dart` -> `main.dart` /// `org-dartlang-app:///foo/bar.dart` -> `bar.dart` static String? translateAppUriToServerPath( String appUrl, { @@ -78,29 +79,32 @@ class DdcUriTranslator { return null; } - /// Adds 'lib' to a package server path. - /// - /// Example: packages/foo/bar.dart -> packages/foo/lib/bar.dart - static String addLibSegment(String serverPath) { + static String _modifyLibSegment(String serverPath, {required bool add}) { if (!serverPath.startsWith('packages/')) return serverPath; final segments = serverPath.split('/'); - if (segments.length > 2 && segments[2] != 'lib') { - return 'packages/${segments[1]}/lib/${segments.skip(2).join('/')}'; + if (segments.length > 2) { + final isLib = segments[2] == 'lib'; + if (add && !isLib) { + return 'packages/${segments[1]}/lib/${segments.skip(2).join('/')}'; + } + if (!add && isLib) { + return 'packages/${segments[1]}/${segments.skip(3).join('/')}'; + } } return serverPath; } + /// Adds 'lib' to a package server path. + /// + /// Example: packages/foo/bar.dart -> packages/foo/lib/bar.dart + static String addLibSegment(String serverPath) => + _modifyLibSegment(serverPath, add: true); + /// Removes 'lib' from a package server path. /// /// Example: packages/foo/lib/bar.dart packages/foo/bar.dart - static String removeLibSegment(String serverPath) { - if (!serverPath.startsWith('packages/')) return serverPath; - final segments = serverPath.split('/'); - if (segments.length > 2 && segments[2] == 'lib') { - return 'packages/${segments[1]}/${segments.skip(3).join('/')}'; - } - return serverPath; - } + static String removeLibSegment(String serverPath) => + _modifyLibSegment(serverPath, add: false); /// Translates a served `packages/` path back to a `package:` URI path. /// diff --git a/dwds/test/integration/fixtures/context.dart b/dwds/test/integration/fixtures/context.dart index 0dc7dc26e3..b0efa26708 100644 --- a/dwds/test/integration/fixtures/context.dart +++ b/dwds/test/integration/fixtures/context.dart @@ -156,13 +156,13 @@ class TestContext { VmService get vmService => debugConnection.vmService; File get _fesManagerConfigFile => File( - p.join( - project.absolutePackageDirectory, - '.dart_tool', - 'build', - 'fes_manager_config', - ), - ); + p.join( + project.absolutePackageDirectory, + '.dart_tool', + 'build', + 'fes_manager_config', + ), + ); TestContext(this.project, this.sdkConfigurationProvider); @@ -346,9 +346,7 @@ class TestContext { buildSettings.canaryFeatures, )) { (ModuleFormat.ddc, true) => - _createBuildRunnerDdcLibraryBundleAssetHandler( - assetServerPort, - ), + _createBuildRunnerDdcLibraryBundleAssetHandler(assetServerPort), _ => _createBuildRunnerProxyHandler(assetServerPort), }; assetReader = ProxyServerAssetReader( @@ -640,19 +638,13 @@ class TestContext { .transform(utf8.decoder) .transform(const LineSplitter()) .listen((line) { - debugLog.writeAsStringSync( - 'STDOUT: $line\n', - mode: FileMode.append, - ); + _logger.info('FES Manager STDOUT: $line'); }); _fesProcess!.stderr .transform(utf8.decoder) .transform(const LineSplitter()) .listen((line) { - debugLog.writeAsStringSync( - 'STDERR: $line\n', - mode: FileMode.append, - ); + _logger.warning('FES Manager STDERR: $line'); }); final configFile = _fesManagerConfigFile; @@ -724,15 +716,15 @@ class TestContext { buildSettings.canaryFeatures, )) { (ModuleFormat.ddc, true) => - _createBuildRunnerDdcLibraryBundleAssetHandler( - assetServerPort, - ), + _createBuildRunnerDdcLibraryBundleAssetHandler(assetServerPort), _ => _createBuildRunnerProxyHandler(assetServerPort), }; assetReader = ProxyServerAssetReader.fromHandler(_assetHandler!); if (testSettings.enableExpressionEvaluation) { - expressionCompiler = DaemonExpressionCompiler(_compileExpressionWithDaemon); + expressionCompiler = DaemonExpressionCompiler( + _compileExpressionWithDaemon, + ); } frontendServerFileSystem = const LocalFileSystem(); final packageUriMapper = await PackageUriMapper.create( @@ -1008,10 +1000,7 @@ class TestContext { } if (compileResult.containsKey('error')) { - return { - 'result': compileResult['error'] as String, - 'isError': true, - }; + return {'result': compileResult['error'] as String, 'isError': true}; } final errorCount = compileResult['errorCount'] as int?; @@ -1293,7 +1282,8 @@ class TestContext { final configFile = _fesManagerConfigFile; if (await configFile.exists()) { try { - final configJson = jsonDecode(await configFile.readAsString()) as Map; + final configJson = + jsonDecode(await configFile.readAsString()) as Map; final port = configJson['port'] as int?; if (port != null) { final socket = await Socket.connect( @@ -1433,7 +1423,8 @@ class TestContext { } } if (buildStartCompleter.isCompleted && isSucceededEvent) { - if (!buildSuccessCompleter.isCompleted) buildSuccessCompleter.complete(); + if (!buildSuccessCompleter.isCompleted) + buildSuccessCompleter.complete(); } }); From b6e816fb9f0cb4eaccb9856838b22542893cc69a Mon Sep 17 00:00:00 2001 From: MarkZ Date: Tue, 14 Jul 2026 16:08:20 -0700 Subject: [PATCH 044/134] Removing invalid tests and fixing timeouts --- dwds/lib/src/handlers/injected_client_js.dart | 603 +++++++++--------- .../frontend_server_strategy_provider.dart | 3 +- dwds/lib/src/utilities/dart_uri.dart | 9 +- .../frontend_server_client.dart | 1 - dwds/test/integration/fixtures/context.dart | 27 +- .../hot_restart_breakpoints_amd_test.dart | 36 -- 6 files changed, 341 insertions(+), 338 deletions(-) delete mode 100644 dwds/test/integration/hot_restart_breakpoints_amd_test.dart diff --git a/dwds/lib/src/handlers/injected_client_js.dart b/dwds/lib/src/handlers/injected_client_js.dart index c055db9f92..ad322f709d 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-edge.cbba25adcb0765b7d4f44f79f146ac4b6018eb45.\n" +const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-values), the Dart to JavaScript compiler version: 3.14.0-edge.30b941a500c61ffb45fe23e49ae0576eada8d371.\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" @@ -891,14 +891,16 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this.__internal\$_source = t0;\n" " this.\$ti = t1;\n" " },\n" -" CastList: function CastList(t0, t1) {\n" -" this.__internal\$_source = t0;\n" -" this.\$ti = t1;\n" +" _CastListBase: function _CastListBase() {\n" " },\n" -" CastList_sort_closure: function CastList_sort_closure(t0, t1) {\n" +" _CastListBase_sort_closure: function _CastListBase_sort_closure(t0, t1) {\n" " this.\$this = t0;\n" " this.compare = t1;\n" " },\n" +" CastList: function CastList(t0, t1) {\n" +" this.__internal\$_source = t0;\n" +" this.\$ti = t1;\n" +" },\n" " CastMap: function CastMap(t0, t1) {\n" " this.__internal\$_source = t0;\n" " this.\$ti = t1;\n" @@ -1035,7 +1037,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this.__internal\$_source = t0;\n" " this.\$ti = t1;\n" " },\n" -" _CastList__CastIterableBase_ListMixin: function _CastList__CastIterableBase_ListMixin() {\n" +" __CastListBase__CastIterableBase_ListMixin: function __CastListBase__CastIterableBase_ListMixin() {\n" " },\n" " ConstantMap__throwUnmodifiable() {\n" " throw A.wrapException(A.UnsupportedError\$(\"Cannot modify unmodifiable Map\"));\n" @@ -2113,7 +2115,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " JsLinkedHashMap: function JsLinkedHashMap(t0) {\n" " var _ = this;\n" " _.__js_helper\$_length = 0;\n" -" _._last = _._first = _.__js_helper\$_rest = _.__js_helper\$_nums = _.__js_helper\$_strings = null;\n" +" _._last = _._first = _.__js_helper\$_rest = _._nums = _._strings = null;\n" " _._modifications = 0;\n" " _.\$ti = t0;\n" " },\n" @@ -2162,7 +2164,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " JsIdentityLinkedHashMap: function JsIdentityLinkedHashMap(t0) {\n" " var _ = this;\n" " _.__js_helper\$_length = 0;\n" -" _._last = _._first = _.__js_helper\$_rest = _.__js_helper\$_nums = _.__js_helper\$_strings = null;\n" +" _._last = _._first = _.__js_helper\$_rest = _._nums = _._strings = null;\n" " _._modifications = 0;\n" " _.\$ti = t0;\n" " },\n" @@ -3824,7 +3826,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " A.Timer__createTimer(B.Duration_0, type\$.void_Function._as(callback));\n" " },\n" " Timer__createTimer(duration, callback) {\n" -" var milliseconds = B.JSInt_methods._tdivFast\$1(duration._duration, 1000);\n" +" var milliseconds = B.JSInt_methods._tdivFast\$1(duration.inMicroseconds, 1000);\n" " return A._TimerImpl\$(milliseconds < 0 ? 0 : milliseconds, callback);\n" " },\n" " _TimerImpl\$(milliseconds, callback) {\n" @@ -4325,13 +4327,27 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return t1.createTimer\$2(duration, t1.bindCallbackGuarded\$1(callback));\n" " },\n" " runZonedGuarded(body, onError, \$R) {\n" -" var error, stackTrace, t1, exception, _null = null, zoneSpecification = null, zoneValues = null,\n" +" var error, stackTrace, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, exception, _null = null, zoneSpecification = null, zoneValues = null,\n" " parentZone = \$.Zone__current,\n" " errorHandler = new A.runZonedGuarded_closure(parentZone, onError);\n" " if (zoneSpecification == null)\n" -" zoneSpecification = new A._ZoneSpecification(errorHandler, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null);\n" -" else\n" -" zoneSpecification = A.ZoneSpecification_ZoneSpecification\$from(zoneSpecification, errorHandler);\n" +" zoneSpecification = new A.ZoneSpecification(errorHandler, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null);\n" +" else {\n" +" t1 = zoneSpecification;\n" +" t2 = t1.run;\n" +" t3 = t1.runUnary;\n" +" t4 = t1.runBinary;\n" +" t5 = t1.registerCallback;\n" +" t6 = t1.registerUnaryCallback;\n" +" t7 = t1.registerBinaryCallback;\n" +" t8 = t1.errorCallback;\n" +" t9 = t1.scheduleMicrotask;\n" +" t10 = t1.createTimer;\n" +" t11 = t1.createPeriodicTimer;\n" +" t12 = t1.print;\n" +" t1 = t1.fork;\n" +" zoneSpecification = new A.ZoneSpecification(errorHandler, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t1);\n" +" }\n" " try {\n" " t1 = parentZone.fork\$2\$specification\$zoneValues(zoneSpecification, zoneValues).run\$1\$1(body, \$R);\n" " return t1;\n" @@ -4343,7 +4359,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return _null;\n" " },\n" " _rootHandleUncaughtError(\$self, \$parent, zone, error, stackTrace) {\n" -" A._rootHandleError(error, type\$.StackTrace._as(stackTrace));\n" +" A._rootHandleError(error, stackTrace);\n" " },\n" " _rootHandleError(error, stackTrace) {\n" " A._schedulePriorityAsyncCallback(new A._rootHandleError_closure(error, stackTrace));\n" @@ -4406,15 +4422,32 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " },\n" " _rootRegisterCallback(\$self, \$parent, zone, f, \$R) {\n" +" var t1 = type\$.Zone;\n" +" t1._as(\$self);\n" +" type\$.ZoneDelegate._as(\$parent);\n" +" t1._as(zone);\n" " return \$R._eval\$1(\"0()\")._as(f);\n" " },\n" " _rootRegisterUnaryCallback(\$self, \$parent, zone, f, \$R, \$T) {\n" +" var t1 = type\$.Zone;\n" +" t1._as(\$self);\n" +" type\$.ZoneDelegate._as(\$parent);\n" +" t1._as(zone);\n" " return \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(f);\n" " },\n" " _rootRegisterBinaryCallback(\$self, \$parent, zone, f, \$R, \$T1, \$T2) {\n" +" var t1 = type\$.Zone;\n" +" t1._as(\$self);\n" +" type\$.ZoneDelegate._as(\$parent);\n" +" t1._as(zone);\n" " return \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(f);\n" " },\n" " _rootErrorCallback(\$self, \$parent, zone, error, stackTrace) {\n" +" var t1 = type\$.Zone;\n" +" t1._as(\$self);\n" +" type\$.ZoneDelegate._as(\$parent);\n" +" t1._as(zone);\n" +" A._asObject(error);\n" " type\$.nullable_StackTrace._as(stackTrace);\n" " return null;\n" " },\n" @@ -4429,41 +4462,23 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " A._scheduleAsyncCallback(f);\n" " },\n" " _rootCreateTimer(\$self, \$parent, zone, duration, callback) {\n" -" type\$.Duration._as(duration);\n" -" type\$.void_Function._as(callback);\n" -" return A.Timer__createTimer(duration, B.C__RootZone !== zone ? zone.bindCallback\$1\$1(callback, type\$.void) : callback);\n" +" callback = zone.bindCallback\$1\$1(type\$.void_Function._as(callback), type\$.void);\n" +" return A.Timer__createTimer(duration, callback);\n" " },\n" " _rootCreatePeriodicTimer(\$self, \$parent, zone, duration, callback) {\n" " var milliseconds;\n" -" type\$.Duration._as(duration);\n" -" type\$.void_Function_Timer._as(callback);\n" -" if (B.C__RootZone !== zone)\n" -" callback = zone.bindUnaryCallback\$2\$1(callback, type\$.void, type\$.Timer);\n" -" milliseconds = B.JSInt_methods._tdivFast\$1(duration._duration, 1000);\n" -" return A._TimerImpl\$periodic(milliseconds < 0 ? 0 : milliseconds, callback);\n" +" callback = zone.bindUnaryCallback\$2\$1(type\$.void_Function_Timer._as(callback), type\$.void, type\$.Timer);\n" +" milliseconds = duration.get\$inMilliseconds();\n" +" return A._TimerImpl\$periodic(milliseconds.\$lt(0, 0) ? 0 : milliseconds, callback);\n" " },\n" " _rootPrint(\$self, \$parent, zone, line) {\n" -" A.printString(A._asString(line));\n" -" },\n" -" _printToZone0(line) {\n" -" \$.Zone__current.print\$1(line);\n" +" A.printString(line);\n" " },\n" " _rootFork(\$self, \$parent, zone, specification, zoneValues) {\n" -" var valueMap, t1, handleUncaughtError;\n" -" type\$.nullable_ZoneSpecification._as(specification);\n" -" type\$.nullable_Map_of_nullable_Object_and_nullable_Object._as(zoneValues);\n" -" \$._printToZone = A.async___printToZone\$closure();\n" -" valueMap = zone.get\$_map();\n" -" t1 = new A._CustomZone(zone.get\$_run(), zone.get\$_runUnary(), zone.get\$_runBinary(), zone.get\$_registerCallback(), zone.get\$_registerUnaryCallback(), zone.get\$_registerBinaryCallback(), zone.get\$_errorCallback(), zone.get\$_scheduleMicrotask(), zone.get\$_createTimer(), zone.get\$_createPeriodicTimer(), zone.get\$_print(), zone.get\$_fork(), zone.get\$_handleUncaughtError(), zone, valueMap);\n" -" handleUncaughtError = specification.handleUncaughtError;\n" -" if (handleUncaughtError != null)\n" -" t1._handleUncaughtError = new A._ZoneFunction(t1, handleUncaughtError, type\$._ZoneFunction_of_void_Function_Zone_ZoneDelegate_Zone_Object_StackTrace);\n" +" var t1 = new A._CustomZone(zone.get\$_run(), zone.get\$_runUnary(), zone.get\$_runBinary(), zone.get\$_registerCallback(), zone.get\$_registerUnaryCallback(), zone.get\$_registerBinaryCallback(), zone.get\$_errorCallback(), zone.get\$_scheduleMicrotask(), zone.get\$_createTimer(), zone.get\$_createPeriodicTimer(), zone.get\$_print(), zone.get\$_fork(), zone.get\$_handleUncaughtError(), zone.get\$_zoneValues(), zone);\n" +" t1._handleUncaughtError = new A._ZoneHandleUncaughtError(t1, specification.handleUncaughtError);\n" " return t1;\n" " },\n" -" ZoneSpecification_ZoneSpecification\$from(other, handleUncaughtError) {\n" -" var t1 = handleUncaughtError == null ? other.handleUncaughtError : handleUncaughtError;\n" -" return new A._ZoneSpecification(t1, other.run, other.runUnary, other.runBinary, other.registerCallback, other.registerUnaryCallback, other.registerBinaryCallback, other.errorCallback, other.scheduleMicrotask, other.createTimer, other.createPeriodicTimer, other.print, other.fork);\n" -" },\n" " _AsyncRun__initializeScheduleImmediate_internalCallback: function _AsyncRun__initializeScheduleImmediate_internalCallback(t0) {\n" " this._box_0 = t0;\n" " },\n" @@ -4806,10 +4821,59 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this._source = t1;\n" " this.\$ti = t2;\n" " },\n" -" _ZoneFunction: function _ZoneFunction(t0, t1, t2) {\n" +" _ZoneRun: function _ZoneRun(t0, t1) {\n" +" this.zone = t0;\n" +" this.\$function = t1;\n" +" },\n" +" _ZoneRunUnary: function _ZoneRunUnary(t0, t1) {\n" +" this.zone = t0;\n" +" this.\$function = t1;\n" +" },\n" +" _ZoneRunBinary: function _ZoneRunBinary(t0, t1) {\n" +" this.zone = t0;\n" +" this.\$function = t1;\n" +" },\n" +" _ZoneRegisterCallback: function _ZoneRegisterCallback(t0, t1) {\n" +" this.zone = t0;\n" +" this.\$function = t1;\n" +" },\n" +" _ZoneRegisterUnaryCallback: function _ZoneRegisterUnaryCallback(t0, t1) {\n" +" this.zone = t0;\n" +" this.\$function = t1;\n" +" },\n" +" _ZoneRegisterBinaryCallback: function _ZoneRegisterBinaryCallback(t0, t1) {\n" +" this.zone = t0;\n" +" this.\$function = t1;\n" +" },\n" +" _ZoneErrorCallback: function _ZoneErrorCallback(t0, t1) {\n" " this.zone = t0;\n" " this.\$function = t1;\n" -" this.\$ti = t2;\n" +" },\n" +" _ZoneScheduleMicrotask: function _ZoneScheduleMicrotask(t0, t1) {\n" +" this.zone = t0;\n" +" this.\$function = t1;\n" +" },\n" +" _ZoneCreateTimer: function _ZoneCreateTimer(t0, t1) {\n" +" this.zone = t0;\n" +" this.\$function = t1;\n" +" },\n" +" _ZoneCreatePeriodicTimer: function _ZoneCreatePeriodicTimer() {\n" +" },\n" +" _ZonePrint: function _ZonePrint(t0, t1) {\n" +" this.zone = t0;\n" +" this.\$function = t1;\n" +" },\n" +" _ZoneFork: function _ZoneFork(t0, t1) {\n" +" this.zone = t0;\n" +" this.\$function = t1;\n" +" },\n" +" _ZoneHandleUncaughtError: function _ZoneHandleUncaughtError(t0, t1) {\n" +" this.zone = t0;\n" +" this.\$function = t1;\n" +" },\n" +" _ZoneValues: function _ZoneValues(t0, t1) {\n" +" this.zone = t0;\n" +" this.map = t1;\n" " },\n" " _Zone: function _Zone() {\n" " },\n" @@ -4828,22 +4892,15 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _._print = t10;\n" " _._fork = t11;\n" " _._handleUncaughtError = t12;\n" +" _._zoneValues = t13;\n" " _._delegateCache = null;\n" -" _.parent = t13;\n" -" _._map = t14;\n" +" _.parent = t14;\n" " },\n" " _CustomZone_bindCallback_closure: function _CustomZone_bindCallback_closure(t0, t1, t2) {\n" " this.\$this = t0;\n" " this.registered = t1;\n" " this.R = t2;\n" " },\n" -" _CustomZone_bindUnaryCallback_closure: function _CustomZone_bindUnaryCallback_closure(t0, t1, t2, t3) {\n" -" var _ = this;\n" -" _.\$this = t0;\n" -" _.registered = t1;\n" -" _.T = t2;\n" -" _.R = t3;\n" -" },\n" " _CustomZone_bindCallbackGuarded_closure: function _CustomZone_bindCallbackGuarded_closure(t0, t1) {\n" " this.\$this = t0;\n" " this.registered = t1;\n" @@ -4860,13 +4917,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this.f = t1;\n" " this.R = t2;\n" " },\n" -" _RootZone_bindUnaryCallback_closure: function _RootZone_bindUnaryCallback_closure(t0, t1, t2, t3) {\n" -" var _ = this;\n" -" _.\$this = t0;\n" -" _.f = t1;\n" -" _.T = t2;\n" -" _.R = t3;\n" -" },\n" " _RootZone_bindCallbackGuarded_closure: function _RootZone_bindCallbackGuarded_closure(t0, t1) {\n" " this.\$this = t0;\n" " this.f = t1;\n" @@ -4887,7 +4937,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this.error = t0;\n" " this.stackTrace = t1;\n" " },\n" -" _ZoneSpecification: function _ZoneSpecification(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) {\n" +" ZoneSpecification: function ZoneSpecification(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) {\n" " var _ = this;\n" " _.handleUncaughtError = t0;\n" " _.run = t1;\n" @@ -4992,23 +5042,23 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _HashMap: function _HashMap(t0) {\n" " var _ = this;\n" " _._collection\$_length = 0;\n" -" _._keys = _._collection\$_rest = _._nums = _._strings = null;\n" +" _._collection\$_keys = _._collection\$_rest = _._collection\$_nums = _._collection\$_strings = null;\n" " _.\$ti = t0;\n" " },\n" " _IdentityHashMap: function _IdentityHashMap(t0) {\n" " var _ = this;\n" " _._collection\$_length = 0;\n" -" _._keys = _._collection\$_rest = _._nums = _._strings = null;\n" +" _._collection\$_keys = _._collection\$_rest = _._collection\$_nums = _._collection\$_strings = null;\n" " _.\$ti = t0;\n" " },\n" " _HashMapKeyIterable: function _HashMapKeyIterable(t0, t1) {\n" -" this._collection\$_map = t0;\n" +" this._map = t0;\n" " this.\$ti = t1;\n" " },\n" " _HashMapKeyIterator: function _HashMapKeyIterator(t0, t1, t2) {\n" " var _ = this;\n" -" _._collection\$_map = t0;\n" -" _._keys = t1;\n" +" _._map = t0;\n" +" _._collection\$_keys = t1;\n" " _._offset = 0;\n" " _._collection\$_current = null;\n" " _.\$ti = t2;\n" @@ -5019,7 +5069,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _._hashCode = t1;\n" " _._validKey = t2;\n" " _.__js_helper\$_length = 0;\n" -" _._last = _._first = _.__js_helper\$_rest = _.__js_helper\$_nums = _.__js_helper\$_strings = null;\n" +" _._last = _._first = _.__js_helper\$_rest = _._nums = _._strings = null;\n" " _._modifications = 0;\n" " _.\$ti = t3;\n" " },\n" @@ -5029,7 +5079,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _HashSet: function _HashSet(t0) {\n" " var _ = this;\n" " _._collection\$_length = 0;\n" -" _._collection\$_elements = _._collection\$_rest = _._nums = _._strings = null;\n" +" _._collection\$_elements = _._collection\$_rest = _._collection\$_nums = _._collection\$_strings = null;\n" " _.\$ti = t0;\n" " },\n" " _HashSetIterator: function _HashSetIterator(t0, t1, t2) {\n" @@ -5053,7 +5103,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " MapView: function MapView() {\n" " },\n" " UnmodifiableMapView: function UnmodifiableMapView(t0, t1) {\n" -" this._collection\$_map = t0;\n" +" this._map = t0;\n" " this.\$ti = t1;\n" " },\n" " ListQueue: function ListQueue(t0, t1) {\n" @@ -6943,7 +6993,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this.isUtc = t2;\n" " },\n" " Duration: function Duration(t0) {\n" -" this._duration = t0;\n" +" this.inMicroseconds = t0;\n" " },\n" " _Enum: function _Enum() {\n" " },\n" @@ -9227,7 +9277,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " encodingForContentTypeHeader(contentTypeHeader) {\n" " var t1,\n" -" charset = contentTypeHeader.parameters._collection\$_map.\$index(0, \"charset\");\n" +" charset = contentTypeHeader.parameters._map.\$index(0, \"charset\");\n" " if (contentTypeHeader.type === \"application\" && contentTypeHeader.subtype === \"json\" && charset == null)\n" " return B.C_Utf8Codec;\n" " if (charset != null) {\n" @@ -9920,7 +9970,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " \$tdiv(receiver, other) {\n" " if ((receiver | 0) === receiver)\n" -" if (other >= 1 || other < -1)\n" +" if (other >= 1)\n" " return receiver / other | 0;\n" " return this._tdivSlow\$1(receiver, other);\n" " },\n" @@ -10262,10 +10312,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " };\n" " A._EfficientLengthCastIterable.prototype = {\$isEfficientLengthIterable: 1};\n" -" A.CastList.prototype = {\n" -" cast\$1\$0(_, \$R) {\n" -" return new A.CastList(this.__internal\$_source, this.\$ti._eval\$1(\"@<1>\")._bind\$1(\$R)._eval\$1(\"CastList<1,2>\"));\n" -" },\n" +" A._CastListBase.prototype = {\n" " \$index(_, index) {\n" " return this.\$ti._rest[1]._as(J.\$index\$asx(this.__internal\$_source, index));\n" " },\n" @@ -10283,19 +10330,16 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " sort\$1(_, compare) {\n" " var t1;\n" " this.\$ti._eval\$1(\"int(2,2)?\")._as(compare);\n" -" t1 = compare == null ? null : new A.CastList_sort_closure(this, compare);\n" +" t1 = compare == null ? null : new A._CastListBase_sort_closure(this, compare);\n" " J.sort\$1\$ax(this.__internal\$_source, t1);\n" " },\n" " fillRange\$3(_, start, end, fillValue) {\n" " J.fillRange\$3\$ax(this.__internal\$_source, start, end, this.\$ti._precomputed1._as(fillValue));\n" " },\n" " \$isEfficientLengthIterable: 1,\n" -" \$isList: 1,\n" -" get\$__internal\$_source() {\n" -" return this.__internal\$_source;\n" -" }\n" +" \$isList: 1\n" " };\n" -" A.CastList_sort_closure.prototype = {\n" +" A._CastListBase_sort_closure.prototype = {\n" " call\$2(v1, v2) {\n" " var t1 = this.\$this.\$ti,\n" " t2 = t1._precomputed1;\n" @@ -10308,6 +10352,14 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return this.\$this.\$ti._eval\$1(\"int(1,1)\");\n" " }\n" " };\n" +" A.CastList.prototype = {\n" +" cast\$1\$0(_, \$R) {\n" +" return new A.CastList(this.__internal\$_source, this.\$ti._eval\$1(\"@<1>\")._bind\$1(\$R)._eval\$1(\"CastList<1,2>\"));\n" +" },\n" +" get\$__internal\$_source() {\n" +" return this.__internal\$_source;\n" +" }\n" +" };\n" " A.CastMap.prototype = {\n" " cast\$2\$0(_, \$RK, \$RV) {\n" " return new A.CastMap(this.__internal\$_source, this.\$ti._eval\$1(\"@<1,2>\")._bind\$1(\$RK)._bind\$1(\$RV)._eval\$1(\"CastMap<1,2,3,4>\"));\n" @@ -10830,7 +10882,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return t2.elementAt\$1(t1, t2.get\$length(t1) - 1 - index);\n" " }\n" " };\n" -" A._CastList__CastIterableBase_ListMixin.prototype = {};\n" +" A.__CastListBase__CastIterableBase_ListMixin.prototype = {};\n" " A._Record_2.prototype = {\$recipe: \"+(1,2)\", \$shape: 1};\n" " A.ConstantMap.prototype = {\n" " cast\$2\$0(_, \$RK, \$RV) {\n" @@ -10858,7 +10910,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " get\$length(_) {\n" " return this._values.length;\n" " },\n" -" get\$__js_helper\$_keys() {\n" +" get\$_keys() {\n" " var keys = this.\$keys;\n" " if (keys == null) {\n" " keys = Object.keys(this._jsIndex);\n" @@ -10881,13 +10933,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " forEach\$1(_, f) {\n" " var keys, values, t1, i;\n" " this.\$ti._eval\$1(\"~(1,2)\")._as(f);\n" -" keys = this.get\$__js_helper\$_keys();\n" +" keys = this.get\$_keys();\n" " values = this._values;\n" " for (t1 = keys.length, i = 0; i < t1; ++i)\n" " f.call\$2(keys[i], values[i]);\n" " },\n" " get\$keys() {\n" -" return new A._KeysOrValues(this.get\$__js_helper\$_keys(), this.\$ti._eval\$1(\"_KeysOrValues<1>\"));\n" +" return new A._KeysOrValues(this.get\$_keys(), this.\$ti._eval\$1(\"_KeysOrValues<1>\"));\n" " }\n" " };\n" " A._KeysOrValues.prototype = {\n" @@ -11084,12 +11136,12 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " containsKey\$1(key) {\n" " var strings, nums;\n" " if (typeof key == \"string\") {\n" -" strings = this.__js_helper\$_strings;\n" +" strings = this._strings;\n" " if (strings == null)\n" " return false;\n" " return strings[key] != null;\n" " } else if (typeof key == \"number\" && (key & 0x3fffffff) === key) {\n" -" nums = this.__js_helper\$_nums;\n" +" nums = this._nums;\n" " if (nums == null)\n" " return false;\n" " return nums[key] != null;\n" @@ -11100,19 +11152,19 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " var rest = this.__js_helper\$_rest;\n" " if (rest == null)\n" " return false;\n" -" return this.internalFindBucketIndex\$2(this.__js_helper\$_getBucket\$2(rest, key), key) >= 0;\n" +" return this.internalFindBucketIndex\$2(this._getBucket\$2(rest, key), key) >= 0;\n" " },\n" " \$index(_, key) {\n" " var strings, cell, t1, nums, _null = null;\n" " if (typeof key == \"string\") {\n" -" strings = this.__js_helper\$_strings;\n" +" strings = this._strings;\n" " if (strings == null)\n" " return _null;\n" " cell = strings[key];\n" " t1 = cell == null ? _null : cell.hashMapCellValue;\n" " return t1;\n" " } else if (typeof key == \"number\" && (key & 0x3fffffff) === key) {\n" -" nums = this.__js_helper\$_nums;\n" +" nums = this._nums;\n" " if (nums == null)\n" " return _null;\n" " cell = nums[key];\n" @@ -11126,7 +11178,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " rest = this.__js_helper\$_rest;\n" " if (rest == null)\n" " return null;\n" -" bucket = this.__js_helper\$_getBucket\$2(rest, key);\n" +" bucket = this._getBucket\$2(rest, key);\n" " index = this.internalFindBucketIndex\$2(bucket, key);\n" " if (index < 0)\n" " return null;\n" @@ -11138,11 +11190,11 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t1._precomputed1._as(key);\n" " t1._rest[1]._as(value);\n" " if (typeof key == \"string\") {\n" -" strings = _this.__js_helper\$_strings;\n" -" _this._addHashTableEntry\$3(strings == null ? _this.__js_helper\$_strings = _this._newHashTable\$0() : strings, key, value);\n" +" strings = _this._strings;\n" +" _this._addHashTableEntry\$3(strings == null ? _this._strings = _this._newHashTable\$0() : strings, key, value);\n" " } else if (typeof key == \"number\" && (key & 0x3fffffff) === key) {\n" -" nums = _this.__js_helper\$_nums;\n" -" _this._addHashTableEntry\$3(nums == null ? _this.__js_helper\$_nums = _this._newHashTable\$0() : nums, key, value);\n" +" nums = _this._nums;\n" +" _this._addHashTableEntry\$3(nums == null ? _this._nums = _this._newHashTable\$0() : nums, key, value);\n" " } else\n" " _this.internalSet\$2(key, value);\n" " },\n" @@ -11224,7 +11276,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " internalComputeHashCode\$1(key) {\n" " return J.get\$hashCode\$(key) & 1073741823;\n" " },\n" -" __js_helper\$_getBucket\$2(table, key) {\n" +" _getBucket\$2(table, key) {\n" " return table[this.internalComputeHashCode\$1(key)];\n" " },\n" " internalFindBucketIndex\$2(bucket, key) {\n" @@ -13519,10 +13571,27 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " sink._add\$1(outputEvent);\n" " }\n" " };\n" -" A._ZoneFunction.prototype = {};\n" +" A._ZoneRun.prototype = {};\n" +" A._ZoneRunUnary.prototype = {};\n" +" A._ZoneRunBinary.prototype = {};\n" +" A._ZoneRegisterCallback.prototype = {};\n" +" A._ZoneRegisterUnaryCallback.prototype = {};\n" +" A._ZoneRegisterBinaryCallback.prototype = {};\n" +" A._ZoneErrorCallback.prototype = {};\n" +" A._ZoneScheduleMicrotask.prototype = {};\n" +" A._ZoneCreateTimer.prototype = {};\n" +" A._ZoneCreatePeriodicTimer.prototype = {};\n" +" A._ZonePrint.prototype = {};\n" +" A._ZoneFork.prototype = {};\n" +" A._ZoneHandleUncaughtError.prototype = {\n" +" function\$5(arg0, arg1, arg2, arg3, arg4) {\n" +" return this.\$function.call\$5(arg0, arg1, arg2, arg3, arg4);\n" +" }\n" +" };\n" +" A._ZoneValues.prototype = {};\n" " A._Zone.prototype = {\n" " _processUncaughtError\$3(zone, error, stackTrace) {\n" -" var implZone, handler, parentDelegate, parentZone, currentZone, e, s, implementation, t1, exception;\n" +" var implementation, implZone, parentZone, currentZone, e, s, t1, exception;\n" " type\$.StackTrace._as(stackTrace);\n" " implementation = this.get\$_handleUncaughtError();\n" " implZone = implementation.zone;\n" @@ -13530,15 +13599,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " A._rootHandleError(error, stackTrace);\n" " return;\n" " }\n" -" handler = implementation.\$function;\n" -" parentDelegate = implZone.get\$_parentDelegate();\n" " t1 = implZone.get\$parent();\n" " t1.toString;\n" " parentZone = t1;\n" " currentZone = \$.Zone__current;\n" " try {\n" " \$.Zone__current = parentZone;\n" -" handler.call\$5(implZone, parentDelegate, zone, error, stackTrace);\n" +" implementation.function\$5(implZone, implZone.get\$_parentDelegate(), zone, error, stackTrace);\n" " \$.Zone__current = currentZone;\n" " } catch (exception) {\n" " e = A.unwrapException(exception);\n" @@ -13600,9 +13667,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " bindCallback\$1\$1(f, \$R) {\n" " return new A._CustomZone_bindCallback_closure(this, this.registerCallback\$1\$1(\$R._eval\$1(\"0()\")._as(f), \$R), \$R);\n" " },\n" -" bindUnaryCallback\$2\$1(f, \$R, \$T) {\n" -" return new A._CustomZone_bindUnaryCallback_closure(this, this.registerUnaryCallback\$2\$1(\$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(f), \$R, \$T), \$T, \$R);\n" -" },\n" " bindCallbackGuarded\$1(f) {\n" " return new A._CustomZone_bindCallbackGuarded_closure(this, this.registerCallback\$1\$1(type\$.void_Function._as(f), type\$.void));\n" " },\n" @@ -13614,79 +13678,74 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " fork\$2\$specification\$zoneValues(specification, zoneValues) {\n" " var implementation = this._fork,\n" -" t1 = implementation.zone;\n" -" return implementation.\$function.call\$5(t1, t1.get\$_parentDelegate(), this, specification, zoneValues);\n" +" zone = implementation.zone;\n" +" return implementation.\$function.call\$5(zone, zone.get\$_parentDelegate(), this, specification, zoneValues);\n" " },\n" " run\$1\$1(f, \$R) {\n" -" var implementation, t1;\n" +" var implementation, zone;\n" " \$R._eval\$1(\"0()\")._as(f);\n" " implementation = this._run;\n" -" t1 = implementation.zone;\n" -" return implementation.\$function.call\$1\$4(t1, t1.get\$_parentDelegate(), this, f, \$R);\n" +" zone = implementation.zone;\n" +" return implementation.\$function.call\$1\$4(zone, zone.get\$_parentDelegate(), this, f, \$R);\n" " },\n" " runUnary\$2\$2(f, arg, \$R, \$T) {\n" -" var implementation, t1;\n" +" var implementation, zone;\n" " \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(f);\n" " \$T._as(arg);\n" " implementation = this._runUnary;\n" -" t1 = implementation.zone;\n" -" return implementation.\$function.call\$2\$5(t1, t1.get\$_parentDelegate(), this, f, arg, \$R, \$T);\n" +" zone = implementation.zone;\n" +" return implementation.\$function.call\$2\$5(zone, zone.get\$_parentDelegate(), this, f, arg, \$R, \$T);\n" " },\n" " runBinary\$3\$3(f, arg1, arg2, \$R, \$T1, \$T2) {\n" -" var implementation, t1;\n" +" var implementation, zone;\n" " \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(f);\n" " \$T1._as(arg1);\n" " \$T2._as(arg2);\n" " implementation = this._runBinary;\n" -" t1 = implementation.zone;\n" -" return implementation.\$function.call\$3\$6(t1, t1.get\$_parentDelegate(), this, f, arg1, arg2, \$R, \$T1, \$T2);\n" +" zone = implementation.zone;\n" +" return implementation.\$function.call\$3\$6(zone, zone.get\$_parentDelegate(), this, f, arg1, arg2, \$R, \$T1, \$T2);\n" " },\n" " registerCallback\$1\$1(callback, \$R) {\n" -" var implementation, t1;\n" +" var implementation, zone;\n" " \$R._eval\$1(\"0()\")._as(callback);\n" " implementation = this._registerCallback;\n" -" t1 = implementation.zone;\n" -" return implementation.\$function.call\$1\$4(t1, t1.get\$_parentDelegate(), this, callback, \$R);\n" +" zone = implementation.zone;\n" +" return implementation.\$function.call\$1\$4(zone, zone.get\$_parentDelegate(), this, callback, \$R);\n" " },\n" " registerUnaryCallback\$2\$1(callback, \$R, \$T) {\n" -" var implementation, t1;\n" +" var implementation, zone;\n" " \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(callback);\n" " implementation = this._registerUnaryCallback;\n" -" t1 = implementation.zone;\n" -" return implementation.\$function.call\$2\$4(t1, t1.get\$_parentDelegate(), this, callback, \$R, \$T);\n" +" zone = implementation.zone;\n" +" return implementation.\$function.call\$2\$4(zone, zone.get\$_parentDelegate(), this, callback, \$R, \$T);\n" " },\n" " registerBinaryCallback\$3\$1(callback, \$R, \$T1, \$T2) {\n" -" var implementation, t1;\n" +" var implementation, zone;\n" " \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(callback);\n" " implementation = this._registerBinaryCallback;\n" -" t1 = implementation.zone;\n" -" return implementation.\$function.call\$3\$4(t1, t1.get\$_parentDelegate(), this, callback, \$R, \$T1, \$T2);\n" +" zone = implementation.zone;\n" +" return implementation.\$function.call\$3\$4(zone, zone.get\$_parentDelegate(), this, callback, \$R, \$T1, \$T2);\n" " },\n" " errorCallback\$2(error, stackTrace) {\n" " var implementation = this._errorCallback,\n" -" implementationZone = implementation.zone;\n" -" if (implementationZone === B.C__RootZone)\n" +" zone = implementation.zone;\n" +" if (zone === B.C__RootZone)\n" " return null;\n" -" return implementation.\$function.call\$5(implementationZone, implementationZone.get\$_parentDelegate(), this, error, stackTrace);\n" +" return implementation.\$function.call\$5(zone, zone.get\$_parentDelegate(), this, error, stackTrace);\n" " },\n" " scheduleMicrotask\$1(f) {\n" -" var implementation, t1;\n" +" var implementation, zone;\n" " type\$.void_Function._as(f);\n" " implementation = this._scheduleMicrotask;\n" -" t1 = implementation.zone;\n" -" return implementation.\$function.call\$4(t1, t1.get\$_parentDelegate(), this, f);\n" +" zone = implementation.zone;\n" +" return implementation.\$function.call\$4(zone, zone.get\$_parentDelegate(), this, f);\n" " },\n" " createTimer\$2(duration, f) {\n" -" var implementation, t1;\n" +" var implementation, zone;\n" " type\$.void_Function._as(f);\n" " implementation = this._createTimer;\n" -" t1 = implementation.zone;\n" -" return implementation.\$function.call\$5(t1, t1.get\$_parentDelegate(), this, duration, f);\n" -" },\n" -" print\$1(line) {\n" -" var implementation = this._print,\n" -" t1 = implementation.zone;\n" -" return implementation.\$function.call\$4(t1, t1.get\$_parentDelegate(), this, line);\n" +" zone = implementation.zone;\n" +" return implementation.\$function.call\$5(zone, zone.get\$_parentDelegate(), this, duration, f);\n" " },\n" " get\$_run() {\n" " return this._run;\n" @@ -13727,11 +13786,11 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " get\$_handleUncaughtError() {\n" " return this._handleUncaughtError;\n" " },\n" +" get\$_zoneValues() {\n" +" return this._zoneValues;\n" +" },\n" " get\$parent() {\n" " return this.parent;\n" -" },\n" -" get\$_map() {\n" -" return this._map;\n" " }\n" " };\n" " A._CustomZone_bindCallback_closure.prototype = {\n" @@ -13742,16 +13801,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return this.R._eval\$1(\"0()\");\n" " }\n" " };\n" -" A._CustomZone_bindUnaryCallback_closure.prototype = {\n" -" call\$1(arg) {\n" -" var _this = this,\n" -" t1 = _this.T;\n" -" return _this.\$this.runUnary\$2\$2(_this.registered, t1._as(arg), _this.R, t1);\n" -" },\n" -" \$signature() {\n" -" return this.R._eval\$1(\"@<0>\")._bind\$1(this.T)._eval\$1(\"1(2)\");\n" -" }\n" -" };\n" " A._CustomZone_bindCallbackGuarded_closure.prototype = {\n" " call\$0() {\n" " return this.\$this.runGuarded\$1(this.registered);\n" @@ -13769,50 +13818,50 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._RootZone.prototype = {\n" " get\$_run() {\n" -" return B._ZoneFunction__RootZone__rootRun;\n" +" return B._ZoneRun__RootZone__rootRun;\n" " },\n" " get\$_runUnary() {\n" -" return B._ZoneFunction__RootZone__rootRunUnary;\n" +" return B._ZoneRunUnary__RootZone__rootRunUnary;\n" " },\n" " get\$_runBinary() {\n" -" return B._ZoneFunction__RootZone__rootRunBinary;\n" +" return B._ZoneRunBinary__RootZone__rootRunBinary;\n" " },\n" " get\$_registerCallback() {\n" -" return B._ZoneFunction__RootZone__rootRegisterCallback;\n" +" return B._ZoneRegisterCallback__RootZone__rootRegisterCallback;\n" " },\n" " get\$_registerUnaryCallback() {\n" -" return B._ZoneFunction_Xkh;\n" +" return B._ZoneRegisterUnaryCallback_a9v;\n" " },\n" " get\$_registerBinaryCallback() {\n" -" return B._ZoneFunction_e9o;\n" +" return B._ZoneRegisterBinaryCallback_sk0;\n" " },\n" " get\$_errorCallback() {\n" -" return B._ZoneFunction__RootZone__rootErrorCallback;\n" +" return B._ZoneErrorCallback__RootZone__rootErrorCallback;\n" " },\n" " get\$_scheduleMicrotask() {\n" -" return B._ZoneFunction__RootZone__rootScheduleMicrotask;\n" +" return B._ZoneScheduleMicrotask__RootZone__rootScheduleMicrotask;\n" " },\n" " get\$_createTimer() {\n" -" return B._ZoneFunction__RootZone__rootCreateTimer;\n" +" return B._ZoneCreateTimer__RootZone__rootCreateTimer;\n" " },\n" " get\$_createPeriodicTimer() {\n" -" return B._ZoneFunction_PAY;\n" +" return B.C__ZoneCreatePeriodicTimer;\n" " },\n" " get\$_print() {\n" -" return B._ZoneFunction__RootZone__rootPrint;\n" +" return B._ZonePrint__RootZone__rootPrint;\n" " },\n" " get\$_fork() {\n" -" return B._ZoneFunction__RootZone__rootFork;\n" +" return B._ZoneFork__RootZone__rootFork;\n" " },\n" " get\$_handleUncaughtError() {\n" -" return B._ZoneFunction_KjJ;\n" +" return B._ZoneHandleUncaughtError_wQ6;\n" +" },\n" +" get\$_zoneValues() {\n" +" return B._ZoneValues__RootZone_Map_empty;\n" " },\n" " get\$parent() {\n" " return null;\n" " },\n" -" get\$_map() {\n" -" return \$.\$get\$_RootZone__rootMap();\n" -" },\n" " get\$_delegate() {\n" " var t1 = \$._RootZone__rootDelegate;\n" " return t1 == null ? \$._RootZone__rootDelegate = new A._ZoneDelegate(this) : t1;\n" @@ -13875,9 +13924,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " bindCallback\$1\$1(f, \$R) {\n" " return new A._RootZone_bindCallback_closure(this, \$R._eval\$1(\"0()\")._as(f), \$R);\n" " },\n" -" bindUnaryCallback\$2\$1(f, \$R, \$T) {\n" -" return new A._RootZone_bindUnaryCallback_closure(this, \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(f), \$T, \$R);\n" -" },\n" " bindCallbackGuarded\$1(f) {\n" " return new A._RootZone_bindCallbackGuarded_closure(this, type\$.void_Function._as(f));\n" " },\n" @@ -13928,9 +13974,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " createTimer\$2(duration, f) {\n" " return A.Timer__createTimer(duration, type\$.void_Function._as(f));\n" -" },\n" -" print\$1(line) {\n" -" A.printString(line);\n" " }\n" " };\n" " A._RootZone_bindCallback_closure.prototype = {\n" @@ -13941,16 +13984,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return this.R._eval\$1(\"0()\");\n" " }\n" " };\n" -" A._RootZone_bindUnaryCallback_closure.prototype = {\n" -" call\$1(arg) {\n" -" var _this = this,\n" -" t1 = _this.T;\n" -" return _this.\$this.runUnary\$2\$2(_this.f, t1._as(arg), _this.R, t1);\n" -" },\n" -" \$signature() {\n" -" return this.R._eval\$1(\"@<0>\")._bind\$1(this.T)._eval\$1(\"1(2)\");\n" -" }\n" -" };\n" " A._RootZone_bindCallbackGuarded_closure.prototype = {\n" " call\$0() {\n" " return this.\$this.runGuarded\$1(this.f);\n" @@ -13968,19 +14001,17 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A.runZonedGuarded_closure.prototype = {\n" " call\$5(\$self, \$parent, zone, error, stackTrace) {\n" -" var e, s, exception, t2,\n" -" t1 = type\$.StackTrace;\n" -" t1._as(stackTrace);\n" +" var e, s, exception, t1;\n" " try {\n" -" this.parentZone.runBinary\$3\$3(this.onError, error, stackTrace, type\$.void, type\$.Object, t1);\n" +" this.parentZone.runBinary\$3\$3(this.onError, error, stackTrace, type\$.void, type\$.Object, type\$.StackTrace);\n" " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" -" t2 = \$parent._delegationTarget;\n" +" t1 = \$parent._delegationTarget;\n" " if (e === error)\n" -" t2._processUncaughtError\$3(zone, error, stackTrace);\n" +" t1._processUncaughtError\$3(zone, error, stackTrace);\n" " else\n" -" t2._processUncaughtError\$3(zone, A._asObject(e), t1._as(s));\n" +" t1._processUncaughtError\$3(zone, A._asObject(e), type\$.StackTrace._as(s));\n" " }\n" " },\n" " \$signature: 42\n" @@ -13992,7 +14023,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " \$signature: 0\n" " };\n" -" A._ZoneSpecification.prototype = {\$isZoneSpecification: 1};\n" +" A.ZoneSpecification.prototype = {};\n" " A._HashMap.prototype = {\n" " get\$length(_) {\n" " return this._collection\$_length;\n" @@ -14009,10 +14040,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " containsKey\$1(key) {\n" " var strings, nums;\n" " if (typeof key == \"string\" && key !== \"__proto__\") {\n" -" strings = this._strings;\n" +" strings = this._collection\$_strings;\n" " return strings == null ? false : strings[key] != null;\n" " } else if (typeof key == \"number\" && (key & 1073741823) === key) {\n" -" nums = this._nums;\n" +" nums = this._collection\$_nums;\n" " return nums == null ? false : nums[key] != null;\n" " } else\n" " return this._containsKey\$1(key);\n" @@ -14021,16 +14052,16 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " var rest = this._collection\$_rest;\n" " if (rest == null)\n" " return false;\n" -" return this._findBucketIndex\$2(this._getBucket\$2(rest, key), key) >= 0;\n" +" return this._findBucketIndex\$2(this._collection\$_getBucket\$2(rest, key), key) >= 0;\n" " },\n" " \$index(_, key) {\n" " var strings, t1, nums;\n" " if (typeof key == \"string\" && key !== \"__proto__\") {\n" -" strings = this._strings;\n" +" strings = this._collection\$_strings;\n" " t1 = strings == null ? null : A._HashMap__getTableEntry(strings, key);\n" " return t1;\n" " } else if (typeof key == \"number\" && (key & 1073741823) === key) {\n" -" nums = this._nums;\n" +" nums = this._collection\$_nums;\n" " t1 = nums == null ? null : A._HashMap__getTableEntry(nums, key);\n" " return t1;\n" " } else\n" @@ -14041,7 +14072,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " rest = this._collection\$_rest;\n" " if (rest == null)\n" " return null;\n" -" bucket = this._getBucket\$2(rest, key);\n" +" bucket = this._collection\$_getBucket\$2(rest, key);\n" " index = this._findBucketIndex\$2(bucket, key);\n" " return index < 0 ? null : bucket[index + 1];\n" " },\n" @@ -14051,11 +14082,11 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t1._precomputed1._as(key);\n" " t1._rest[1]._as(value);\n" " if (typeof key == \"string\" && key !== \"__proto__\") {\n" -" strings = _this._strings;\n" -" _this._collection\$_addHashTableEntry\$3(strings == null ? _this._strings = A._HashMap__newHashTable() : strings, key, value);\n" +" strings = _this._collection\$_strings;\n" +" _this._collection\$_addHashTableEntry\$3(strings == null ? _this._collection\$_strings = A._HashMap__newHashTable() : strings, key, value);\n" " } else if (typeof key == \"number\" && (key & 1073741823) === key) {\n" -" nums = _this._nums;\n" -" _this._collection\$_addHashTableEntry\$3(nums == null ? _this._nums = A._HashMap__newHashTable() : nums, key, value);\n" +" nums = _this._collection\$_nums;\n" +" _this._collection\$_addHashTableEntry\$3(nums == null ? _this._collection\$_nums = A._HashMap__newHashTable() : nums, key, value);\n" " } else\n" " _this._set\$2(key, value);\n" " },\n" @@ -14072,7 +14103,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " if (bucket == null) {\n" " A._HashMap__setTableEntry(rest, hash, [key, value]);\n" " ++_this._collection\$_length;\n" -" _this._keys = null;\n" +" _this._collection\$_keys = null;\n" " } else {\n" " index = _this._findBucketIndex\$2(bucket, key);\n" " if (index >= 0)\n" @@ -14080,7 +14111,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " else {\n" " bucket.push(key, value);\n" " ++_this._collection\$_length;\n" -" _this._keys = null;\n" +" _this._collection\$_keys = null;\n" " }\n" " }\n" " },\n" @@ -14094,17 +14125,17 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t2._as(key);\n" " t3 = _this.\$index(0, key);\n" " action.call\$2(key, t3 == null ? t1._as(t3) : t3);\n" -" if (keys !== _this._keys)\n" +" if (keys !== _this._collection\$_keys)\n" " throw A.wrapException(A.ConcurrentModificationError\$(_this));\n" " }\n" " },\n" " _computeKeys\$0() {\n" " var strings, index, names, entries, i, nums, rest, bucket, \$length, i0, _this = this,\n" -" result = _this._keys;\n" +" result = _this._collection\$_keys;\n" " if (result != null)\n" " return result;\n" " result = A.List_List\$filled(_this._collection\$_length, null, false, type\$.dynamic);\n" -" strings = _this._strings;\n" +" strings = _this._collection\$_strings;\n" " index = 0;\n" " if (strings != null) {\n" " names = Object.getOwnPropertyNames(strings);\n" @@ -14114,7 +14145,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " ++index;\n" " }\n" " }\n" -" nums = _this._nums;\n" +" nums = _this._collection\$_nums;\n" " if (nums != null) {\n" " names = Object.getOwnPropertyNames(nums);\n" " entries = names.length;\n" @@ -14136,7 +14167,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " }\n" " }\n" -" return _this._keys = result;\n" +" return _this._collection\$_keys = result;\n" " },\n" " _collection\$_addHashTableEntry\$3(table, key, value) {\n" " var t1 = A._instanceType(this);\n" @@ -14144,14 +14175,14 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t1._rest[1]._as(value);\n" " if (table[key] == null) {\n" " ++this._collection\$_length;\n" -" this._keys = null;\n" +" this._collection\$_keys = null;\n" " }\n" " A._HashMap__setTableEntry(table, key, value);\n" " },\n" " _computeHashCode\$1(key) {\n" " return J.get\$hashCode\$(key) & 1073741823;\n" " },\n" -" _getBucket\$2(table, key) {\n" +" _collection\$_getBucket\$2(table, key) {\n" " return table[this._computeHashCode\$1(key)];\n" " },\n" " _findBucketIndex\$2(bucket, key) {\n" @@ -14185,20 +14216,20 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._HashMapKeyIterable.prototype = {\n" " get\$length(_) {\n" -" return this._collection\$_map._collection\$_length;\n" +" return this._map._collection\$_length;\n" " },\n" " get\$isEmpty(_) {\n" -" return this._collection\$_map._collection\$_length === 0;\n" +" return this._map._collection\$_length === 0;\n" " },\n" " get\$isNotEmpty(_) {\n" -" return this._collection\$_map._collection\$_length !== 0;\n" +" return this._map._collection\$_length !== 0;\n" " },\n" " get\$iterator(_) {\n" -" var t1 = this._collection\$_map;\n" +" var t1 = this._map;\n" " return new A._HashMapKeyIterator(t1, t1._computeKeys\$0(), this.\$ti._eval\$1(\"_HashMapKeyIterator<1>\"));\n" " },\n" " contains\$1(_, element) {\n" -" return this._collection\$_map.containsKey\$1(element);\n" +" return this._map.containsKey\$1(element);\n" " }\n" " };\n" " A._HashMapKeyIterator.prototype = {\n" @@ -14208,10 +14239,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " moveNext\$0() {\n" " var _this = this,\n" -" keys = _this._keys,\n" +" keys = _this._collection\$_keys,\n" " offset = _this._offset,\n" -" t1 = _this._collection\$_map;\n" -" if (keys !== t1._keys)\n" +" t1 = _this._map;\n" +" if (keys !== t1._collection\$_keys)\n" " throw A.wrapException(A.ConcurrentModificationError\$(t1));\n" " else if (offset >= keys.length) {\n" " _this._collection\$_current = null;\n" @@ -14275,10 +14306,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " contains\$1(_, object) {\n" " var strings, nums;\n" " if (typeof object == \"string\" && object !== \"__proto__\") {\n" -" strings = this._strings;\n" +" strings = this._collection\$_strings;\n" " return strings == null ? false : strings[object] != null;\n" " } else if (typeof object == \"number\" && (object & 1073741823) === object) {\n" -" nums = this._nums;\n" +" nums = this._collection\$_nums;\n" " return nums == null ? false : nums[object] != null;\n" " } else\n" " return this._contains\$1(object);\n" @@ -14293,11 +14324,11 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " var strings, nums, _this = this;\n" " A._instanceType(_this)._precomputed1._as(element);\n" " if (typeof element == \"string\" && element !== \"__proto__\") {\n" -" strings = _this._strings;\n" -" return _this._collection\$_addHashTableEntry\$2(strings == null ? _this._strings = A._HashSet__newHashTable() : strings, element);\n" +" strings = _this._collection\$_strings;\n" +" return _this._collection\$_addHashTableEntry\$2(strings == null ? _this._collection\$_strings = A._HashSet__newHashTable() : strings, element);\n" " } else if (typeof element == \"number\" && (element & 1073741823) === element) {\n" -" nums = _this._nums;\n" -" return _this._collection\$_addHashTableEntry\$2(nums == null ? _this._nums = A._HashSet__newHashTable() : nums, element);\n" +" nums = _this._collection\$_nums;\n" +" return _this._collection\$_addHashTableEntry\$2(nums == null ? _this._collection\$_nums = A._HashSet__newHashTable() : nums, element);\n" " } else\n" " return _this._collection\$_add\$1(element);\n" " },\n" @@ -14323,9 +14354,9 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " remove\$1(_, object) {\n" " var _this = this;\n" " if (typeof object == \"string\" && object !== \"__proto__\")\n" -" return _this._removeHashTableEntry\$2(_this._strings, object);\n" +" return _this._removeHashTableEntry\$2(_this._collection\$_strings, object);\n" " else if (typeof object == \"number\" && (object & 1073741823) === object)\n" -" return _this._removeHashTableEntry\$2(_this._nums, object);\n" +" return _this._removeHashTableEntry\$2(_this._collection\$_nums, object);\n" " else\n" " return _this._remove\$1(object);\n" " },\n" @@ -14352,7 +14383,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " if (result != null)\n" " return result;\n" " result = A.List_List\$filled(_this._collection\$_length, null, false, type\$.dynamic);\n" -" strings = _this._strings;\n" +" strings = _this._collection\$_strings;\n" " index = 0;\n" " if (strings != null) {\n" " names = Object.getOwnPropertyNames(strings);\n" @@ -14362,7 +14393,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " ++index;\n" " }\n" " }\n" -" nums = _this._nums;\n" +" nums = _this._collection\$_nums;\n" " if (nums != null) {\n" " names = Object.getOwnPropertyNames(nums);\n" " entries = names.length;\n" @@ -14613,44 +14644,44 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A.MapView.prototype = {\n" " cast\$2\$0(_, \$RK, \$RV) {\n" -" return this._collection\$_map.cast\$2\$0(0, \$RK, \$RV);\n" +" return this._map.cast\$2\$0(0, \$RK, \$RV);\n" " },\n" " \$index(_, key) {\n" -" return this._collection\$_map.\$index(0, key);\n" +" return this._map.\$index(0, key);\n" " },\n" " \$indexSet(_, key, value) {\n" " var t1 = A._instanceType(this);\n" -" this._collection\$_map.\$indexSet(0, t1._precomputed1._as(key), t1._rest[1]._as(value));\n" +" this._map.\$indexSet(0, t1._precomputed1._as(key), t1._rest[1]._as(value));\n" " },\n" " containsKey\$1(key) {\n" -" return this._collection\$_map.containsKey\$1(key);\n" +" return this._map.containsKey\$1(key);\n" " },\n" " forEach\$1(_, action) {\n" -" this._collection\$_map.forEach\$1(0, A._instanceType(this)._eval\$1(\"~(1,2)\")._as(action));\n" +" this._map.forEach\$1(0, A._instanceType(this)._eval\$1(\"~(1,2)\")._as(action));\n" " },\n" " get\$isEmpty(_) {\n" -" var t1 = this._collection\$_map;\n" +" var t1 = this._map;\n" " return t1.get\$isEmpty(t1);\n" " },\n" " get\$isNotEmpty(_) {\n" -" var t1 = this._collection\$_map;\n" +" var t1 = this._map;\n" " return t1.get\$isNotEmpty(t1);\n" " },\n" " get\$length(_) {\n" -" var t1 = this._collection\$_map;\n" +" var t1 = this._map;\n" " return t1.get\$length(t1);\n" " },\n" " get\$keys() {\n" -" return this._collection\$_map.get\$keys();\n" +" return this._map.get\$keys();\n" " },\n" " toString\$0(_) {\n" -" return this._collection\$_map.toString\$0(0);\n" +" return this._map.toString\$0(0);\n" " },\n" " \$isMap: 1\n" " };\n" " A.UnmodifiableMapView.prototype = {\n" " cast\$2\$0(_, \$RK, \$RV) {\n" -" return new A.UnmodifiableMapView(this._collection\$_map.cast\$2\$0(0, \$RK, \$RV), \$RK._eval\$1(\"@<0>\")._bind\$1(\$RV)._eval\$1(\"UnmodifiableMapView<1,2>\"));\n" +" return new A.UnmodifiableMapView(this._map.cast\$2\$0(0, \$RK, \$RV), \$RK._eval\$1(\"@<0>\")._bind\$1(\$RV)._eval\$1(\"UnmodifiableMapView<1,2>\"));\n" " }\n" " };\n" " A.ListQueue.prototype = {\n" @@ -15117,6 +15148,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " containsKey\$1(key) {\n" " if (this._processed == null)\n" " return this._data.containsKey\$1(key);\n" +" if (typeof key != \"string\")\n" +" return false;\n" " return Object.prototype.hasOwnProperty.call(this._original, key);\n" " },\n" " forEach\$1(_, f) {\n" @@ -16045,17 +16078,17 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " \$eq(_, other) {\n" " if (other == null)\n" " return false;\n" -" return other instanceof A.Duration && this._duration === other._duration;\n" +" return other instanceof A.Duration && this.inMicroseconds === other.inMicroseconds;\n" " },\n" " get\$hashCode(_) {\n" -" return B.JSInt_methods.get\$hashCode(this._duration);\n" +" return B.JSInt_methods.get\$hashCode(this.inMicroseconds);\n" " },\n" " compareTo\$1(_, other) {\n" -" return B.JSInt_methods.compareTo\$1(this._duration, type\$.Duration._as(other)._duration);\n" +" return B.JSInt_methods.compareTo\$1(this.inMicroseconds, type\$.Duration._as(other).inMicroseconds);\n" " },\n" " toString\$0(_) {\n" " var sign, minutes, minutesPadding, seconds, secondsPadding,\n" -" microseconds = this._duration,\n" +" microseconds = this.inMicroseconds,\n" " hours = B.JSInt_methods._tdivFast\$1(microseconds, 3600000000),\n" " microseconds0 = microseconds % 3600000000;\n" " if (microseconds < 0) {\n" @@ -17607,7 +17640,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$0() {\n" " throw A.wrapException(A.ArgumentError\$(\"Unknown BuildStatus: \" + this.json, null));\n" " },\n" -" \$signature: 90\n" +" \$signature: 89\n" " };\n" " A.BuildResult.prototype = {\n" " toJson\$0() {\n" @@ -17683,7 +17716,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(e) {\n" " return type\$.DebugEvent._as(e).toJson\$0();\n" " },\n" -" \$signature: 91\n" +" \$signature: 90\n" " };\n" " A.DebugInfo.prototype = {\n" " toJson\$0() {\n" @@ -18658,7 +18691,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " buffer._contents = t1;\n" " buffer._contents = t1 + this.subtype;\n" " t1 = this.parameters;\n" -" t1._collection\$_map.forEach\$1(0, t1.\$ti._eval\$1(\"~(1,2)\")._as(new A.MediaType_toString_closure(buffer)));\n" +" t1._map.forEach\$1(0, t1.\$ti._eval\$1(\"~(1,2)\")._as(new A.MediaType_toString_closure(buffer)));\n" " t1 = buffer._contents;\n" " return t1.charCodeAt(0) == 0 ? t1 : t1;\n" " }\n" @@ -19537,7 +19570,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t1._restartable_timer\$_timer.cancel\$0();\n" " else {\n" " t1._restartable_timer\$_timer.cancel\$0();\n" -" t1._restartable_timer\$_timer = A.Timer_Timer(t1._restartable_timer\$_duration, t1._restartable_timer\$_callback);\n" +" t1._restartable_timer\$_timer = A.Timer_Timer(t1._duration, t1._restartable_timer\$_callback);\n" " }\n" " }\n" " };\n" @@ -21037,7 +21070,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(runId) {\n" " return this.call\$2(runId, null);\n" " },\n" -" \$signature: 93\n" +" \$signature: 92\n" " };\n" " A.main__closure3.prototype = {\n" " call\$1(runId) {\n" @@ -22206,7 +22239,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " stronglyConnectedComponents = A.stronglyConnectedComponents(A.JSArrayExtension_toDartIterable(type\$.JSArray_nullable_Object._as(t1.Array.from(A._asJSObject(t2.keys()))), t3), this.get\$_moduleParents(), t3);\n" " t3 = this._moduleOrdering;\n" " if (t3._collection\$_length > 0) {\n" -" t3._strings = t3._nums = t3._collection\$_rest = t3._keys = null;\n" +" t3._collection\$_strings = t3._collection\$_nums = t3._collection\$_rest = t3._collection\$_keys = null;\n" " t3._collection\$_length = 0;\n" " }\n" " for (i = 0; i < stronglyConnectedComponents.length; ++i)\n" @@ -22335,8 +22368,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _static(A, \"async___rootCreateTimer\$closure\", 5, null, [\"call\$5\"], [\"_rootCreateTimer\"], 85, 0);\n" " _static(A, \"async___rootCreatePeriodicTimer\$closure\", 5, null, [\"call\$5\"], [\"_rootCreatePeriodicTimer\"], 86, 0);\n" " _static(A, \"async___rootPrint\$closure\", 4, null, [\"call\$4\"], [\"_rootPrint\"], 87, 0);\n" -" _static_1(A, \"async___printToZone\$closure\", \"_printToZone0\", 88);\n" -" _static(A, \"async___rootFork\$closure\", 5, null, [\"call\$5\"], [\"_rootFork\"], 89, 0);\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\"], 62, 0, 0);\n" " _instance_2_u(A._Future.prototype, \"get\$_completeError\", \"_completeError\$2\", 6);\n" " var _;\n" @@ -22364,7 +22396,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _static_1(A, \"core_Uri_decodeComponent\$closure\", \"Uri_decodeComponent\", 10);\n" " _static(A, \"math__max\$closure\", 2, null, [\"call\$1\$2\", \"call\$2\"], [\"max\", function(a, b) {\n" " return A.max(a, b, type\$.num);\n" -" }], 92, 0);\n" +" }], 91, 0);\n" " _instance_1_u(_ = A.PersistentWebSocket.prototype, \"get\$_writeToWebSocket\", \"_writeToWebSocket\$1\", 5);\n" " _instance_0_u(_, \"get\$_listenWithRetry\", \"_listenWithRetry\$0\", 9);\n" " _static_1(A, \"case_insensitive_map_CaseInsensitiveMap__canonicalizer\$closure\", \"CaseInsensitiveMap__canonicalizer\", 10);\n" @@ -22383,7 +22415,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _inherit = hunkHelpers.inherit,\n" " _inheritMany = hunkHelpers.inheritMany;\n" " _inherit(A.Object, null);\n" -" _inheritMany(A.Object, [A.JS_CONST, J.Interceptor, A.SafeToStringHook, J.ArrayIterator, A.Stream, A.CastStreamSubscription, A.Iterable, A.CastIterator, A.Closure, A.MapBase, A.Error, A.ListBase, A.SentinelValue, A.ListIterator, A.MappedIterator, A.WhereIterator, A.ExpandIterator, A.TakeIterator, A.SkipIterator, A.EmptyIterator, A.WhereTypeIterator, A.FixedLengthListMixin, A.UnmodifiableListMixin, A._Record, A.ConstantMap, A._KeysOrValuesOrElementsIterator, A.TypeErrorDecoder, A.NullThrownFromJavaScriptException, A.ExceptionAndStackTrace, A._StackTrace, A.LinkedHashMapCell, A.LinkedHashMapKeyIterator, A.LinkedHashMapValueIterator, A.LinkedHashMapEntryIterator, A.JSSyntaxRegExp, A._MatchImplementation, A._AllMatchesIterator, A.StringMatch, A._StringAllMatchesIterator, A._Cell, A._UnmodifiableNativeByteBufferView, A.Rti, A._FunctionParameters, A._Type, A._TimerImpl, A._AsyncAwaitCompleter, A._AsyncStarStreamController, A._IterationMarker, A.AsyncError, A._Completer, A._FutureListener, A._Future, A._AsyncCallbackEntry, A._StreamController, A._AsyncStreamControllerDispatch, A._BufferingStreamSubscription, A._StreamSinkWrapper, A._AddStreamState, A._DelayedEvent, A._DelayedDone, A._PendingEvents, A._DoneStreamSubscription, A._StreamIterator, A._ZoneFunction, A._Zone, A._ZoneDelegate, A._ZoneSpecification, A._HashMapKeyIterator, A.SetBase, A._HashSetIterator, A._UnmodifiableMapMixin, A.MapView, A._ListQueueIterator, A._SplayTreeNode, A._SplayTree, A._SplayTreeIterator, A.Codec, A.Converter, A.ByteConversionSink, A._JsonStringifier, A._Utf8Encoder, A._Utf8Decoder, A.DateTime, A.Duration, A._Enum, A.OutOfMemoryError, A.StackOverflowError, A._Exception, A.FormatException, A.MapEntry, A.Null, A._StringStackTrace, A.StringBuffer, A._Uri, A.UriData, A._SimpleUri, A.NullRejectionException, A._JSRandom, A._JSSecureRandom, A.AsyncMemoizer, A.ErrorResult, A.ValueResult, A.StreamQueue, A._NextRequest, A._HasNextRequest, A.CanonicalizedMap, A._QueueList_Object_ListMixin, A.BuildResult, A.ConnectRequest, A.DebugEvent, A.BatchedDebugEvents, A.DebugInfo, A.DevToolsRequest, A.DevToolsResponse, A.ErrorResponse, A.HotReloadRequest, A.HotReloadResponse, A.HotRestartRequest, A.HotRestartResponse, A.PingRequest, A.RegisterEvent, A.RunRequest, A.ServiceExtensionRequest, A.ServiceExtensionResponse, A.BatchedStreamController, A.SocketClient, A._PersistentWebSocket_Object_StreamChannelMixin, A.Uuid, A._StackState, A.ClientException, A.BaseClient, A.BaseRequest, A.BaseResponse, A.MediaType, A.Level, A.LogRecord, A.Logger, A.Context, A.Style, A.ParsedPath, A.PathException, A.Pool, A.PoolResource, A.SourceFile, A.SourceLocationMixin, A.SourceSpanMixin, A.Highlighter, A._Highlight, A._Line, A.SourceLocation, A.SourceSpanException, A.StreamChannelMixin, A.StringScanner, A.EventStreamProvider, A._EventStreamSubscription, A.BrowserWebSocket, A.WebSocketEvent, A.WebSocketException, A.DdcLibraryBundleRestarter, A.DdcRestarter, A.ReloadingManager, A.HotReloadFailedException, A.RequireRestarter]);\n" +" _inheritMany(A.Object, [A.JS_CONST, J.Interceptor, A.SafeToStringHook, J.ArrayIterator, A.Stream, A.CastStreamSubscription, A.Iterable, A.CastIterator, A.Closure, A.MapBase, A.Error, A.ListBase, A.SentinelValue, A.ListIterator, A.MappedIterator, A.WhereIterator, A.ExpandIterator, A.TakeIterator, A.SkipIterator, A.EmptyIterator, A.WhereTypeIterator, A.FixedLengthListMixin, A.UnmodifiableListMixin, A._Record, A.ConstantMap, A._KeysOrValuesOrElementsIterator, A.TypeErrorDecoder, A.NullThrownFromJavaScriptException, A.ExceptionAndStackTrace, A._StackTrace, A.LinkedHashMapCell, A.LinkedHashMapKeyIterator, A.LinkedHashMapValueIterator, A.LinkedHashMapEntryIterator, A.JSSyntaxRegExp, A._MatchImplementation, A._AllMatchesIterator, A.StringMatch, A._StringAllMatchesIterator, A._Cell, A._UnmodifiableNativeByteBufferView, A.Rti, A._FunctionParameters, A._Type, A._TimerImpl, A._AsyncAwaitCompleter, A._AsyncStarStreamController, A._IterationMarker, A.AsyncError, A._Completer, A._FutureListener, A._Future, A._AsyncCallbackEntry, A._StreamController, A._AsyncStreamControllerDispatch, A._BufferingStreamSubscription, A._StreamSinkWrapper, A._AddStreamState, A._DelayedEvent, A._DelayedDone, A._PendingEvents, A._DoneStreamSubscription, A._StreamIterator, A._ZoneRun, A._ZoneRunUnary, A._ZoneRunBinary, A._ZoneRegisterCallback, A._ZoneRegisterUnaryCallback, A._ZoneRegisterBinaryCallback, A._ZoneErrorCallback, A._ZoneScheduleMicrotask, A._ZoneCreateTimer, A._ZoneCreatePeriodicTimer, A._ZonePrint, A._ZoneFork, A._ZoneHandleUncaughtError, A._ZoneValues, A._Zone, A._ZoneDelegate, A.ZoneSpecification, A._HashMapKeyIterator, A.SetBase, A._HashSetIterator, A._UnmodifiableMapMixin, A.MapView, A._ListQueueIterator, A._SplayTreeNode, A._SplayTree, A._SplayTreeIterator, A.Codec, A.Converter, A.ByteConversionSink, A._JsonStringifier, A._Utf8Encoder, A._Utf8Decoder, A.DateTime, A.Duration, A._Enum, A.OutOfMemoryError, A.StackOverflowError, A._Exception, A.FormatException, A.MapEntry, A.Null, A._StringStackTrace, A.StringBuffer, A._Uri, A.UriData, A._SimpleUri, A.NullRejectionException, A._JSRandom, A._JSSecureRandom, A.AsyncMemoizer, A.ErrorResult, A.ValueResult, A.StreamQueue, A._NextRequest, A._HasNextRequest, A.CanonicalizedMap, A._QueueList_Object_ListMixin, A.BuildResult, A.ConnectRequest, A.DebugEvent, A.BatchedDebugEvents, A.DebugInfo, A.DevToolsRequest, A.DevToolsResponse, A.ErrorResponse, A.HotReloadRequest, A.HotReloadResponse, A.HotRestartRequest, A.HotRestartResponse, A.PingRequest, A.RegisterEvent, A.RunRequest, A.ServiceExtensionRequest, A.ServiceExtensionResponse, A.BatchedStreamController, A.SocketClient, A._PersistentWebSocket_Object_StreamChannelMixin, A.Uuid, A._StackState, A.ClientException, A.BaseClient, A.BaseRequest, A.BaseResponse, A.MediaType, A.Level, A.LogRecord, A.Logger, A.Context, A.Style, A.ParsedPath, A.PathException, A.Pool, A.PoolResource, A.SourceFile, A.SourceLocationMixin, A.SourceSpanMixin, A.Highlighter, A._Highlight, A._Line, A.SourceLocation, A.SourceSpanException, A.StreamChannelMixin, A.StringScanner, A.EventStreamProvider, A._EventStreamSubscription, A.BrowserWebSocket, A.WebSocketEvent, A.WebSocketException, A.DdcLibraryBundleRestarter, A.DdcRestarter, A.ReloadingManager, A.HotReloadFailedException, A.RequireRestarter]);\n" " _inheritMany(J.Interceptor, [J.JSBool, J.JSNull, J.JavaScriptObject, J.JavaScriptBigInt, J.JavaScriptSymbol, J.JSNumber, J.JSString]);\n" " _inheritMany(J.JavaScriptObject, [J.LegacyJavaScriptObject, J.JSArray, A.NativeByteBuffer, A.NativeTypedData]);\n" " _inheritMany(J.LegacyJavaScriptObject, [J.PlainJavaScriptObject, J.UnknownJavaScriptObject, J.JavaScriptFunction]);\n" @@ -22392,11 +22424,12 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _inheritMany(J.JSNumber, [J.JSInt, J.JSNumNotInt]);\n" " _inheritMany(A.Stream, [A.CastStream, A.StreamView, A._StreamImpl, A._EmptyStream, A._ForwardingStream, A._EventStream]);\n" " _inheritMany(A.Iterable, [A._CastIterableBase, A.EfficientLengthIterable, A.MappedIterable, A.WhereIterable, A.ExpandIterable, A.TakeIterable, A.SkipIterable, A.WhereTypeIterable, A._KeysOrValues, A._AllMatchesIterable, A._StringAllMatchesIterable]);\n" -" _inheritMany(A._CastIterableBase, [A.CastIterable, A._CastList__CastIterableBase_ListMixin]);\n" +" _inheritMany(A._CastIterableBase, [A.CastIterable, A.__CastListBase__CastIterableBase_ListMixin]);\n" " _inherit(A._EfficientLengthCastIterable, A.CastIterable);\n" -" _inherit(A.CastList, A._CastList__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._asyncStarHelper_closure0, 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._readBody_closure, A._readBody_closure0, 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.CastList_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._AddStreamState_makeErrorHandler_closure, 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._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._asyncStarHelper_closure0, A._Future__propagateToListeners_handleWhenCompleteCallback_closure, A._Future_timeout_closure0, A.Stream_length_closure, A.Stream_first_closure0, A._CustomZone_bindUnaryCallbackGuarded_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._readBody_closure, A._readBody_closure0, 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._AddStreamState_makeErrorHandler_closure, 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" @@ -22475,7 +22508,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _inheritMany(A.WebSocketEvent, [A.TextDataReceived, A.BinaryDataReceived, A.CloseReceived]);\n" " _inherit(A.WebSocketConnectionClosed, A.WebSocketException);\n" " _mixin(A.UnmodifiableListBase, A.UnmodifiableListMixin);\n" -" _mixin(A._CastList__CastIterableBase_ListMixin, A.ListBase);\n" +" _mixin(A.__CastListBase__CastIterableBase_ListMixin, A.ListBase);\n" " _mixin(A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin, A.ListBase);\n" " _mixin(A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin, A.FixedLengthListMixin);\n" " _mixin(A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin, A.ListBase);\n" @@ -22492,7 +22525,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)\", \"Null(@)\", \"~(@)\", \"~(Object,StackTrace)\", \"JSObject()\", \"~(Object?)\", \"Future<~>()\", \"String(String)\", \"Object?(Object?)\", \"bool(_Highlight)\", \"Null(JSObject)\", \"~(~())\", \"int(Object?)\", \"@(@)\", \"~(Object?,Object?)\", \"@()\", \"Null(JavaScriptFunction,JavaScriptFunction)\", \"bool()\", \"Future<~>(String)\", \"String(Match)\", \"bool(String)\", \"int()\", \"Null(String)\", \"Null(JavaScriptFunction)\", \"int(@,@)\", \"bool(Object?,Object?)\", \"String(@)\", \"@(String)\", \"@(@,String)\", \"PersistentWebSocket(WebSocket)\", \"~(@,StackTrace)\", \"Future<~>(WebSocketEvent)\", \"bool(String,String)\", \"int(String)\", \"Null(String,String[Object?])\", \"bool(Object)\", \"~(List)\", \"MediaType()\", \"~(String,String)\", \"~(Zone,ZoneDelegate,Zone,Object,StackTrace)\", \"Logger()\", \"bool(Object?)\", \"String(String?)\", \"Null(~)\", \"String?()\", \"int(_Line)\", \"Null(~())\", \"Object(_Line)\", \"Object(_Highlight)\", \"int(_Highlight,_Highlight)\", \"List<_Line>(MapEntry>)\", \"Null(@,StackTrace)\", \"SourceSpanWithContext()\", \"0&(String,int?)\", \"~(String?)\", \"Future()\", \"~(int,@)\", \"_Future<@>?()\", \"~(StreamSink<@>)\", \"~(Object[StackTrace?])\", \"~(List)\", \"Null(String,String)\", \"~(bool)\", \"HotReloadResponse(String,bool,String?)\", \"HotRestartResponse(String,bool,String?)\", \"JSObject(Object,StackTrace)\", \"bool(bool)\", \"List(String)\", \"int(String,String)\", \"Null(JavaScriptObject)\", \"JSObject()()\", \"Object?(~)\", \"bool(BuildStatus)\", \"~(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?)\", \"0&()\", \"Map(DebugEvent)\", \"0^(0^,0^)\", \"JSObject(String[bool?])\"],\n" +" types: [\"~()\", \"Null()\", \"~(JSObject)\", \"Null(Object,StackTrace)\", \"Null(@)\", \"~(@)\", \"~(Object,StackTrace)\", \"JSObject()\", \"~(Object?)\", \"Future<~>()\", \"String(String)\", \"Object?(Object?)\", \"bool(_Highlight)\", \"Null(JSObject)\", \"~(~())\", \"int(Object?)\", \"@(@)\", \"~(Object?,Object?)\", \"@()\", \"Null(JavaScriptFunction,JavaScriptFunction)\", \"bool()\", \"Future<~>(String)\", \"String(Match)\", \"bool(String)\", \"int()\", \"Null(String)\", \"Null(JavaScriptFunction)\", \"int(@,@)\", \"bool(Object?,Object?)\", \"String(@)\", \"@(String)\", \"@(@,String)\", \"PersistentWebSocket(WebSocket)\", \"~(@,StackTrace)\", \"Future<~>(WebSocketEvent)\", \"bool(String,String)\", \"int(String)\", \"Null(String,String[Object?])\", \"bool(Object)\", \"~(List)\", \"MediaType()\", \"~(String,String)\", \"~(Zone,ZoneDelegate,Zone,Object,StackTrace)\", \"Logger()\", \"bool(Object?)\", \"String(String?)\", \"Null(~)\", \"String?()\", \"int(_Line)\", \"Null(~())\", \"Object(_Line)\", \"Object(_Highlight)\", \"int(_Highlight,_Highlight)\", \"List<_Line>(MapEntry>)\", \"Null(@,StackTrace)\", \"SourceSpanWithContext()\", \"0&(String,int?)\", \"~(String?)\", \"Future()\", \"~(int,@)\", \"_Future<@>?()\", \"~(StreamSink<@>)\", \"~(Object[StackTrace?])\", \"~(List)\", \"Null(String,String)\", \"~(bool)\", \"HotReloadResponse(String,bool,String?)\", \"HotRestartResponse(String,bool,String?)\", \"JSObject(Object,StackTrace)\", \"bool(bool)\", \"List(String)\", \"int(String,String)\", \"Null(JavaScriptObject)\", \"JSObject()()\", \"Object?(~)\", \"bool(BuildStatus)\", \"~(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)\", \"Zone(Zone?,ZoneDelegate?,Zone,ZoneSpecification?,Map?)\", \"0&()\", \"Map(DebugEvent)\", \"0^(0^,0^)\", \"JSObject(String[bool?])\"],\n" " interceptorsByTag: null,\n" " leafTags: null,\n" " arrayRti: Symbol(\"\$ti\"),\n" @@ -22500,8 +22533,8 @@ 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\"},\"CastList\":{\"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\":[]},\"_Future\":{\"Future\":[\"1\"]},\"_TimerImpl\":{\"Timer\":[]},\"_AsyncAwaitCompleter\":{\"Completer\":[\"1\"]},\"_Completer\":{\"Completer\":[\"1\"]},\"_AsyncCompleter\":{\"_Completer\":[\"1\"],\"Completer\":[\"1\"]},\"_SyncCompleter\":{\"_Completer\":[\"1\"],\"Completer\":[\"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\"]},\"_StreamControllerAddStreamState\":{\"_AddStreamState\":[\"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\"},\"_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,\"_CastList__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" +" 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\":[]},\"_Future\":{\"Future\":[\"1\"]},\"_TimerImpl\":{\"Timer\":[]},\"_AsyncAwaitCompleter\":{\"Completer\":[\"1\"]},\"_Completer\":{\"Completer\":[\"1\"]},\"_AsyncCompleter\":{\"_Completer\":[\"1\"],\"Completer\":[\"1\"]},\"_SyncCompleter\":{\"_Completer\":[\"1\"],\"Completer\":[\"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\"]},\"_StreamControllerAddStreamState\":{\"_AddStreamState\":[\"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\"},\"_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\":[]},\"_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" " x20must_: \" must not be greater than the number of characters in the file, \",\n" @@ -22616,6 +22649,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " WebSocketEvent: findType(\"WebSocketEvent\"),\n" " WhereTypeIterable_String: findType(\"WhereTypeIterable\"),\n" " Zone: findType(\"Zone\"),\n" +" ZoneDelegate: findType(\"ZoneDelegate\"),\n" " _AsyncCompleter_BrowserWebSocket: findType(\"_AsyncCompleter\"),\n" " _AsyncCompleter_PoolResource: findType(\"_AsyncCompleter\"),\n" " _AsyncCompleter_String: findType(\"_AsyncCompleter\"),\n" @@ -22639,7 +22673,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _Line: findType(\"_Line\"),\n" " _StreamControllerAddStreamState_nullable_Object: findType(\"_StreamControllerAddStreamState\"),\n" " _SyncCompleter_PoolResource: findType(\"_SyncCompleter\"),\n" -" _ZoneFunction_of_void_Function_Zone_ZoneDelegate_Zone_Object_StackTrace: findType(\"_ZoneFunction<~(Zone,ZoneDelegate,Zone,Object,StackTrace)>\"),\n" " bool: findType(\"bool\"),\n" " bool_Function_Object: findType(\"bool(Object)\"),\n" " bool_Function__Highlight: findType(\"bool(_Highlight)\"),\n" @@ -22656,7 +22689,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " nullable_List_dynamic: findType(\"List<@>?\"),\n" " nullable_Map_String_dynamic: findType(\"Map?\"),\n" " nullable_Map_dynamic_dynamic: findType(\"Map<@,@>?\"),\n" -" nullable_Map_of_nullable_Object_and_nullable_Object: findType(\"Map?\"),\n" " nullable_Object: findType(\"Object?\"),\n" " nullable_Result_DebugEvent: findType(\"Result?\"),\n" " nullable_StackTrace: findType(\"StackTrace?\"),\n" @@ -22664,7 +22696,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " nullable_String_Function_Match: findType(\"String(Match)?\"),\n" " nullable_Zone: findType(\"Zone?\"),\n" " nullable_ZoneDelegate: findType(\"ZoneDelegate?\"),\n" -" nullable_ZoneSpecification: findType(\"ZoneSpecification?\"),\n" " nullable__DelayedEvent_dynamic: findType(\"_DelayedEvent<@>?\"),\n" " nullable__FutureListener_dynamic_dynamic: findType(\"_FutureListener<@,@>?\"),\n" " nullable__Highlight: findType(\"_Highlight?\"),\n" @@ -22843,6 +22874,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " B.C__DelayedDone = new A._DelayedDone();\n" " B.C__JSRandom = new A._JSRandom();\n" " B.C__RootZone = new A._RootZone();\n" +" B.C__ZoneCreatePeriodicTimer = new A._ZoneCreatePeriodicTimer();\n" " B.Duration_0 = new A.Duration(0);\n" " B.Duration_5000000 = new A.Duration(5000000);\n" " B.JsonDecoder_null = new A.JsonDecoder(null);\n" @@ -22879,19 +22911,20 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " B.Type_Uint8List_8Eb = A.typeLiteral(\"Uint8List\");\n" " B.Utf8Decoder_false = new A.Utf8Decoder(false);\n" " B._StringStackTrace_OdL = new A._StringStackTrace(\"\");\n" -" B._ZoneFunction_KjJ = new A._ZoneFunction(B.C__RootZone, A.async___rootHandleUncaughtError\$closure(), type\$._ZoneFunction_of_void_Function_Zone_ZoneDelegate_Zone_Object_StackTrace);\n" -" B._ZoneFunction_PAY = new A._ZoneFunction(B.C__RootZone, A.async___rootCreatePeriodicTimer\$closure(), A.findType(\"_ZoneFunction\"));\n" -" B._ZoneFunction_Xkh = new A._ZoneFunction(B.C__RootZone, A.async___rootRegisterUnaryCallback\$closure(), A.findType(\"_ZoneFunction<0^(1^)(Zone,ZoneDelegate,Zone,0^(1^))>\"));\n" -" B._ZoneFunction__RootZone__rootCreateTimer = new A._ZoneFunction(B.C__RootZone, A.async___rootCreateTimer\$closure(), A.findType(\"_ZoneFunction\"));\n" -" B._ZoneFunction__RootZone__rootErrorCallback = new A._ZoneFunction(B.C__RootZone, A.async___rootErrorCallback\$closure(), A.findType(\"_ZoneFunction\"));\n" -" B._ZoneFunction__RootZone__rootFork = new A._ZoneFunction(B.C__RootZone, A.async___rootFork\$closure(), A.findType(\"_ZoneFunction?)>\"));\n" -" B._ZoneFunction__RootZone__rootPrint = new A._ZoneFunction(B.C__RootZone, A.async___rootPrint\$closure(), A.findType(\"_ZoneFunction<~(Zone,ZoneDelegate,Zone,String)>\"));\n" -" B._ZoneFunction__RootZone__rootRegisterCallback = new A._ZoneFunction(B.C__RootZone, A.async___rootRegisterCallback\$closure(), A.findType(\"_ZoneFunction<0^()(Zone,ZoneDelegate,Zone,0^())>\"));\n" -" B._ZoneFunction__RootZone__rootRun = new A._ZoneFunction(B.C__RootZone, A.async___rootRun\$closure(), A.findType(\"_ZoneFunction<0^(Zone,ZoneDelegate,Zone,0^())>\"));\n" -" B._ZoneFunction__RootZone__rootRunBinary = new A._ZoneFunction(B.C__RootZone, A.async___rootRunBinary\$closure(), A.findType(\"_ZoneFunction<0^(Zone,ZoneDelegate,Zone,0^(1^,2^),1^,2^)>\"));\n" -" B._ZoneFunction__RootZone__rootRunUnary = new A._ZoneFunction(B.C__RootZone, A.async___rootRunUnary\$closure(), A.findType(\"_ZoneFunction<0^(Zone,ZoneDelegate,Zone,0^(1^),1^)>\"));\n" -" B._ZoneFunction__RootZone__rootScheduleMicrotask = new A._ZoneFunction(B.C__RootZone, A.async___rootScheduleMicrotask\$closure(), A.findType(\"_ZoneFunction<~(Zone,ZoneDelegate,Zone,~())>\"));\n" -" B._ZoneFunction_e9o = new A._ZoneFunction(B.C__RootZone, A.async___rootRegisterBinaryCallback\$closure(), A.findType(\"_ZoneFunction<0^(1^,2^)(Zone,ZoneDelegate,Zone,0^(1^,2^))>\"));\n" +" B._ZoneCreateTimer__RootZone__rootCreateTimer = new A._ZoneCreateTimer(B.C__RootZone, A.async___rootCreateTimer\$closure());\n" +" B._ZoneErrorCallback__RootZone__rootErrorCallback = new A._ZoneErrorCallback(B.C__RootZone, A.async___rootErrorCallback\$closure());\n" +" B._ZoneFork__RootZone__rootFork = new A._ZoneFork(B.C__RootZone, A.async___rootFork\$closure());\n" +" B._ZoneHandleUncaughtError_wQ6 = new A._ZoneHandleUncaughtError(B.C__RootZone, A.async___rootHandleUncaughtError\$closure());\n" +" B._ZonePrint__RootZone__rootPrint = new A._ZonePrint(B.C__RootZone, A.async___rootPrint\$closure());\n" +" B._ZoneRegisterBinaryCallback_sk0 = new A._ZoneRegisterBinaryCallback(B.C__RootZone, A.async___rootRegisterBinaryCallback\$closure());\n" +" B._ZoneRegisterCallback__RootZone__rootRegisterCallback = new A._ZoneRegisterCallback(B.C__RootZone, A.async___rootRegisterCallback\$closure());\n" +" B._ZoneRegisterUnaryCallback_a9v = new A._ZoneRegisterUnaryCallback(B.C__RootZone, A.async___rootRegisterUnaryCallback\$closure());\n" +" B._ZoneRunBinary__RootZone__rootRunBinary = new A._ZoneRunBinary(B.C__RootZone, A.async___rootRunBinary\$closure());\n" +" B._ZoneRunUnary__RootZone__rootRunUnary = new A._ZoneRunUnary(B.C__RootZone, A.async___rootRunUnary\$closure());\n" +" B._ZoneRun__RootZone__rootRun = new A._ZoneRun(B.C__RootZone, A.async___rootRun\$closure());\n" +" B._ZoneScheduleMicrotask__RootZone__rootScheduleMicrotask = new A._ZoneScheduleMicrotask(B.C__RootZone, A.async___rootScheduleMicrotask\$closure());\n" +" B.Map_empty1 = new A.ConstantStringMap(B.Object_empty, [], A.findType(\"ConstantStringMap\"));\n" +" B._ZoneValues__RootZone_Map_empty = new A._ZoneValues(B.C__RootZone, B.Map_empty1);\n" " })();\n" " (function staticFields() {\n" " \$._JS_INTEROP_INTERCEPTOR_TAG = null;\n" @@ -22973,10 +23006,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }()));\n" " _lazyFinal(\$, \"_AsyncRun__scheduleImmediateClosure\", \"\$get\$_AsyncRun__scheduleImmediateClosure\", () => A._AsyncRun__initializeScheduleImmediate());\n" " _lazyFinal(\$, \"Future__nullFuture\", \"\$get\$Future__nullFuture\", () => \$.\$get\$nullFuture());\n" -" _lazyFinal(\$, \"_RootZone__rootMap\", \"\$get\$_RootZone__rootMap\", () => {\n" -" var t1 = type\$.dynamic;\n" -" return A.HashMap_HashMap(null, null, t1, t1);\n" -" });\n" " _lazyFinal(\$, \"_Utf8Decoder__reusableBuffer\", \"\$get\$_Utf8Decoder__reusableBuffer\", () => A.NativeUint8List_NativeUint8List(4096));\n" " _lazyFinal(\$, \"_Utf8Decoder__decoder\", \"\$get\$_Utf8Decoder__decoder\", () => new A._Utf8Decoder__decoder_closure().call\$0());\n" " _lazyFinal(\$, \"_Utf8Decoder__decoderNonfatal\", \"\$get\$_Utf8Decoder__decoderNonfatal\", () => new A._Utf8Decoder__decoderNonfatal_closure().call\$0());\n" @@ -23078,9 +23107,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " Function.prototype.call\$3 = function(a, b, c) {\n" " return this(a, b, c);\n" " };\n" -" Function.prototype.call\$4 = function(a, b, c, d) {\n" -" return this(a, b, c, d);\n" -" };\n" " Function.prototype.call\$3\$6 = function(a, b, c, d, e, f) {\n" " return this(a, b, c, d, e, f);\n" " };\n" @@ -23090,10 +23116,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " Function.prototype.call\$2\$1 = function(a) {\n" " return this(a);\n" " };\n" -" Function.prototype.call\$2\$5 = function(a, b, c, d, e) {\n" -" return this(a, b, c, d, e);\n" -" };\n" -" Function.prototype.call\$2\$4 = function(a, b, c, d) {\n" +" Function.prototype.call\$4 = function(a, b, c, d) {\n" " return this(a, b, c, d);\n" " };\n" " Function.prototype.call\$3\$1 = function(a) {\n" @@ -23102,9 +23125,15 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " Function.prototype.call\$3\$4 = function(a, b, c, d) {\n" " return this(a, b, c, d);\n" " };\n" +" Function.prototype.call\$2\$4 = function(a, b, c, d) {\n" +" return this(a, b, c, d);\n" +" };\n" " Function.prototype.call\$2\$2 = function(a, b) {\n" " return this(a, b);\n" " };\n" +" Function.prototype.call\$2\$5 = function(a, b, c, d, e) {\n" +" return this(a, b, c, d, e);\n" +" };\n" " Function.prototype.call\$2\$3 = function(a, b, c) {\n" " return this(a, b, c);\n" " };\n" diff --git a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart index 8a3bd4875c..16cc9e21b4 100644 --- a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart +++ b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart @@ -74,11 +74,12 @@ abstract class FrontendServerStrategyProvider { _addBasePath((await metadataProvider.moduleToSourceMap)[module] ?? ''); String? _serverPathForAppUri(String appUrl) { - return DdcUriTranslator.translateAppUriToServerPath( + final translated = DdcUriTranslator.translateAppUriToServerPath( appUrl, layout: AppUriLayout.frontendServerOnly, useDebuggerModuleNames: _buildSettings.useDebuggerModuleNames, ); + return translated != null ? _addBasePath(translated) : null; } Future> _moduleInfoForProvider( diff --git a/dwds/lib/src/utilities/dart_uri.dart b/dwds/lib/src/utilities/dart_uri.dart index 3314325897..25645a7f39 100644 --- a/dwds/lib/src/utilities/dart_uri.dart +++ b/dwds/lib/src/utilities/dart_uri.dart @@ -44,13 +44,8 @@ class DartUri { if (uri.startsWith('file:')) { return DartUri._fromFileUri(uri, root: root); } - if (uri.endsWith('.dart') && - (uri.startsWith('packages/') || uri.startsWith('/packages/'))) { - final path = stripLeadingSlashes(uri); - final packageUri = DdcUriTranslator.translatePackagesPathToPackageUri( - path, - ); - return DartUri._fromPackageUri(packageUri, root: root); + if (uri.startsWith('packages/') || uri.startsWith('/packages/')) { + return DartUri._fromRelativePath(uri, root: root); } if (uri.startsWith('/')) { return DartUri._fromRelativePath(uri, root: root); diff --git a/dwds/test/frontend_server_common/frontend_server_client.dart b/dwds/test/frontend_server_common/frontend_server_client.dart index a1ae0c8030..ac52fc87cc 100644 --- a/dwds/test/frontend_server_common/frontend_server_client.dart +++ b/dwds/test/frontend_server_common/frontend_server_client.dart @@ -411,7 +411,6 @@ class ResidentCompiler { for (final experiment in compilerOptions.experiments) '--enable-experiment=$experiment', if (compilerOptions.canaryFeatures) '--dartdevc-canary', - '--no-js-strongly-connected-components', if (verbose) '--verbose', if (compilerOptions.moduleFormat == ModuleFormat.ddc) '--dartdevc-module-format=ddc' diff --git a/dwds/test/integration/fixtures/context.dart b/dwds/test/integration/fixtures/context.dart index b0efa26708..87cd885668 100644 --- a/dwds/test/integration/fixtures/context.dart +++ b/dwds/test/integration/fixtures/context.dart @@ -1430,16 +1430,31 @@ class TestContext { var isWaitingForSuccess = false; try { - // Give the build daemon a few seconds to start the build. - await buildStartCompleter.future.timeout(const Duration(seconds: 5)); + var timedOutWaitingForStart = false; + await buildStartCompleter.future.timeout( + const Duration(seconds: 5), + onTimeout: () { + timedOutWaitingForStart = true; + }, + ); + + if (timedOutWaitingForStart) { + return; + } + isWaitingForSuccess = true; await buildSuccessCompleter.future.timeout( timeout ?? const Duration(seconds: 60), ); - } on TimeoutException { - // Return if an edit did not trigger a rebuild/recompile. - if (!isWaitingForSuccess) return; - // If the build started but never finished, the test has likely hung. + } catch (e, s) { + if (e is TimeoutException) { + // Return if an edit did not trigger a rebuild/recompile. + if (!isWaitingForSuccess) { + return; + } + // If the build started but never finished, the test has likely hung. + rethrow; + } rethrow; } finally { await subscription.cancel(); diff --git a/dwds/test/integration/hot_restart_breakpoints_amd_test.dart b/dwds/test/integration/hot_restart_breakpoints_amd_test.dart deleted file mode 100644 index b2c7936e63..0000000000 --- a/dwds/test/integration/hot_restart_breakpoints_amd_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -@TestOn('vm') -@Timeout(Duration(minutes: 5)) -library; - -import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; -import 'package:test/test.dart'; - -import 'fixtures/context.dart'; -import 'hot_restart_breakpoints_common.dart'; - -void main() { - // Enable verbose logging for debugging. - const debug = false; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - group('Build Daemon |', () { - runTests(provider: provider, compilationMode: CompilationMode.buildDaemon); - }); - - group('Frontend Server |', () { - runTests( - provider: provider, - compilationMode: CompilationMode.frontendServer, - ); - }); -} From 0e0e083c7fd51c322a3231733cbd32c3516c3245 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Tue, 14 Jul 2026 18:22:53 -0700 Subject: [PATCH 045/134] Removing debug pubspec files --- dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml | 3 --- webdev/pubspec.yaml | 7 +------ 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml b/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml index c1d108badd..f2e5ea6465 100644 --- a/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml @@ -10,6 +10,3 @@ dev_dependencies: build_runner: ^2.5.0 build_web_compilers: ^4.8.7 -dependency_overrides: - build_web_compilers: - path: /Users/markzipan/Projects/build/builder_pkgs/build_web_compilers diff --git a/webdev/pubspec.yaml b/webdev/pubspec.yaml index b02f2113f7..19a4f554d4 100644 --- a/webdev/pubspec.yaml +++ b/webdev/pubspec.yaml @@ -58,9 +58,4 @@ executables: dependency_overrides: dwds: - path: ../dwds - dwds_test_common: - git: - url: https://github.com/dart-lang/sdk.git - ref: cc67fadefe24678e7f020fe42cbb41fed2cd6f0c - path: pkg/dwds_test_common + path: ../dwds \ No newline at end of file From df538abc16d43b37736f8543e5040799346ab7a6 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Wed, 15 Jul 2026 13:32:10 -0700 Subject: [PATCH 046/134] Passing AppUriLayout --- .../frontend_server_strategy_provider.dart | 6 ++- .../readers/frontend_server_asset_reader.dart | 1 + .../lib/src/utilities/ddc_uri_translator.dart | 41 +++++++++++++++++-- 3 files changed, 43 insertions(+), 5 deletions(-) diff --git a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart index 16cc9e21b4..9ddff74a99 100644 --- a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart +++ b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart @@ -241,7 +241,11 @@ class FrontendServerBuildDaemonStrategyProvider MetadataProvider metadataProvider, String serverPath, ) async { - final remappedPath = serverPath.replaceAll('.ddc', '.dart.lib'); + final remappedPath = DdcUriTranslator.translateModuleExtension( + serverPath, + from: AppUriLayout.buildRunner, + to: AppUriLayout.frontendServerOnly, + ); final module = await super._moduleForServerPath( metadataProvider, remappedPath, diff --git a/dwds/lib/src/readers/frontend_server_asset_reader.dart b/dwds/lib/src/readers/frontend_server_asset_reader.dart index 9385c8009d..23b30d40dc 100644 --- a/dwds/lib/src/readers/frontend_server_asset_reader.dart +++ b/dwds/lib/src/readers/frontend_server_asset_reader.dart @@ -67,6 +67,7 @@ class FrontendServerAssetReader implements AssetReader { if (strippedPath.startsWith('packages/')) { final packagePath = DdcUriTranslator.translatePackagesPathToPackageUri( strippedPath, + layout: AppUriLayout.frontendServerOnly, ); fileUri = packageConfig.resolve(Uri.parse(packagePath)); } else { diff --git a/dwds/lib/src/utilities/ddc_uri_translator.dart b/dwds/lib/src/utilities/ddc_uri_translator.dart index 312cef0661..f50e51540d 100644 --- a/dwds/lib/src/utilities/ddc_uri_translator.dart +++ b/dwds/lib/src/utilities/ddc_uri_translator.dart @@ -2,7 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -/// The path format of the DDC application's served files. enum AppUriLayout { /// Used when compiling and serving directly with Frontend Server. /// Preserves 'lib/' segments for package paths (e.g. packages/foo/lib/bar.dart). @@ -111,9 +110,16 @@ class DdcUriTranslator { /// Examples: /// - `packages/foo/lib/bar.dart` -> `package:foo/bar.dart` /// - `packages/foo/bar.dart` -> `package:foo/bar.dart` - static String translatePackagesPathToPackageUri(String serverPath) { + static String translatePackagesPathToPackageUri( + String serverPath, { + AppUriLayout? layout, + }) { if (!serverPath.startsWith('packages/')) return serverPath; - final pathWithoutLib = removeLibSegment(serverPath); + // If layout is not provided, we assume it might have 'lib/'. + final pathWithoutLib = + layout == null || layout == AppUriLayout.frontendServerOnly + ? removeLibSegment(serverPath) + : serverPath; return pathWithoutLib.replaceFirst('packages/', 'package:'); } @@ -138,8 +144,35 @@ class DdcUriTranslator { return uri; } + /// Maps module extensions between layouts. + /// + /// For example, from [AppUriLayout.frontendServerOnly] to + /// [AppUriLayout.buildRunner]: + /// `main.dart.lib` -> `main.ddc` + /// `main.dart.lib.js` -> `main.ddc.js` + static String translateModuleExtension( + String path, { + required AppUriLayout from, + required AppUriLayout to, + }) { + if (from == to) return path; + if (from == AppUriLayout.frontendServerOnly && + to == AppUriLayout.buildRunner) { + return path.replaceAll('.dart.lib', '.ddc'); + } + if (from == AppUriLayout.buildRunner && + to == AppUriLayout.frontendServerOnly) { + return path.replaceAll('.ddc', '.dart.lib'); + } + return path; + } + /// Maps '.dart.lib' (FES suffix) to '.ddc' (package:build suffix). static String translateFesToBuildRunnerPath(String path) { - return path.replaceAll('.dart.lib', '.ddc'); + return translateModuleExtension( + path, + from: AppUriLayout.frontendServerOnly, + to: AppUriLayout.buildRunner, + ); } } From 1174260991101b941d3ecfd3016e26ab8d497043 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Wed, 15 Jul 2026 13:32:19 -0700 Subject: [PATCH 047/134] Updating expectations --- dwds/test/integration/inspector_common.dart | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dwds/test/integration/inspector_common.dart b/dwds/test/integration/inspector_common.dart index 97d6f368e0..e374c6f2af 100644 --- a/dwds/test/integration/inspector_common.dart +++ b/dwds/test/integration/inspector_common.dart @@ -126,7 +126,7 @@ void runTests({ final result = await inspector.mapExceptionStackTrace( jsSingleLineExceptionWithStackTrace, ); - expect(result, equals(formattedSingleLineExceptionWithStackTrace)); + expect(result, matches(formattedSingleLineExceptionWithStackTrace)); }, skip: skipFrontendServerAmd); }); @@ -325,10 +325,10 @@ Error: Unexpected null value. at http://localhost:63236/web_entrypoint.dart.lib.js:41:33 '''; -final formattedSingleLineExceptionWithStackTrace = ''' -Error: Unexpected null value. -http://localhost:63236/dart_sdk.js 5379:11 throw_ -http://localhost:63236/dart_sdk.js 5696:30 nullCheck -http://localhost:63236/packages/tmpapp/main.dart.lib.js 374:10 main -http://localhost:63236/web_entrypoint.dart.lib.js 41:33 -'''; +final formattedSingleLineExceptionWithStackTrace = RegExp( + r'^Error: Unexpected null value\.\n' + r'(?:http://localhost:\d+/dart_sdk\.js|dart:sdk_internal) 5379:11\s+throw_\n' + r'(?:http://localhost:\d+/dart_sdk\.js|dart:sdk_internal) 5696:30\s+nullCheck\n' + r'http://localhost:\d+/packages/tmpapp/main\.dart\.lib\.js 374:10\s+main\n' + r'http://localhost:\d+/web_entrypoint\.dart\.lib\.js 41:33\s+\n$', +); From 7ed19385fb594eb9e8f4ebc77a6c94624d189de5 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Wed, 15 Jul 2026 14:20:50 -0700 Subject: [PATCH 048/134] Deleting tests in the test workspace to ensure a single entrypoint --- webdev/test/daemon/launch_app_common.dart | 7 +++++++ webdev/test/e2e_common.dart | 2 -- webdev/test/tls_common.dart | 24 +++++++---------------- 3 files changed, 14 insertions(+), 19 deletions(-) diff --git a/webdev/test/daemon/launch_app_common.dart b/webdev/test/daemon/launch_app_common.dart index d0319a9546..43b68556b0 100644 --- a/webdev/test/daemon/launch_app_common.dart +++ b/webdev/test/daemon/launch_app_common.dart @@ -5,6 +5,8 @@ @Timeout(Duration(minutes: 2)) library; +import 'dart:io'; +import 'package:path/path.dart' as p; import 'package:test/test.dart'; import '../test_utils.dart'; @@ -16,6 +18,11 @@ void launchAppTests({required TestRunner testRunner}) { setUpAll(() async { await testRunner.setUpAll(); exampleDirectory = await testRunner.prepareWorkspace(); + // Delete 'main.dart' to ensure only one entrypoint exists. + final mainDart = File(p.join(exampleDirectory, 'web', 'main.dart')); + if (mainDart.existsSync()) { + mainDart.deleteSync(); + } }); tearDownAll(testRunner.tearDownAll); diff --git a/webdev/test/e2e_common.dart b/webdev/test/e2e_common.dart index a3d08a8d35..cef73705e2 100644 --- a/webdev/test/e2e_common.dart +++ b/webdev/test/e2e_common.dart @@ -374,7 +374,6 @@ void e2eTests({required TestRunner testRunner}) { 'daemon', 'web:$openPort', '--enable-expression-evaluation', - '--null-safety=sound', '--verbose', ]; final process = await testRunner.runWebDev( @@ -450,7 +449,6 @@ void e2eTests({required TestRunner testRunner}) { 'daemon', 'web:$openPort', '--enable-expression-evaluation', - '--null-safety=sound', '--verbose', ]; final process = await testRunner.runWebDev( diff --git a/webdev/test/tls_common.dart b/webdev/test/tls_common.dart index 6984ae6507..984629de2e 100644 --- a/webdev/test/tls_common.dart +++ b/webdev/test/tls_common.dart @@ -26,24 +26,14 @@ void tlsTests({required TestRunner testRunner}) { setUpAll(() async { configureLogWriter(debug); await testRunner.setUpAll(); - exampleDirectory = p.absolute( - p.join( - p.current, - '..', - 'dwds_test_common', - 'fixtures', - '_webdev_smoke', - ), - ); + exampleDirectory = await testRunner.prepareWorkspace(); - final process = await TestProcess.start( - 'dart', - ['pub', 'upgrade'], - workingDirectory: exampleDirectory, - environment: getPubEnvironment(), - ); - - await process.shouldExit(0); + // Delete 'scopes_main.dart' to ensure only one entrypoint exists. + final scopesMainDart = + File(p.join(exampleDirectory, 'web', 'scopes_main.dart')); + if (scopesMainDart.existsSync()) { + scopesMainDart.deleteSync(); + } await d .file('.dart_tool/package_config.json', isNotEmpty) From fba1e5268866291e8b73437194c3074d47031425 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Wed, 15 Jul 2026 14:54:10 -0700 Subject: [PATCH 049/134] Updating tls test expectations --- webdev/test/e2e_common.dart | 4 ++-- webdev/test/tls_common.dart | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/webdev/test/e2e_common.dart b/webdev/test/e2e_common.dart index cef73705e2..b7c2205a53 100644 --- a/webdev/test/e2e_common.dart +++ b/webdev/test/e2e_common.dart @@ -212,10 +212,10 @@ void e2eTests({required TestRunner testRunner}) { final hostUrl = 'http://localhost:$openPort'; - // Wait for the initial build to finish. + // Wait for the server to be ready for connections. await expectLater( process.stdout, - emitsThrough(contains('Built with build_runner')), + emitsThrough(contains('Serving `web` on')), ); final client = HttpClient(); diff --git a/webdev/test/tls_common.dart b/webdev/test/tls_common.dart index 984629de2e..2cbd0d54e5 100644 --- a/webdev/test/tls_common.dart +++ b/webdev/test/tls_common.dart @@ -29,8 +29,9 @@ void tlsTests({required TestRunner testRunner}) { exampleDirectory = await testRunner.prepareWorkspace(); // Delete 'scopes_main.dart' to ensure only one entrypoint exists. - final scopesMainDart = - File(p.join(exampleDirectory, 'web', 'scopes_main.dart')); + final scopesMainDart = File( + p.join(exampleDirectory, 'web', 'scopes_main.dart'), + ); if (scopesMainDart.existsSync()) { scopesMainDart.deleteSync(); } @@ -55,9 +56,10 @@ void tlsTests({required TestRunner testRunner}) { args, workingDirectory: exampleDirectory, ); + // Wait for the server to be ready for connections. await expectLater( process.stdout, - emitsThrough(contains('Built with build_runner')), + emitsThrough(contains('Serving `web` on')), ); final client = HttpClient() @@ -91,9 +93,10 @@ void tlsTests({required TestRunner testRunner}) { args, workingDirectory: exampleDirectory, ); + // Wait for the server to be ready for connections. await expectLater( process.stdout, - emitsThrough(contains('Built with build_runner')), + emitsThrough(contains('Serving `web` on')), ); final interfaces = await NetworkInterface.list( From 96d62da7b24c013d0e3879b04ecfa35a148abc18 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Wed, 15 Jul 2026 15:06:09 -0700 Subject: [PATCH 050/134] formatting --- dwds/lib/src/utilities/ddc_uri_translator.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dwds/lib/src/utilities/ddc_uri_translator.dart b/dwds/lib/src/utilities/ddc_uri_translator.dart index f50e51540d..51a1d0c35a 100644 --- a/dwds/lib/src/utilities/ddc_uri_translator.dart +++ b/dwds/lib/src/utilities/ddc_uri_translator.dart @@ -118,8 +118,8 @@ class DdcUriTranslator { // If layout is not provided, we assume it might have 'lib/'. final pathWithoutLib = layout == null || layout == AppUriLayout.frontendServerOnly - ? removeLibSegment(serverPath) - : serverPath; + ? removeLibSegment(serverPath) + : serverPath; return pathWithoutLib.replaceFirst('packages/', 'package:'); } From 1aa966cabbf77dca51d2bd0bbbed9d331f964e41 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Wed, 15 Jul 2026 15:12:13 -0700 Subject: [PATCH 051/134] fixing analysis errors --- webdev/test/tls_common.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/webdev/test/tls_common.dart b/webdev/test/tls_common.dart index 2cbd0d54e5..939d6d3f6b 100644 --- a/webdev/test/tls_common.dart +++ b/webdev/test/tls_common.dart @@ -9,7 +9,6 @@ import 'package:logging/logging.dart'; import 'package:path/path.dart' as p; import 'package:test/test.dart'; import 'package:test_descriptor/test_descriptor.dart' as d; -import 'package:test_process/test_process.dart'; import 'package:webdev/src/logging.dart'; import 'package:webdev/src/serve/utils.dart'; From 858e6f29122980aaae40ecdab7360cd3cf16ea09 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 16 Jul 2026 11:42:28 -0700 Subject: [PATCH 052/134] Updating versions --- dwds/lib/src/services/chrome/chrome_proxy_service.dart | 2 +- dwds_test_common/fixtures/_experiment/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_circular1/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_circular2/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml | 2 +- .../fixtures/_test_hot_reload_breakpoints/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_hot_restart2/pubspec.yaml | 2 +- .../fixtures/_test_hot_restart_breakpoints/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_package/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_parts/pubspec.yaml | 2 +- dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml | 2 +- example/pubspec.yaml | 2 +- webdev/lib/src/pubspec.dart | 2 +- webdev/test/integration_common.dart | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/dwds/lib/src/services/chrome/chrome_proxy_service.dart b/dwds/lib/src/services/chrome/chrome_proxy_service.dart index 1add07eece..49c0fc951e 100644 --- a/dwds/lib/src/services/chrome/chrome_proxy_service.dart +++ b/dwds/lib/src/services/chrome/chrome_proxy_service.dart @@ -415,7 +415,7 @@ final class ChromeProxyService extends ProxyService { }) { return wrapInErrorHandlerAsync( 'addBreakpoint', - () => _addBreakpoint(isolateId, scriptId, line), + () => _addBreakpoint(isolateId, scriptId, line, column: column), ); } diff --git a/dwds_test_common/fixtures/_experiment/pubspec.yaml b/dwds_test_common/fixtures/_experiment/pubspec.yaml index 750c59877d..d4c74f7db5 100644 --- a/dwds_test_common/fixtures/_experiment/pubspec.yaml +++ b/dwds_test_common/fixtures/_experiment/pubspec.yaml @@ -12,4 +12,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.7 + build_web_compilers: ^4.8.8 diff --git a/dwds_test_common/fixtures/_test/pubspec.yaml b/dwds_test_common/fixtures/_test/pubspec.yaml index 8f8e9fa01e..6aa8b85e1e 100644 --- a/dwds_test_common/fixtures/_test/pubspec.yaml +++ b/dwds_test_common/fixtures/_test/pubspec.yaml @@ -12,5 +12,5 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.7 + build_web_compilers: ^4.8.8 diff --git a/dwds_test_common/fixtures/_test_circular1/pubspec.yaml b/dwds_test_common/fixtures/_test_circular1/pubspec.yaml index a579372d4a..d1db425425 100644 --- a/dwds_test_common/fixtures/_test_circular1/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_circular1/pubspec.yaml @@ -14,4 +14,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.7 + build_web_compilers: ^4.8.8 diff --git a/dwds_test_common/fixtures/_test_circular2/pubspec.yaml b/dwds_test_common/fixtures/_test_circular2/pubspec.yaml index cc86627d95..9948691f73 100644 --- a/dwds_test_common/fixtures/_test_circular2/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_circular2/pubspec.yaml @@ -12,4 +12,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.7 + build_web_compilers: ^4.8.8 diff --git a/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml b/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml index 61349dd7f0..04f65cf7a7 100644 --- a/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml @@ -8,4 +8,4 @@ environment: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.7 + build_web_compilers: ^4.8.8 diff --git a/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml b/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml index f2e5ea6465..ded750868c 100644 --- a/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml @@ -8,5 +8,5 @@ environment: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.7 + build_web_compilers: ^4.8.8 diff --git a/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml b/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml index acc153b2eb..b200b62b2f 100644 --- a/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml @@ -8,4 +8,4 @@ environment: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.7 + build_web_compilers: ^4.8.8 diff --git a/dwds_test_common/fixtures/_test_hot_restart2/pubspec.yaml b/dwds_test_common/fixtures/_test_hot_restart2/pubspec.yaml index 48b3add867..48a97af26e 100644 --- a/dwds_test_common/fixtures/_test_hot_restart2/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_restart2/pubspec.yaml @@ -14,4 +14,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.7 + build_web_compilers: ^4.8.8 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 abcc424e8d..8d86937ace 100644 --- a/dwds_test_common/fixtures/_test_hot_restart_breakpoints/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_restart_breakpoints/pubspec.yaml @@ -8,5 +8,5 @@ environment: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.7 + build_web_compilers: ^4.8.8 diff --git a/dwds_test_common/fixtures/_test_package/pubspec.yaml b/dwds_test_common/fixtures/_test_package/pubspec.yaml index a1e51b2c20..39296b32eb 100644 --- a/dwds_test_common/fixtures/_test_package/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_package/pubspec.yaml @@ -12,4 +12,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.7 \ No newline at end of file + build_web_compilers: ^4.8.8 \ No newline at end of file diff --git a/dwds_test_common/fixtures/_test_parts/pubspec.yaml b/dwds_test_common/fixtures/_test_parts/pubspec.yaml index cd1a740975..0d762a6114 100644 --- a/dwds_test_common/fixtures/_test_parts/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_parts/pubspec.yaml @@ -12,4 +12,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.7 + build_web_compilers: ^4.8.8 diff --git a/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml b/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml index 037047e98b..4bb8177404 100644 --- a/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml +++ b/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml @@ -8,4 +8,4 @@ environment: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.7 + build_web_compilers: ^4.8.8 diff --git a/example/pubspec.yaml b/example/pubspec.yaml index ad2a061f7d..d50a8fb6b9 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -8,4 +8,4 @@ environment: dev_dependencies: build_runner: ^2.4.0 - build_web_compilers: ^4.8.7 + build_web_compilers: ^4.8.8 diff --git a/webdev/lib/src/pubspec.dart b/webdev/lib/src/pubspec.dart index f671698c38..b8343cc5f4 100644 --- a/webdev/lib/src/pubspec.dart +++ b/webdev/lib/src/pubspec.dart @@ -188,7 +188,7 @@ Future> _validateBuildDaemonVersion( } final buildRunnerConstraint = VersionConstraint.parse('^2.4.0'); -final buildWebCompilersConstraint = VersionConstraint.parse('^4.8.7'); +final buildWebCompilersConstraint = VersionConstraint.parse('^4.8.8'); // Note the minimum versions should never be dev versions as users will not // get them by default. diff --git a/webdev/test/integration_common.dart b/webdev/test/integration_common.dart index 61bed96e83..fb8eeddb0d 100644 --- a/webdev/test/integration_common.dart +++ b/webdev/test/integration_common.dart @@ -296,7 +296,7 @@ dependencies: } const _supportedBuildRunnerVersion = '2.4.0'; -const _supportedWebCompilersVersion = '4.8.7'; +const _supportedWebCompilersVersion = '4.8.8'; const _supportedBuildDaemonVersion = '4.0.0'; String _pubspecYaml = ''' From 6e66ca93d6c12fc3ada741117e2944b387b26557 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 16 Jul 2026 14:05:09 -0700 Subject: [PATCH 053/134] Updating injected client logic --- dwds/lib/src/handlers/injected_client_js.dart | 46 ++++++++++++++++--- dwds/lib/src/handlers/injector.dart | 6 +-- dwds/web/reloader/require_restarter.dart | 18 +++++--- webdev/lib/src/serve/webdev_server.dart | 4 +- 4 files changed, 56 insertions(+), 18 deletions(-) diff --git a/dwds/lib/src/handlers/injected_client_js.dart b/dwds/lib/src/handlers/injected_client_js.dart index ad322f709d..09dac8a3a1 100644 --- a/dwds/lib/src/handlers/injected_client_js.dart +++ b/dwds/lib/src/handlers/injected_client_js.dart @@ -21714,10 +21714,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return A._asyncStartSync(\$async\$restart\$3\$readyToRunMain\$reloadedSourcesPath\$runId, \$async\$completer);\n" " },\n" " hotReloadEnd\$0() {\n" -" return A.throwExpression(A.UnimplementedError\$(string\$.Hot_reD));\n" +" return A.throwExpression(A.UnimplementedError\$(string\$.Hot_re));\n" " },\n" " hotReloadStart\$1(reloadedSourcesPath) {\n" -" return A.throwExpression(A.UnimplementedError\$(string\$.Hot_reD));\n" +" return A.throwExpression(A.UnimplementedError\$(string\$.Hot_re));\n" " },\n" " \$isRestarter: 1\n" " };\n" @@ -21970,10 +21970,45 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return A._asyncStartSync(\$async\$restart\$3\$readyToRunMain\$reloadedSourcesPath\$runId, \$async\$completer);\n" " },\n" " hotReloadEnd\$0() {\n" -" return A.throwExpression(A.UnimplementedError\$(string\$.Hot_reA));\n" +" var \$async\$goto = 0,\n" +" \$async\$completer = A._makeAsyncAwaitCompleter(type\$.void);\n" +" var \$async\$hotReloadEnd\$0 = 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" +" // implicit return\n" +" return A._asyncReturn(null, \$async\$completer);\n" +" }\n" +" });\n" +" return A._asyncStartSync(\$async\$hotReloadEnd\$0, \$async\$completer);\n" " },\n" " hotReloadStart\$1(reloadedSourcesPath) {\n" -" return A.throwExpression(A.UnimplementedError\$(string\$.Hot_reA));\n" +" var \$async\$goto = 0,\n" +" \$async\$completer = A._makeAsyncAwaitCompleter(type\$.JSArray_nullable_Object),\n" +" \$async\$returnValue;\n" +" var \$async\$hotReloadStart\$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" +" if (reloadedSourcesPath.length === 0) {\n" +" \$async\$returnValue = type\$.JSArray_nullable_Object._as(new init.G.Array());\n" +" // goto return\n" +" \$async\$goto = 1;\n" +" break;\n" +" }\n" +" throw A.wrapException(A.UnimplementedError\$(\"Hot reload is not supported for the AMD module format.\"));\n" +" case 1:\n" +" // return\n" +" return A._asyncReturn(\$async\$returnValue, \$async\$completer);\n" +" }\n" +" });\n" +" return A._asyncStartSync(\$async\$hotReloadStart\$1, \$async\$completer);\n" " },\n" " _require_restarter\$_runMainWhenReady\$1(readyToRunMain) {\n" " var \$async\$goto = 0,\n" @@ -22544,8 +22579,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " Cannotn: \"Cannot extract a non-Windows file path from a file URI with an authority\",\n" " Dart_e: \"Dart exception thrown from converted Future. Use the properties 'error' to fetch the boxed error and 'stack' to recover the stack trace.\",\n" " Error_: \"Error handler must accept one Object or one Object and a StackTrace as arguments, and return a value of the returned future's type\",\n" -" Hot_reA: \"Hot reload is not supported for the AMD module format.\",\n" -" Hot_reD: \"Hot reload is not supported for the DDC module format.\",\n" +" Hot_re: \"Hot reload is not supported for the DDC module format.\",\n" " handle: \"handleError callback must take either an Object (the error), or both an Object (the error) and a StackTrace.\",\n" " max_mu: \"max must be in range 0 < max \\u2264 2^32, was \"\n" " };\n" diff --git a/dwds/lib/src/handlers/injector.dart b/dwds/lib/src/handlers/injector.dart index 5523a43fe7..bcdd57ca7e 100644 --- a/dwds/lib/src/handlers/injector.dart +++ b/dwds/lib/src/handlers/injector.dart @@ -189,8 +189,8 @@ Future _injectedClientSnippet( final buildSettings = loadStrategy.buildSettings; final appMetadata = globalToolConfiguration.appMetadata; final debugSettings = globalToolConfiguration.debugSettings; - final reloadedSourcesPath = loadStrategy is ReloadableLoadStrategy - ? 'window.\$reloadedSourcesPath = "${loadStrategy.reloadedSourcesUri}";\n' + final reloadedSourcesUri = loadStrategy is ReloadableLoadStrategy + ? loadStrategy.reloadedSourcesUri : ''; var injectedBody = @@ -207,7 +207,7 @@ Future _injectedClientSnippet( 'window.\$dartEmitDebugEvents = ${debugSettings.emitDebugEvents};\n' 'window.\$isInternalBuild = ${appMetadata.isInternalBuild};\n' 'window.\$isFlutterApp = ${buildSettings.isFlutterApp};\n' - '$reloadedSourcesPath' + 'window.\$reloadedSourcesPath = "$reloadedSourcesUri";\n' '${loadStrategy.loadClientSnippet(_clientScript)}'; if (extensionUri != null) { diff --git a/dwds/web/reloader/require_restarter.dart b/dwds/web/reloader/require_restarter.dart index 61ba853035..91fd7b0dec 100644 --- a/dwds/web/reloader/require_restarter.dart +++ b/dwds/web/reloader/require_restarter.dart @@ -170,15 +170,19 @@ class RequireRestarter implements Restarter { } @override - Future hotReloadEnd() => throw UnimplementedError( - 'Hot reload is not supported for the AMD module format.', - ); + Future hotReloadEnd() async { + // No-op for AMD. + } @override - Future> hotReloadStart(String reloadedSourcesPath) => - throw UnimplementedError( - 'Hot reload is not supported for the AMD module format.', - ); + Future> hotReloadStart(String reloadedSourcesPath) async { + if (reloadedSourcesPath.isEmpty) { + return JSArray(); + } + throw UnimplementedError( + 'Hot reload is not supported for the AMD module format.', + ); + } Future _runMainWhenReady(Future? readyToRunMain) async { if (readyToRunMain != null) { diff --git a/webdev/lib/src/serve/webdev_server.dart b/webdev/lib/src/serve/webdev_server.dart index bbadc8113c..008adb8570 100644 --- a/webdev/lib/src/serve/webdev_server.dart +++ b/webdev/lib/src/serve/webdev_server.dart @@ -172,9 +172,9 @@ class WebDevServer { // Only provide relevant build results final filteredBuildResults = buildResults.asyncMap((results) { + // Clear reloaded sources for the new build results. + reloadedSources.clear(); if (options.configuration.usesDdcLibraryBundle) { - // Clear reloaded sources for the new build results. - reloadedSources.clear(); results.changedAssets?.forEach((uri) { if (uri.path.endsWith(jsLibraryBundleExtension)) { final reloadedSource = { From 28afafa6cc0b03ca6f6052dbbc1870a9d314d5b6 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Fri, 17 Jul 2026 10:55:57 -0700 Subject: [PATCH 054/134] Updating versions in fixtures --- dwds_test_common/fixtures/_experiment/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_circular1/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_circular2/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml | 2 +- .../fixtures/_test_hot_reload_breakpoints/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_hot_restart2/pubspec.yaml | 2 +- .../fixtures/_test_hot_restart_breakpoints/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_package/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test_parts/pubspec.yaml | 2 +- dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml | 2 +- example/pubspec.yaml | 2 +- webdev/lib/src/pubspec.dart | 2 +- webdev/test/integration_common.dart | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/dwds_test_common/fixtures/_experiment/pubspec.yaml b/dwds_test_common/fixtures/_experiment/pubspec.yaml index d4c74f7db5..4f59b2731a 100644 --- a/dwds_test_common/fixtures/_experiment/pubspec.yaml +++ b/dwds_test_common/fixtures/_experiment/pubspec.yaml @@ -12,4 +12,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.8 + build_web_compilers: ^4.8.9 diff --git a/dwds_test_common/fixtures/_test/pubspec.yaml b/dwds_test_common/fixtures/_test/pubspec.yaml index 6aa8b85e1e..a598d3d0f3 100644 --- a/dwds_test_common/fixtures/_test/pubspec.yaml +++ b/dwds_test_common/fixtures/_test/pubspec.yaml @@ -12,5 +12,5 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.8 + build_web_compilers: ^4.8.9 diff --git a/dwds_test_common/fixtures/_test_circular1/pubspec.yaml b/dwds_test_common/fixtures/_test_circular1/pubspec.yaml index d1db425425..fbd633ab81 100644 --- a/dwds_test_common/fixtures/_test_circular1/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_circular1/pubspec.yaml @@ -14,4 +14,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.8 + build_web_compilers: ^4.8.9 diff --git a/dwds_test_common/fixtures/_test_circular2/pubspec.yaml b/dwds_test_common/fixtures/_test_circular2/pubspec.yaml index 9948691f73..b57886bb95 100644 --- a/dwds_test_common/fixtures/_test_circular2/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_circular2/pubspec.yaml @@ -12,4 +12,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.8 + build_web_compilers: ^4.8.9 diff --git a/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml b/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml index 04f65cf7a7..1f971f6217 100644 --- a/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml @@ -8,4 +8,4 @@ environment: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.8 + build_web_compilers: ^4.8.9 diff --git a/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml b/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml index ded750868c..45e536f771 100644 --- a/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml @@ -8,5 +8,5 @@ environment: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.8 + build_web_compilers: ^4.8.9 diff --git a/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml b/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml index b200b62b2f..8e461c0d9b 100644 --- a/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml @@ -8,4 +8,4 @@ environment: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.8 + build_web_compilers: ^4.8.9 diff --git a/dwds_test_common/fixtures/_test_hot_restart2/pubspec.yaml b/dwds_test_common/fixtures/_test_hot_restart2/pubspec.yaml index 48a97af26e..5c729526bd 100644 --- a/dwds_test_common/fixtures/_test_hot_restart2/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_restart2/pubspec.yaml @@ -14,4 +14,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.8 + build_web_compilers: ^4.8.9 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 8d86937ace..2d290276a7 100644 --- a/dwds_test_common/fixtures/_test_hot_restart_breakpoints/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_restart_breakpoints/pubspec.yaml @@ -8,5 +8,5 @@ environment: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.8 + build_web_compilers: ^4.8.9 diff --git a/dwds_test_common/fixtures/_test_package/pubspec.yaml b/dwds_test_common/fixtures/_test_package/pubspec.yaml index 39296b32eb..02a4a3895c 100644 --- a/dwds_test_common/fixtures/_test_package/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_package/pubspec.yaml @@ -12,4 +12,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.8 \ No newline at end of file + build_web_compilers: ^4.8.9 \ No newline at end of file diff --git a/dwds_test_common/fixtures/_test_parts/pubspec.yaml b/dwds_test_common/fixtures/_test_parts/pubspec.yaml index 0d762a6114..0ed9ba22f1 100644 --- a/dwds_test_common/fixtures/_test_parts/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_parts/pubspec.yaml @@ -12,4 +12,4 @@ dependencies: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.8 + build_web_compilers: ^4.8.9 diff --git a/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml b/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml index 4bb8177404..bdf30132ee 100644 --- a/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml +++ b/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml @@ -8,4 +8,4 @@ environment: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.8.8 + build_web_compilers: ^4.8.9 diff --git a/example/pubspec.yaml b/example/pubspec.yaml index d50a8fb6b9..31ad7335df 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -8,4 +8,4 @@ environment: dev_dependencies: build_runner: ^2.4.0 - build_web_compilers: ^4.8.8 + build_web_compilers: ^4.8.9 diff --git a/webdev/lib/src/pubspec.dart b/webdev/lib/src/pubspec.dart index b8343cc5f4..c2bc6ec53d 100644 --- a/webdev/lib/src/pubspec.dart +++ b/webdev/lib/src/pubspec.dart @@ -188,7 +188,7 @@ Future> _validateBuildDaemonVersion( } final buildRunnerConstraint = VersionConstraint.parse('^2.4.0'); -final buildWebCompilersConstraint = VersionConstraint.parse('^4.8.8'); +final buildWebCompilersConstraint = VersionConstraint.parse('^4.8.9'); // Note the minimum versions should never be dev versions as users will not // get them by default. diff --git a/webdev/test/integration_common.dart b/webdev/test/integration_common.dart index fb8eeddb0d..c04c930f7e 100644 --- a/webdev/test/integration_common.dart +++ b/webdev/test/integration_common.dart @@ -296,7 +296,7 @@ dependencies: } const _supportedBuildRunnerVersion = '2.4.0'; -const _supportedWebCompilersVersion = '4.8.8'; +const _supportedWebCompilersVersion = '4.8.9'; const _supportedBuildDaemonVersion = '4.0.0'; String _pubspecYaml = ''' From 47c54cf746f5206446cd9e9e7a18a6850579175c Mon Sep 17 00:00:00 2001 From: MarkZ Date: Sat, 18 Jul 2026 00:25:33 -0700 Subject: [PATCH 055/134] Updating changelogs --- dwds/CHANGELOG.md | 5 +++++ webdev/CHANGELOG.md | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/dwds/CHANGELOG.md b/dwds/CHANGELOG.md index a91b7be58a..a7571e363f 100644 --- a/dwds/CHANGELOG.md +++ b/dwds/CHANGELOG.md @@ -1,3 +1,8 @@ +## 27.2.0 + +- Add support for Frontend Server + Build Daemon configuration with hot reload via `FrontendServerBuildDaemonStrategyProvider`. +- Expose `DaemonExpressionCompiler` for handling expression compile directly via `build_daemon`. + ## 27.1.2 - Bump the min sdk to 3.13.0-107.0.dev. diff --git a/webdev/CHANGELOG.md b/webdev/CHANGELOG.md index 46c3c2ae16..945f5bebad 100644 --- a/webdev/CHANGELOG.md +++ b/webdev/CHANGELOG.md @@ -1,3 +1,8 @@ +## 4.1.0 + +- Enable hot reload support in Frontend Server + Build Daemon mode. +- Bump `build_web_compilers` constraint to `^4.8.8`. + ## 4.0.0 - Add `module-format` flag for testing new DDC Library Bundle module format prior to release. From d87e0ead43d05221c292dfdfb4ead4f947e631f8 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Sat, 18 Jul 2026 00:27:37 -0700 Subject: [PATCH 056/134] Updating versions --- dwds/pubspec.yaml | 2 +- webdev/lib/src/version.dart | 2 +- webdev/pubspec.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dwds/pubspec.yaml b/dwds/pubspec.yaml index 25600c6d53..c4ef3cf735 100644 --- a/dwds/pubspec.yaml +++ b/dwds/pubspec.yaml @@ -1,6 +1,6 @@ name: dwds # Every time this changes you need to run `dart run tool/build.dart`. -version: 27.1.2 +version: 27.2.0 description: >- A service that proxies between the Chrome debug protocol and the Dart VM diff --git a/webdev/lib/src/version.dart b/webdev/lib/src/version.dart index 66803eca53..2384f91ac4 100644 --- a/webdev/lib/src/version.dart +++ b/webdev/lib/src/version.dart @@ -1,2 +1,2 @@ // Generated code. Do not modify. -const packageVersion = '4.0.0'; +const packageVersion = '4.1.0'; diff --git a/webdev/pubspec.yaml b/webdev/pubspec.yaml index 19a4f554d4..3a4c9e4bc8 100644 --- a/webdev/pubspec.yaml +++ b/webdev/pubspec.yaml @@ -1,6 +1,6 @@ name: webdev # Every time this changes you need to run `dart run build_runner build`. -version: 4.0.0 +version: 4.1.0 # We should not depend on a dev SDK before publishing. # publish_to: none description: >- From eb0883bfa0d19d6a6e6ccb08d226a0b6cb15bdec Mon Sep 17 00:00:00 2001 From: MarkZ Date: Sat, 18 Jul 2026 00:28:50 -0700 Subject: [PATCH 057/134] Updating uri modifiers to support windows style paths --- dwds/lib/src/debugging/metadata/provider.dart | 24 +++++++++++-------- dwds/lib/src/utilities/dart_uri.dart | 2 ++ 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/dwds/lib/src/debugging/metadata/provider.dart b/dwds/lib/src/debugging/metadata/provider.dart index 0f639406fd..624319f8db 100644 --- a/dwds/lib/src/debugging/metadata/provider.dart +++ b/dwds/lib/src/debugging/metadata/provider.dart @@ -264,8 +264,10 @@ class MetadataProvider { } void _addMetadata(ModuleMetadata metadata) { - final modulePath = stripLeadingSlashes(metadata.moduleUri); - final sourceMapPath = stripLeadingSlashes(metadata.sourceMapUri); + final modulePath = stripLeadingSlashes(metadata.moduleUri) + .replaceAll('\\', '/'); + final sourceMapPath = stripLeadingSlashes(metadata.sourceMapUri) + .replaceAll('\\', '/'); final moduleName = metadata.name; _moduleToSourceMap[moduleName] = sourceMapPath; @@ -274,18 +276,20 @@ class MetadataProvider { final moduleLibraries = {}; for (final library in metadata.libraries.values) { - if (library.importUri.startsWith('file:/')) { - throw AbsoluteImportUriException(library.importUri); + final importUri = library.importUri.replaceAll('\\', '/'); + if (importUri.startsWith('file:/')) { + throw AbsoluteImportUriException(importUri); } - moduleLibraries.add(library.importUri); - _libraries.add(library.importUri); - _scripts[library.importUri] = []; + moduleLibraries.add(importUri); + _libraries.add(importUri); + _scripts[importUri] = []; - _scriptToModule[library.importUri] = moduleName; + _scriptToModule[importUri] = moduleName; for (final path in library.partUris) { + final normalizedPath = path.replaceAll('\\', '/'); // Parts in metadata are relative to the library Uri directory. - final partPath = p.url.join(p.dirname(library.importUri), path); - _scripts[library.importUri]!.add(partPath); + final partPath = p.url.join(p.url.dirname(importUri), normalizedPath); + _scripts[importUri]!.add(partPath); _scriptToModule[partPath] = moduleName; } } diff --git a/dwds/lib/src/utilities/dart_uri.dart b/dwds/lib/src/utilities/dart_uri.dart index 25645a7f39..4b36b6b5c4 100644 --- a/dwds/lib/src/utilities/dart_uri.dart +++ b/dwds/lib/src/utilities/dart_uri.dart @@ -96,11 +96,13 @@ class DartUri { /// [root] is the directory the app is served from (such as 'web') and is used /// to translate served URI paths to their on-disk paths. factory DartUri._fromRelativePath(String uri, {String? root}) { + uri = uri.replaceAll('\\', '/'); if (uri.startsWith('.')) uri = uri.substring(1); if (uri.startsWith('/')) uri = uri.substring(1); // Strip the [root] if provided. For example, with '/abc' as root: // abc/packages/foo/bar.dart -> DartUri('packages/foo/bar.dart', '/abc') if (root != null && root.isNotEmpty) { + root = root.replaceAll('\\', '/'); final cleanRoot = stripLeadingSlashes(root); if (cleanRoot.isNotEmpty) { final rootPrefix = cleanRoot.endsWith('/') ? cleanRoot : '$cleanRoot/'; From 9c4dbb182974e8f9763d28b6c8b72f1dda8f19f2 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Mon, 20 Jul 2026 09:33:24 -0700 Subject: [PATCH 058/134] Updating ver --- dwds/lib/src/version.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dwds/lib/src/version.dart b/dwds/lib/src/version.dart index 7a70c983c3..e89ff91b52 100644 --- a/dwds/lib/src/version.dart +++ b/dwds/lib/src/version.dart @@ -1,2 +1,2 @@ // Generated code. Do not modify. -const packageVersion = '27.1.2'; +const packageVersion = '27.2.0'; From a483dc003c7af7fac521fef046962832e91c5783 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Mon, 20 Jul 2026 12:27:10 -0700 Subject: [PATCH 059/134] Filtering Windows slashes --- dwds/lib/src/loaders/frontend_server_strategy_provider.dart | 1 + dwds/lib/src/readers/asset_reader.dart | 2 +- dwds/lib/src/readers/frontend_server_asset_reader.dart | 2 ++ dwds/lib/src/utilities/ddc_uri_translator.dart | 2 ++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart index 9ddff74a99..7072a8f950 100644 --- a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart +++ b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart @@ -210,6 +210,7 @@ class FrontendServerBuildDaemonStrategyProvider /// - `example/append_body/main.dart` -> `append_body/main.dart` /// - `packages/path/path.dart` -> `packages/path/path.dart` String _stripPrefix(String path) { + path = path.replaceAll('\\', '/'); if (path.startsWith('packages')) return path; final parts = path.split('/'); diff --git a/dwds/lib/src/readers/asset_reader.dart b/dwds/lib/src/readers/asset_reader.dart index 6730be91fb..3b8dc62bdc 100644 --- a/dwds/lib/src/readers/asset_reader.dart +++ b/dwds/lib/src/readers/asset_reader.dart @@ -103,7 +103,7 @@ class PackageUriMapper { /// For example, 'package:foo/bar.dart' would be served at /// 'packages/foo/bar.dart'. Uri? serverPathToResolvedUri(String serverPath) { - serverPath = stripLeadingSlashes(serverPath); + serverPath = stripLeadingSlashes(serverPath).replaceAll('\\', '/'); final segments = serverPath.split('/'); if (segments.first == 'packages') { final packagePath = DdcUriTranslator.translatePackagesPathToPackageUri( diff --git a/dwds/lib/src/readers/frontend_server_asset_reader.dart b/dwds/lib/src/readers/frontend_server_asset_reader.dart index 23b30d40dc..45fd8af50f 100644 --- a/dwds/lib/src/readers/frontend_server_asset_reader.dart +++ b/dwds/lib/src/readers/frontend_server_asset_reader.dart @@ -60,6 +60,7 @@ class FrontendServerAssetReader implements AssetReader { @override Future dartSourceContents(String serverPath) async { + serverPath = serverPath.replaceAll('\\', '/'); if (serverPath.endsWith('.dart')) { final packageConfig = await _packageConfig; var strippedPath = _stripBasePath(serverPath); @@ -84,6 +85,7 @@ class FrontendServerAssetReader implements AssetReader { @override Future sourceMapContents(String serverPath) async { + serverPath = serverPath.replaceAll('\\', '/'); if (serverPath.endsWith('lib.js.map')) { var strippedPath = _stripBasePath(serverPath); if (!strippedPath.startsWith('/')) strippedPath = '/$strippedPath'; diff --git a/dwds/lib/src/utilities/ddc_uri_translator.dart b/dwds/lib/src/utilities/ddc_uri_translator.dart index 51a1d0c35a..2122dafa78 100644 --- a/dwds/lib/src/utilities/ddc_uri_translator.dart +++ b/dwds/lib/src/utilities/ddc_uri_translator.dart @@ -32,6 +32,7 @@ class DdcUriTranslator { required AppUriLayout layout, bool useDebuggerModuleNames = true, }) { + appUrl = appUrl.replaceAll('\\', '/'); final appUri = Uri.parse(appUrl); if (appUri.isScheme('package')) { final pathSegments = appUri.pathSegments; @@ -79,6 +80,7 @@ class DdcUriTranslator { } static String _modifyLibSegment(String serverPath, {required bool add}) { + serverPath = serverPath.replaceAll('\\', '/'); if (!serverPath.startsWith('packages/')) return serverPath; final segments = serverPath.split('/'); if (segments.length > 2) { From d4b230b3ee0103922acf3e446b558d3262be2806 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Mon, 20 Jul 2026 15:20:10 -0700 Subject: [PATCH 060/134] Updating location parsing --- dwds/lib/src/debugging/location.dart | 23 ++----------- .../lib/src/utilities/ddc_uri_translator.dart | 34 +++++++++++++++++++ 2 files changed, 36 insertions(+), 21 deletions(-) diff --git a/dwds/lib/src/debugging/location.dart b/dwds/lib/src/debugging/location.dart index d292cb60d7..3c36f03eef 100644 --- a/dwds/lib/src/debugging/location.dart +++ b/dwds/lib/src/debugging/location.dart @@ -8,6 +8,7 @@ import 'package:dwds/src/debugging/metadata/provider.dart'; import 'package:dwds/src/debugging/modules.dart'; import 'package:dwds/src/readers/asset_reader.dart'; import 'package:dwds/src/utilities/dart_uri.dart'; +import 'package:dwds/src/utilities/ddc_uri_translator.dart'; import 'package:logging/logging.dart'; import 'package:path/path.dart' as p; import 'package:source_maps/parser.dart'; @@ -416,27 +417,7 @@ class Locations { p.url.joinAll([scriptLocation, ...relativeSegments]), ); - // Frontend Server emits source maps paths relative relative to the - // generated JS. If this is for a 'package:build' source, it may be in - // `.dart_tool/build/generated`, and relative path resolution might - // traverse beyond the package directory. We detect this and reconstruct - // the correct `org-dartlang-app:///` URI. - // - // For example: - // scriptLocation: `/packages/my_package/subdir/main.ddc.js` - // relativePath in source map: `../../../lib/src/library.dart` - // - // Joined path: - // Before: `/lib/src/library.dart` (loses `my_package`) - // After: `org-dartlang-app:///packages/my_package/src/library.dart` - if (scriptLocation.startsWith('/packages/') && - !path.startsWith('/packages/')) { - final packageDir = scriptLocation.split('/').take(3).join('/'); - final relativePath = path.startsWith('/lib/') - ? path.substring('/lib/'.length) - : path.substring('/'.length); - path = 'org-dartlang-app://$packageDir/$relativePath'; - } + path = DdcUriTranslator.reconstructAppScheme(path, scriptLocation); } try { diff --git a/dwds/lib/src/utilities/ddc_uri_translator.dart b/dwds/lib/src/utilities/ddc_uri_translator.dart index 2122dafa78..b604f97475 100644 --- a/dwds/lib/src/utilities/ddc_uri_translator.dart +++ b/dwds/lib/src/utilities/ddc_uri_translator.dart @@ -177,4 +177,38 @@ class DdcUriTranslator { to: AppUriLayout.buildRunner, ); } + + static const defaultWebDirs = ['web', 'test', 'example', 'benchmark']; + + /// Reconstructs the `org-dartlang-app:///` scheme for paths. + /// + /// This is required for relative sourcemaps emitted by the Frontend Server, + /// which lack a scheme (such as `/web/main.dart`). + static String reconstructAppScheme(String path, String scriptLocation) { + if (path.startsWith('org-dartlang-app:')) return path; + final normalizedPath = path.startsWith('/') ? path : '/$path'; + final isWebDir = defaultWebDirs.any( + (dir) => normalizedPath.startsWith('/$dir/'), + ); + if (isWebDir) { + // Example: + // scriptLocation: `/` + // path: `/web/main.dart` + // after: `org-dartlang-app:///web/main.dart` + return 'org-dartlang-app://$normalizedPath'; + } + if (scriptLocation.startsWith('/packages/') && + !path.startsWith('/packages/')) { + // Example: + // scriptLocation: `/packages/my_package/subdir/main.ddc.js` + // path: `/lib/src/library.dart` + // after: `org-dartlang-app:///packages/my_package/src/library.dart` + final packageDir = scriptLocation.split('/').take(3).join('/'); + final relativePath = path.startsWith('/lib/') + ? path.substring('/lib/'.length) + : path.substring(1); + return 'org-dartlang-app://$packageDir/$relativePath'; + } + return path; + } } From ce50fbed4ae9e690b65ab83e3daab25556720c78 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Tue, 21 Jul 2026 14:13:12 -0700 Subject: [PATCH 061/134] Support flutter style URIs for package paths --- .../frontend_server_strategy_provider.dart | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart index 7072a8f950..e5d23275f1 100644 --- a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart +++ b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart @@ -163,6 +163,23 @@ class FrontendServerDdcLibraryBundleStrategyProvider ); } + @override + String? _serverPathForAppUri(String appUrl) { + // Use [AppUriLayout.buildRunner] to strip 'lib/' from package paths + // (e.g., 'packages/test/main.dart'), which is expected by Flutter's asset + // server. + if (appUrl.startsWith('package:')) { + final translated = DdcUriTranslator.translateAppUriToServerPath( + appUrl, + layout: AppUriLayout.buildRunner, + ); + if (translated != null) { + return _addBasePath(translated); + } + } + return super._serverPathForAppUri(appUrl); + } + @override DdcLibraryBundleStrategy get strategy => _libraryBundleStrategy; } @@ -337,6 +354,23 @@ class FrontendServerRequireStrategyProvider super.packageConfigPath, }); + @override + String? _serverPathForAppUri(String appUrl) { + // Use [AppUriLayout.buildRunner] to strip 'lib/' from package paths + // (e.g., 'packages/test/main.dart'), which is expected by Flutter's asset + // server. + if (appUrl.startsWith('package:')) { + final translated = DdcUriTranslator.translateAppUriToServerPath( + appUrl, + layout: AppUriLayout.buildRunner, + ); + if (translated != null) { + return _addBasePath(translated); + } + } + return super._serverPathForAppUri(appUrl); + } + @override RequireStrategy get strategy => _requireStrategy; } From 35482504f7ed35676bc81394d9c2037f9d7628bb Mon Sep 17 00:00:00 2001 From: MarkZ Date: Wed, 22 Jul 2026 16:07:48 -0700 Subject: [PATCH 062/134] Adding flutter-specific handling to FrontendServerDdcLibraryBundleStrategyProvider --- .../loaders/frontend_server_strategy_provider.dart | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart index e5d23275f1..122d784de7 100644 --- a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart +++ b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart @@ -165,10 +165,9 @@ class FrontendServerDdcLibraryBundleStrategyProvider @override String? _serverPathForAppUri(String appUrl) { - // Use [AppUriLayout.buildRunner] to strip 'lib/' from package paths - // (e.g., 'packages/test/main.dart'), which is expected by Flutter's asset - // server. - if (appUrl.startsWith('package:')) { + // Flutter's asset server expects package paths without the 'lib/' segment + // (e.g., 'packages/test/main.dart'), so we use AppUriLayout.buildRunner. + if (_buildSettings.isFlutterApp && appUrl.startsWith('package:')) { final translated = DdcUriTranslator.translateAppUriToServerPath( appUrl, layout: AppUriLayout.buildRunner, @@ -356,10 +355,9 @@ class FrontendServerRequireStrategyProvider @override String? _serverPathForAppUri(String appUrl) { - // Use [AppUriLayout.buildRunner] to strip 'lib/' from package paths - // (e.g., 'packages/test/main.dart'), which is expected by Flutter's asset - // server. - if (appUrl.startsWith('package:')) { + // Flutter's asset server expects package paths without the 'lib/' segment + // (e.g., 'packages/test/main.dart'), so we use AppUriLayout.buildRunner. + if (_buildSettings.isFlutterApp && appUrl.startsWith('package:')) { final translated = DdcUriTranslator.translateAppUriToServerPath( appUrl, layout: AppUriLayout.buildRunner, From 3ce0cf1d365fdb6f6d97676ac96b3854fa3938e7 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 23 Jul 2026 16:32:55 -0700 Subject: [PATCH 063/134] Allowing null reloadedSources and handling them at downstream call sites --- dwds/lib/src/handlers/injected_client_js.dart | 78 ++++++++++++------- dwds/lib/src/handlers/injector.dart | 6 +- dwds/web/client.dart | 13 +--- .../ddc_library_bundle_restarter.dart | 16 +++- dwds/web/reloader/ddc_restarter.dart | 18 +++-- dwds/web/reloader/manager.dart | 4 +- dwds/web/reloader/require_restarter.dart | 4 +- dwds/web/reloader/restarter.dart | 4 +- 8 files changed, 86 insertions(+), 57 deletions(-) diff --git a/dwds/lib/src/handlers/injected_client_js.dart b/dwds/lib/src/handlers/injected_client_js.dart index 09dac8a3a1..93c9b319b6 100644 --- a/dwds/lib/src/handlers/injected_client_js.dart +++ b/dwds/lib/src/handlers/injected_client_js.dart @@ -8771,7 +8771,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " handleWebSocketHotReloadRequest\$body(\$event, manager, clientSink) {\n" " var \$async\$goto = 0,\n" " \$async\$completer = A._makeAsyncAwaitCompleter(type\$.void),\n" -" \$async\$handler = 1, \$async\$errorStack = [], e, path, exception, requestId, \$async\$exception;\n" +" \$async\$handler = 1, \$async\$errorStack = [], e, exception, requestId, \$async\$exception;\n" " var \$async\$handleWebSocketHotReloadRequest = A._wrapJsFunctionForAsync(function(\$async\$errorCode, \$async\$result) {\n" " if (\$async\$errorCode === 1) {\n" " \$async\$errorStack.push(\$async\$result);\n" @@ -8783,10 +8783,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " // Function start\n" " requestId = \$event.id;\n" " \$async\$handler = 3;\n" -" path = A._asStringQ(init.G.\$reloadedSourcesPath);\n" -" path.toString;\n" " \$async\$goto = 6;\n" -" return A._asyncAwait(manager._restarter.hotReloadStart\$1(path), \$async\$handleWebSocketHotReloadRequest);\n" +" return A._asyncAwait(manager._restarter.hotReloadStart\$1(A._asStringQ(init.G.\$reloadedSourcesPath)), \$async\$handleWebSocketHotReloadRequest);\n" " case 6:\n" " // returning from await.\n" " \$async\$goto = 7;\n" @@ -8829,7 +8827,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, t1, t2, exception, requestId, \$async\$exception;\n" +" \$async\$handler = 1, \$async\$errorStack = [], runId, e, t1, 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" @@ -8847,10 +8845,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " 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" +" return A._asyncAwait(manager.hotRestartBegin\$1(A._asStringQ(t1.\$reloadedSourcesPath)), \$async\$handleWebSocketHotRestartRequest);\n" " case 9:\n" " // returning from await.\n" " A._asJSObject(t1.dartDevEmbedder).hotRestartEnd();\n" @@ -21032,9 +21028,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A.main__closure.prototype = {\n" " call\$0() {\n" -" var path = A._asStringQ(init.G.\$reloadedSourcesPath);\n" -" path.toString;\n" -" return A.FutureOfJSAnyToJSPromise_get_toJS(this.manager._restarter.hotReloadStart\$1(path), type\$.JSArray_nullable_Object);\n" +" return A.FutureOfJSAnyToJSPromise_get_toJS(this.manager._restarter.hotReloadStart\$1(A._asStringQ(init.G.\$reloadedSourcesPath)), type\$.JSArray_nullable_Object);\n" " },\n" " \$signature: 7\n" " };\n" @@ -21046,9 +21040,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\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" +" return A.FutureOfJSAnyToJSPromise_get_toJS(this.manager.hotRestartBegin\$1(A._asStringQ(init.G.\$reloadedSourcesPath)), type\$.JSArray_nullable_Object);\n" " },\n" " \$signature: 7\n" " };\n" @@ -21144,7 +21136,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, t3, path, \$alert, \$event;\n" +" \$async\$self = this, t1, t2, \$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" @@ -21177,10 +21169,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " 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" +" return A._asyncAwait(t2.hotRestartBegin\$1(A._asStringQ(t1.\$reloadedSourcesPath)), \$async\$call\$1);\n" " case 14:\n" " // returning from await.\n" " type\$.TwoPhaseRestarter._as(t2._restarter);\n" @@ -21206,10 +21196,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " case 16:\n" " // then\n" " t2 = \$async\$self.manager;\n" -" path = A._asStringQ(t1.\$reloadedSourcesPath);\n" -" path.toString;\n" " \$async\$goto = 18;\n" -" return A._asyncAwait(t2._restarter.hotReloadStart\$1(path), \$async\$call\$1);\n" +" return A._asyncAwait(t2._restarter.hotReloadStart\$1(A._asStringQ(t1.\$reloadedSourcesPath)), \$async\$call\$1);\n" " case 18:\n" " // returning from await.\n" " \$async\$goto = 19;\n" @@ -21484,6 +21472,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return A._asyncAwait(A._Debugger_maybeInvokeFlutterDisassemble(A._asJSObject(A._asJSObject(t1.dartDevEmbedder).debugger)), \$async\$hotRestartBegin\$1);\n" " case 3:\n" " // returning from await.\n" +" reloadedSourcesPath.toString;\n" " t2 = type\$.JSArray_nullable_Object;\n" " \$async\$temp1 = t2;\n" " \$async\$temp2 = A;\n" @@ -21510,7 +21499,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " hotReloadStart\$1(reloadedSourcesPath) {\n" " var \$async\$goto = 0,\n" " \$async\$completer = A._makeAsyncAwaitCompleter(type\$.JSArray_nullable_Object),\n" -" \$async\$returnValue, \$async\$self = this, t3, t4, t5, t6, srcModuleLibraryCast, src, libraries, t7, t8, t9, result, t1, t2, filesToLoad, librariesToReload, srcModuleLibraries;\n" +" \$async\$returnValue, \$async\$self = this, srcModuleLibraries, t3, t4, t5, t6, srcModuleLibraryCast, src, libraries, t7, t8, t9, result, t1, t2, filesToLoad, librariesToReload;\n" " var \$async\$hotReloadStart\$1 = A._wrapJsFunctionForAsync(function(\$async\$errorCode, \$async\$result) {\n" " if (\$async\$errorCode === 1)\n" " return A._asyncRethrow(\$async\$result, \$async\$completer);\n" @@ -21522,6 +21511,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t2 = type\$.JSArray_nullable_Object;\n" " filesToLoad = t2._as(new t1.Array());\n" " librariesToReload = t2._as(new t1.Array());\n" +" reloadedSourcesPath.toString;\n" " \$async\$goto = 3;\n" " return A._asyncAwait(\$async\$self._getSrcModuleLibraries\$1(reloadedSourcesPath), \$async\$hotReloadStart\$1);\n" " case 3:\n" @@ -21714,10 +21704,45 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return A._asyncStartSync(\$async\$restart\$3\$readyToRunMain\$reloadedSourcesPath\$runId, \$async\$completer);\n" " },\n" " hotReloadEnd\$0() {\n" -" return A.throwExpression(A.UnimplementedError\$(string\$.Hot_re));\n" +" var \$async\$goto = 0,\n" +" \$async\$completer = A._makeAsyncAwaitCompleter(type\$.void);\n" +" var \$async\$hotReloadEnd\$0 = 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" +" // implicit return\n" +" return A._asyncReturn(null, \$async\$completer);\n" +" }\n" +" });\n" +" return A._asyncStartSync(\$async\$hotReloadEnd\$0, \$async\$completer);\n" " },\n" " hotReloadStart\$1(reloadedSourcesPath) {\n" -" return A.throwExpression(A.UnimplementedError\$(string\$.Hot_re));\n" +" var \$async\$goto = 0,\n" +" \$async\$completer = A._makeAsyncAwaitCompleter(type\$.JSArray_nullable_Object),\n" +" \$async\$returnValue;\n" +" var \$async\$hotReloadStart\$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" +" if (reloadedSourcesPath == null || reloadedSourcesPath.length === 0) {\n" +" \$async\$returnValue = type\$.JSArray_nullable_Object._as(new init.G.Array());\n" +" // goto return\n" +" \$async\$goto = 1;\n" +" break;\n" +" }\n" +" throw A.wrapException(A.UnimplementedError\$(\"Hot reload is not supported for the DDC module format.\"));\n" +" case 1:\n" +" // return\n" +" return A._asyncReturn(\$async\$returnValue, \$async\$completer);\n" +" }\n" +" });\n" +" return A._asyncStartSync(\$async\$hotReloadStart\$1, \$async\$completer);\n" " },\n" " \$isRestarter: 1\n" " };\n" @@ -21996,7 +22021,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " switch (\$async\$goto) {\n" " case 0:\n" " // Function start\n" -" if (reloadedSourcesPath.length === 0) {\n" +" if (reloadedSourcesPath == null || reloadedSourcesPath.length === 0) {\n" " \$async\$returnValue = type\$.JSArray_nullable_Object._as(new init.G.Array());\n" " // goto return\n" " \$async\$goto = 1;\n" @@ -22579,7 +22604,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " Cannotn: \"Cannot extract a non-Windows file path from a file URI with an authority\",\n" " Dart_e: \"Dart exception thrown from converted Future. Use the properties 'error' to fetch the boxed error and 'stack' to recover the stack trace.\",\n" " Error_: \"Error handler must accept one Object or one Object and a StackTrace as arguments, and return a value of the returned future's type\",\n" -" Hot_re: \"Hot reload is not supported for the DDC module format.\",\n" " handle: \"handleError callback must take either an Object (the error), or both an Object (the error) and a StackTrace.\",\n" " max_mu: \"max must be in range 0 < max \\u2264 2^32, was \"\n" " };\n" @@ -23213,4 +23237,4 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value "})();\n" ""; -const clientDartHash = 'eb87fbfbfd5a1d956d883131177756f74503b621509846fb09367d3ab94173eb'; +const clientDartHash = '6c9aa3e56aa014bb92865822a76b4cfbb757957f40e8112884d684f4e86c82ea'; diff --git a/dwds/lib/src/handlers/injector.dart b/dwds/lib/src/handlers/injector.dart index bcdd57ca7e..5523a43fe7 100644 --- a/dwds/lib/src/handlers/injector.dart +++ b/dwds/lib/src/handlers/injector.dart @@ -189,8 +189,8 @@ Future _injectedClientSnippet( final buildSettings = loadStrategy.buildSettings; final appMetadata = globalToolConfiguration.appMetadata; final debugSettings = globalToolConfiguration.debugSettings; - final reloadedSourcesUri = loadStrategy is ReloadableLoadStrategy - ? loadStrategy.reloadedSourcesUri + final reloadedSourcesPath = loadStrategy is ReloadableLoadStrategy + ? 'window.\$reloadedSourcesPath = "${loadStrategy.reloadedSourcesUri}";\n' : ''; var injectedBody = @@ -207,7 +207,7 @@ Future _injectedClientSnippet( 'window.\$dartEmitDebugEvents = ${debugSettings.emitDebugEvents};\n' 'window.\$isInternalBuild = ${appMetadata.isInternalBuild};\n' 'window.\$isFlutterApp = ${buildSettings.isFlutterApp};\n' - 'window.\$reloadedSourcesPath = "$reloadedSourcesUri";\n' + '$reloadedSourcesPath' '${loadStrategy.loadClientSnippet(_clientScript)}'; if (extensionUri != null) { diff --git a/dwds/web/client.dart b/dwds/web/client.dart index 89a91b8409..ee2cfb48bf 100644 --- a/dwds/web/client.dart +++ b/dwds/web/client.dart @@ -201,7 +201,7 @@ Future? main() { } else if (reloadConfiguration == 'ReloadConfiguration.hotRestart') { if (dartModuleStrategy == 'ddc-library-bundle') { - await manager.hotRestartBegin(hotRestartReloadedSourcesPath!); + await manager.hotRestartBegin(hotRestartReloadedSourcesPath); manager.hotRestartEnd(); } else { await manager.hotRestart( @@ -535,7 +535,7 @@ Future handleWebSocketHotRestartRequest( try { final runId = const Uuid().v4(); if (manager.supportsTwoPhaseHotRestart) { - await manager.hotRestartBegin(hotRestartReloadedSourcesPath!); + await manager.hotRestartBegin(hotRestartReloadedSourcesPath); manager.hotRestartEnd(); } else { // TODO(nshahan): Remove after migrating to hotRestartBegin/hotRestartEnd. @@ -626,14 +626,7 @@ external String? get _reloadedSourcesPath; String? get hotRestartReloadedSourcesPath => _reloadedSourcesPath; -String get hotReloadReloadedSourcesPath { - final path = _reloadedSourcesPath; - assert( - path != null, - "Expected 'reloadedSourcesPath' to not be null in a hot reload.", - ); - return path!; -} +String? get hotReloadReloadedSourcesPath => _reloadedSourcesPath; /// Debugger-initiated hot restart. // TODO(nshahan): Remove after migrating to hotRestartBegin/hotRestartEnd. diff --git a/dwds/web/reloader/ddc_library_bundle_restarter.dart b/dwds/web/reloader/ddc_library_bundle_restarter.dart index 817b3a4976..d63a6b6f10 100644 --- a/dwds/web/reloader/ddc_library_bundle_restarter.dart +++ b/dwds/web/reloader/ddc_library_bundle_restarter.dart @@ -133,10 +133,14 @@ class DdcLibraryBundleRestarter implements Restarter, TwoPhaseRestarter { } @override - Future> hotRestartBegin(String reloadedSourcesPath) async { + Future> hotRestartBegin(String? reloadedSourcesPath) async { + assert( + reloadedSourcesPath != null, + "Expected 'reloadedSourcesPath' to not be null in a hot restart.", + ); await _dartDevEmbedder.debugger.maybeInvokeFlutterDisassemble(); final srcModuleLibraries = await _getSrcModuleLibraries( - reloadedSourcesPath, + reloadedSourcesPath!, ); final jsFilesToRequest = srcModuleLibraries.jsify() as JSArray; final requestedJsFiles = await _dartDevEmbedder @@ -149,11 +153,15 @@ class DdcLibraryBundleRestarter implements Restarter, TwoPhaseRestarter { void hotRestartEnd() => _dartDevEmbedder.hotRestartEnd(); @override - Future> hotReloadStart(String reloadedSourcesPath) async { + Future> hotReloadStart(String? reloadedSourcesPath) async { + assert( + reloadedSourcesPath != null, + "Expected 'reloadedSourcesPath' to not be null in a hot reload.", + ); final filesToLoad = JSArray(); final librariesToReload = JSArray(); final srcModuleLibraries = await _getSrcModuleLibraries( - reloadedSourcesPath, + reloadedSourcesPath!, ); for (final srcModuleLibrary in srcModuleLibraries) { final srcModuleLibraryCast = srcModuleLibrary.cast(); diff --git a/dwds/web/reloader/ddc_restarter.dart b/dwds/web/reloader/ddc_restarter.dart index 696f4e4f81..d10d0e2f65 100644 --- a/dwds/web/reloader/ddc_restarter.dart +++ b/dwds/web/reloader/ddc_restarter.dart @@ -59,13 +59,17 @@ class DdcRestarter implements Restarter { } @override - Future hotReloadEnd() => throw UnimplementedError( - 'Hot reload is not supported for the DDC module format.', - ); + Future hotReloadEnd() async { + // No-op for DDC. + } @override - Future> hotReloadStart(String reloadedSourcesPath) => - throw UnimplementedError( - 'Hot reload is not supported for the DDC module format.', - ); + Future> hotReloadStart(String? reloadedSourcesPath) async { + if (reloadedSourcesPath == null || reloadedSourcesPath.isEmpty) { + return JSArray(); + } + throw UnimplementedError( + 'Hot reload is not supported for the DDC module format.', + ); + } } diff --git a/dwds/web/reloader/manager.dart b/dwds/web/reloader/manager.dart index f1f7ac1544..eb123d5e14 100644 --- a/dwds/web/reloader/manager.dart +++ b/dwds/web/reloader/manager.dart @@ -66,7 +66,7 @@ class ReloadingManager { bool get supportsTwoPhaseHotRestart => _restarter is TwoPhaseRestarter; - Future> hotRestartBegin(String reloadedSourcesPath) async { + 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 @@ -107,7 +107,7 @@ class ReloadingManager { /// `module`: The name of the library bundle in `src`. /// `libraries`: An array of strings containing the libraries that were /// compiled in `src`. - Future> hotReloadStart(String reloadedSourcesPath) => + Future> hotReloadStart(String? reloadedSourcesPath) => _restarter.hotReloadStart(reloadedSourcesPath); /// Does a hard reload of the application. diff --git a/dwds/web/reloader/require_restarter.dart b/dwds/web/reloader/require_restarter.dart index 91fd7b0dec..af01bd2372 100644 --- a/dwds/web/reloader/require_restarter.dart +++ b/dwds/web/reloader/require_restarter.dart @@ -175,8 +175,8 @@ class RequireRestarter implements Restarter { } @override - Future> hotReloadStart(String reloadedSourcesPath) async { - if (reloadedSourcesPath.isEmpty) { + Future> hotReloadStart(String? reloadedSourcesPath) async { + if (reloadedSourcesPath == null || reloadedSourcesPath.isEmpty) { return JSArray(); } throw UnimplementedError( diff --git a/dwds/web/reloader/restarter.dart b/dwds/web/reloader/restarter.dart index 1810cca2db..0b0460b3ff 100644 --- a/dwds/web/reloader/restarter.dart +++ b/dwds/web/reloader/restarter.dart @@ -17,7 +17,7 @@ abstract class TwoPhaseRestarter implements Restarter { /// /// Passes the [reloadedSourcesPath] through to the `DartDevEmbedder` and /// bubbles up the returned array of scripts that were actually requested. - Future> hotRestartBegin(String reloadedSourcesPath); + Future> hotRestartBegin(String? reloadedSourcesPath); /// Finishes the hot restart operation that must have been previously started /// by [hotRestartBegin]. @@ -83,5 +83,5 @@ abstract class Restarter { /// `module`: The name of the library bundle in `src`. /// `libraries`: An array of strings containing the libraries that were /// compiled in `src`. - Future> hotReloadStart(String reloadedSourcesPath); + Future> hotReloadStart(String? reloadedSourcesPath); } From 50042ad3c6f51b7d034a4d2327ba64e56c82eaa1 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 23 Jul 2026 17:18:04 -0700 Subject: [PATCH 064/134] Adding an AppUriLayout.flutter option + adding tests for uri translation --- .../frontend_server_strategy_provider.dart | 8 +- .../lib/src/utilities/ddc_uri_translator.dart | 15 +- .../utilities/ddc_uri_translator_test.dart | 418 ++++++++++++++++++ 3 files changed, 432 insertions(+), 9 deletions(-) create mode 100644 dwds/test/utilities/ddc_uri_translator_test.dart diff --git a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart index 122d784de7..1dddbea82c 100644 --- a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart +++ b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart @@ -166,11 +166,11 @@ class FrontendServerDdcLibraryBundleStrategyProvider @override String? _serverPathForAppUri(String appUrl) { // Flutter's asset server expects package paths without the 'lib/' segment - // (e.g., 'packages/test/main.dart'), so we use AppUriLayout.buildRunner. + // (e.g., 'packages/test/main.dart'), so we use AppUriLayout.flutter. if (_buildSettings.isFlutterApp && appUrl.startsWith('package:')) { final translated = DdcUriTranslator.translateAppUriToServerPath( appUrl, - layout: AppUriLayout.buildRunner, + layout: AppUriLayout.flutter, ); if (translated != null) { return _addBasePath(translated); @@ -356,11 +356,11 @@ class FrontendServerRequireStrategyProvider @override String? _serverPathForAppUri(String appUrl) { // Flutter's asset server expects package paths without the 'lib/' segment - // (e.g., 'packages/test/main.dart'), so we use AppUriLayout.buildRunner. + // (e.g., 'packages/test/main.dart'), so we use AppUriLayout.flutter. if (_buildSettings.isFlutterApp && appUrl.startsWith('package:')) { final translated = DdcUriTranslator.translateAppUriToServerPath( appUrl, - layout: AppUriLayout.buildRunner, + layout: AppUriLayout.flutter, ); if (translated != null) { return _addBasePath(translated); diff --git a/dwds/lib/src/utilities/ddc_uri_translator.dart b/dwds/lib/src/utilities/ddc_uri_translator.dart index b604f97475..bfbc950eae 100644 --- a/dwds/lib/src/utilities/ddc_uri_translator.dart +++ b/dwds/lib/src/utilities/ddc_uri_translator.dart @@ -10,6 +10,10 @@ enum AppUriLayout { /// Used when compiling/serving with package:build. /// Omits 'lib/' segments (e.g. packages/foo/bar.dart). buildRunner, + + /// Used when serving Flutter apps. + /// Omits 'lib/' segments for package paths (e.g. packages/foo/bar.dart). + flutter, } /// Translates paths across DDC, Frontend Server, DWDS, and package:build. @@ -45,7 +49,7 @@ class DdcUriTranslator { useDebuggerModuleNames ? addLibSegment(buildRunnerPath) : buildRunnerPath, - AppUriLayout.buildRunner => buildRunnerPath, + AppUriLayout.buildRunner || AppUriLayout.flutter => buildRunnerPath, }; } @@ -60,6 +64,7 @@ class DdcUriTranslator { ? addLibSegment(appUri.path.substring(1)) : removeLibSegment(appUri.path.substring(1)); case AppUriLayout.buildRunner: + case AppUriLayout.flutter: final first = segments.first; if (first == 'packages') { if (segments.length < 3) { @@ -198,15 +203,15 @@ class DdcUriTranslator { return 'org-dartlang-app://$normalizedPath'; } if (scriptLocation.startsWith('/packages/') && - !path.startsWith('/packages/')) { + !normalizedPath.startsWith('/packages/')) { // Example: // scriptLocation: `/packages/my_package/subdir/main.ddc.js` // path: `/lib/src/library.dart` // after: `org-dartlang-app:///packages/my_package/src/library.dart` final packageDir = scriptLocation.split('/').take(3).join('/'); - final relativePath = path.startsWith('/lib/') - ? path.substring('/lib/'.length) - : path.substring(1); + final relativePath = normalizedPath.startsWith('/lib/') + ? normalizedPath.substring('/lib/'.length) + : normalizedPath.substring(1); return 'org-dartlang-app://$packageDir/$relativePath'; } return path; diff --git a/dwds/test/utilities/ddc_uri_translator_test.dart b/dwds/test/utilities/ddc_uri_translator_test.dart new file mode 100644 index 0000000000..4eaab8e4c9 --- /dev/null +++ b/dwds/test/utilities/ddc_uri_translator_test.dart @@ -0,0 +1,418 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:dwds/src/utilities/ddc_uri_translator.dart'; +import 'package:test/test.dart'; + +void main() { + group('DdcUriTranslator', () { + group('translateAppUriToServerPath', () { + group('package: URIs', () { + test('frontendServerOnly layout adds lib/ segment', () { + // Checks: package:foo/bar.dart -> packages/foo/lib/bar.dart + expect( + DdcUriTranslator.translateAppUriToServerPath( + 'package:foo/bar.dart', + layout: AppUriLayout.frontendServerOnly, + ), + 'packages/foo/lib/bar.dart', + ); + }); + + test('frontendServerOnly layout omits lib/ segment if useDebuggerModuleNames is false', () { + // Checks: package:foo/bar.dart -> packages/foo/bar.dart + expect( + DdcUriTranslator.translateAppUriToServerPath( + 'package:foo/bar.dart', + layout: AppUriLayout.frontendServerOnly, + useDebuggerModuleNames: false, + ), + 'packages/foo/bar.dart', + ); + }); + + test('buildRunner layout omits lib/ segment', () { + // Checks: package:foo/bar.dart -> packages/foo/bar.dart + expect( + DdcUriTranslator.translateAppUriToServerPath( + 'package:foo/bar.dart', + layout: AppUriLayout.buildRunner, + ), + 'packages/foo/bar.dart', + ); + }); + + test('flutter layout omits lib/ segment', () { + // Checks: package:foo/bar.dart -> packages/foo/bar.dart + expect( + DdcUriTranslator.translateAppUriToServerPath( + 'package:foo/bar.dart', + layout: AppUriLayout.flutter, + ), + 'packages/foo/bar.dart', + ); + }); + }); + + group('org-dartlang-app: URIs', () { + test('frontendServerOnly layout preserves path', () { + // Checks: org-dartlang-app:///web/main.dart -> web/main.dart + expect( + DdcUriTranslator.translateAppUriToServerPath( + 'org-dartlang-app:///web/main.dart', + layout: AppUriLayout.frontendServerOnly, + ), + 'web/main.dart', + ); + }); + + test('frontendServerOnly layout adds lib/ to packages path', () { + // Checks: org-dartlang-app:///packages/foo/bar.dart -> packages/foo/lib/bar.dart + expect( + DdcUriTranslator.translateAppUriToServerPath( + 'org-dartlang-app:///packages/foo/bar.dart', + layout: AppUriLayout.frontendServerOnly, + ), + 'packages/foo/lib/bar.dart', + ); + }); + + test('buildRunner layout strips entrypoint prefix', () { + // Checks: org-dartlang-app:///web/main.dart -> main.dart + expect( + DdcUriTranslator.translateAppUriToServerPath( + 'org-dartlang-app:///web/main.dart', + layout: AppUriLayout.buildRunner, + ), + 'main.dart', + ); + }); + + test('buildRunner layout dedupes entrypoint prefix', () { + // Checks: org-dartlang-app:///web/web/main.dart -> main.dart + expect( + DdcUriTranslator.translateAppUriToServerPath( + 'org-dartlang-app:///web/web/main.dart', + layout: AppUriLayout.buildRunner, + ), + 'main.dart', + ); + }); + + test('buildRunner layout preserves packages path', () { + // Checks: org-dartlang-app:///packages/foo/bar.dart -> packages/foo/bar.dart + expect( + DdcUriTranslator.translateAppUriToServerPath( + 'org-dartlang-app:///packages/foo/bar.dart', + layout: AppUriLayout.buildRunner, + ), + 'packages/foo/bar.dart', + ); + }); + + test('flutter layout behaves like buildRunner for entrypoints', () { + // Checks: org-dartlang-app:///web/main.dart -> main.dart + expect( + DdcUriTranslator.translateAppUriToServerPath( + 'org-dartlang-app:///web/main.dart', + layout: AppUriLayout.flutter, + ), + 'main.dart', + ); + }); + + test('flutter layout behaves like buildRunner for packages path', () { + // Checks: org-dartlang-app:///packages/foo/bar.dart -> packages/foo/bar.dart + expect( + DdcUriTranslator.translateAppUriToServerPath( + 'org-dartlang-app:///packages/foo/bar.dart', + layout: AppUriLayout.flutter, + ), + 'packages/foo/bar.dart', + ); + }); + }); + }); + + group('addLibSegment', () { + test('adds lib/ to packages paths', () { + // Checks: packages/foo/bar.dart -> packages/foo/lib/bar.dart + expect( + DdcUriTranslator.addLibSegment('packages/foo/bar.dart'), + 'packages/foo/lib/bar.dart', + ); + }); + + test('is no-op if lib/ is already present', () { + // Checks: packages/foo/lib/bar.dart -> packages/foo/lib/bar.dart + expect( + DdcUriTranslator.addLibSegment('packages/foo/lib/bar.dart'), + 'packages/foo/lib/bar.dart', + ); + }); + + test('is no-op for non-packages paths', () { + // Checks: web/main.dart -> web/main.dart + expect( + DdcUriTranslator.addLibSegment('web/main.dart'), + 'web/main.dart', + ); + }); + }); + + group('removeLibSegment', () { + test('removes lib/ from packages paths', () { + // Checks: packages/foo/lib/bar.dart -> packages/foo/bar.dart + expect( + DdcUriTranslator.removeLibSegment('packages/foo/lib/bar.dart'), + 'packages/foo/bar.dart', + ); + }); + + test('is no-op if lib/ is not present', () { + // Checks: packages/foo/bar.dart -> packages/foo/bar.dart + expect( + DdcUriTranslator.removeLibSegment('packages/foo/bar.dart'), + 'packages/foo/bar.dart', + ); + }); + + test('is no-op for non-packages paths', () { + // Checks: web/main.dart -> web/main.dart + expect( + DdcUriTranslator.removeLibSegment('web/main.dart'), + 'web/main.dart', + ); + }); + }); + + group('translatePackagesPathToPackageUri', () { + test('translates packages/ paths with lib/ (frontendServerOnly)', () { + // Checks: packages/foo/lib/bar.dart -> package:foo/bar.dart + expect( + DdcUriTranslator.translatePackagesPathToPackageUri( + 'packages/foo/lib/bar.dart', + layout: AppUriLayout.frontendServerOnly, + ), + 'package:foo/bar.dart', + ); + }); + + test('translates packages/ paths without lib/ (buildRunner)', () { + // Checks: packages/foo/bar.dart -> package:foo/bar.dart + expect( + DdcUriTranslator.translatePackagesPathToPackageUri( + 'packages/foo/bar.dart', + layout: AppUriLayout.buildRunner, + ), + 'package:foo/bar.dart', + ); + }); + + test('preserves lib/ if present in buildRunner layout', () { + // Checks: packages/foo/lib/bar.dart -> package:foo/lib/bar.dart + // Note: we usually never want 'lib' to be retained in a package path. + // However, this tests that a file in a nested 'lib/' directory (e.g., + // 'lib/lib/bar.dart') is reconstructed properly. + expect( + DdcUriTranslator.translatePackagesPathToPackageUri( + 'packages/foo/lib/bar.dart', + layout: AppUriLayout.buildRunner, + ), + 'package:foo/lib/bar.dart', + ); + }); + + test('is no-op for non-packages paths', () { + // Checks: web/main.dart -> web/main.dart + expect( + DdcUriTranslator.translatePackagesPathToPackageUri('web/main.dart'), + 'web/main.dart', + ); + }); + }); + + group('translateLibPathToPackagePath', () { + test('translates lib/ paths to packages/ paths', () { + // Checks: lib/foo.dart -> packages/my_package/foo.dart + expect( + DdcUriTranslator.translateLibPathToPackagePath( + 'lib/foo.dart', + 'my_package', + ), + 'packages/my_package/foo.dart', + ); + }); + + test('translates lib/src/ paths to packages/ paths', () { + // Checks: lib/src/foo.dart -> packages/my_package/src/foo.dart + expect( + DdcUriTranslator.translateLibPathToPackagePath( + 'lib/src/foo.dart', + 'my_package', + ), + 'packages/my_package/src/foo.dart', + ); + }); + + test('is no-op for non-lib paths', () { + // Checks: web/main.dart -> web/main.dart + expect( + DdcUriTranslator.translateLibPathToPackagePath( + 'web/main.dart', + 'my_package', + ), + 'web/main.dart', + ); + }); + + test( + 'throws StateError if rootPackageName is null or empty for lib/ path', + () { + // Checks: lib/foo.dart (with null package) -> StateError + expect( + () => DdcUriTranslator.translateLibPathToPackagePath( + 'lib/foo.dart', + null, + ), + throwsStateError, + ); + // Checks: lib/foo.dart (with empty package) -> StateError + expect( + () => DdcUriTranslator.translateLibPathToPackagePath( + 'lib/foo.dart', + '', + ), + throwsStateError, + ); + }, + ); + }); + + group('translateModuleExtension', () { + test( + 'translates .dart.lib to .ddc (frontendServerOnly to buildRunner)', + () { + // Checks: main.dart.lib -> main.ddc + expect( + DdcUriTranslator.translateModuleExtension( + 'main.dart.lib', + from: AppUriLayout.frontendServerOnly, + to: AppUriLayout.buildRunner, + ), + 'main.ddc', + ); + // Checks: main.dart.lib.js -> main.ddc.js + expect( + DdcUriTranslator.translateModuleExtension( + 'main.dart.lib.js', + from: AppUriLayout.frontendServerOnly, + to: AppUriLayout.buildRunner, + ), + 'main.ddc.js', + ); + }, + ); + + test( + 'translates .ddc to .dart.lib (buildRunner to frontendServerOnly)', + () { + // Checks: main.ddc -> main.dart.lib + expect( + DdcUriTranslator.translateModuleExtension( + 'main.ddc', + from: AppUriLayout.buildRunner, + to: AppUriLayout.frontendServerOnly, + ), + 'main.dart.lib', + ); + // Checks: main.ddc.js -> main.dart.lib.js + expect( + DdcUriTranslator.translateModuleExtension( + 'main.ddc.js', + from: AppUriLayout.buildRunner, + to: AppUriLayout.frontendServerOnly, + ), + 'main.dart.lib.js', + ); + }, + ); + + test('is no-op if from and to are the same', () { + // Checks: main.dart.lib -> main.dart.lib + expect( + DdcUriTranslator.translateModuleExtension( + 'main.dart.lib', + from: AppUriLayout.frontendServerOnly, + to: AppUriLayout.frontendServerOnly, + ), + 'main.dart.lib', + ); + }); + }); + + group('translateFesToBuildRunnerPath', () { + test('translates .dart.lib to .ddc', () { + // Checks: main.dart.lib -> main.ddc + expect( + DdcUriTranslator.translateFesToBuildRunnerPath('main.dart.lib'), + 'main.ddc', + ); + // Checks: main.dart.lib.js -> main.ddc.js + expect( + DdcUriTranslator.translateFesToBuildRunnerPath('main.dart.lib.js'), + 'main.ddc.js', + ); + }); + }); + + group('reconstructAppScheme', () { + test('is no-op if org-dartlang-app scheme is already present', () { + // Checks: org-dartlang-app:///web/main.dart -> org-dartlang-app:///web/main.dart + expect( + DdcUriTranslator.reconstructAppScheme( + 'org-dartlang-app:///web/main.dart', + '/', + ), + 'org-dartlang-app:///web/main.dart', + ); + }); + + test('reconstructs scheme for default web dirs', () { + // Checks: web/main.dart -> org-dartlang-app:///web/main.dart + expect( + DdcUriTranslator.reconstructAppScheme('web/main.dart', '/'), + 'org-dartlang-app:///web/main.dart', + ); + // Checks: /test/foo_test.dart -> org-dartlang-app:///test/foo_test.dart + expect( + DdcUriTranslator.reconstructAppScheme('/test/foo_test.dart', '/'), + 'org-dartlang-app:///test/foo_test.dart', + ); + }); + + test('reconstructs scheme for package paths', () { + // Checks: /lib/src/library.dart -> org-dartlang-app:///packages/my_package/src/library.dart + expect( + DdcUriTranslator.reconstructAppScheme( + '/lib/src/library.dart', + '/packages/my_package/subdir/main.ddc.js', + ), + 'org-dartlang-app:///packages/my_package/src/library.dart', + ); + }); + + test('handles package paths without leading slash', () { + // Checks: lib/src/library.dart -> org-dartlang-app:///packages/my_package/src/library.dart + expect( + DdcUriTranslator.reconstructAppScheme( + 'lib/src/library.dart', + '/packages/my_package/subdir/main.ddc.js', + ), + 'org-dartlang-app:///packages/my_package/src/library.dart', + ); + }); + }); + }); +} From 76ba3b0e1217f85ad6a71c7aaad32d9509c68de6 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 23 Jul 2026 17:21:45 -0700 Subject: [PATCH 065/134] Updating versions --- dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml | 2 +- example/pubspec.yaml | 2 +- webdev/README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml b/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml index 6f16347647..bdf30132ee 100644 --- a/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml +++ b/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml @@ -8,4 +8,4 @@ environment: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.4.12 + build_web_compilers: ^4.8.9 diff --git a/example/pubspec.yaml b/example/pubspec.yaml index de2942e582..f10bd62815 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -8,4 +8,4 @@ environment: dev_dependencies: build_runner: ^2.5.0 - build_web_compilers: ^4.4.12 + build_web_compilers: ^4.8.9 diff --git a/webdev/README.md b/webdev/README.md index ba81d1d0f9..110ce827d7 100644 --- a/webdev/README.md +++ b/webdev/README.md @@ -12,7 +12,7 @@ similar to: --- dev_dependencies: build_runner: ^2.4.0 - build_web_compilers: ^4.4.12 + build_web_compilers: ^4.8.9 ``` ## Installation From 96ac149aac64a903d05a8c0965ad9123da2a1728 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 23 Jul 2026 17:56:31 -0700 Subject: [PATCH 066/134] Cleaning up FrontendServerBuildDaemonStrategyProvider --- .../frontend_server_strategy_provider.dart | 58 +++++++++---------- 1 file changed, 27 insertions(+), 31 deletions(-) diff --git a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart index 1dddbea82c..c83a92e274 100644 --- a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart +++ b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart @@ -165,18 +165,17 @@ class FrontendServerDdcLibraryBundleStrategyProvider @override String? _serverPathForAppUri(String appUrl) { - // Flutter's asset server expects package paths without the 'lib/' segment - // (e.g., 'packages/test/main.dart'), so we use AppUriLayout.flutter. - if (_buildSettings.isFlutterApp && appUrl.startsWith('package:')) { - final translated = DdcUriTranslator.translateAppUriToServerPath( - appUrl, - layout: AppUriLayout.flutter, - ); - if (translated != null) { - return _addBasePath(translated); - } - } - return super._serverPathForAppUri(appUrl); + final isFlutterPackage = + _buildSettings.isFlutterApp && appUrl.startsWith('package:'); + final layout = isFlutterPackage + ? AppUriLayout.flutter + : AppUriLayout.frontendServerOnly; + final translated = DdcUriTranslator.translateAppUriToServerPath( + appUrl, + layout: layout, + useDebuggerModuleNames: _buildSettings.useDebuggerModuleNames, + ); + return translated != null ? _addBasePath(translated) : null; } @override @@ -303,13 +302,11 @@ class FrontendServerBuildDaemonStrategyProvider } @override - String? _serverPathForAppUri(String appUrl) { - return DdcUriTranslator.translateAppUriToServerPath( - appUrl, - layout: AppUriLayout.buildRunner, - ) ?? - super._serverPathForAppUri(appUrl); - } + String? _serverPathForAppUri(String appUrl) => + DdcUriTranslator.translateAppUriToServerPath( + appUrl, + layout: AppUriLayout.buildRunner, + ); @override Future> _moduleInfoForProvider( @@ -355,18 +352,17 @@ class FrontendServerRequireStrategyProvider @override String? _serverPathForAppUri(String appUrl) { - // Flutter's asset server expects package paths without the 'lib/' segment - // (e.g., 'packages/test/main.dart'), so we use AppUriLayout.flutter. - if (_buildSettings.isFlutterApp && appUrl.startsWith('package:')) { - final translated = DdcUriTranslator.translateAppUriToServerPath( - appUrl, - layout: AppUriLayout.flutter, - ); - if (translated != null) { - return _addBasePath(translated); - } - } - return super._serverPathForAppUri(appUrl); + final isFlutterPackage = + _buildSettings.isFlutterApp && appUrl.startsWith('package:'); + final layout = isFlutterPackage + ? AppUriLayout.flutter + : AppUriLayout.frontendServerOnly; + final translated = DdcUriTranslator.translateAppUriToServerPath( + appUrl, + layout: layout, + useDebuggerModuleNames: _buildSettings.useDebuggerModuleNames, + ); + return translated != null ? _addBasePath(translated) : null; } @override From 626c9e72fc39743a3944403a90f8f99e33315dba Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 23 Jul 2026 18:06:05 -0700 Subject: [PATCH 067/134] Removing URI hacks --- dwds/lib/src/utilities/ddc_uri_translator.dart | 7 +------ dwds/test/utilities/ddc_uri_translator_test.dart | 11 ----------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/dwds/lib/src/utilities/ddc_uri_translator.dart b/dwds/lib/src/utilities/ddc_uri_translator.dart index bfbc950eae..0ca99b67bc 100644 --- a/dwds/lib/src/utilities/ddc_uri_translator.dart +++ b/dwds/lib/src/utilities/ddc_uri_translator.dart @@ -72,12 +72,7 @@ class DdcUriTranslator { } return segments.join('/'); } - // Dedupe 'web/'web or 'test/test' paths. - final isDuplicated = - segments.length > 2 && - first == segments[1] && - (first == 'web' || first == 'test'); - return segments.skip(isDuplicated ? 2 : 1).join('/'); + return segments.skip(1).join('/'); } } diff --git a/dwds/test/utilities/ddc_uri_translator_test.dart b/dwds/test/utilities/ddc_uri_translator_test.dart index 4eaab8e4c9..a4de6e1ef5 100644 --- a/dwds/test/utilities/ddc_uri_translator_test.dart +++ b/dwds/test/utilities/ddc_uri_translator_test.dart @@ -89,17 +89,6 @@ void main() { ); }); - test('buildRunner layout dedupes entrypoint prefix', () { - // Checks: org-dartlang-app:///web/web/main.dart -> main.dart - expect( - DdcUriTranslator.translateAppUriToServerPath( - 'org-dartlang-app:///web/web/main.dart', - layout: AppUriLayout.buildRunner, - ), - 'main.dart', - ); - }); - test('buildRunner layout preserves packages path', () { // Checks: org-dartlang-app:///packages/foo/bar.dart -> packages/foo/bar.dart expect( From f10aba4652c17bb3c7774e55116c180c6b371a48 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 23 Jul 2026 18:08:27 -0700 Subject: [PATCH 068/134] Reusing defaultWebDirs --- dwds/lib/src/loaders/frontend_server_strategy_provider.dart | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart index c83a92e274..5b63b3ed20 100644 --- a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart +++ b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart @@ -12,8 +12,6 @@ import 'package:dwds/src/services/expression_compiler.dart'; import 'package:dwds/src/utilities/ddc_uri_translator.dart'; import 'package:path/path.dart' as p; -const _defaultWebDirs = ['web', 'test', 'example', 'benchmark']; - abstract class FrontendServerStrategyProvider { final ReloadConfiguration _configuration; final AssetReader _assetReader; @@ -233,7 +231,7 @@ class FrontendServerBuildDaemonStrategyProvider final validPrefixes = [ if (appUri != null && appUri.pathSegments.isNotEmpty) appUri.pathSegments.first, - ..._defaultWebDirs, + ...DdcUriTranslator.defaultWebDirs, ]; if (parts.length > 1 && validPrefixes.contains(parts[0])) { From 72034ca9b9ffd29cc9e168e39c97ab2d13e97210 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 23 Jul 2026 18:14:46 -0700 Subject: [PATCH 069/134] Using better package uri/path naming --- dwds/lib/src/utilities/dart_uri.dart | 4 ++-- dwds/lib/src/utilities/ddc_uri_translator.dart | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dwds/lib/src/utilities/dart_uri.dart b/dwds/lib/src/utilities/dart_uri.dart index 4b36b6b5c4..260b64261f 100644 --- a/dwds/lib/src/utilities/dart_uri.dart +++ b/dwds/lib/src/utilities/dart_uri.dart @@ -21,8 +21,8 @@ class DartUri { /// - package:packageName/pathUnderLib/file.dart /// - org-dartlang-app:///prefix/path/file.dart, where prefix is ignored. /// e.g. org-dartlang-app:example/hello_world/main.dart, - /// - /packages/packageName/foo.dart, the web server form of a package URI, - /// e.g. /packages/path/src/utils.dart + /// - /packages/packageName/foo.dart, the web server package path of a + /// package URI, e.g. /packages/path/src/utils.dart /// - /path/foo.dart or path/foo.dart, e.g. /hello_world/web/main.dart, where /// path is a web server path and so relative to the directory being /// served, not to the package. diff --git a/dwds/lib/src/utilities/ddc_uri_translator.dart b/dwds/lib/src/utilities/ddc_uri_translator.dart index 0ca99b67bc..95d2e81f13 100644 --- a/dwds/lib/src/utilities/ddc_uri_translator.dart +++ b/dwds/lib/src/utilities/ddc_uri_translator.dart @@ -68,7 +68,7 @@ class DdcUriTranslator { final first = segments.first; if (first == 'packages') { if (segments.length < 3) { - throw FormatException('Invalid packages URI: $appUrl'); + throw FormatException('Invalid package path in app URI: $appUrl'); } return segments.join('/'); } @@ -95,19 +95,19 @@ class DdcUriTranslator { return serverPath; } - /// Adds 'lib' to a package server path. + /// Adds 'lib' to a package path. /// /// Example: packages/foo/bar.dart -> packages/foo/lib/bar.dart static String addLibSegment(String serverPath) => _modifyLibSegment(serverPath, add: true); - /// Removes 'lib' from a package server path. + /// Removes 'lib' from a package path. /// /// Example: packages/foo/lib/bar.dart packages/foo/bar.dart static String removeLibSegment(String serverPath) => _modifyLibSegment(serverPath, add: false); - /// Translates a served `packages/` path back to a `package:` URI path. + /// Translates a served `packages/` path back to a `package:` URI. /// /// Examples: /// - `packages/foo/lib/bar.dart` -> `package:foo/bar.dart` @@ -129,7 +129,7 @@ class DdcUriTranslator { /// /// DDC generates source maps with relative paths from the generated output. /// Files in the root package can resolve to 'lib/' references, so we prepend - /// `packages/[rootPackageName]/` to resolve them to a package URI. Example: + /// `packages/[rootPackageName]/` to resolve them to a package path. Example: /// `lib/foo.dart` -> `packages/root_package/foo.dart` static String translateLibPathToPackagePath( String uri, From cc98d7532a7b197c69bd68f8748a819ef84c8c22 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 23 Jul 2026 18:42:59 -0700 Subject: [PATCH 070/134] Updating major ver --- dwds/CHANGELOG.md | 3 ++- dwds/lib/src/version.dart | 2 +- dwds/pubspec.yaml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dwds/CHANGELOG.md b/dwds/CHANGELOG.md index a7571e363f..74f5d347d6 100644 --- a/dwds/CHANGELOG.md +++ b/dwds/CHANGELOG.md @@ -1,5 +1,6 @@ -## 27.2.0 +## 28.0.0 +- **Breaking Change**: Removed `PackageUriMapper` from the constructors of `FrontendServerStrategyProvider` and its subclasses (`FrontendServerBuildDaemonStrategyProvider`, `FrontendServerDdcStrategyProvider`, `FrontendServerRequireStrategyProvider`). - Add support for Frontend Server + Build Daemon configuration with hot reload via `FrontendServerBuildDaemonStrategyProvider`. - Expose `DaemonExpressionCompiler` for handling expression compile directly via `build_daemon`. diff --git a/dwds/lib/src/version.dart b/dwds/lib/src/version.dart index e89ff91b52..d3dcccae6c 100644 --- a/dwds/lib/src/version.dart +++ b/dwds/lib/src/version.dart @@ -1,2 +1,2 @@ // Generated code. Do not modify. -const packageVersion = '27.2.0'; +const packageVersion = '28.0.0'; diff --git a/dwds/pubspec.yaml b/dwds/pubspec.yaml index c4ef3cf735..02ecda5fb9 100644 --- a/dwds/pubspec.yaml +++ b/dwds/pubspec.yaml @@ -1,6 +1,6 @@ name: dwds # Every time this changes you need to run `dart run tool/build.dart`. -version: 27.2.0 +version: 28.0.0 description: >- A service that proxies between the Chrome debug protocol and the Dart VM From e7cdbbf0abebdb1b557fbd79fe4a4748523fbbd0 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Fri, 24 Jul 2026 10:32:48 -0700 Subject: [PATCH 071/134] Reverting unnecessary windows guards --- dwds/lib/src/debugging/metadata/provider.dart | 11 ++++------- dwds/lib/src/utilities/ddc_uri_translator.dart | 1 - 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/dwds/lib/src/debugging/metadata/provider.dart b/dwds/lib/src/debugging/metadata/provider.dart index 624319f8db..43767285ee 100644 --- a/dwds/lib/src/debugging/metadata/provider.dart +++ b/dwds/lib/src/debugging/metadata/provider.dart @@ -264,10 +264,8 @@ class MetadataProvider { } void _addMetadata(ModuleMetadata metadata) { - final modulePath = stripLeadingSlashes(metadata.moduleUri) - .replaceAll('\\', '/'); - final sourceMapPath = stripLeadingSlashes(metadata.sourceMapUri) - .replaceAll('\\', '/'); + final modulePath = stripLeadingSlashes(metadata.moduleUri); + final sourceMapPath = stripLeadingSlashes(metadata.sourceMapUri); final moduleName = metadata.name; _moduleToSourceMap[moduleName] = sourceMapPath; @@ -276,7 +274,7 @@ class MetadataProvider { final moduleLibraries = {}; for (final library in metadata.libraries.values) { - final importUri = library.importUri.replaceAll('\\', '/'); + final importUri = library.importUri; if (importUri.startsWith('file:/')) { throw AbsoluteImportUriException(importUri); } @@ -286,9 +284,8 @@ class MetadataProvider { _scriptToModule[importUri] = moduleName; for (final path in library.partUris) { - final normalizedPath = path.replaceAll('\\', '/'); // Parts in metadata are relative to the library Uri directory. - final partPath = p.url.join(p.url.dirname(importUri), normalizedPath); + final partPath = p.url.join(p.url.dirname(importUri), path); _scripts[importUri]!.add(partPath); _scriptToModule[partPath] = moduleName; } diff --git a/dwds/lib/src/utilities/ddc_uri_translator.dart b/dwds/lib/src/utilities/ddc_uri_translator.dart index 95d2e81f13..545a222ad3 100644 --- a/dwds/lib/src/utilities/ddc_uri_translator.dart +++ b/dwds/lib/src/utilities/ddc_uri_translator.dart @@ -36,7 +36,6 @@ class DdcUriTranslator { required AppUriLayout layout, bool useDebuggerModuleNames = true, }) { - appUrl = appUrl.replaceAll('\\', '/'); final appUri = Uri.parse(appUrl); if (appUri.isScheme('package')) { final pathSegments = appUri.pathSegments; From 409afeb389396965d372e5d5223c45c8980743a5 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Fri, 24 Jul 2026 10:59:08 -0700 Subject: [PATCH 072/134] Cleaning up debug code --- .../frontend_server_strategy_provider.dart | 2 +- dwds/lib/src/loaders/strategy.dart | 25 ++++++------------- 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart index 5b63b3ed20..73e12c0020 100644 --- a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart +++ b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart @@ -221,7 +221,7 @@ class FrontendServerBuildDaemonStrategyProvider /// For example: /// - `web/main.dart` -> `main.dart` /// - `example/append_body/main.dart` -> `append_body/main.dart` - /// - `packages/path/path.dart` -> `packages/path/path.dart` + /// - `packages/path/path.dart` -> `packages/path/path.dart` (unchanged) String _stripPrefix(String path) { path = path.replaceAll('\\', '/'); if (path.startsWith('packages')) return path; diff --git a/dwds/lib/src/loaders/strategy.dart b/dwds/lib/src/loaders/strategy.dart index d06bad1475..0cc0d2bccb 100644 --- a/dwds/lib/src/loaders/strategy.dart +++ b/dwds/lib/src/loaders/strategy.dart @@ -191,11 +191,12 @@ abstract class LoadStrategy { /// Returns the [MetadataProvider] for the application located at the provided /// [entrypoint]. MetadataProvider metadataProviderFor(String entrypoint) { - if (_providers.containsKey(entrypoint)) { - return _providers[entrypoint]!; - } else { - throw StateError('No metadata provider for $entrypoint'); - } + final provider = _providers[entrypoint]; + if (provider != null) return provider; + throw StateError( + 'No metadata provider for $entrypoint. ' + 'Available providers: ${_providers.keys.toList()}', + ); } /// Creates and returns a [MetadataProvider] with the given [entrypoint] and @@ -217,19 +218,7 @@ abstract class LoadStrategy { String entrypoint, Map reloadedModulesToLibraries, ) { - var provider = _providers[entrypoint]; - if (provider == null) { - final normalized = entrypoint.startsWith('/') - ? entrypoint.substring(1) - : '/$entrypoint'; - provider = _providers[normalized] ?? _providers.values.firstOrNull; - if (provider == null) { - throw StateError( - 'No metadata provider found for entrypoint $entrypoint. ' - 'Available providers: ${_providers.keys.toList()}', - ); - } - } + final provider = metadataProviderFor(entrypoint); return provider.reinitializeAfterHotReload(reloadedModulesToLibraries); } } From 165b2c7104531fcb8b45f38c04544a4bba7b2476 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Fri, 24 Jul 2026 11:09:41 -0700 Subject: [PATCH 073/134] Renaming DDCUriTranslator to WebPathTranslator --- dwds/lib/src/debugging/location.dart | 4 +- .../build_runner_strategy_provider.dart | 4 +- .../frontend_server_strategy_provider.dart | 22 +++--- dwds/lib/src/readers/asset_reader.dart | 4 +- .../readers/frontend_server_asset_reader.dart | 4 +- dwds/lib/src/utilities/dart_uri.dart | 4 +- ...anslator.dart => web_path_translator.dart} | 2 +- dwds/test/integration/fixtures/context.dart | 4 +- ...est.dart => web_path_translator_test.dart} | 78 +++++++++---------- 9 files changed, 63 insertions(+), 63 deletions(-) rename dwds/lib/src/utilities/{ddc_uri_translator.dart => web_path_translator.dart} (99%) rename dwds/test/utilities/{ddc_uri_translator_test.dart => web_path_translator_test.dart} (82%) diff --git a/dwds/lib/src/debugging/location.dart b/dwds/lib/src/debugging/location.dart index 3c36f03eef..cc5bc6fc71 100644 --- a/dwds/lib/src/debugging/location.dart +++ b/dwds/lib/src/debugging/location.dart @@ -8,7 +8,7 @@ import 'package:dwds/src/debugging/metadata/provider.dart'; import 'package:dwds/src/debugging/modules.dart'; import 'package:dwds/src/readers/asset_reader.dart'; import 'package:dwds/src/utilities/dart_uri.dart'; -import 'package:dwds/src/utilities/ddc_uri_translator.dart'; +import 'package:dwds/src/utilities/web_path_translator.dart'; import 'package:logging/logging.dart'; import 'package:path/path.dart' as p; import 'package:source_maps/parser.dart'; @@ -417,7 +417,7 @@ class Locations { p.url.joinAll([scriptLocation, ...relativeSegments]), ); - path = DdcUriTranslator.reconstructAppScheme(path, scriptLocation); + path = WebPathTranslator.reconstructAppScheme(path, scriptLocation); } try { diff --git a/dwds/lib/src/loaders/build_runner_strategy_provider.dart b/dwds/lib/src/loaders/build_runner_strategy_provider.dart index 5d2c58f8ab..b4a1fb9b21 100644 --- a/dwds/lib/src/loaders/build_runner_strategy_provider.dart +++ b/dwds/lib/src/loaders/build_runner_strategy_provider.dart @@ -10,7 +10,7 @@ import 'package:dwds/src/loaders/require.dart'; import 'package:dwds/src/loaders/strategy.dart'; import 'package:dwds/src/readers/asset_reader.dart'; import 'package:dwds/src/services/expression_compiler.dart'; -import 'package:dwds/src/utilities/ddc_uri_translator.dart'; +import 'package:dwds/src/utilities/web_path_translator.dart'; import 'package:logging/logging.dart'; import 'package:path/path.dart' as p; @@ -204,7 +204,7 @@ mixin BuildRunnerStrategyProviderMixin { } String? _serverPathForAppUri(String appUrl) { - return DdcUriTranslator.translateAppUriToServerPath( + return WebPathTranslator.translateAppUriToServerPath( appUrl, layout: AppUriLayout.buildRunner, ); diff --git a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart index 73e12c0020..2d0cc46a8c 100644 --- a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart +++ b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart @@ -9,7 +9,7 @@ import 'package:dwds/src/loaders/require.dart'; import 'package:dwds/src/loaders/strategy.dart'; import 'package:dwds/src/readers/asset_reader.dart'; import 'package:dwds/src/services/expression_compiler.dart'; -import 'package:dwds/src/utilities/ddc_uri_translator.dart'; +import 'package:dwds/src/utilities/web_path_translator.dart'; import 'package:path/path.dart' as p; abstract class FrontendServerStrategyProvider { @@ -72,7 +72,7 @@ abstract class FrontendServerStrategyProvider { _addBasePath((await metadataProvider.moduleToSourceMap)[module] ?? ''); String? _serverPathForAppUri(String appUrl) { - final translated = DdcUriTranslator.translateAppUriToServerPath( + final translated = WebPathTranslator.translateAppUriToServerPath( appUrl, layout: AppUriLayout.frontendServerOnly, useDebuggerModuleNames: _buildSettings.useDebuggerModuleNames, @@ -168,7 +168,7 @@ class FrontendServerDdcLibraryBundleStrategyProvider final layout = isFlutterPackage ? AppUriLayout.flutter : AppUriLayout.frontendServerOnly; - final translated = DdcUriTranslator.translateAppUriToServerPath( + final translated = WebPathTranslator.translateAppUriToServerPath( appUrl, layout: layout, useDebuggerModuleNames: _buildSettings.useDebuggerModuleNames, @@ -231,7 +231,7 @@ class FrontendServerBuildDaemonStrategyProvider final validPrefixes = [ if (appUri != null && appUri.pathSegments.isNotEmpty) appUri.pathSegments.first, - ...DdcUriTranslator.defaultWebDirs, + ...WebPathTranslator.defaultWebDirs, ]; if (parts.length > 1 && validPrefixes.contains(parts[0])) { @@ -255,7 +255,7 @@ class FrontendServerBuildDaemonStrategyProvider MetadataProvider metadataProvider, String serverPath, ) async { - final remappedPath = DdcUriTranslator.translateModuleExtension( + final remappedPath = WebPathTranslator.translateModuleExtension( serverPath, from: AppUriLayout.buildRunner, to: AppUriLayout.frontendServerOnly, @@ -286,7 +286,7 @@ class FrontendServerBuildDaemonStrategyProvider ) async { final path = await super._serverPathForModule(metadataProvider, module); final stripped = _stripPrefix(path); - return DdcUriTranslator.translateFesToBuildRunnerPath(stripped); + return WebPathTranslator.translateFesToBuildRunnerPath(stripped); } @override @@ -296,12 +296,12 @@ class FrontendServerBuildDaemonStrategyProvider ) async { final path = await super._sourceMapPathForModule(metadataProvider, module); final stripped = _stripPrefix(path); - return DdcUriTranslator.translateFesToBuildRunnerPath(stripped); + return WebPathTranslator.translateFesToBuildRunnerPath(stripped); } @override String? _serverPathForAppUri(String appUrl) => - DdcUriTranslator.translateAppUriToServerPath( + WebPathTranslator.translateAppUriToServerPath( appUrl, layout: AppUriLayout.buildRunner, ); @@ -315,8 +315,8 @@ class FrontendServerBuildDaemonStrategyProvider return MapEntry( module, ModuleInfo( - DdcUriTranslator.translateFesToBuildRunnerPath(info.fullDillPath), - DdcUriTranslator.translateFesToBuildRunnerPath(info.summaryPath), + WebPathTranslator.translateFesToBuildRunnerPath(info.fullDillPath), + WebPathTranslator.translateFesToBuildRunnerPath(info.summaryPath), ), ); }); @@ -355,7 +355,7 @@ class FrontendServerRequireStrategyProvider final layout = isFlutterPackage ? AppUriLayout.flutter : AppUriLayout.frontendServerOnly; - final translated = DdcUriTranslator.translateAppUriToServerPath( + final translated = WebPathTranslator.translateAppUriToServerPath( appUrl, layout: layout, useDebuggerModuleNames: _buildSettings.useDebuggerModuleNames, diff --git a/dwds/lib/src/readers/asset_reader.dart b/dwds/lib/src/readers/asset_reader.dart index 3b8dc62bdc..4c0b7b1a6f 100644 --- a/dwds/lib/src/readers/asset_reader.dart +++ b/dwds/lib/src/readers/asset_reader.dart @@ -3,8 +3,8 @@ // BSD-style license that can be found in the LICENSE file. import 'package:collection/collection.dart'; -import 'package:dwds/src/utilities/ddc_uri_translator.dart'; import 'package:dwds/src/utilities/shared.dart'; +import 'package:dwds/src/utilities/web_path_translator.dart'; import 'package:file/file.dart'; import 'package:logging/logging.dart'; import 'package:package_config/package_config.dart'; @@ -106,7 +106,7 @@ class PackageUriMapper { serverPath = stripLeadingSlashes(serverPath).replaceAll('\\', '/'); final segments = serverPath.split('/'); if (segments.first == 'packages') { - final packagePath = DdcUriTranslator.translatePackagesPathToPackageUri( + final packagePath = WebPathTranslator.translatePackagesPathToPackageUri( serverPath, ); return packageConfig.resolve(Uri.parse(packagePath)); diff --git a/dwds/lib/src/readers/frontend_server_asset_reader.dart b/dwds/lib/src/readers/frontend_server_asset_reader.dart index 45fd8af50f..b9c1cc036d 100644 --- a/dwds/lib/src/readers/frontend_server_asset_reader.dart +++ b/dwds/lib/src/readers/frontend_server_asset_reader.dart @@ -6,7 +6,7 @@ import 'dart:convert'; import 'dart:io'; import 'package:dwds/src/readers/asset_reader.dart'; -import 'package:dwds/src/utilities/ddc_uri_translator.dart'; +import 'package:dwds/src/utilities/web_path_translator.dart'; import 'package:logging/logging.dart'; import 'package:package_config/package_config.dart'; import 'package:path/path.dart' as p; @@ -66,7 +66,7 @@ class FrontendServerAssetReader implements AssetReader { var strippedPath = _stripBasePath(serverPath); Uri? fileUri; if (strippedPath.startsWith('packages/')) { - final packagePath = DdcUriTranslator.translatePackagesPathToPackageUri( + final packagePath = WebPathTranslator.translatePackagesPathToPackageUri( strippedPath, layout: AppUriLayout.frontendServerOnly, ); diff --git a/dwds/lib/src/utilities/dart_uri.dart b/dwds/lib/src/utilities/dart_uri.dart index 260b64261f..c880920e41 100644 --- a/dwds/lib/src/utilities/dart_uri.dart +++ b/dwds/lib/src/utilities/dart_uri.dart @@ -3,8 +3,8 @@ // BSD-style license that can be found in the LICENSE file. import 'package:dwds/src/config/tool_configuration.dart'; -import 'package:dwds/src/utilities/ddc_uri_translator.dart'; import 'package:dwds/src/utilities/shared.dart'; +import 'package:dwds/src/utilities/web_path_translator.dart'; import 'package:logging/logging.dart'; import 'package:package_config/package_config.dart'; import 'package:path/path.dart' as p; @@ -113,7 +113,7 @@ class DartUri { } } - uri = DdcUriTranslator.translateLibPathToPackagePath( + uri = WebPathTranslator.translateLibPathToPackagePath( uri, globalToolConfiguration.appMetadata.workspaceName, ); diff --git a/dwds/lib/src/utilities/ddc_uri_translator.dart b/dwds/lib/src/utilities/web_path_translator.dart similarity index 99% rename from dwds/lib/src/utilities/ddc_uri_translator.dart rename to dwds/lib/src/utilities/web_path_translator.dart index 545a222ad3..bfbed75efb 100644 --- a/dwds/lib/src/utilities/ddc_uri_translator.dart +++ b/dwds/lib/src/utilities/web_path_translator.dart @@ -17,7 +17,7 @@ enum AppUriLayout { } /// Translates paths across DDC, Frontend Server, DWDS, and package:build. -class DdcUriTranslator { +class WebPathTranslator { /// Translates a DDC app URI (any referenceable dart file) into a path /// expected by its [layout]'s asset server. /// diff --git a/dwds/test/integration/fixtures/context.dart b/dwds/test/integration/fixtures/context.dart index 87cd885668..54999a5741 100644 --- a/dwds/test/integration/fixtures/context.dart +++ b/dwds/test/integration/fixtures/context.dart @@ -26,7 +26,7 @@ import 'package:dwds/src/services/daemon_expression_compiler.dart'; import 'package:dwds/src/services/expression_compiler.dart'; import 'package:dwds/src/services/expression_compiler_service.dart'; import 'package:dwds/src/utilities/dart_uri.dart'; -import 'package:dwds/src/utilities/ddc_uri_translator.dart'; +import 'package:dwds/src/utilities/web_path_translator.dart'; import 'package:dwds/src/utilities/server.dart'; import 'package:dwds_test_common/logging.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; @@ -1178,7 +1178,7 @@ class TestContext { var newPath = path; // Translate FES paths to package:build paths. - newPath = DdcUriTranslator.translateFesToBuildRunnerPath(newPath); + newPath = WebPathTranslator.translateFesToBuildRunnerPath(newPath); var requestToProxy = request; if (newPath != path) { requestToProxy = shelf.Request( diff --git a/dwds/test/utilities/ddc_uri_translator_test.dart b/dwds/test/utilities/web_path_translator_test.dart similarity index 82% rename from dwds/test/utilities/ddc_uri_translator_test.dart rename to dwds/test/utilities/web_path_translator_test.dart index a4de6e1ef5..fe4e1a84ff 100644 --- a/dwds/test/utilities/ddc_uri_translator_test.dart +++ b/dwds/test/utilities/web_path_translator_test.dart @@ -2,17 +2,17 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'package:dwds/src/utilities/ddc_uri_translator.dart'; +import 'package:dwds/src/utilities/web_path_translator.dart'; import 'package:test/test.dart'; void main() { - group('DdcUriTranslator', () { + group('WebPathTranslator', () { group('translateAppUriToServerPath', () { group('package: URIs', () { test('frontendServerOnly layout adds lib/ segment', () { // Checks: package:foo/bar.dart -> packages/foo/lib/bar.dart expect( - DdcUriTranslator.translateAppUriToServerPath( + WebPathTranslator.translateAppUriToServerPath( 'package:foo/bar.dart', layout: AppUriLayout.frontendServerOnly, ), @@ -23,7 +23,7 @@ void main() { test('frontendServerOnly layout omits lib/ segment if useDebuggerModuleNames is false', () { // Checks: package:foo/bar.dart -> packages/foo/bar.dart expect( - DdcUriTranslator.translateAppUriToServerPath( + WebPathTranslator.translateAppUriToServerPath( 'package:foo/bar.dart', layout: AppUriLayout.frontendServerOnly, useDebuggerModuleNames: false, @@ -35,7 +35,7 @@ void main() { test('buildRunner layout omits lib/ segment', () { // Checks: package:foo/bar.dart -> packages/foo/bar.dart expect( - DdcUriTranslator.translateAppUriToServerPath( + WebPathTranslator.translateAppUriToServerPath( 'package:foo/bar.dart', layout: AppUriLayout.buildRunner, ), @@ -46,7 +46,7 @@ void main() { test('flutter layout omits lib/ segment', () { // Checks: package:foo/bar.dart -> packages/foo/bar.dart expect( - DdcUriTranslator.translateAppUriToServerPath( + WebPathTranslator.translateAppUriToServerPath( 'package:foo/bar.dart', layout: AppUriLayout.flutter, ), @@ -59,7 +59,7 @@ void main() { test('frontendServerOnly layout preserves path', () { // Checks: org-dartlang-app:///web/main.dart -> web/main.dart expect( - DdcUriTranslator.translateAppUriToServerPath( + WebPathTranslator.translateAppUriToServerPath( 'org-dartlang-app:///web/main.dart', layout: AppUriLayout.frontendServerOnly, ), @@ -70,7 +70,7 @@ void main() { test('frontendServerOnly layout adds lib/ to packages path', () { // Checks: org-dartlang-app:///packages/foo/bar.dart -> packages/foo/lib/bar.dart expect( - DdcUriTranslator.translateAppUriToServerPath( + WebPathTranslator.translateAppUriToServerPath( 'org-dartlang-app:///packages/foo/bar.dart', layout: AppUriLayout.frontendServerOnly, ), @@ -81,7 +81,7 @@ void main() { test('buildRunner layout strips entrypoint prefix', () { // Checks: org-dartlang-app:///web/main.dart -> main.dart expect( - DdcUriTranslator.translateAppUriToServerPath( + WebPathTranslator.translateAppUriToServerPath( 'org-dartlang-app:///web/main.dart', layout: AppUriLayout.buildRunner, ), @@ -92,7 +92,7 @@ void main() { test('buildRunner layout preserves packages path', () { // Checks: org-dartlang-app:///packages/foo/bar.dart -> packages/foo/bar.dart expect( - DdcUriTranslator.translateAppUriToServerPath( + WebPathTranslator.translateAppUriToServerPath( 'org-dartlang-app:///packages/foo/bar.dart', layout: AppUriLayout.buildRunner, ), @@ -103,7 +103,7 @@ void main() { test('flutter layout behaves like buildRunner for entrypoints', () { // Checks: org-dartlang-app:///web/main.dart -> main.dart expect( - DdcUriTranslator.translateAppUriToServerPath( + WebPathTranslator.translateAppUriToServerPath( 'org-dartlang-app:///web/main.dart', layout: AppUriLayout.flutter, ), @@ -114,7 +114,7 @@ void main() { test('flutter layout behaves like buildRunner for packages path', () { // Checks: org-dartlang-app:///packages/foo/bar.dart -> packages/foo/bar.dart expect( - DdcUriTranslator.translateAppUriToServerPath( + WebPathTranslator.translateAppUriToServerPath( 'org-dartlang-app:///packages/foo/bar.dart', layout: AppUriLayout.flutter, ), @@ -128,7 +128,7 @@ void main() { test('adds lib/ to packages paths', () { // Checks: packages/foo/bar.dart -> packages/foo/lib/bar.dart expect( - DdcUriTranslator.addLibSegment('packages/foo/bar.dart'), + WebPathTranslator.addLibSegment('packages/foo/bar.dart'), 'packages/foo/lib/bar.dart', ); }); @@ -136,7 +136,7 @@ void main() { test('is no-op if lib/ is already present', () { // Checks: packages/foo/lib/bar.dart -> packages/foo/lib/bar.dart expect( - DdcUriTranslator.addLibSegment('packages/foo/lib/bar.dart'), + WebPathTranslator.addLibSegment('packages/foo/lib/bar.dart'), 'packages/foo/lib/bar.dart', ); }); @@ -144,7 +144,7 @@ void main() { test('is no-op for non-packages paths', () { // Checks: web/main.dart -> web/main.dart expect( - DdcUriTranslator.addLibSegment('web/main.dart'), + WebPathTranslator.addLibSegment('web/main.dart'), 'web/main.dart', ); }); @@ -154,7 +154,7 @@ void main() { test('removes lib/ from packages paths', () { // Checks: packages/foo/lib/bar.dart -> packages/foo/bar.dart expect( - DdcUriTranslator.removeLibSegment('packages/foo/lib/bar.dart'), + WebPathTranslator.removeLibSegment('packages/foo/lib/bar.dart'), 'packages/foo/bar.dart', ); }); @@ -162,7 +162,7 @@ void main() { test('is no-op if lib/ is not present', () { // Checks: packages/foo/bar.dart -> packages/foo/bar.dart expect( - DdcUriTranslator.removeLibSegment('packages/foo/bar.dart'), + WebPathTranslator.removeLibSegment('packages/foo/bar.dart'), 'packages/foo/bar.dart', ); }); @@ -170,7 +170,7 @@ void main() { test('is no-op for non-packages paths', () { // Checks: web/main.dart -> web/main.dart expect( - DdcUriTranslator.removeLibSegment('web/main.dart'), + WebPathTranslator.removeLibSegment('web/main.dart'), 'web/main.dart', ); }); @@ -180,7 +180,7 @@ void main() { test('translates packages/ paths with lib/ (frontendServerOnly)', () { // Checks: packages/foo/lib/bar.dart -> package:foo/bar.dart expect( - DdcUriTranslator.translatePackagesPathToPackageUri( + WebPathTranslator.translatePackagesPathToPackageUri( 'packages/foo/lib/bar.dart', layout: AppUriLayout.frontendServerOnly, ), @@ -191,7 +191,7 @@ void main() { test('translates packages/ paths without lib/ (buildRunner)', () { // Checks: packages/foo/bar.dart -> package:foo/bar.dart expect( - DdcUriTranslator.translatePackagesPathToPackageUri( + WebPathTranslator.translatePackagesPathToPackageUri( 'packages/foo/bar.dart', layout: AppUriLayout.buildRunner, ), @@ -205,7 +205,7 @@ void main() { // However, this tests that a file in a nested 'lib/' directory (e.g., // 'lib/lib/bar.dart') is reconstructed properly. expect( - DdcUriTranslator.translatePackagesPathToPackageUri( + WebPathTranslator.translatePackagesPathToPackageUri( 'packages/foo/lib/bar.dart', layout: AppUriLayout.buildRunner, ), @@ -216,7 +216,7 @@ void main() { test('is no-op for non-packages paths', () { // Checks: web/main.dart -> web/main.dart expect( - DdcUriTranslator.translatePackagesPathToPackageUri('web/main.dart'), + WebPathTranslator.translatePackagesPathToPackageUri('web/main.dart'), 'web/main.dart', ); }); @@ -226,7 +226,7 @@ void main() { test('translates lib/ paths to packages/ paths', () { // Checks: lib/foo.dart -> packages/my_package/foo.dart expect( - DdcUriTranslator.translateLibPathToPackagePath( + WebPathTranslator.translateLibPathToPackagePath( 'lib/foo.dart', 'my_package', ), @@ -237,7 +237,7 @@ void main() { test('translates lib/src/ paths to packages/ paths', () { // Checks: lib/src/foo.dart -> packages/my_package/src/foo.dart expect( - DdcUriTranslator.translateLibPathToPackagePath( + WebPathTranslator.translateLibPathToPackagePath( 'lib/src/foo.dart', 'my_package', ), @@ -248,7 +248,7 @@ void main() { test('is no-op for non-lib paths', () { // Checks: web/main.dart -> web/main.dart expect( - DdcUriTranslator.translateLibPathToPackagePath( + WebPathTranslator.translateLibPathToPackagePath( 'web/main.dart', 'my_package', ), @@ -261,7 +261,7 @@ void main() { () { // Checks: lib/foo.dart (with null package) -> StateError expect( - () => DdcUriTranslator.translateLibPathToPackagePath( + () => WebPathTranslator.translateLibPathToPackagePath( 'lib/foo.dart', null, ), @@ -269,7 +269,7 @@ void main() { ); // Checks: lib/foo.dart (with empty package) -> StateError expect( - () => DdcUriTranslator.translateLibPathToPackagePath( + () => WebPathTranslator.translateLibPathToPackagePath( 'lib/foo.dart', '', ), @@ -285,7 +285,7 @@ void main() { () { // Checks: main.dart.lib -> main.ddc expect( - DdcUriTranslator.translateModuleExtension( + WebPathTranslator.translateModuleExtension( 'main.dart.lib', from: AppUriLayout.frontendServerOnly, to: AppUriLayout.buildRunner, @@ -294,7 +294,7 @@ void main() { ); // Checks: main.dart.lib.js -> main.ddc.js expect( - DdcUriTranslator.translateModuleExtension( + WebPathTranslator.translateModuleExtension( 'main.dart.lib.js', from: AppUriLayout.frontendServerOnly, to: AppUriLayout.buildRunner, @@ -309,7 +309,7 @@ void main() { () { // Checks: main.ddc -> main.dart.lib expect( - DdcUriTranslator.translateModuleExtension( + WebPathTranslator.translateModuleExtension( 'main.ddc', from: AppUriLayout.buildRunner, to: AppUriLayout.frontendServerOnly, @@ -318,7 +318,7 @@ void main() { ); // Checks: main.ddc.js -> main.dart.lib.js expect( - DdcUriTranslator.translateModuleExtension( + WebPathTranslator.translateModuleExtension( 'main.ddc.js', from: AppUriLayout.buildRunner, to: AppUriLayout.frontendServerOnly, @@ -331,7 +331,7 @@ void main() { test('is no-op if from and to are the same', () { // Checks: main.dart.lib -> main.dart.lib expect( - DdcUriTranslator.translateModuleExtension( + WebPathTranslator.translateModuleExtension( 'main.dart.lib', from: AppUriLayout.frontendServerOnly, to: AppUriLayout.frontendServerOnly, @@ -345,12 +345,12 @@ void main() { test('translates .dart.lib to .ddc', () { // Checks: main.dart.lib -> main.ddc expect( - DdcUriTranslator.translateFesToBuildRunnerPath('main.dart.lib'), + WebPathTranslator.translateFesToBuildRunnerPath('main.dart.lib'), 'main.ddc', ); // Checks: main.dart.lib.js -> main.ddc.js expect( - DdcUriTranslator.translateFesToBuildRunnerPath('main.dart.lib.js'), + WebPathTranslator.translateFesToBuildRunnerPath('main.dart.lib.js'), 'main.ddc.js', ); }); @@ -360,7 +360,7 @@ void main() { test('is no-op if org-dartlang-app scheme is already present', () { // Checks: org-dartlang-app:///web/main.dart -> org-dartlang-app:///web/main.dart expect( - DdcUriTranslator.reconstructAppScheme( + WebPathTranslator.reconstructAppScheme( 'org-dartlang-app:///web/main.dart', '/', ), @@ -371,12 +371,12 @@ void main() { test('reconstructs scheme for default web dirs', () { // Checks: web/main.dart -> org-dartlang-app:///web/main.dart expect( - DdcUriTranslator.reconstructAppScheme('web/main.dart', '/'), + WebPathTranslator.reconstructAppScheme('web/main.dart', '/'), 'org-dartlang-app:///web/main.dart', ); // Checks: /test/foo_test.dart -> org-dartlang-app:///test/foo_test.dart expect( - DdcUriTranslator.reconstructAppScheme('/test/foo_test.dart', '/'), + WebPathTranslator.reconstructAppScheme('/test/foo_test.dart', '/'), 'org-dartlang-app:///test/foo_test.dart', ); }); @@ -384,7 +384,7 @@ void main() { test('reconstructs scheme for package paths', () { // Checks: /lib/src/library.dart -> org-dartlang-app:///packages/my_package/src/library.dart expect( - DdcUriTranslator.reconstructAppScheme( + WebPathTranslator.reconstructAppScheme( '/lib/src/library.dart', '/packages/my_package/subdir/main.ddc.js', ), @@ -395,7 +395,7 @@ void main() { test('handles package paths without leading slash', () { // Checks: lib/src/library.dart -> org-dartlang-app:///packages/my_package/src/library.dart expect( - DdcUriTranslator.reconstructAppScheme( + WebPathTranslator.reconstructAppScheme( 'lib/src/library.dart', '/packages/my_package/subdir/main.ddc.js', ), From f91a5782b0c42278d738ce9ad97698c67297552d Mon Sep 17 00:00:00 2001 From: MarkZ Date: Tue, 28 Jul 2026 14:53:11 -0700 Subject: [PATCH 074/134] Adding separate 'providers' for asset scheme, metadata, and path translation --- dwds/CHANGELOG.md | 11 +- dwds/lib/asset_reader.dart | 2 +- dwds/lib/dwds.dart | 8 +- dwds/lib/src/debugging/metadata/loader.dart | 61 ++++ dwds/lib/src/debugging/metadata/provider.dart | 42 +-- dwds/lib/src/loaders/asset_scheme.dart | 62 ++++ .../build_runner_strategy_provider.dart | 11 +- dwds/lib/src/loaders/ddc.dart | 8 +- dwds/lib/src/loaders/ddc_library_bundle.dart | 8 +- .../frontend_server_strategy_provider.dart | 115 ++++--- dwds/lib/src/loaders/require.dart | 8 +- dwds/lib/src/loaders/strategy.dart | 25 +- dwds/lib/src/readers/asset_reader.dart | 296 +++++++++++++++--- .../readers/frontend_server_asset_reader.dart | 8 +- .../src/utilities/web_path_translator.dart | 119 +------ .../frontend_server_common/asset_server.dart | 17 +- dwds/test/frontend_server_common/devfs.dart | 4 +- .../resident_runner.dart | 2 +- dwds/test/integration/fixtures/context.dart | 8 +- dwds/test/integration/fixtures/fakes.dart | 5 + dwds/test/integration/metadata_test.dart | 12 +- .../integration/package_uri_mapper_test.dart | 11 +- .../utilities/web_path_translator_test.dart | 184 +---------- webdev/CHANGELOG.md | 3 +- webdev/lib/src/serve/webdev_server.dart | 12 +- 25 files changed, 579 insertions(+), 463 deletions(-) create mode 100644 dwds/lib/src/debugging/metadata/loader.dart create mode 100644 dwds/lib/src/loaders/asset_scheme.dart diff --git a/dwds/CHANGELOG.md b/dwds/CHANGELOG.md index 74f5d347d6..fb5f7112d9 100644 --- a/dwds/CHANGELOG.md +++ b/dwds/CHANGELOG.md @@ -1,8 +1,11 @@ ## 28.0.0 - -- **Breaking Change**: Removed `PackageUriMapper` from the constructors of `FrontendServerStrategyProvider` and its subclasses (`FrontendServerBuildDaemonStrategyProvider`, `FrontendServerDdcStrategyProvider`, `FrontendServerRequireStrategyProvider`). -- Add support for Frontend Server + Build Daemon configuration with hot reload via `FrontendServerBuildDaemonStrategyProvider`. -- Expose `DaemonExpressionCompiler` for handling expression compile directly via `build_daemon`. +- **Breaking Change**: Removed `PackageUriMapper` in favor of **`PathResolver`**. +- **Breaking Change**: **`LoadStrategy`** implementors must now implement the **`assetScheme`** getter to define asset naming conventions. +- Introduce **`MetadataLoader`** and **`AssetScheme`** to generalize metadata loading and asset naming schemes. +- Export **`MetadataLoader`**, **`MergedMetadataLoader`**, **`ModuleMetadata`**, and **`LibraryMetadata`** to enable custom metadata loading implementations. +- Add support for Frontend Server + Build Daemon configuration with hot reload via **`FrontendServerBuildDaemonStrategyProvider`**. +- Expose **`DaemonExpressionCompiler`** for handling expression compilation directly via `build_daemon`. +- **`BuildSettings`** now supports **`useDebuggerModuleNames`** to distinguish between debugger-friendly paths and raw server paths. ## 27.1.2 diff --git a/dwds/lib/asset_reader.dart b/dwds/lib/asset_reader.dart index 578849f302..98b6ca246b 100644 --- a/dwds/lib/asset_reader.dart +++ b/dwds/lib/asset_reader.dart @@ -3,4 +3,4 @@ // BSD-style license that can be found in the LICENSE file. export 'src/readers/asset_reader.dart' - show AssetReader, PackageUriMapper, stripLeadingSlashes; + show AssetReader, PathResolver, stripLeadingSlashes; diff --git a/dwds/lib/dwds.dart b/dwds/lib/dwds.dart index cac2797ee5..27a34952bb 100644 --- a/dwds/lib/dwds.dart +++ b/dwds/lib/dwds.dart @@ -13,11 +13,17 @@ export 'src/config/tool_configuration.dart' UrlEncoder; export 'src/connections/app_connection.dart' show AppConnection; export 'src/connections/debug_connection.dart' show DebugConnection; +export 'src/debugging/metadata/loader.dart' + show MergedMetadataLoader, MetadataLoader; +export 'src/debugging/metadata/module_metadata.dart' + show LibraryMetadata, ModuleMetadata; export 'src/debugging/metadata/provider.dart' show AbsoluteImportUriException, MetadataProvider; export 'src/events.dart' show DwdsEvent; export 'src/handlers/dev_handler.dart' show AppConnectionException; export 'src/handlers/socket_connections.dart'; +export 'src/loaders/asset_scheme.dart' + show AssetScheme, BuildRunnerAssetScheme, FrontendServerAssetScheme; export 'src/loaders/build_runner_strategy_provider.dart' show BuildRunnerDdcLibraryBundleStrategyProvider, @@ -36,7 +42,7 @@ export 'src/loaders/strategy.dart' LoadStrategy, ReloadConfiguration, ReloadableLoadStrategy; -export 'src/readers/asset_reader.dart' show AssetReader, PackageUriMapper; +export 'src/readers/asset_reader.dart' show AssetReader, PathResolver; export 'src/readers/frontend_server_asset_reader.dart' show FrontendServerAssetReader; export 'src/readers/proxy_server_asset_reader.dart' show ProxyServerAssetReader; diff --git a/dwds/lib/src/debugging/metadata/loader.dart b/dwds/lib/src/debugging/metadata/loader.dart new file mode 100644 index 0000000000..fda4dade32 --- /dev/null +++ b/dwds/lib/src/debugging/metadata/loader.dart @@ -0,0 +1,61 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:convert'; + +import 'package:dwds/src/debugging/metadata/module_metadata.dart'; +import 'package:dwds/src/readers/asset_reader.dart'; +import 'package:logging/logging.dart'; + +/// Interface for fetching and parsing debug metadata emitted by the compiler. +abstract class MetadataLoader { + /// Loads debug metadata associated with the application [entrypoint]. + /// + /// Returns a map of module names to their corresponding [ModuleMetadata]. + Future> loadMetadata(String entrypoint); +} + +/// Metadata loader that reads merged metadata files. +class MergedMetadataLoader implements MetadataLoader { + final AssetReader _assetReader; + final _logger = Logger('MergedMetadataLoader'); + + MergedMetadataLoader(this._assetReader); + + @override + Future> loadMetadata(String entrypoint) async { + final modules = {}; + // The merged metadata resides next to the entrypoint. + // Assume that .bootstrap.js has .ddc_merged_metadata + if (entrypoint.endsWith('.bootstrap.js')) { + _logger.info('Loading debug metadata...'); + final serverPath = entrypoint.replaceAll( + '.bootstrap.js', + '.ddc_merged_metadata', + ); + final merged = await _assetReader.metadataContents(serverPath); + if (merged != null) { + for (final contents in merged.split('\n')) { + try { + if (contents.isEmpty || + contents.startsWith('// intentionally empty:')) { + continue; + } + final moduleJson = json.decode(contents); + final metadata = ModuleMetadata.fromJson( + moduleJson as Map, + ); + final moduleName = metadata.name; + modules[moduleName] = metadata; + _logger.fine('Loaded debug metadata for module: $moduleName'); + } catch (e) { + _logger.warning('Failed to read metadata: $e'); + rethrow; + } + } + } + } + return modules; + } +} diff --git a/dwds/lib/src/debugging/metadata/provider.dart b/dwds/lib/src/debugging/metadata/provider.dart index 43767285ee..930fc631ca 100644 --- a/dwds/lib/src/debugging/metadata/provider.dart +++ b/dwds/lib/src/debugging/metadata/provider.dart @@ -2,18 +2,15 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:convert'; - import 'package:async/async.dart'; +import 'package:dwds/src/debugging/metadata/loader.dart'; import 'package:dwds/src/debugging/metadata/module_metadata.dart'; import 'package:dwds/src/readers/asset_reader.dart'; -import 'package:logging/logging.dart'; import 'package:path/path.dart' as p; /// A provider of metadata in which data is collected through DDC outputs. class MetadataProvider { - final AssetReader _assetReader; - final _logger = Logger('MetadataProvider'); + final MetadataLoader _metadataLoader; final String entrypoint; final Set _libraries = {}; final Map _scriptToModule = {}; @@ -65,7 +62,7 @@ class MetadataProvider { 'dart:ui', ]; - MetadataProvider(this.entrypoint, this._assetReader); + MetadataProvider(this.entrypoint, this._metadataLoader); /// A list of all libraries in the Dart application. /// @@ -164,38 +161,7 @@ class MetadataProvider { /// Compute metadata information after reading the metadata contents and /// return a map from module names to their [ModuleMetadata]. Future> _processMetadata() async { - final modules = {}; - // The merged metadata resides next to the entrypoint. - // Assume that .bootstrap.js has .ddc_merged_metadata - if (entrypoint.endsWith('.bootstrap.js')) { - _logger.info('Loading debug metadata...'); - final serverPath = entrypoint.replaceAll( - '.bootstrap.js', - '.ddc_merged_metadata', - ); - final merged = await _assetReader.metadataContents(serverPath); - if (merged != null) { - for (final contents in merged.split('\n')) { - try { - if (contents.isEmpty || - contents.startsWith('// intentionally empty:')) { - continue; - } - final moduleJson = json.decode(contents); - final metadata = ModuleMetadata.fromJson( - moduleJson as Map, - ); - final moduleName = metadata.name; - modules[moduleName] = metadata; - _logger.fine('Loaded debug metadata for module: $moduleName'); - } catch (e) { - _logger.warning('Failed to read metadata: $e'); - rethrow; - } - } - } - } - return modules; + return _metadataLoader.loadMetadata(entrypoint); } /// Process all metadata, including SDK metadata, and compute caches once. diff --git a/dwds/lib/src/loaders/asset_scheme.dart b/dwds/lib/src/loaders/asset_scheme.dart new file mode 100644 index 0000000000..881a9cc89e --- /dev/null +++ b/dwds/lib/src/loaders/asset_scheme.dart @@ -0,0 +1,62 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// Encapsulates asset file naming conventions and schemes. +abstract class AssetScheme { + /// File extension for JS files. + /// (e.g., '.ddc.js' or '.dart.lib.js'). + String get jsSuffix; + + /// File extension for sourcemaps. + /// (e.g., '.ddc.js.map' or '.dart.lib.js.map'). + String get sourceMapSuffix; + + /// File extension for module names. + /// (e.g., '.ddc' or '.dart.lib'). + String get descriptorSuffix; + + /// File extension for full dill files. + /// (e.g., '.ddc.full.dill' or '.dart.lib.full.dill'). + String get fullDillSuffix; + + /// File extension for summary dill files. + /// (e.g., '.ddc.dill' or '.dart.lib.dill'). + String get summaryDillSuffix; +} + +/// Asset scheme for package:build assets. +class BuildRunnerAssetScheme implements AssetScheme { + @override + String get jsSuffix => '.ddc.js'; + + @override + String get sourceMapSuffix => '.ddc.js.map'; + + @override + String get descriptorSuffix => '.ddc'; + + @override + String get fullDillSuffix => '.ddc.full.dill'; + + @override + String get summaryDillSuffix => '.ddc.dill'; +} + +/// Asset scheme for Frontend Server assets. +class FrontendServerAssetScheme implements AssetScheme { + @override + String get jsSuffix => '.dart.lib.js'; + + @override + String get sourceMapSuffix => '.dart.lib.js.map'; + + @override + String get descriptorSuffix => '.dart.lib'; + + @override + String get fullDillSuffix => '.dart.lib.full.dill'; + + @override + String get summaryDillSuffix => '.dart.lib.dill'; +} diff --git a/dwds/lib/src/loaders/build_runner_strategy_provider.dart b/dwds/lib/src/loaders/build_runner_strategy_provider.dart index b4a1fb9b21..3b712deb16 100644 --- a/dwds/lib/src/loaders/build_runner_strategy_provider.dart +++ b/dwds/lib/src/loaders/build_runner_strategy_provider.dart @@ -5,12 +5,12 @@ import 'dart:convert'; import 'package:dwds/src/debugging/metadata/provider.dart'; +import 'package:dwds/src/loaders/asset_scheme.dart'; import 'package:dwds/src/loaders/ddc_library_bundle.dart'; import 'package:dwds/src/loaders/require.dart'; import 'package:dwds/src/loaders/strategy.dart'; import 'package:dwds/src/readers/asset_reader.dart'; import 'package:dwds/src/services/expression_compiler.dart'; -import 'package:dwds/src/utilities/web_path_translator.dart'; import 'package:logging/logging.dart'; import 'package:path/path.dart' as p; @@ -39,6 +39,7 @@ class BuildRunnerRequireStrategyProvider with BuildRunnerStrategyProviderMixin { _moduleInfoForProvider, _assetReader, _buildSettings, + BuildRunnerAssetScheme(), packageConfigPath: _packageConfigPath, ); @@ -80,6 +81,7 @@ class BuildRunnerDdcLibraryBundleStrategyProvider _assetReader, _buildSettings, (path) => null, // g3RelativePath + BuildRunnerAssetScheme(), packageConfigPath: _packageConfigPath, injectScriptLoad: injectScriptLoad, reloadedSourcesUri: _reloadedSourcesUri, @@ -204,10 +206,9 @@ mixin BuildRunnerStrategyProviderMixin { } String? _serverPathForAppUri(String appUrl) { - return WebPathTranslator.translateAppUriToServerPath( - appUrl, - layout: AppUriLayout.buildRunner, - ); + return BuildRunnerPathResolver( + useDebuggerModuleNames: _buildSettings.useDebuggerModuleNames, + ).appUriToServerPath(appUrl); } Future> _moduleInfoForProvider( diff --git a/dwds/lib/src/loaders/ddc.dart b/dwds/lib/src/loaders/ddc.dart index a1b18f6fd4..a12afba735 100644 --- a/dwds/lib/src/loaders/ddc.dart +++ b/dwds/lib/src/loaders/ddc.dart @@ -6,6 +6,7 @@ import 'dart:convert'; import 'package:dwds/src/debugging/dart_runtime_debugger.dart'; import 'package:dwds/src/debugging/metadata/provider.dart'; +import 'package:dwds/src/loaders/asset_scheme.dart'; import 'package:dwds/src/loaders/strategy.dart'; import 'package:dwds/src/readers/asset_reader.dart'; import 'package:dwds/src/services/expression_compiler.dart'; @@ -145,8 +146,10 @@ class DdcStrategy extends LoadStrategy { this._moduleInfoForProvider, AssetReader assetReader, this._buildSettings, - this._g3RelativePath, { + this._g3RelativePath, + this.assetScheme, { super.packageConfigPath, + super.metadataLoader, }) : super(assetReader); @override @@ -162,6 +165,9 @@ class DdcStrategy extends LoadStrategy { @override String get moduleFormat => 'ddc'; + @override + final AssetScheme assetScheme; + @override String get loadLibrariesModule => 'ddc_module_loader.ddk.js'; diff --git a/dwds/lib/src/loaders/ddc_library_bundle.dart b/dwds/lib/src/loaders/ddc_library_bundle.dart index 2404fb9567..e00ae3311c 100644 --- a/dwds/lib/src/loaders/ddc_library_bundle.dart +++ b/dwds/lib/src/loaders/ddc_library_bundle.dart @@ -6,6 +6,7 @@ import 'dart:convert'; import 'package:dwds/src/debugging/dart_runtime_debugger.dart'; import 'package:dwds/src/debugging/metadata/provider.dart'; +import 'package:dwds/src/loaders/asset_scheme.dart'; import 'package:dwds/src/loaders/ddc.dart'; import 'package:dwds/src/loaders/strategy.dart'; import 'package:dwds/src/readers/asset_reader.dart'; @@ -124,8 +125,10 @@ class DdcLibraryBundleStrategy extends LoadStrategy this._moduleInfoForProvider, AssetReader assetReader, this._buildSettings, - this._g3RelativePath, { + this._g3RelativePath, + this.assetScheme, { super.packageConfigPath, + super.metadataLoader, this.reloadedSourcesUri, this.injectScriptLoad = true, }) : super(assetReader); @@ -146,6 +149,9 @@ class DdcLibraryBundleStrategy extends LoadStrategy @override String get moduleFormat => 'ddc'; + @override + final AssetScheme assetScheme; + @override String get loadLibrariesModule => 'ddc_module_loader.ddk.js'; diff --git a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart index 2d0cc46a8c..da1d268017 100644 --- a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart +++ b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart @@ -3,6 +3,7 @@ // found in the LICENSE file. import 'package:dwds/src/debugging/metadata/provider.dart'; +import 'package:dwds/src/loaders/asset_scheme.dart'; import 'package:dwds/src/loaders/ddc.dart'; import 'package:dwds/src/loaders/ddc_library_bundle.dart'; import 'package:dwds/src/loaders/require.dart'; @@ -15,18 +16,23 @@ import 'package:path/path.dart' as p; abstract class FrontendServerStrategyProvider { final ReloadConfiguration _configuration; final AssetReader _assetReader; + final PathResolver _pathResolver; final Future> Function() _digestsProvider; final String _basePath; final BuildSettings _buildSettings; final String? _packageConfigPath; + AssetScheme get assetScheme; + FrontendServerStrategyProvider( this._configuration, this._assetReader, + PathResolver? pathResolver, this._digestsProvider, this._buildSettings, { this._packageConfigPath, - }) : _basePath = _assetReader.basePath; + }) : _basePath = _assetReader.basePath, + _pathResolver = pathResolver ?? FrontendServerPathResolver(); T get strategy; @@ -72,9 +78,8 @@ abstract class FrontendServerStrategyProvider { _addBasePath((await metadataProvider.moduleToSourceMap)[module] ?? ''); String? _serverPathForAppUri(String appUrl) { - final translated = WebPathTranslator.translateAppUriToServerPath( + final translated = _pathResolver.appUriToServerPath( appUrl, - layout: AppUriLayout.frontendServerOnly, useDebuggerModuleNames: _buildSettings.useDebuggerModuleNames, ); return translated != null ? _addBasePath(translated) : null; @@ -113,17 +118,22 @@ class FrontendServerDdcStrategyProvider _assetReader, _buildSettings, (String _) => null, + assetScheme, packageConfigPath: _packageConfigPath, ); FrontendServerDdcStrategyProvider( super._configuration, super._assetReader, + super._pathResolver, super._digestsProvider, super._buildSettings, { super.packageConfigPath, }); + @override + AssetScheme get assetScheme => FrontendServerAssetScheme(); + @override DdcStrategy get strategy => _ddcStrategy; } @@ -135,14 +145,24 @@ class FrontendServerDdcLibraryBundleStrategyProvider late final DdcLibraryBundleStrategy _libraryBundleStrategy; FrontendServerDdcLibraryBundleStrategyProvider( - super._configuration, - super._assetReader, - super._digestsProvider, - super._buildSettings, { + ReloadConfiguration configuration, + AssetReader assetReader, + PathResolver? pathResolver, + Future> Function() digestsProvider, + BuildSettings buildSettings, { super.packageConfigPath, Uri? reloadedSourcesUri, bool injectScriptLoad = true, - }) { + }) : super( + configuration, + assetReader, + pathResolver ?? + (buildSettings.isFlutterApp + ? FlutterPathResolver() + : FrontendServerPathResolver()), + digestsProvider, + buildSettings, + ) { _libraryBundleStrategy = DdcLibraryBundleStrategy( _configuration, _moduleProvider, @@ -155,6 +175,7 @@ class FrontendServerDdcLibraryBundleStrategyProvider _assetReader, _buildSettings, (String _) => null, + assetScheme, packageConfigPath: _packageConfigPath, reloadedSourcesUri: reloadedSourcesUri, injectScriptLoad: injectScriptLoad, @@ -162,19 +183,7 @@ class FrontendServerDdcLibraryBundleStrategyProvider } @override - String? _serverPathForAppUri(String appUrl) { - final isFlutterPackage = - _buildSettings.isFlutterApp && appUrl.startsWith('package:'); - final layout = isFlutterPackage - ? AppUriLayout.flutter - : AppUriLayout.frontendServerOnly; - final translated = WebPathTranslator.translateAppUriToServerPath( - appUrl, - layout: layout, - useDebuggerModuleNames: _buildSettings.useDebuggerModuleNames, - ); - return translated != null ? _addBasePath(translated) : null; - } + AssetScheme get assetScheme => FrontendServerAssetScheme(); @override DdcLibraryBundleStrategy get strategy => _libraryBundleStrategy; @@ -187,14 +196,21 @@ class FrontendServerBuildDaemonStrategyProvider late final DdcLibraryBundleStrategy _libraryBundleStrategy; FrontendServerBuildDaemonStrategyProvider( - super._configuration, - super._assetReader, - super._digestsProvider, - super._buildSettings, { + ReloadConfiguration configuration, + AssetReader assetReader, + PathResolver? pathResolver, + Future> Function() digestsProvider, + BuildSettings buildSettings, { super.packageConfigPath, Uri? reloadedSourcesUri, bool injectScriptLoad = true, - }) { + }) : super( + configuration, + assetReader, + pathResolver ?? BuildRunnerPathResolver(), + digestsProvider, + buildSettings, + ) { _libraryBundleStrategy = DdcLibraryBundleStrategy( _configuration, _moduleProvider, @@ -207,12 +223,16 @@ class FrontendServerBuildDaemonStrategyProvider _assetReader, _buildSettings, (String _) => null, + assetScheme, packageConfigPath: _packageConfigPath, reloadedSourcesUri: reloadedSourcesUri, injectScriptLoad: injectScriptLoad, ); } + @override + AssetScheme get assetScheme => BuildRunnerAssetScheme(); + @override DdcLibraryBundleStrategy get strategy => _libraryBundleStrategy; @@ -257,8 +277,8 @@ class FrontendServerBuildDaemonStrategyProvider ) async { final remappedPath = WebPathTranslator.translateModuleExtension( serverPath, - from: AppUriLayout.buildRunner, - to: AppUriLayout.frontendServerOnly, + from: BuildRunnerAssetScheme(), + to: FrontendServerAssetScheme(), ); final module = await super._moduleForServerPath( metadataProvider, @@ -301,9 +321,9 @@ class FrontendServerBuildDaemonStrategyProvider @override String? _serverPathForAppUri(String appUrl) => - WebPathTranslator.translateAppUriToServerPath( + _pathResolver.appUriToServerPath( appUrl, - layout: AppUriLayout.buildRunner, + useDebuggerModuleNames: _buildSettings.useDebuggerModuleNames, ); @override @@ -337,31 +357,30 @@ class FrontendServerRequireStrategyProvider _moduleInfoForProvider, _assetReader, _buildSettings, + assetScheme, packageConfigPath: _packageConfigPath, ); FrontendServerRequireStrategyProvider( - super._configuration, - super._assetReader, - super._digestsProvider, - super._buildSettings, { + ReloadConfiguration configuration, + AssetReader assetReader, + PathResolver? pathResolver, + Future> Function() digestsProvider, + BuildSettings buildSettings, { super.packageConfigPath, - }); + }) : super( + configuration, + assetReader, + pathResolver ?? + (buildSettings.isFlutterApp + ? FlutterPathResolver() + : FrontendServerPathResolver()), + digestsProvider, + buildSettings, + ); @override - String? _serverPathForAppUri(String appUrl) { - final isFlutterPackage = - _buildSettings.isFlutterApp && appUrl.startsWith('package:'); - final layout = isFlutterPackage - ? AppUriLayout.flutter - : AppUriLayout.frontendServerOnly; - final translated = WebPathTranslator.translateAppUriToServerPath( - appUrl, - layout: layout, - useDebuggerModuleNames: _buildSettings.useDebuggerModuleNames, - ); - return translated != null ? _addBasePath(translated) : null; - } + AssetScheme get assetScheme => FrontendServerAssetScheme(); @override RequireStrategy get strategy => _requireStrategy; diff --git a/dwds/lib/src/loaders/require.dart b/dwds/lib/src/loaders/require.dart index 535c39d66e..bc7b302b53 100644 --- a/dwds/lib/src/loaders/require.dart +++ b/dwds/lib/src/loaders/require.dart @@ -6,6 +6,7 @@ import 'dart:convert'; import 'package:dwds/src/debugging/dart_runtime_debugger.dart'; import 'package:dwds/src/debugging/metadata/provider.dart'; +import 'package:dwds/src/loaders/asset_scheme.dart'; import 'package:dwds/src/loaders/strategy.dart'; import 'package:dwds/src/readers/asset_reader.dart'; import 'package:dwds/src/services/expression_compiler.dart'; @@ -138,8 +139,10 @@ class RequireStrategy extends LoadStrategy { this._serverPathForAppUri, this._moduleInfoForProvider, AssetReader assetReader, - this._buildSettings, { + this._buildSettings, + this.assetScheme, { super.packageConfigPath, + super.metadataLoader, }) : super(assetReader); @override @@ -162,6 +165,9 @@ class RequireStrategy extends LoadStrategy { @override String get moduleFormat => 'amd'; + @override + final AssetScheme assetScheme; + @override String get loadLibrariesModule => 'require.js'; diff --git a/dwds/lib/src/loaders/strategy.dart b/dwds/lib/src/loaders/strategy.dart index 0cc0d2bccb..1cfc6d6dcc 100644 --- a/dwds/lib/src/loaders/strategy.dart +++ b/dwds/lib/src/loaders/strategy.dart @@ -6,7 +6,9 @@ import 'dart:io'; import 'dart:typed_data'; import 'package:dwds/src/debugging/dart_runtime_debugger.dart'; +import 'package:dwds/src/debugging/metadata/loader.dart'; import 'package:dwds/src/debugging/metadata/provider.dart'; +import 'package:dwds/src/loaders/asset_scheme.dart'; import 'package:dwds/src/readers/asset_reader.dart'; import 'package:dwds/src/services/expression_compiler.dart'; import 'package:dwds/src/utilities/dart_uri.dart'; @@ -46,9 +48,15 @@ abstract class LoadStrategy { final AssetReader _assetReader; final String? _packageConfigPath; final _providers = {}; + final MetadataLoader? _metadataLoader; - LoadStrategy(this._assetReader, {String? packageConfigPath}) - : _packageConfigPath = packageConfigPath ?? _findPackageConfigFilePath(); + LoadStrategy( + this._assetReader, { + String? packageConfigPath, + MetadataLoader? metadataLoader, + // ignore: prefer_initializing_formals + }) : _metadataLoader = metadataLoader, + _packageConfigPath = packageConfigPath ?? _findPackageConfigFilePath(); /// The ID for this strategy. /// @@ -66,6 +74,17 @@ abstract class LoadStrategy { /// Used for preventing stepping into the library loading code. String get loadLibrariesModule; + /// Asset scheme, which determines file extensions for this strategy. + AssetScheme get assetScheme; + + /// Loader used to fetch and parse debug metadata for this strategy. + MetadataLoader get metadataLoader => + _metadataLoader ?? _defaultMetadataLoader; + + /// The default metadata loader if none is provided. + MetadataLoader get _defaultMetadataLoader => + MergedMetadataLoader(_assetReader); + /// Returns a snippet of JS code that can be used to load a JS module. /// /// The snippet should be a reference to a function that takes a single @@ -202,7 +221,7 @@ abstract class LoadStrategy { /// Creates and returns a [MetadataProvider] with the given [entrypoint] and /// [reader]. MetadataProvider createProvider(String entrypoint, AssetReader reader) => - MetadataProvider(entrypoint, reader); + MetadataProvider(entrypoint, metadataLoader); /// Initializes a [MetadataProvider] for the application located at the /// provided [entrypoint]. diff --git a/dwds/lib/src/readers/asset_reader.dart b/dwds/lib/src/readers/asset_reader.dart index 4c0b7b1a6f..6c6dab5601 100644 --- a/dwds/lib/src/readers/asset_reader.dart +++ b/dwds/lib/src/readers/asset_reader.dart @@ -2,12 +2,12 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'package:collection/collection.dart'; import 'package:dwds/src/utilities/shared.dart'; import 'package:dwds/src/utilities/web_path_translator.dart'; import 'package:file/file.dart'; import 'package:logging/logging.dart'; import 'package:package_config/package_config.dart'; +import 'package:path/path.dart' as p; export 'package:dwds/src/utilities/shared.dart' show stripLeadingSlashes; /// A reader for Dart sources and related source maps. @@ -40,12 +40,8 @@ abstract class AssetReader { Future close(); } -class PackageUriMapper { - final _logger = Logger('PackageUriMapper'); - final PackageConfig packageConfig; - final bool useDebuggerModuleNames; - - static Future create( +abstract class PathResolver { + static Future create( FileSystem fileSystem, Uri packageConfigFile, { bool useDebuggerModuleNames = false, @@ -53,68 +49,266 @@ class PackageUriMapper { final packageConfig = await loadPackageConfig( fileSystem.file(packageConfigFile), ); - return PackageUriMapper( - packageConfig, + return BuildRunnerPathResolver( + packageConfig: packageConfig, useDebuggerModuleNames: useDebuggerModuleNames, ); } - PackageUriMapper(this.packageConfig, {this.useDebuggerModuleNames = false}); + /// Computes the server path for a given application URL. + String? appUriToServerPath(String appUrl, {bool? useDebuggerModuleNames}); - /// Compute server path for package uri. - /// - /// Note: needs to match `urlForComponentUri` in javascript_bundle.dart - /// in SDK code. - String? packageUriToServerPath(Uri packageUri) { - final defaultServerPath = '/packages/${packageUri.path}'; - if (packageUri.isScheme('package')) { - if (!useDebuggerModuleNames) { - return defaultServerPath; + /// Computes the application URI (e.g., package: URI) for a given server path. + String? serverPathToAppUri(String serverPath); + + /// Computes the resolved file URI for a server path. + Uri? serverPathToResolvedUri(String serverPath); + + PackageConfig? get packageConfig; + + bool get useDebuggerModuleNames; +} + +class FrontendServerPathResolver implements PathResolver { + final _logger = Logger('FrontendServerPathResolver'); + @override + final PackageConfig? packageConfig; + @override + final bool useDebuggerModuleNames; + final String? packageRoot; + + FrontendServerPathResolver({ + this.packageConfig, + this.useDebuggerModuleNames = false, + this.packageRoot, + }); + + @override + String? appUriToServerPath(String appUrl, {bool? useDebuggerModuleNames}) { + final useDebugger = useDebuggerModuleNames ?? this.useDebuggerModuleNames; + final appUri = Uri.parse(appUrl); + // Note: must match `urlForComponentUri` in javascript_bundle.dart in SDK. + if (appUri.isScheme('package')) { + // package:foo/bar.dart -> packages/foo/lib/bar.dart (useDebugger) + // package:foo/bar.dart -> packages/foo/bar.dart (!useDebugger) + final pathSegments = appUri.pathSegments; + if (pathSegments.isEmpty) { + throw FormatException('Invalid package URI with empty path: $appUrl'); } - final resolvedUri = packageConfig.resolve(packageUri); - if (resolvedUri == null) { - _logger.severe('Cannot resolve package uri $packageUri'); - return defaultServerPath; + final buildRunnerPath = 'packages/${appUri.path}'; + final path = useDebugger + ? WebPathTranslator.addLibSegment(buildRunnerPath) + : buildRunnerPath; + return path; + } + if (appUri.isScheme('org-dartlang-app')) { + // org-dartlang-app:///web/main.dart -> web/main.dart + // org-dartlang-app:///packages/foo/bar.dart -> packages/foo/lib/bar.dart (useDebugger) + // org-dartlang-app:///packages/foo/lib/bar.dart -> packages/foo/bar.dart (!useDebugger) + final segments = appUri.pathSegments; + if (segments.isEmpty) { + throw FormatException('Invalid org-dartlang-app URI: $appUrl'); } - final package = packageConfig.packageOf(resolvedUri); - if (package == null) { - _logger.severe('Cannot find package for package uri $packageUri'); - return defaultServerPath; + final path = useDebugger + ? WebPathTranslator.addLibSegment(appUri.path.substring(1)) + : WebPathTranslator.removeLibSegment(appUri.path.substring(1)); + return path; + } + return null; + } + + @override + String? serverPathToAppUri(String serverPath) { + // packages/foo/lib/bar.dart -> package:foo/bar.dart + // packages/foo/bar.dart -> package:foo/bar.dart + // web/main.dart -> web/main.dart + serverPath = stripLeadingSlashes(serverPath).replaceAll('\\', '/'); + if (!serverPath.startsWith('packages/')) return serverPath; + final pathWithoutLib = WebPathTranslator.removeLibSegment(serverPath); + return pathWithoutLib.replaceFirst('packages/', 'package:'); + } + + @override + Uri? serverPathToResolvedUri(String serverPath) { + serverPath = stripLeadingSlashes(serverPath).replaceAll('\\', '/'); + final segments = serverPath.split('/'); + if (segments.first == 'packages') { + final config = packageConfig; + if (config == null) { + _logger.severe('Cannot resolve packages without packageConfig'); + return null; } - final root = package.root; - final relativeUrl = resolvedUri.toString().replaceFirst('$root', ''); - final relativeRoot = _getRelativeRoot(root); - final ret = relativeRoot == null - ? 'packages/$relativeUrl' - : 'packages/$relativeRoot/$relativeUrl'; - return ret; + final packagePath = serverPathToAppUri(serverPath); + if (packagePath == null) return null; + return config.resolve(Uri.parse(packagePath)); + } else if (packageRoot != null) { + return Uri.file(p.join(packageRoot!, serverPath)); } - _logger.severe('Expected package uri, but found $packageUri'); + _logger.severe( + 'Cannot resolve path without packages/ prefix or packageRoot: $serverPath', + ); return null; } +} - /// Compute resolved file URI for a server path. - /// - /// Frontend Server serves package URIs with 'lib' intact, representing their - /// on-disk structure. For example, 'package:foo/bar.dart' would be served at - /// 'packages/foo/lib/bar.dart'. - /// - /// Build runner serves package URIs from a flattened 'packages' directory. - /// For example, 'package:foo/bar.dart' would be served at - /// 'packages/foo/bar.dart'. +class BuildRunnerPathResolver implements PathResolver { + final _logger = Logger('BuildRunnerPathResolver'); + @override + final PackageConfig? packageConfig; + @override + final bool useDebuggerModuleNames; + final String? packageRoot; + + BuildRunnerPathResolver({ + this.packageConfig, + this.useDebuggerModuleNames = false, + this.packageRoot, + }); + + @override + String? appUriToServerPath(String appUrl, {bool? useDebuggerModuleNames}) { + final useDebugger = useDebuggerModuleNames ?? this.useDebuggerModuleNames; + final appUri = Uri.parse(appUrl); + // Note: must match `urlForComponentUri` in javascript_bundle.dart in SDK. + if (appUri.isScheme('package')) { + // package:foo/bar.dart -> packages/foo/bar.dart (useDebugger) + // package:foo/bar.dart -> /packages/foo/bar.dart (!useDebugger) + final pathSegments = appUri.pathSegments; + if (pathSegments.isEmpty) { + throw FormatException('Invalid package URI with empty path: $appUrl'); + } + final path = 'packages/${appUri.path}'; + if (!useDebugger && path.startsWith('packages/')) { + return '/$path'; + } + return path; + } + + if (appUri.isScheme('org-dartlang-app')) { + // org-dartlang-app:///web/main.dart -> main.dart + // org-dartlang-app:///packages/foo/bar.dart -> packages/foo/bar.dart + final segments = appUri.pathSegments; + if (segments.isEmpty) { + throw FormatException('Invalid org-dartlang-app URI: $appUrl'); + } + final first = segments.first; + if (first == 'packages') { + if (segments.length < 3) { + throw FormatException('Invalid package path in app URI: $appUrl'); + } + return segments.join('/'); + } + return segments.skip(1).join('/'); + } + + return null; + } + + @override + String? serverPathToAppUri(String serverPath) { + // packages/foo/bar.dart -> package:foo/bar.dart + // web/main.dart -> web/main.dart + serverPath = stripLeadingSlashes(serverPath).replaceAll('\\', '/'); + if (!serverPath.startsWith('packages/')) return serverPath; + return serverPath.replaceFirst('packages/', 'package:'); + } + + @override Uri? serverPathToResolvedUri(String serverPath) { serverPath = stripLeadingSlashes(serverPath).replaceAll('\\', '/'); final segments = serverPath.split('/'); if (segments.first == 'packages') { - final packagePath = WebPathTranslator.translatePackagesPathToPackageUri( - serverPath, - ); - return packageConfig.resolve(Uri.parse(packagePath)); + final config = packageConfig; + if (config == null) { + _logger.severe('Cannot resolve packages without packageConfig'); + return null; + } + final packagePath = serverPathToAppUri(serverPath); + if (packagePath == null) return null; + return config.resolve(Uri.parse(packagePath)); + } else if (packageRoot != null) { + return Uri.file(p.join(packageRoot!, serverPath)); } - _logger.severe('Expected "packages/" path, but found $serverPath'); + _logger.severe( + 'Cannot resolve path without packages/ prefix or packageRoot: $serverPath', + ); return null; } } -String? _getRelativeRoot(Uri root) => - root.pathSegments.lastWhereOrNull((segment) => segment.isNotEmpty); +class FlutterPathResolver implements PathResolver { + final _logger = Logger('FlutterPathResolver'); + @override + final PackageConfig? packageConfig; + @override + final bool useDebuggerModuleNames; + final String? packageRoot; + + FlutterPathResolver({ + this.packageConfig, + this.useDebuggerModuleNames = false, + this.packageRoot, + }); + + @override + String? appUriToServerPath(String appUrl, {bool? useDebuggerModuleNames}) { + final useDebugger = useDebuggerModuleNames ?? this.useDebuggerModuleNames; + final isFlutterPackage = appUrl.startsWith('package:'); + + if (isFlutterPackage) { + // package:foo/bar.dart -> packages/foo/bar.dart + final appUri = Uri.parse(appUrl); + final pathSegments = appUri.pathSegments; + if (pathSegments.isEmpty) { + throw FormatException('Invalid package URI with empty path: $appUrl'); + } + final path = 'packages/${appUri.path}'; + return path; + } else { + final appUri = Uri.parse(appUrl); + if (appUri.isScheme('org-dartlang-app')) { + // org-dartlang-app:///web/main.dart -> web/main.dart + // org-dartlang-app:///packages/foo/bar.dart -> packages/foo/lib/bar.dart (useDebugger) + // org-dartlang-app:///packages/foo/lib/bar.dart -> packages/foo/bar.dart (!useDebugger) + final path = useDebugger + ? WebPathTranslator.addLibSegment(appUri.path.substring(1)) + : WebPathTranslator.removeLibSegment(appUri.path.substring(1)); + return path; + } + } + return null; + } + + @override + String? serverPathToAppUri(String serverPath) { + // packages/foo/lib/bar.dart -> package:foo/bar.dart + // packages/foo/bar.dart -> package:foo/bar.dart + // web/main.dart -> web/main.dart + serverPath = stripLeadingSlashes(serverPath).replaceAll('\\', '/'); + if (!serverPath.startsWith('packages/')) return serverPath; + final pathWithoutLib = WebPathTranslator.removeLibSegment(serverPath); + return pathWithoutLib.replaceFirst('packages/', 'package:'); + } + + @override + Uri? serverPathToResolvedUri(String serverPath) { + serverPath = stripLeadingSlashes(serverPath).replaceAll('\\', '/'); + final segments = serverPath.split('/'); + if (segments.first == 'packages') { + final config = packageConfig; + if (config == null) { + _logger.severe('Cannot resolve packages without packageConfig'); + return null; + } + final packagePath = serverPathToAppUri(serverPath); + if (packagePath == null) return null; + return config.resolve(Uri.parse(packagePath)); + } else if (packageRoot != null) { + return Uri.file(p.join(packageRoot!, serverPath)); + } + _logger.severe( + 'Cannot resolve path without packages/ prefix or packageRoot: $serverPath', + ); + return null; + } +} diff --git a/dwds/lib/src/readers/frontend_server_asset_reader.dart b/dwds/lib/src/readers/frontend_server_asset_reader.dart index b9c1cc036d..d41490d5ef 100644 --- a/dwds/lib/src/readers/frontend_server_asset_reader.dart +++ b/dwds/lib/src/readers/frontend_server_asset_reader.dart @@ -6,7 +6,6 @@ import 'dart:convert'; import 'dart:io'; import 'package:dwds/src/readers/asset_reader.dart'; -import 'package:dwds/src/utilities/web_path_translator.dart'; import 'package:logging/logging.dart'; import 'package:package_config/package_config.dart'; import 'package:path/path.dart' as p; @@ -66,11 +65,12 @@ class FrontendServerAssetReader implements AssetReader { var strippedPath = _stripBasePath(serverPath); Uri? fileUri; if (strippedPath.startsWith('packages/')) { - final packagePath = WebPathTranslator.translatePackagesPathToPackageUri( + final packagePath = FrontendServerPathResolver().serverPathToAppUri( strippedPath, - layout: AppUriLayout.frontendServerOnly, ); - fileUri = packageConfig.resolve(Uri.parse(packagePath)); + if (packagePath != null) { + fileUri = packageConfig.resolve(Uri.parse(packagePath)); + } } else { fileUri = p.toUri(p.join(_packageRoot, strippedPath)); } diff --git a/dwds/lib/src/utilities/web_path_translator.dart b/dwds/lib/src/utilities/web_path_translator.dart index bfbed75efb..73808ccbe5 100644 --- a/dwds/lib/src/utilities/web_path_translator.dart +++ b/dwds/lib/src/utilities/web_path_translator.dart @@ -1,83 +1,10 @@ // Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. - -enum AppUriLayout { - /// Used when compiling and serving directly with Frontend Server. - /// Preserves 'lib/' segments for package paths (e.g. packages/foo/lib/bar.dart). - frontendServerOnly, - - /// Used when compiling/serving with package:build. - /// Omits 'lib/' segments (e.g. packages/foo/bar.dart). - buildRunner, - - /// Used when serving Flutter apps. - /// Omits 'lib/' segments for package paths (e.g. packages/foo/bar.dart). - flutter, -} +import 'package:dwds/src/loaders/asset_scheme.dart'; /// Translates paths across DDC, Frontend Server, DWDS, and package:build. class WebPathTranslator { - /// Translates a DDC app URI (any referenceable dart file) into a path - /// expected by its [layout]'s asset server. - /// - /// FES Only Layout: - /// `package:foo/bar.dart` -> `packages/foo/lib/bar.dart` - /// `org-dartlang-app:///foo/bar.dart` -> `foo/bar.dart` - /// - /// Build Runner Layout: - /// `package:foo/bar.dart` -> `packages/foo/bar.dart` - /// `org-dartlang-app:///packages/foo/bar.dart` -> `packages/foo/bar.dart` - /// `org-dartlang-app:///web/web/main.dart` -> `main.dart` (deduped) - /// `org-dartlang-app:///web/main.dart` -> `main.dart` - /// `org-dartlang-app:///foo/bar.dart` -> `bar.dart` - static String? translateAppUriToServerPath( - String appUrl, { - required AppUriLayout layout, - bool useDebuggerModuleNames = true, - }) { - final appUri = Uri.parse(appUrl); - if (appUri.isScheme('package')) { - final pathSegments = appUri.pathSegments; - if (pathSegments.isEmpty) { - throw FormatException('Invalid package URI with empty path: $appUrl'); - } - final buildRunnerPath = 'packages/${appUri.path}'; - return switch (layout) { - AppUriLayout.frontendServerOnly => - useDebuggerModuleNames - ? addLibSegment(buildRunnerPath) - : buildRunnerPath, - AppUriLayout.buildRunner || AppUriLayout.flutter => buildRunnerPath, - }; - } - - if (appUri.isScheme('org-dartlang-app')) { - final segments = appUri.pathSegments; - if (segments.isEmpty) { - throw FormatException('Invalid org-dartlang-app URI: $appUrl'); - } - switch (layout) { - case AppUriLayout.frontendServerOnly: - return useDebuggerModuleNames - ? addLibSegment(appUri.path.substring(1)) - : removeLibSegment(appUri.path.substring(1)); - case AppUriLayout.buildRunner: - case AppUriLayout.flutter: - final first = segments.first; - if (first == 'packages') { - if (segments.length < 3) { - throw FormatException('Invalid package path in app URI: $appUrl'); - } - return segments.join('/'); - } - return segments.skip(1).join('/'); - } - } - - return null; - } - static String _modifyLibSegment(String serverPath, {required bool add}) { serverPath = serverPath.replaceAll('\\', '/'); if (!serverPath.startsWith('packages/')) return serverPath; @@ -102,28 +29,10 @@ class WebPathTranslator { /// Removes 'lib' from a package path. /// - /// Example: packages/foo/lib/bar.dart packages/foo/bar.dart + /// Example: packages/foo/lib/bar.dart -> packages/foo/bar.dart static String removeLibSegment(String serverPath) => _modifyLibSegment(serverPath, add: false); - /// Translates a served `packages/` path back to a `package:` URI. - /// - /// Examples: - /// - `packages/foo/lib/bar.dart` -> `package:foo/bar.dart` - /// - `packages/foo/bar.dart` -> `package:foo/bar.dart` - static String translatePackagesPathToPackageUri( - String serverPath, { - AppUriLayout? layout, - }) { - if (!serverPath.startsWith('packages/')) return serverPath; - // If layout is not provided, we assume it might have 'lib/'. - final pathWithoutLib = - layout == null || layout == AppUriLayout.frontendServerOnly - ? removeLibSegment(serverPath) - : serverPath; - return pathWithoutLib.replaceFirst('packages/', 'package:'); - } - /// Translates a 'lib/' path to a package path. /// /// DDC generates source maps with relative paths from the generated output. @@ -147,33 +56,25 @@ class WebPathTranslator { /// Maps module extensions between layouts. /// - /// For example, from [AppUriLayout.frontendServerOnly] to - /// [AppUriLayout.buildRunner]: + /// For example, from [FrontendServerAssetScheme] to + /// [BuildRunnerAssetScheme]: /// `main.dart.lib` -> `main.ddc` /// `main.dart.lib.js` -> `main.ddc.js` static String translateModuleExtension( String path, { - required AppUriLayout from, - required AppUriLayout to, + required AssetScheme from, + required AssetScheme to, }) { - if (from == to) return path; - if (from == AppUriLayout.frontendServerOnly && - to == AppUriLayout.buildRunner) { - return path.replaceAll('.dart.lib', '.ddc'); - } - if (from == AppUriLayout.buildRunner && - to == AppUriLayout.frontendServerOnly) { - return path.replaceAll('.ddc', '.dart.lib'); - } - return path; + if (from.descriptorSuffix == to.descriptorSuffix) return path; + return path.replaceAll(from.descriptorSuffix, to.descriptorSuffix); } /// Maps '.dart.lib' (FES suffix) to '.ddc' (package:build suffix). static String translateFesToBuildRunnerPath(String path) { return translateModuleExtension( path, - from: AppUriLayout.frontendServerOnly, - to: AppUriLayout.buildRunner, + from: FrontendServerAssetScheme(), + to: BuildRunnerAssetScheme(), ); } diff --git a/dwds/test/frontend_server_common/asset_server.dart b/dwds/test/frontend_server_common/asset_server.dart index b242c8cc4f..e0dc961734 100644 --- a/dwds/test/frontend_server_common/asset_server.dart +++ b/dwds/test/frontend_server_common/asset_server.dart @@ -33,7 +33,7 @@ class TestAssetServer implements AssetReader { final Map _sourceMaps = {}; final Map _metadata = {}; late String _mergedMetadata; - final PackageUriMapper _packageUriMapper; + final PathResolver _packageUriMapper; final InternetAddress internetAddress; final TestSdkLayout _sdkLayout; @@ -73,7 +73,7 @@ class TestAssetServer implements AssetReader { String hostname, int port, UrlEncoder? urlTunneler, - PackageUriMapper packageUriMapper, + PathResolver packageUriMapper, ) async { final address = (await InternetAddress.lookup(hostname)).first; final httpServer = await HttpServer.bind(address, port); @@ -283,11 +283,14 @@ class TestAssetServer implements AssetReader { // Expression evaluation and debugger requests may reference sources // using `package:` URIs. Resolve them to files using the packageConfig. if (path.startsWith('package:')) { - final resolved = _packageUriMapper.packageConfig.resolve(Uri.parse(path)); - if (resolved != null) { - final packageFile = _fileSystem.file(resolved); - if (packageFile.existsSync()) { - return packageFile; + final serverPath = _packageUriMapper.appUriToServerPath(path); + if (serverPath != null) { + final resolved = _packageUriMapper.serverPathToResolvedUri(serverPath); + if (resolved != null) { + final packageFile = _fileSystem.file(resolved); + if (packageFile.existsSync()) { + return packageFile; + } } } } diff --git a/dwds/test/frontend_server_common/devfs.dart b/dwds/test/frontend_server_common/devfs.dart index 37d0497ce9..329040e61a 100644 --- a/dwds/test/frontend_server_common/devfs.dart +++ b/dwds/test/frontend_server_common/devfs.dart @@ -39,7 +39,7 @@ class WebDevFS { final String hostname; final int port; final Uri projectDirectory; - final PackageUriMapper packageUriMapper; + final PathResolver packageUriMapper; final String index; final UrlEncoder? urlTunneler; List sources = []; @@ -188,7 +188,7 @@ class WebDevFS { Uri.parse('org-dartlang-app:///$mainUri'), invalidatedFiles, outputPath: p.join(dillOutputPath, 'app.dill'), - packageConfig: packageUriMapper.packageConfig, + packageConfig: packageUriMapper.packageConfig!, recompileRestart: fullRestart, ); if (compilerOutput == null || compilerOutput.errorCount > 0) { diff --git a/dwds/test/frontend_server_common/resident_runner.dart b/dwds/test/frontend_server_common/resident_runner.dart index 905d7c61db..60a5bb48ec 100644 --- a/dwds/test/frontend_server_common/resident_runner.dart +++ b/dwds/test/frontend_server_common/resident_runner.dart @@ -54,7 +54,7 @@ class ResidentWebRunner { final Uri mainUri; final Uri projectDirectory; final Uri packageConfigFile; - final PackageUriMapper packageUriMapper; + final PathResolver packageUriMapper; final String outputPath; final List fileSystemRoots; final String fileSystemScheme; diff --git a/dwds/test/integration/fixtures/context.dart b/dwds/test/integration/fixtures/context.dart index 54999a5741..69ec915b7d 100644 --- a/dwds/test/integration/fixtures/context.dart +++ b/dwds/test/integration/fixtures/context.dart @@ -403,7 +403,7 @@ class TestContext { p.join(project.webAssetsPath, project.dartEntryFileName), ); frontendServerFileSystem = const LocalFileSystem(); - final packageUriMapper = await PackageUriMapper.create( + final packageUriMapper = await PathResolver.create( frontendServerFileSystem, project.packageConfigFile, useDebuggerModuleNames: testSettings.useDebuggerModuleNames, @@ -454,6 +454,7 @@ class TestContext { (ModuleFormat.amd, _) => FrontendServerRequireStrategyProvider( testSettings.reloadConfiguration, assetReader, + packageUriMapper, () async => {}, buildSettings, ).strategy, @@ -461,6 +462,7 @@ class TestContext { FrontendServerDdcLibraryBundleStrategyProvider( testSettings.reloadConfiguration, assetReader, + packageUriMapper, () async => {}, buildSettings, reloadedSourcesUri: reloadedSourcesUri, @@ -468,6 +470,7 @@ class TestContext { (ModuleFormat.ddc, false) => FrontendServerDdcStrategyProvider( testSettings.reloadConfiguration, assetReader, + packageUriMapper, () async => {}, buildSettings, ).strategy, @@ -727,7 +730,7 @@ class TestContext { ); } frontendServerFileSystem = const LocalFileSystem(); - final packageUriMapper = await PackageUriMapper.create( + final packageUriMapper = await PathResolver.create( frontendServerFileSystem, project.packageConfigFile, useDebuggerModuleNames: testSettings.useDebuggerModuleNames, @@ -741,6 +744,7 @@ class TestContext { FrontendServerBuildDaemonStrategyProvider( testSettings.reloadConfiguration, assetReader, + packageUriMapper, () async => {}, buildSettings, injectScriptLoad: false, diff --git a/dwds/test/integration/fixtures/fakes.dart b/dwds/test/integration/fixtures/fakes.dart index 0b90d0e163..38f0296e9f 100644 --- a/dwds/test/integration/fixtures/fakes.dart +++ b/dwds/test/integration/fixtures/fakes.dart @@ -15,6 +15,7 @@ import 'package:dwds/src/debugging/modules.dart'; import 'package:dwds/src/debugging/remote_debugger.dart'; import 'package:dwds/src/debugging/webkit_debugger.dart'; import 'package:dwds/src/handlers/socket_connections.dart'; +import 'package:dwds/src/loaders/asset_scheme.dart'; import 'package:dwds/src/loaders/require.dart'; import 'package:dwds/src/loaders/strategy.dart'; import 'package:dwds/src/services/expression_compiler.dart'; @@ -217,6 +218,7 @@ class FakeWebkitDebugger implements WebkitDebugger { (MetadataProvider _) async => {}, FakeAssetReader(), buildSettings, + BuildRunnerAssetScheme(), ), ), ); @@ -355,6 +357,9 @@ class FakeStrategy extends LoadStrategy { appEntrypoint: Uri.parse('package:myapp/main.dart'), ); + @override + AssetScheme get assetScheme => BuildRunnerAssetScheme(); + @override Future bootstrapFor(String entrypoint) async => 'dummy_bootstrap'; diff --git a/dwds/test/integration/metadata_test.dart b/dwds/test/integration/metadata_test.dart index 50d12c8e1d..430f04d166 100644 --- a/dwds/test/integration/metadata_test.dart +++ b/dwds/test/integration/metadata_test.dart @@ -7,6 +7,7 @@ library; import 'dart:convert'; +import 'package:dwds/src/debugging/metadata/loader.dart'; import 'package:dwds/src/debugging/metadata/module_metadata.dart'; import 'package:dwds/src/debugging/metadata/provider.dart'; import 'package:test/test.dart'; @@ -40,7 +41,7 @@ void main() { test('can parse metadata with empty sources', () async { final provider = MetadataProvider( 'foo.bootstrap.js', - FakeAssetReader(metadata: _emptySourceMetadata), + MergedMetadataLoader(FakeAssetReader(metadata: _emptySourceMetadata)), ); expect( await provider.libraries, @@ -51,7 +52,7 @@ void main() { test('throws on metadata with absolute import uris', () async { final provider = MetadataProvider( 'foo.bootstrap.js', - FakeAssetReader(metadata: _fileUriMetadata), + MergedMetadataLoader(FakeAssetReader(metadata: _fileUriMetadata)), ); await expectLater( provider.libraries, @@ -64,7 +65,7 @@ void main() { () async { final provider = MetadataProvider( 'foo.bootstrap.js', - FakeAssetReader(metadata: _emptySourceMetadata), + MergedMetadataLoader(FakeAssetReader(metadata: _emptySourceMetadata)), ); final modulePath = 'foo/web/main.ddc.js'; final moduleName = 'web/main'; @@ -210,7 +211,10 @@ void main() { final assetReader = FakeAssetReader( metadata: createMetadataContents(moduleToLibraries, libraryToParts), ); - final provider = MetadataProvider('foo.bootstrap.js', assetReader); + final provider = MetadataProvider( + 'foo.bootstrap.js', + MergedMetadataLoader(assetReader), + ); await validateProvider(provider, moduleToLibraries, libraryToParts); const newModuleToLibraries = >{ diff --git a/dwds/test/integration/package_uri_mapper_test.dart b/dwds/test/integration/package_uri_mapper_test.dart index 8d8e8957ac..223f885d78 100644 --- a/dwds/test/integration/package_uri_mapper_test.dart +++ b/dwds/test/integration/package_uri_mapper_test.dart @@ -30,11 +30,11 @@ void main() { final serverPath = useDebuggerModuleNames ? 'packages/${project.packageDirectory}/lib/test_library.dart' - : '/packages/${project.packageName}/test_library.dart'; + : 'packages/${project.packageName}/test_library.dart'; final resolvedPath = '${project.packageDirectory}/lib/test_library.dart'; - late final PackageUriMapper packageUriMapper; + late final PathResolver packageUriMapper; setUpAll(() async { await project.setUp(); // Note: Run `dart pub upgrade` before the test cases to fix @@ -52,7 +52,7 @@ void main() { ), ); - packageUriMapper = await PackageUriMapper.create( + packageUriMapper = await PathResolver.create( fileSystem, packageConfigFile, useDebuggerModuleNames: useDebuggerModuleNames, @@ -62,7 +62,10 @@ void main() { tearDownAll(project.tearDown); test('Can convert package urls to server paths', () { - expect(packageUriMapper.packageUriToServerPath(packageUri), serverPath); + expect( + packageUriMapper.appUriToServerPath(packageUri.toString()), + serverPath, + ); }); test('Can convert server paths to file paths', () { diff --git a/dwds/test/utilities/web_path_translator_test.dart b/dwds/test/utilities/web_path_translator_test.dart index fe4e1a84ff..217e2a3c56 100644 --- a/dwds/test/utilities/web_path_translator_test.dart +++ b/dwds/test/utilities/web_path_translator_test.dart @@ -2,128 +2,12 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +import 'package:dwds/src/loaders/asset_scheme.dart'; import 'package:dwds/src/utilities/web_path_translator.dart'; import 'package:test/test.dart'; void main() { group('WebPathTranslator', () { - group('translateAppUriToServerPath', () { - group('package: URIs', () { - test('frontendServerOnly layout adds lib/ segment', () { - // Checks: package:foo/bar.dart -> packages/foo/lib/bar.dart - expect( - WebPathTranslator.translateAppUriToServerPath( - 'package:foo/bar.dart', - layout: AppUriLayout.frontendServerOnly, - ), - 'packages/foo/lib/bar.dart', - ); - }); - - test('frontendServerOnly layout omits lib/ segment if useDebuggerModuleNames is false', () { - // Checks: package:foo/bar.dart -> packages/foo/bar.dart - expect( - WebPathTranslator.translateAppUriToServerPath( - 'package:foo/bar.dart', - layout: AppUriLayout.frontendServerOnly, - useDebuggerModuleNames: false, - ), - 'packages/foo/bar.dart', - ); - }); - - test('buildRunner layout omits lib/ segment', () { - // Checks: package:foo/bar.dart -> packages/foo/bar.dart - expect( - WebPathTranslator.translateAppUriToServerPath( - 'package:foo/bar.dart', - layout: AppUriLayout.buildRunner, - ), - 'packages/foo/bar.dart', - ); - }); - - test('flutter layout omits lib/ segment', () { - // Checks: package:foo/bar.dart -> packages/foo/bar.dart - expect( - WebPathTranslator.translateAppUriToServerPath( - 'package:foo/bar.dart', - layout: AppUriLayout.flutter, - ), - 'packages/foo/bar.dart', - ); - }); - }); - - group('org-dartlang-app: URIs', () { - test('frontendServerOnly layout preserves path', () { - // Checks: org-dartlang-app:///web/main.dart -> web/main.dart - expect( - WebPathTranslator.translateAppUriToServerPath( - 'org-dartlang-app:///web/main.dart', - layout: AppUriLayout.frontendServerOnly, - ), - 'web/main.dart', - ); - }); - - test('frontendServerOnly layout adds lib/ to packages path', () { - // Checks: org-dartlang-app:///packages/foo/bar.dart -> packages/foo/lib/bar.dart - expect( - WebPathTranslator.translateAppUriToServerPath( - 'org-dartlang-app:///packages/foo/bar.dart', - layout: AppUriLayout.frontendServerOnly, - ), - 'packages/foo/lib/bar.dart', - ); - }); - - test('buildRunner layout strips entrypoint prefix', () { - // Checks: org-dartlang-app:///web/main.dart -> main.dart - expect( - WebPathTranslator.translateAppUriToServerPath( - 'org-dartlang-app:///web/main.dart', - layout: AppUriLayout.buildRunner, - ), - 'main.dart', - ); - }); - - test('buildRunner layout preserves packages path', () { - // Checks: org-dartlang-app:///packages/foo/bar.dart -> packages/foo/bar.dart - expect( - WebPathTranslator.translateAppUriToServerPath( - 'org-dartlang-app:///packages/foo/bar.dart', - layout: AppUriLayout.buildRunner, - ), - 'packages/foo/bar.dart', - ); - }); - - test('flutter layout behaves like buildRunner for entrypoints', () { - // Checks: org-dartlang-app:///web/main.dart -> main.dart - expect( - WebPathTranslator.translateAppUriToServerPath( - 'org-dartlang-app:///web/main.dart', - layout: AppUriLayout.flutter, - ), - 'main.dart', - ); - }); - - test('flutter layout behaves like buildRunner for packages path', () { - // Checks: org-dartlang-app:///packages/foo/bar.dart -> packages/foo/bar.dart - expect( - WebPathTranslator.translateAppUriToServerPath( - 'org-dartlang-app:///packages/foo/bar.dart', - layout: AppUriLayout.flutter, - ), - 'packages/foo/bar.dart', - ); - }); - }); - }); - group('addLibSegment', () { test('adds lib/ to packages paths', () { // Checks: packages/foo/bar.dart -> packages/foo/lib/bar.dart @@ -176,52 +60,6 @@ void main() { }); }); - group('translatePackagesPathToPackageUri', () { - test('translates packages/ paths with lib/ (frontendServerOnly)', () { - // Checks: packages/foo/lib/bar.dart -> package:foo/bar.dart - expect( - WebPathTranslator.translatePackagesPathToPackageUri( - 'packages/foo/lib/bar.dart', - layout: AppUriLayout.frontendServerOnly, - ), - 'package:foo/bar.dart', - ); - }); - - test('translates packages/ paths without lib/ (buildRunner)', () { - // Checks: packages/foo/bar.dart -> package:foo/bar.dart - expect( - WebPathTranslator.translatePackagesPathToPackageUri( - 'packages/foo/bar.dart', - layout: AppUriLayout.buildRunner, - ), - 'package:foo/bar.dart', - ); - }); - - test('preserves lib/ if present in buildRunner layout', () { - // Checks: packages/foo/lib/bar.dart -> package:foo/lib/bar.dart - // Note: we usually never want 'lib' to be retained in a package path. - // However, this tests that a file in a nested 'lib/' directory (e.g., - // 'lib/lib/bar.dart') is reconstructed properly. - expect( - WebPathTranslator.translatePackagesPathToPackageUri( - 'packages/foo/lib/bar.dart', - layout: AppUriLayout.buildRunner, - ), - 'package:foo/lib/bar.dart', - ); - }); - - test('is no-op for non-packages paths', () { - // Checks: web/main.dart -> web/main.dart - expect( - WebPathTranslator.translatePackagesPathToPackageUri('web/main.dart'), - 'web/main.dart', - ); - }); - }); - group('translateLibPathToPackagePath', () { test('translates lib/ paths to packages/ paths', () { // Checks: lib/foo.dart -> packages/my_package/foo.dart @@ -287,8 +125,8 @@ void main() { expect( WebPathTranslator.translateModuleExtension( 'main.dart.lib', - from: AppUriLayout.frontendServerOnly, - to: AppUriLayout.buildRunner, + from: FrontendServerAssetScheme(), + to: BuildRunnerAssetScheme(), ), 'main.ddc', ); @@ -296,8 +134,8 @@ void main() { expect( WebPathTranslator.translateModuleExtension( 'main.dart.lib.js', - from: AppUriLayout.frontendServerOnly, - to: AppUriLayout.buildRunner, + from: FrontendServerAssetScheme(), + to: BuildRunnerAssetScheme(), ), 'main.ddc.js', ); @@ -311,8 +149,8 @@ void main() { expect( WebPathTranslator.translateModuleExtension( 'main.ddc', - from: AppUriLayout.buildRunner, - to: AppUriLayout.frontendServerOnly, + from: BuildRunnerAssetScheme(), + to: FrontendServerAssetScheme(), ), 'main.dart.lib', ); @@ -320,8 +158,8 @@ void main() { expect( WebPathTranslator.translateModuleExtension( 'main.ddc.js', - from: AppUriLayout.buildRunner, - to: AppUriLayout.frontendServerOnly, + from: BuildRunnerAssetScheme(), + to: FrontendServerAssetScheme(), ), 'main.dart.lib.js', ); @@ -333,8 +171,8 @@ void main() { expect( WebPathTranslator.translateModuleExtension( 'main.dart.lib', - from: AppUriLayout.frontendServerOnly, - to: AppUriLayout.frontendServerOnly, + from: FrontendServerAssetScheme(), + to: FrontendServerAssetScheme(), ), 'main.dart.lib', ); diff --git a/webdev/CHANGELOG.md b/webdev/CHANGELOG.md index 945f5bebad..a790672bd3 100644 --- a/webdev/CHANGELOG.md +++ b/webdev/CHANGELOG.md @@ -1,7 +1,8 @@ ## 4.1.0 - - Enable hot reload support in Frontend Server + Build Daemon mode. +- Support expression evaluation in Frontend Server + Build Daemon mode via DaemonExpressionCompiler. - Bump `build_web_compilers` constraint to `^4.8.8`. +- Bump `dwds` constraint to `^28.0.0`. ## 4.0.0 diff --git a/webdev/lib/src/serve/webdev_server.dart b/webdev/lib/src/serve/webdev_server.dart index 008adb8570..798980adc3 100644 --- a/webdev/lib/src/serve/webdev_server.dart +++ b/webdev/lib/src/serve/webdev_server.dart @@ -10,12 +10,12 @@ import 'package:build_daemon/client.dart'; import 'package:build_daemon/data/build_status.dart' as daemon; import 'package:dwds/data/build_result.dart'; import 'package:dwds/dwds.dart'; +import 'package:file/local.dart'; import 'package:http/http.dart' as http; import 'package:http/io_client.dart'; import 'package:http_multi_server/http_multi_server.dart'; import 'package:logging/logging.dart'; import 'package:path/path.dart' as p; - import 'package:shelf/shelf.dart'; import 'package:shelf_proxy/shelf_proxy.dart'; @@ -23,7 +23,7 @@ import '../command/configuration.dart'; import '../util.dart'; import 'chrome.dart'; import 'handlers/favicon_handler.dart'; -import 'utils.dart' show findPackageConfigFilePath; +import 'utils.dart' show findPackageConfigFilePath, findPackageConfigUri; Logger _logger = Logger('WebDevServer'); @@ -252,14 +252,22 @@ class WebDevServer { canaryFeatures: options.configuration.canaryFeatures, isFlutterApp: false, experiments: options.configuration.experiments, + useDebuggerModuleNames: false, ); final LoadStrategy loadStrategy; if (options.configuration.webHotReload && !options.configuration.release) { + final frontendServerFileSystem = const LocalFileSystem(); + final packageUriMapper = await PathResolver.create( + frontendServerFileSystem, + findPackageConfigUri()!, + useDebuggerModuleNames: false, + ); loadStrategy = FrontendServerBuildDaemonStrategyProvider( options.configuration.reload, assetReader, + packageUriMapper, () async => {}, buildSettings, packageConfigPath: findPackageConfigFilePath(), From c3806891302040fab3d04a3cc223b14bd5870d53 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Tue, 28 Jul 2026 15:25:15 -0700 Subject: [PATCH 075/134] Splitting path resolvers --- dwds/CHANGELOG.md | 2 +- dwds/lib/asset_reader.dart | 7 +++- dwds/lib/dwds.dart | 8 +++- dwds/lib/src/readers/asset_reader.dart | 42 ++++++++++++------- dwds/test/integration/fixtures/context.dart | 4 +- .../integration/package_uri_mapper_test.dart | 18 +++++--- webdev/lib/src/serve/webdev_server.dart | 2 +- 7 files changed, 57 insertions(+), 26 deletions(-) diff --git a/dwds/CHANGELOG.md b/dwds/CHANGELOG.md index fb5f7112d9..48528615d4 100644 --- a/dwds/CHANGELOG.md +++ b/dwds/CHANGELOG.md @@ -1,5 +1,5 @@ ## 28.0.0 -- **Breaking Change**: Removed `PackageUriMapper` in favor of **`PathResolver`**. +- **Breaking Change**: Removed `PackageUriMapper` in favor of **`PathResolver`** - with `BuildRunnerPathResolver`, `FrontendServerPathResolver`, and `FlutterPathResolver` impls. - **Breaking Change**: **`LoadStrategy`** implementors must now implement the **`assetScheme`** getter to define asset naming conventions. - Introduce **`MetadataLoader`** and **`AssetScheme`** to generalize metadata loading and asset naming schemes. - Export **`MetadataLoader`**, **`MergedMetadataLoader`**, **`ModuleMetadata`**, and **`LibraryMetadata`** to enable custom metadata loading implementations. diff --git a/dwds/lib/asset_reader.dart b/dwds/lib/asset_reader.dart index 98b6ca246b..d9c471903a 100644 --- a/dwds/lib/asset_reader.dart +++ b/dwds/lib/asset_reader.dart @@ -3,4 +3,9 @@ // BSD-style license that can be found in the LICENSE file. export 'src/readers/asset_reader.dart' - show AssetReader, PathResolver, stripLeadingSlashes; + show + AssetReader, + BuildRunnerPathResolver, + FrontendServerPathResolver, + PathResolver, + stripLeadingSlashes; diff --git a/dwds/lib/dwds.dart b/dwds/lib/dwds.dart index 27a34952bb..0f40af84e2 100644 --- a/dwds/lib/dwds.dart +++ b/dwds/lib/dwds.dart @@ -42,7 +42,13 @@ export 'src/loaders/strategy.dart' LoadStrategy, ReloadConfiguration, ReloadableLoadStrategy; -export 'src/readers/asset_reader.dart' show AssetReader, PathResolver; +export 'src/readers/asset_reader.dart' + show + AssetReader, + BuildRunnerPathResolver, + FlutterPathResolver, + FrontendServerPathResolver, + PathResolver; export 'src/readers/frontend_server_asset_reader.dart' show FrontendServerAssetReader; export 'src/readers/proxy_server_asset_reader.dart' show ProxyServerAssetReader; diff --git a/dwds/lib/src/readers/asset_reader.dart b/dwds/lib/src/readers/asset_reader.dart index 6c6dab5601..05191c936c 100644 --- a/dwds/lib/src/readers/asset_reader.dart +++ b/dwds/lib/src/readers/asset_reader.dart @@ -41,20 +41,6 @@ abstract class AssetReader { } abstract class PathResolver { - static Future create( - FileSystem fileSystem, - Uri packageConfigFile, { - bool useDebuggerModuleNames = false, - }) async { - final packageConfig = await loadPackageConfig( - fileSystem.file(packageConfigFile), - ); - return BuildRunnerPathResolver( - packageConfig: packageConfig, - useDebuggerModuleNames: useDebuggerModuleNames, - ); - } - /// Computes the server path for a given application URL. String? appUriToServerPath(String appUrl, {bool? useDebuggerModuleNames}); @@ -77,6 +63,20 @@ class FrontendServerPathResolver implements PathResolver { final bool useDebuggerModuleNames; final String? packageRoot; + static Future create( + FileSystem fileSystem, + Uri packageConfigFile, { + bool useDebuggerModuleNames = false, + }) async { + final packageConfig = await loadPackageConfig( + fileSystem.file(packageConfigFile), + ); + return FrontendServerPathResolver( + packageConfig: packageConfig, + useDebuggerModuleNames: useDebuggerModuleNames, + ); + } + FrontendServerPathResolver({ this.packageConfig, this.useDebuggerModuleNames = false, @@ -159,6 +159,20 @@ class BuildRunnerPathResolver implements PathResolver { final bool useDebuggerModuleNames; final String? packageRoot; + static Future create( + FileSystem fileSystem, + Uri packageConfigFile, { + bool useDebuggerModuleNames = false, + }) async { + final packageConfig = await loadPackageConfig( + fileSystem.file(packageConfigFile), + ); + return BuildRunnerPathResolver( + packageConfig: packageConfig, + useDebuggerModuleNames: useDebuggerModuleNames, + ); + } + BuildRunnerPathResolver({ this.packageConfig, this.useDebuggerModuleNames = false, diff --git a/dwds/test/integration/fixtures/context.dart b/dwds/test/integration/fixtures/context.dart index 69ec915b7d..d8ae35f27c 100644 --- a/dwds/test/integration/fixtures/context.dart +++ b/dwds/test/integration/fixtures/context.dart @@ -403,7 +403,7 @@ class TestContext { p.join(project.webAssetsPath, project.dartEntryFileName), ); frontendServerFileSystem = const LocalFileSystem(); - final packageUriMapper = await PathResolver.create( + final packageUriMapper = await FrontendServerPathResolver.create( frontendServerFileSystem, project.packageConfigFile, useDebuggerModuleNames: testSettings.useDebuggerModuleNames, @@ -730,7 +730,7 @@ class TestContext { ); } frontendServerFileSystem = const LocalFileSystem(); - final packageUriMapper = await PathResolver.create( + final packageUriMapper = await BuildRunnerPathResolver.create( frontendServerFileSystem, project.packageConfigFile, useDebuggerModuleNames: testSettings.useDebuggerModuleNames, diff --git a/dwds/test/integration/package_uri_mapper_test.dart b/dwds/test/integration/package_uri_mapper_test.dart index 223f885d78..a23fdfff9f 100644 --- a/dwds/test/integration/package_uri_mapper_test.dart +++ b/dwds/test/integration/package_uri_mapper_test.dart @@ -30,7 +30,7 @@ void main() { final serverPath = useDebuggerModuleNames ? 'packages/${project.packageDirectory}/lib/test_library.dart' - : 'packages/${project.packageName}/test_library.dart'; + : '/packages/${project.packageName}/test_library.dart'; final resolvedPath = '${project.packageDirectory}/lib/test_library.dart'; @@ -52,11 +52,17 @@ void main() { ), ); - packageUriMapper = await PathResolver.create( - fileSystem, - packageConfigFile, - useDebuggerModuleNames: useDebuggerModuleNames, - ); + packageUriMapper = useDebuggerModuleNames + ? await FrontendServerPathResolver.create( + fileSystem, + packageConfigFile, + useDebuggerModuleNames: useDebuggerModuleNames, + ) + : await BuildRunnerPathResolver.create( + fileSystem, + packageConfigFile, + useDebuggerModuleNames: useDebuggerModuleNames, + ); }); tearDownAll(project.tearDown); diff --git a/webdev/lib/src/serve/webdev_server.dart b/webdev/lib/src/serve/webdev_server.dart index 798980adc3..fdb8b6b956 100644 --- a/webdev/lib/src/serve/webdev_server.dart +++ b/webdev/lib/src/serve/webdev_server.dart @@ -259,7 +259,7 @@ class WebDevServer { if (options.configuration.webHotReload && !options.configuration.release) { final frontendServerFileSystem = const LocalFileSystem(); - final packageUriMapper = await PathResolver.create( + final packageUriMapper = await BuildRunnerPathResolver.create( frontendServerFileSystem, findPackageConfigUri()!, useDebuggerModuleNames: false, From 251b9f1c78733e2ada8e04963f9d553c79b52878 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Tue, 28 Jul 2026 15:41:58 -0700 Subject: [PATCH 076/134] Disabling symlinks to avoid race condition --- dwds/test/integration/fixtures/context.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dwds/test/integration/fixtures/context.dart b/dwds/test/integration/fixtures/context.dart index d8ae35f27c..5a17aab498 100644 --- a/dwds/test/integration/fixtures/context.dart +++ b/dwds/test/integration/fixtures/context.dart @@ -700,7 +700,7 @@ class TestContext { ..outputLocation = OutputLocation( (o) => o ..output = outputDir.path - ..useSymlinks = true + ..useSymlinks = false ..hoist = true, ).toBuilder() ..reportChangedAssets = true, From 085e16a05c9ed78bebe5df32d1b6e114b3e92751 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Tue, 28 Jul 2026 15:56:49 -0700 Subject: [PATCH 077/134] Updating test timeout --- dwds/test/integration/hot_restart_breakpoints_common.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dwds/test/integration/hot_restart_breakpoints_common.dart b/dwds/test/integration/hot_restart_breakpoints_common.dart index 5732563eb4..18b40c18ab 100644 --- a/dwds/test/integration/hot_restart_breakpoints_common.dart +++ b/dwds/test/integration/hot_restart_breakpoints_common.dart @@ -404,7 +404,7 @@ void runTests({ expect(consoleLogs.contains(newGenLog), false); await resumeAndWaitForLog(newGenLog); }); - }); + }, timeout: const Timeout.factor(4)); } TypeMatcher _hasKind(String kind) => From 447103610c87e020bff0a29099e965bed6512122 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Tue, 28 Jul 2026 16:14:51 -0700 Subject: [PATCH 078/134] Pulling sdk out --- frontend_server_client/lib/src/frontend_server_client.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend_server_client/lib/src/frontend_server_client.dart b/frontend_server_client/lib/src/frontend_server_client.dart index 139f4ae990..019a0a6f9d 100644 --- a/frontend_server_client/lib/src/frontend_server_client.dart +++ b/frontend_server_client/lib/src/frontend_server_client.dart @@ -71,9 +71,10 @@ class FrontendServerClient { List additionalSources = const [], String? nativeAssets, }) async { + final sdk = sdkRoot ?? sdkDir; final commonArguments = [ '--sdk-root', - sdkRoot ?? sdkDir, + sdk, '--platform=$platformKernel', '--target=$target', if (target == 'dartdevc') @@ -95,7 +96,6 @@ class FrontendServerClient { if (nativeAssets != null) ...['--native-assets', nativeAssets], ]; - final sdk = sdkRoot ?? sdkDir; final dartExecutable = p.join( sdk, 'bin', From c699532b79dfae0e092ac6cbb0f1e6cf90b3a46f Mon Sep 17 00:00:00 2001 From: MarkZ Date: Wed, 29 Jul 2026 17:07:20 -0700 Subject: [PATCH 079/134] Unifying metadata and asset loader --- dwds/lib/dwds.dart | 2 - dwds/lib/src/debugging/metadata/loader.dart | 61 ----------------- dwds/lib/src/debugging/metadata/provider.dart | 7 +- dwds/lib/src/loaders/asset_scheme.dart | 20 ++++++ dwds/lib/src/loaders/ddc.dart | 1 - dwds/lib/src/loaders/ddc_library_bundle.dart | 1 - dwds/lib/src/loaders/require.dart | 1 - dwds/lib/src/loaders/strategy.dart | 16 +---- dwds/lib/src/readers/asset_reader.dart | 56 +++++++++++++-- .../readers/frontend_server_asset_reader.dart | 68 ++++++++++--------- .../readers/proxy_server_asset_reader.dart | 38 +++++++---- .../frontend_server_common/asset_server.dart | 42 ++++++------ dwds/test/integration/fixtures/context.dart | 22 +++--- dwds/test/integration/fixtures/fakes.dart | 30 +++++--- dwds/test/integration/metadata_test.dart | 12 ++-- .../proxy_server_asset_reader_common.dart | 4 +- 16 files changed, 193 insertions(+), 188 deletions(-) delete mode 100644 dwds/lib/src/debugging/metadata/loader.dart diff --git a/dwds/lib/dwds.dart b/dwds/lib/dwds.dart index 0f40af84e2..f085a541be 100644 --- a/dwds/lib/dwds.dart +++ b/dwds/lib/dwds.dart @@ -13,8 +13,6 @@ export 'src/config/tool_configuration.dart' UrlEncoder; export 'src/connections/app_connection.dart' show AppConnection; export 'src/connections/debug_connection.dart' show DebugConnection; -export 'src/debugging/metadata/loader.dart' - show MergedMetadataLoader, MetadataLoader; export 'src/debugging/metadata/module_metadata.dart' show LibraryMetadata, ModuleMetadata; export 'src/debugging/metadata/provider.dart' diff --git a/dwds/lib/src/debugging/metadata/loader.dart b/dwds/lib/src/debugging/metadata/loader.dart deleted file mode 100644 index fda4dade32..0000000000 --- a/dwds/lib/src/debugging/metadata/loader.dart +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -import 'dart:convert'; - -import 'package:dwds/src/debugging/metadata/module_metadata.dart'; -import 'package:dwds/src/readers/asset_reader.dart'; -import 'package:logging/logging.dart'; - -/// Interface for fetching and parsing debug metadata emitted by the compiler. -abstract class MetadataLoader { - /// Loads debug metadata associated with the application [entrypoint]. - /// - /// Returns a map of module names to their corresponding [ModuleMetadata]. - Future> loadMetadata(String entrypoint); -} - -/// Metadata loader that reads merged metadata files. -class MergedMetadataLoader implements MetadataLoader { - final AssetReader _assetReader; - final _logger = Logger('MergedMetadataLoader'); - - MergedMetadataLoader(this._assetReader); - - @override - Future> loadMetadata(String entrypoint) async { - final modules = {}; - // The merged metadata resides next to the entrypoint. - // Assume that .bootstrap.js has .ddc_merged_metadata - if (entrypoint.endsWith('.bootstrap.js')) { - _logger.info('Loading debug metadata...'); - final serverPath = entrypoint.replaceAll( - '.bootstrap.js', - '.ddc_merged_metadata', - ); - final merged = await _assetReader.metadataContents(serverPath); - if (merged != null) { - for (final contents in merged.split('\n')) { - try { - if (contents.isEmpty || - contents.startsWith('// intentionally empty:')) { - continue; - } - final moduleJson = json.decode(contents); - final metadata = ModuleMetadata.fromJson( - moduleJson as Map, - ); - final moduleName = metadata.name; - modules[moduleName] = metadata; - _logger.fine('Loaded debug metadata for module: $moduleName'); - } catch (e) { - _logger.warning('Failed to read metadata: $e'); - rethrow; - } - } - } - } - return modules; - } -} diff --git a/dwds/lib/src/debugging/metadata/provider.dart b/dwds/lib/src/debugging/metadata/provider.dart index 930fc631ca..32111006ba 100644 --- a/dwds/lib/src/debugging/metadata/provider.dart +++ b/dwds/lib/src/debugging/metadata/provider.dart @@ -3,14 +3,13 @@ // BSD-style license that can be found in the LICENSE file. import 'package:async/async.dart'; -import 'package:dwds/src/debugging/metadata/loader.dart'; import 'package:dwds/src/debugging/metadata/module_metadata.dart'; import 'package:dwds/src/readers/asset_reader.dart'; import 'package:path/path.dart' as p; /// A provider of metadata in which data is collected through DDC outputs. class MetadataProvider { - final MetadataLoader _metadataLoader; + final AssetReader _assetReader; final String entrypoint; final Set _libraries = {}; final Map _scriptToModule = {}; @@ -62,7 +61,7 @@ class MetadataProvider { 'dart:ui', ]; - MetadataProvider(this.entrypoint, this._metadataLoader); + MetadataProvider(this.entrypoint, this._assetReader); /// A list of all libraries in the Dart application. /// @@ -161,7 +160,7 @@ class MetadataProvider { /// Compute metadata information after reading the metadata contents and /// return a map from module names to their [ModuleMetadata]. Future> _processMetadata() async { - return _metadataLoader.loadMetadata(entrypoint); + return _assetReader.loadMetadata(entrypoint); } /// Process all metadata, including SDK metadata, and compute caches once. diff --git a/dwds/lib/src/loaders/asset_scheme.dart b/dwds/lib/src/loaders/asset_scheme.dart index 881a9cc89e..d4d77f2a31 100644 --- a/dwds/lib/src/loaders/asset_scheme.dart +++ b/dwds/lib/src/loaders/asset_scheme.dart @@ -23,6 +23,14 @@ abstract class AssetScheme { /// File extension for summary dill files. /// (e.g., '.ddc.dill' or '.dart.lib.dill'). String get summaryDillSuffix; + + /// File extension for bootstrap files. + /// (e.g., '.bootstrap.js' or '.dart.bootstrap.js'). + String get bootstrapSuffix; + + /// File extension for merged metadata. + /// (e.g., '.ddc_merged_metadata'). + String get mergedMetadataSuffix; } /// Asset scheme for package:build assets. @@ -41,6 +49,12 @@ class BuildRunnerAssetScheme implements AssetScheme { @override String get summaryDillSuffix => '.ddc.dill'; + + @override + String get bootstrapSuffix => '.dart.bootstrap.js'; + + @override + String get mergedMetadataSuffix => '.ddc_merged_metadata'; } /// Asset scheme for Frontend Server assets. @@ -59,4 +73,10 @@ class FrontendServerAssetScheme implements AssetScheme { @override String get summaryDillSuffix => '.dart.lib.dill'; + + @override + String get bootstrapSuffix => '.bootstrap.js'; + + @override + String get mergedMetadataSuffix => '.ddc_merged_metadata'; } diff --git a/dwds/lib/src/loaders/ddc.dart b/dwds/lib/src/loaders/ddc.dart index a12afba735..6fddc0dd32 100644 --- a/dwds/lib/src/loaders/ddc.dart +++ b/dwds/lib/src/loaders/ddc.dart @@ -149,7 +149,6 @@ class DdcStrategy extends LoadStrategy { this._g3RelativePath, this.assetScheme, { super.packageConfigPath, - super.metadataLoader, }) : super(assetReader); @override diff --git a/dwds/lib/src/loaders/ddc_library_bundle.dart b/dwds/lib/src/loaders/ddc_library_bundle.dart index e00ae3311c..7f2bb61a11 100644 --- a/dwds/lib/src/loaders/ddc_library_bundle.dart +++ b/dwds/lib/src/loaders/ddc_library_bundle.dart @@ -128,7 +128,6 @@ class DdcLibraryBundleStrategy extends LoadStrategy this._g3RelativePath, this.assetScheme, { super.packageConfigPath, - super.metadataLoader, this.reloadedSourcesUri, this.injectScriptLoad = true, }) : super(assetReader); diff --git a/dwds/lib/src/loaders/require.dart b/dwds/lib/src/loaders/require.dart index bc7b302b53..9ce760bcbf 100644 --- a/dwds/lib/src/loaders/require.dart +++ b/dwds/lib/src/loaders/require.dart @@ -142,7 +142,6 @@ class RequireStrategy extends LoadStrategy { this._buildSettings, this.assetScheme, { super.packageConfigPath, - super.metadataLoader, }) : super(assetReader); @override diff --git a/dwds/lib/src/loaders/strategy.dart b/dwds/lib/src/loaders/strategy.dart index 1cfc6d6dcc..60084990f5 100644 --- a/dwds/lib/src/loaders/strategy.dart +++ b/dwds/lib/src/loaders/strategy.dart @@ -6,7 +6,6 @@ import 'dart:io'; import 'dart:typed_data'; import 'package:dwds/src/debugging/dart_runtime_debugger.dart'; -import 'package:dwds/src/debugging/metadata/loader.dart'; import 'package:dwds/src/debugging/metadata/provider.dart'; import 'package:dwds/src/loaders/asset_scheme.dart'; import 'package:dwds/src/readers/asset_reader.dart'; @@ -48,15 +47,12 @@ abstract class LoadStrategy { final AssetReader _assetReader; final String? _packageConfigPath; final _providers = {}; - final MetadataLoader? _metadataLoader; LoadStrategy( this._assetReader, { String? packageConfigPath, - MetadataLoader? metadataLoader, // ignore: prefer_initializing_formals - }) : _metadataLoader = metadataLoader, - _packageConfigPath = packageConfigPath ?? _findPackageConfigFilePath(); + }) : _packageConfigPath = packageConfigPath ?? _findPackageConfigFilePath(); /// The ID for this strategy. /// @@ -77,14 +73,6 @@ abstract class LoadStrategy { /// Asset scheme, which determines file extensions for this strategy. AssetScheme get assetScheme; - /// Loader used to fetch and parse debug metadata for this strategy. - MetadataLoader get metadataLoader => - _metadataLoader ?? _defaultMetadataLoader; - - /// The default metadata loader if none is provided. - MetadataLoader get _defaultMetadataLoader => - MergedMetadataLoader(_assetReader); - /// Returns a snippet of JS code that can be used to load a JS module. /// /// The snippet should be a reference to a function that takes a single @@ -221,7 +209,7 @@ abstract class LoadStrategy { /// Creates and returns a [MetadataProvider] with the given [entrypoint] and /// [reader]. MetadataProvider createProvider(String entrypoint, AssetReader reader) => - MetadataProvider(entrypoint, metadataLoader); + MetadataProvider(entrypoint, reader); /// Initializes a [MetadataProvider] for the application located at the /// provided [entrypoint]. diff --git a/dwds/lib/src/readers/asset_reader.dart b/dwds/lib/src/readers/asset_reader.dart index 05191c936c..56e163d1da 100644 --- a/dwds/lib/src/readers/asset_reader.dart +++ b/dwds/lib/src/readers/asset_reader.dart @@ -2,6 +2,10 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +import 'dart:convert'; + +import 'package:dwds/src/debugging/metadata/module_metadata.dart'; +import 'package:dwds/src/loaders/asset_scheme.dart'; import 'package:dwds/src/utilities/shared.dart'; import 'package:dwds/src/utilities/web_path_translator.dart'; import 'package:file/file.dart'; @@ -24,20 +28,58 @@ abstract class AssetReader { /// ``` String get basePath; - /// Returns the contents for a source map at the provided server path, or - /// null if the resource does not exist. - Future sourceMapContents(String serverPath); + /// The asset scheme used by this reader. + AssetScheme get assetScheme; - /// Returns the contents for a dart source at the provided server path, or - /// null if the resource does not exist. + /// Returns the contents of a Dart source file. Future dartSourceContents(String serverPath); - /// Returns the contents for the merged metadata output at the provided path, - /// or null if the resource does not exist. + /// Returns the contents of a source map file. + Future sourceMapContents(String serverPath); + + /// Returns the contents of a metadata file. Future metadataContents(String serverPath); /// Closes connections Future close(); + + /// Loads debug metadata associated with the application [entrypoint]. + /// + /// Returns a map of module names to their corresponding [ModuleMetadata]. + Future> loadMetadata(String entrypoint) async { + final modules = {}; + final logger = Logger('AssetReader'); + // The merged metadata resides next to the entrypoint. + final bootstrapSuffix = assetScheme.bootstrapSuffix; + if (entrypoint.endsWith(bootstrapSuffix)) { + logger.info('Loading debug metadata...'); + final serverPath = entrypoint.replaceAll( + bootstrapSuffix, + assetScheme.mergedMetadataSuffix, + ); + final merged = await metadataContents(serverPath); + if (merged != null) { + for (final contents in merged.split('\n')) { + try { + if (contents.isEmpty || + contents.startsWith('// intentionally empty:')) { + continue; + } + final moduleJson = json.decode(contents); + final metadata = ModuleMetadata.fromJson( + moduleJson as Map, + ); + final moduleName = metadata.name; + modules[moduleName] = metadata; + logger.fine('Loaded debug metadata for module: $moduleName'); + } catch (e) { + logger.warning('Failed to parse metadata: $e'); + } + } + } + } + return modules; + } } abstract class PathResolver { diff --git a/dwds/lib/src/readers/frontend_server_asset_reader.dart b/dwds/lib/src/readers/frontend_server_asset_reader.dart index d41490d5ef..56a51f16ac 100644 --- a/dwds/lib/src/readers/frontend_server_asset_reader.dart +++ b/dwds/lib/src/readers/frontend_server_asset_reader.dart @@ -5,6 +5,7 @@ import 'dart:convert'; import 'dart:io'; +import 'package:dwds/src/loaders/asset_scheme.dart'; import 'package:dwds/src/readers/asset_reader.dart'; import 'package:logging/logging.dart'; import 'package:package_config/package_config.dart'; @@ -12,7 +13,7 @@ import 'package:path/path.dart' as p; /// A reader for Dart sources and related source maps provided by the Frontend /// Server. -class FrontendServerAssetReader implements AssetReader { +class FrontendServerAssetReader extends AssetReader { final _logger = Logger('FrontendServerAssetReader'); final File _mapOriginal; final File _mapIncremental; @@ -21,6 +22,8 @@ class FrontendServerAssetReader implements AssetReader { final String _packageRoot; final Future _packageConfig; final String _basePath; + final AssetScheme _assetScheme; + final PathResolver _pathResolver; /// Map of Dart module server path to source map contents. final _mapContents = {}; @@ -42,8 +45,12 @@ class FrontendServerAssetReader implements AssetReader { required String outputPath, required String packageRoot, String? basePath, + AssetScheme? assetScheme, + PathResolver? pathResolver, }) : _packageRoot = packageRoot, _basePath = basePath ?? '', + _assetScheme = assetScheme ?? FrontendServerAssetScheme(), + _pathResolver = pathResolver ?? FrontendServerPathResolver(), _mapOriginal = File('$outputPath.map'), _mapIncremental = File('$outputPath.incremental.map'), _jsonOriginal = File('$outputPath.json'), @@ -57,27 +64,26 @@ class FrontendServerAssetReader implements AssetReader { @override String get basePath => _basePath; + @override + AssetScheme get assetScheme => _assetScheme; + @override Future dartSourceContents(String serverPath) async { serverPath = serverPath.replaceAll('\\', '/'); - if (serverPath.endsWith('.dart')) { - final packageConfig = await _packageConfig; - var strippedPath = _stripBasePath(serverPath); - Uri? fileUri; - if (strippedPath.startsWith('packages/')) { - final packagePath = FrontendServerPathResolver().serverPathToAppUri( - strippedPath, - ); - if (packagePath != null) { - fileUri = packageConfig.resolve(Uri.parse(packagePath)); - } - } else { - fileUri = p.toUri(p.join(_packageRoot, strippedPath)); - } - if (fileUri != null) { - final source = File(fileUri.toFilePath()); - if (source.existsSync()) return source.readAsString(); + final packageConfig = await _packageConfig; + var strippedPath = _stripBasePath(serverPath); + Uri? fileUri; + if (strippedPath.startsWith('packages/')) { + final packagePath = _pathResolver.serverPathToAppUri(strippedPath); + if (packagePath != null) { + fileUri = packageConfig.resolve(Uri.parse(packagePath)); } + } else { + fileUri = p.toUri(p.join(_packageRoot, strippedPath)); + } + if (fileUri != null) { + final source = File(fileUri.toFilePath()); + if (source.existsSync()) return source.readAsString(); } _logger.severe('Cannot find source contents for $serverPath'); return null; @@ -86,19 +92,23 @@ class FrontendServerAssetReader implements AssetReader { @override Future sourceMapContents(String serverPath) async { serverPath = serverPath.replaceAll('\\', '/'); - if (serverPath.endsWith('lib.js.map')) { - var strippedPath = _stripBasePath(serverPath); - if (!strippedPath.startsWith('/')) strippedPath = '/$strippedPath'; - // Strip the .map, sources are looked up by their js path. - strippedPath = p.withoutExtension(strippedPath); - if (_mapContents.containsKey(strippedPath)) { - return _mapContents[strippedPath]; - } + var strippedPath = _stripBasePath(serverPath); + if (!strippedPath.startsWith('/')) strippedPath = '/$strippedPath'; + // Strip the .map, sources are looked up by their js path. + strippedPath = p.withoutExtension(strippedPath); + if (_mapContents.containsKey(strippedPath)) { + return _mapContents[strippedPath]; } _logger.severe('Cannot find source map contents for $serverPath'); return null; } + @override + Future metadataContents(String serverPath) { + // TODO(grouma) - Implement the merged metadata reader. + throw UnimplementedError(); + } + /// Updates the internal caches by reading the Frontend Server output files. /// /// Will only read the incremental files on additional calls. @@ -129,12 +139,6 @@ class FrontendServerAssetReader implements AssetReader { } } - @override - Future metadataContents(String serverPath) { - // TODO(grouma) - Implement the merged metadata reader. - throw UnimplementedError(); - } - /// Strips the [_basePath] prefix from the [serverPath]. /// /// Example (if [_basePath] is 'foo/bar'): diff --git a/dwds/lib/src/readers/proxy_server_asset_reader.dart b/dwds/lib/src/readers/proxy_server_asset_reader.dart index 4225ba9bd9..d169208ddd 100644 --- a/dwds/lib/src/readers/proxy_server_asset_reader.dart +++ b/dwds/lib/src/readers/proxy_server_asset_reader.dart @@ -5,6 +5,7 @@ import 'dart:convert'; import 'dart:io'; +import 'package:dwds/src/loaders/asset_scheme.dart'; import 'package:dwds/src/readers/asset_reader.dart'; import 'package:http/http.dart' as http; import 'package:http/io_client.dart'; @@ -13,19 +14,21 @@ import 'package:shelf/shelf.dart'; import 'package:shelf_proxy/shelf_proxy.dart'; /// A reader for resources provided by a proxy server. -class ProxyServerAssetReader implements AssetReader { +class ProxyServerAssetReader extends AssetReader { final _logger = Logger('ProxyServerAssetReader'); final Handler _handler; final http.Client? _client; + final AssetScheme _assetScheme; - ProxyServerAssetReader._(this._handler, this._client); + ProxyServerAssetReader._(this._handler, this._client, this._assetScheme); factory ProxyServerAssetReader( int assetServerPort, { String root = '', String host = 'localhost', bool isHttps = false, + AssetScheme? assetScheme, }) { final scheme = isHttps ? 'https://' : 'http://'; final inner = HttpClient() @@ -38,34 +41,35 @@ class ProxyServerAssetReader implements AssetReader { var url = '$scheme$host:$assetServerPort/'; if (root.isNotEmpty) url += '$root/'; final handler = proxyHandler(url, client: client); - return ProxyServerAssetReader._(handler, client); + return ProxyServerAssetReader._( + handler, + client, + assetScheme ?? BuildRunnerAssetScheme(), + ); } - ProxyServerAssetReader.fromHandler(this._handler) : _client = null; + ProxyServerAssetReader.fromHandler(this._handler, {AssetScheme? assetScheme}) + : _client = null, + _assetScheme = assetScheme ?? BuildRunnerAssetScheme(); @override String get basePath => ''; @override - Future dartSourceContents(String serverPath) => - _readResource(serverPath); + AssetScheme get assetScheme => _assetScheme; - @override - Future sourceMapContents(String serverPath) => - _readResource(serverPath); - - Future _readResource(String path) async { + Future _readResource(String serverPath) async { // Handlers expect a fully formed HTML URI. The actual hostname and port // does not matter. final request = Request( 'GET', - Uri.parse('http://foo:0000/$path'), + Uri.parse('http://foo:0000/$serverPath'), ).change(headers: {'requested-by': 'DWDS'}); final response = await _handler(request); if (response.statusCode != HttpStatus.ok) { _logger.warning(''' - Failed to load asset at path: $path. + Failed to load asset at path: $serverPath. Status code: ${response.statusCode} @@ -78,6 +82,14 @@ class ProxyServerAssetReader implements AssetReader { } } + @override + Future dartSourceContents(String serverPath) => + _readResource(serverPath); + + @override + Future sourceMapContents(String serverPath) => + _readResource(serverPath); + @override Future metadataContents(String serverPath) => _readResource(serverPath); diff --git a/dwds/test/frontend_server_common/asset_server.dart b/dwds/test/frontend_server_common/asset_server.dart index e0dc961734..eeb39ce909 100644 --- a/dwds/test/frontend_server_common/asset_server.dart +++ b/dwds/test/frontend_server_common/asset_server.dart @@ -11,13 +11,14 @@ import 'dart:typed_data'; import 'package:dwds/asset_reader.dart'; import 'package:dwds/config.dart'; +import 'package:dwds/src/loaders/asset_scheme.dart'; import 'package:dwds_test_common/test_sdk_layout.dart'; import 'package:file/file.dart'; import 'package:logging/logging.dart'; import 'package:mime/mime.dart' as mime; import 'package:shelf/shelf.dart' as shelf; -class TestAssetServer implements AssetReader { +class TestAssetServer extends AssetReader { late final String _basePath; final String index; @@ -36,6 +37,7 @@ class TestAssetServer implements AssetReader { final PathResolver _packageUriMapper; final InternetAddress internetAddress; final TestSdkLayout _sdkLayout; + final AssetScheme _assetScheme; TestAssetServer( this.index, @@ -44,14 +46,18 @@ class TestAssetServer implements AssetReader { this.internetAddress, this._projectDirectory, this._fileSystem, - this._sdkLayout, - ) { + this._sdkLayout, { + AssetScheme? assetScheme, + }) : _assetScheme = assetScheme ?? FrontendServerAssetScheme() { _basePath = _parseBasePathFromIndexHtml(index); } @override String get basePath => _basePath; + @override + AssetScheme get assetScheme => _assetScheme; + bool hasFile(String path) => _files.containsKey(path); Uint8List getFile(String path) => _files[path]!; @@ -329,11 +335,10 @@ class TestAssetServer implements AssetReader { @override Future dartSourceContents(String serverPath) async { final stripped = _stripBasePath(serverPath, basePath); - if (stripped != null) { - final result = _resolveDartFile(stripped); - if (result.existsSync()) { - return result.readAsString(); - } + if (stripped == null) return null; + final result = _resolveDartFile(stripped); + if (result.existsSync()) { + return result.readAsString(); } _logger.severe('Source not found: $serverPath'); return null; @@ -342,10 +347,9 @@ class TestAssetServer implements AssetReader { @override Future sourceMapContents(String serverPath) async { final stripped = _stripBasePath(serverPath, basePath); - if (stripped != null) { - if (hasSourceMap(stripped)) { - return utf8.decode(getSourceMap(stripped)); - } + if (stripped == null) return null; + if (hasSourceMap(stripped)) { + return utf8.decode(getSourceMap(stripped)); } _logger.severe('Source map not found: $serverPath'); return null; @@ -354,15 +358,13 @@ class TestAssetServer implements AssetReader { @override Future metadataContents(String serverPath) async { final stripped = _stripBasePath(serverPath, basePath); - if (stripped != null) { - if (stripped.endsWith('.ddc_merged_metadata')) { - return _mergedMetadata; - } - if (hasMetadata(stripped)) { - return utf8.decode(getMetadata(stripped)); - } + if (stripped == null) return null; + if (stripped.endsWith('.ddc_merged_metadata')) { + return _mergedMetadata; + } + if (hasMetadata(stripped)) { + return utf8.decode(getMetadata(stripped)); } - _logger.severe('Metadata not found: $serverPath'); return null; } diff --git a/dwds/test/integration/fixtures/context.dart b/dwds/test/integration/fixtures/context.dart index 5a17aab498..7d179023f6 100644 --- a/dwds/test/integration/fixtures/context.dart +++ b/dwds/test/integration/fixtures/context.dart @@ -515,20 +515,16 @@ class TestContext { if (testSettings.enableExpressionEvaluation) { _logger.info('Starting Frontend Server Manager'); final sdkDir = p.dirname(p.dirname(sdkLayout.dartPath)); - final buildDir = Directory( - p.join(project.absolutePackageDirectory, '.dart_tool', 'build'), - ); - if (buildDir.existsSync()) { - buildDir.deleteSync(recursive: true); - } final testScratchSpaceDir = Directory( p.join( project.absolutePackageDirectory, '.dart_tool', - 'build', 'test_scratch_space', ), ); + if (testScratchSpaceDir.existsSync()) { + testScratchSpaceDir.deleteSync(recursive: true); + } testScratchSpaceDir.createSync(recursive: true); // Build daemon requires a package config inside its scratch @@ -568,10 +564,11 @@ class TestContext { } packagesFile.writeAsStringSync(jsonEncode(originalJson)); - options.add( - '--define=build_web_compilers:ddc=scratch-space-dir=' - '${testScratchSpaceDir.path}', - ); + options.addAll([ + '--define', + 'build_web_compilers|ddc=scratch-space-dir=' + '${testScratchSpaceDir.path}', + ]); final fesSnapshot = p.join( project.absolutePackageDirectory, '.dart_tool', @@ -951,7 +948,8 @@ class TestContext { final lines = result.stdout.toString().split('\n'); final isStillRunning = lines.any( (line) => - line.contains('build.dart.aot') && line.contains(targetPath), + (line.contains('build_runner') || line.contains('build.dart')) && + line.contains(targetPath), ); if (!isStillRunning) break; await Future.delayed(const Duration(milliseconds: 100)); diff --git a/dwds/test/integration/fixtures/fakes.dart b/dwds/test/integration/fixtures/fakes.dart index 38f0296e9f..de8c70fc57 100644 --- a/dwds/test/integration/fixtures/fakes.dart +++ b/dwds/test/integration/fixtures/fakes.dart @@ -427,28 +427,38 @@ class FakeStrategy extends LoadStrategy { throw UnimplementedError(); } -class FakeAssetReader implements AssetReader { +class FakeAssetReader extends AssetReader { String? metadata; - final String? _dartSource; - final String? _sourceMap; - FakeAssetReader({this.metadata, this._dartSource, this._sourceMap}); + final String? dartSource; + final String? sourceMap; + final AssetScheme _assetScheme; + + FakeAssetReader({ + this.metadata, + this.dartSource, + this.sourceMap, + AssetScheme? assetScheme, + }) : _assetScheme = assetScheme ?? FrontendServerAssetScheme(); @override String get basePath => ''; @override - Future dartSourceContents(String serverPath) { - return _throwUnimplementedOrReturnContents(_dartSource); + AssetScheme get assetScheme => _assetScheme; + + @override + Future dartSourceContents(String serverPath) async { + return _throwUnimplementedOrReturnContents(dartSource); } @override - Future metadataContents(String serverPath) { - return _throwUnimplementedOrReturnContents(metadata); + Future sourceMapContents(String serverPath) async { + return _throwUnimplementedOrReturnContents(sourceMap); } @override - Future sourceMapContents(String serverPath) { - return _throwUnimplementedOrReturnContents(_sourceMap); + Future metadataContents(String serverPath) async { + return _throwUnimplementedOrReturnContents(metadata); } @override diff --git a/dwds/test/integration/metadata_test.dart b/dwds/test/integration/metadata_test.dart index 430f04d166..50d12c8e1d 100644 --- a/dwds/test/integration/metadata_test.dart +++ b/dwds/test/integration/metadata_test.dart @@ -7,7 +7,6 @@ library; import 'dart:convert'; -import 'package:dwds/src/debugging/metadata/loader.dart'; import 'package:dwds/src/debugging/metadata/module_metadata.dart'; import 'package:dwds/src/debugging/metadata/provider.dart'; import 'package:test/test.dart'; @@ -41,7 +40,7 @@ void main() { test('can parse metadata with empty sources', () async { final provider = MetadataProvider( 'foo.bootstrap.js', - MergedMetadataLoader(FakeAssetReader(metadata: _emptySourceMetadata)), + FakeAssetReader(metadata: _emptySourceMetadata), ); expect( await provider.libraries, @@ -52,7 +51,7 @@ void main() { test('throws on metadata with absolute import uris', () async { final provider = MetadataProvider( 'foo.bootstrap.js', - MergedMetadataLoader(FakeAssetReader(metadata: _fileUriMetadata)), + FakeAssetReader(metadata: _fileUriMetadata), ); await expectLater( provider.libraries, @@ -65,7 +64,7 @@ void main() { () async { final provider = MetadataProvider( 'foo.bootstrap.js', - MergedMetadataLoader(FakeAssetReader(metadata: _emptySourceMetadata)), + FakeAssetReader(metadata: _emptySourceMetadata), ); final modulePath = 'foo/web/main.ddc.js'; final moduleName = 'web/main'; @@ -211,10 +210,7 @@ void main() { final assetReader = FakeAssetReader( metadata: createMetadataContents(moduleToLibraries, libraryToParts), ); - final provider = MetadataProvider( - 'foo.bootstrap.js', - MergedMetadataLoader(assetReader), - ); + final provider = MetadataProvider('foo.bootstrap.js', assetReader); await validateProvider(provider, moduleToLibraries, libraryToParts); const newModuleToLibraries = >{ diff --git a/dwds/test/integration/readers/proxy_server_asset_reader_common.dart b/dwds/test/integration/readers/proxy_server_asset_reader_common.dart index b1b04f7930..0818f875cd 100644 --- a/dwds/test/integration/readers/proxy_server_asset_reader_common.dart +++ b/dwds/test/integration/readers/proxy_server_asset_reader_common.dart @@ -42,14 +42,14 @@ void testAll({required TestSdkConfigurationProvider provider}) { }); test('can read source maps', () async { - final result = await assetReader.dartSourceContents( + final result = await assetReader.sourceMapContents( 'hello_world/main.ddc.js.map', ); expect(result, isNotNull); }); test('returns null if the source map path does not exist', () async { - final result = await assetReader.dartSourceContents( + final result = await assetReader.sourceMapContents( 'hello_world/foo.ddc.js.map', ); expect(result, isNull); From 3459043d7727833583abc996efd5e1b26c2a9f24 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Wed, 29 Jul 2026 17:18:56 -0700 Subject: [PATCH 080/134] Cleaning up webdev_server.dart --- webdev/lib/src/serve/webdev_server.dart | 164 +++++++++++------------- 1 file changed, 76 insertions(+), 88 deletions(-) diff --git a/webdev/lib/src/serve/webdev_server.dart b/webdev/lib/src/serve/webdev_server.dart index fdb8b6b956..08a8853ae8 100644 --- a/webdev/lib/src/serve/webdev_server.dart +++ b/webdev/lib/src/serve/webdev_server.dart @@ -175,16 +175,19 @@ class WebDevServer { // Clear reloaded sources for the new build results. reloadedSources.clear(); if (options.configuration.usesDdcLibraryBundle) { - results.changedAssets?.forEach((uri) { - if (uri.path.endsWith(jsLibraryBundleExtension)) { - final reloadedSource = { - 'src': ddcUriToSourceUrl(basePath, options.target, uri), - 'module': ddcUriToLibraryId(uri), - 'libraries': [ddcUriToLibraryId(uri)], - }; - reloadedSources.add(reloadedSource); + final changedAssets = results.changedAssets; + if (changedAssets != null) { + for (final uri in changedAssets) { + if (uri.path.endsWith(jsLibraryBundleExtension)) { + final reloadedSource = { + 'src': ddcUriToSourceUrl(basePath, options.target, uri), + 'module': ddcUriToLibraryId(uri), + 'libraries': [ddcUriToLibraryId(uri)], + }; + reloadedSources.add(reloadedSource); + } } - }); + } } final result = results.results.firstWhere( (result) => result.target == options.target, @@ -274,23 +277,21 @@ class WebDevServer { reloadedSourcesUri: Uri.parse('$basePath/$reloadedSourcesFileName'), injectScriptLoad: false, ).strategy; + } else if (options.configuration.moduleFormat == 'ddc') { + loadStrategy = BuildRunnerDdcLibraryBundleStrategyProvider( + options.configuration.reload, + assetReader, + buildSettings, + packageConfigPath: findPackageConfigFilePath(), + reloadedSourcesUri: Uri.parse('$basePath/$reloadedSourcesFileName'), + ).strategy; } else { - if (options.configuration.moduleFormat == 'ddc') { - loadStrategy = BuildRunnerDdcLibraryBundleStrategyProvider( - options.configuration.reload, - assetReader, - buildSettings, - packageConfigPath: findPackageConfigFilePath(), - reloadedSourcesUri: Uri.parse('$basePath/$reloadedSourcesFileName'), - ).strategy; - } else { - loadStrategy = BuildRunnerRequireStrategyProvider( - options.configuration.reload, - assetReader, - buildSettings, - packageConfigPath: findPackageConfigFilePath(), - ).strategy; - } + loadStrategy = BuildRunnerRequireStrategyProvider( + options.configuration.reload, + assetReader, + buildSettings, + packageConfigPath: findPackageConfigFilePath(), + ).strategy; } // Check that we're running from a compiled binary (like webdev.exe) and not @@ -319,30 +320,32 @@ class WebDevServer { !options.configuration.release) { // Use the daemon expression compiler when web hot reload is enabled // to reuse the Frontend Server's in-memory state. - int? cachedFesPort; - - // Try to read port from config file early. - try { - final file = File( - p.join('.dart_tool', 'build', 'fes_manager_config'), - ); - if (await file.exists()) { - final content = await file.readAsString(); - final json = jsonDecode(content) as Map; - cachedFesPort = json['port'] as int?; + Future readFesPort() async { + try { + final file = File( + p.join('.dart_tool', 'build', 'fes_manager_config'), + ); + if (await file.exists()) { + final content = await file.readAsString(); + final json = jsonDecode(content) as Map; + return json['port'] as int?; + } + } catch (e) { + _logger.warning('Failed to read FES config', e); } - } catch (e) { - _logger.warning('Failed to read FES config', e); + return null; } + var cachedFesPort = await readFesPort(); // Pre-initialize the Frontend Server if a port and canonical URI // are found. Required for cached builds. if (cachedFesPort != null && canonicalUri != null) { _logger.info( 'Early initializing Frontend Server with $canonicalUri', ); + Socket? socket; try { - final socket = await Socket.connect( + socket = await Socket.connect( InternetAddress.loopbackIPv4, cachedFesPort, ); @@ -359,9 +362,10 @@ class WebDevServer { .transform(const LineSplitter()) .first; _logger.fine('Early initialization response: $responseStr'); - await socket.close(); } catch (e) { _logger.warning('Failed to early initialize FES', e); + } finally { + await socket?.close(); } } @@ -382,38 +386,36 @@ class WebDevServer { .first; final compileResult = jsonDecode(responseStr); - if (compileResult is Map) { - if (compileResult.containsKey('error')) { - return { - 'result': compileResult['error'] as String, - 'isError': true, - }; - } - final errorCount = compileResult['errorCount'] as int?; - final expressionData = - compileResult['expressionData'] as String?; - - if (errorCount != null && errorCount > 0) { - return { - 'result': - compileResult['errorMessage'] as String? ?? - 'Unknown error', - 'isError': true, - }; - } - - if (expressionData != null) { - final decodedResult = utf8.decode( - base64.decode(expressionData), - ); - return {'result': decodedResult, 'isError': false}; - } + if (compileResult is! Map) { + return { + 'result': + 'Unexpected response format from FES. ' + 'Expected a Map but got: $compileResult', + 'isError': true, + }; } - return { - 'result': 'Failed to read evaluation result', - 'isError': true, - }; + final error = compileResult['error'] as String?; + final errorCount = compileResult['errorCount'] as int?; + final errorMessage = compileResult['errorMessage'] as String?; + if (error != null || (errorCount != null && errorCount > 0)) { + return { + 'result': + 'FES error: ${error ?? errorMessage ?? 'Unknown error'}', + 'isError': true, + }; + } + + final expressionData = compileResult['expressionData'] as String?; + if (expressionData == null) { + return { + 'result': 'Missing expressionData in FES compile result', + 'isError': true, + }; + } + + final decodedResult = utf8.decode(base64.decode(expressionData)); + return {'result': decodedResult, 'isError': false}; } finally { await socket.close(); } @@ -432,24 +434,10 @@ class WebDevServer { } } - try { - final file = File( - p.join('.dart_tool', 'build', 'fes_manager_config'), - ); - if (await file.exists()) { - final content = await file.readAsString(); - final json = jsonDecode(content) as Map; - final port = json['port'] as int?; - if (port != null) { - cachedFesPort = port; - return await sendRequestToFes(port, request); - } - } - } catch (e) { - _logger.warning( - 'Failed to read FES config from .dart_tool/build/fes_manager_config', - e, - ); + final port = await readFesPort(); + if (port != null) { + cachedFesPort = port; + return await sendRequestToFes(port, request); } return { 'result': From 7959e10ac88a14360bd06b58bb6acc7a678b4f88 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 30 Jul 2026 10:48:12 -0700 Subject: [PATCH 081/134] Updating metadata exports and fixing asset schemes --- dwds/CHANGELOG.md | 5 +- dwds/lib/dwds.dart | 2 - dwds/lib/src/debugging/metadata/provider.dart | 36 ++++++++++++- dwds/lib/src/loaders/asset_scheme.dart | 2 +- dwds/lib/src/readers/asset_reader.dart | 50 +++---------------- 5 files changed, 44 insertions(+), 51 deletions(-) diff --git a/dwds/CHANGELOG.md b/dwds/CHANGELOG.md index 48528615d4..320b8e05cf 100644 --- a/dwds/CHANGELOG.md +++ b/dwds/CHANGELOG.md @@ -1,8 +1,7 @@ ## 28.0.0 - **Breaking Change**: Removed `PackageUriMapper` in favor of **`PathResolver`** - with `BuildRunnerPathResolver`, `FrontendServerPathResolver`, and `FlutterPathResolver` impls. -- **Breaking Change**: **`LoadStrategy`** implementors must now implement the **`assetScheme`** getter to define asset naming conventions. -- Introduce **`MetadataLoader`** and **`AssetScheme`** to generalize metadata loading and asset naming schemes. -- Export **`MetadataLoader`**, **`MergedMetadataLoader`**, **`ModuleMetadata`**, and **`LibraryMetadata`** to enable custom metadata loading implementations. +- **Breaking Change**: **`LoadStrategy`** implementors must now implement the **`assetScheme`** getter. +- Introduce **`AssetScheme`** to generalize asset naming schemes. - Add support for Frontend Server + Build Daemon configuration with hot reload via **`FrontendServerBuildDaemonStrategyProvider`**. - Expose **`DaemonExpressionCompiler`** for handling expression compilation directly via `build_daemon`. - **`BuildSettings`** now supports **`useDebuggerModuleNames`** to distinguish between debugger-friendly paths and raw server paths. diff --git a/dwds/lib/dwds.dart b/dwds/lib/dwds.dart index f085a541be..295de36207 100644 --- a/dwds/lib/dwds.dart +++ b/dwds/lib/dwds.dart @@ -13,8 +13,6 @@ export 'src/config/tool_configuration.dart' UrlEncoder; export 'src/connections/app_connection.dart' show AppConnection; export 'src/connections/debug_connection.dart' show DebugConnection; -export 'src/debugging/metadata/module_metadata.dart' - show LibraryMetadata, ModuleMetadata; export 'src/debugging/metadata/provider.dart' show AbsoluteImportUriException, MetadataProvider; export 'src/events.dart' show DwdsEvent; diff --git a/dwds/lib/src/debugging/metadata/provider.dart b/dwds/lib/src/debugging/metadata/provider.dart index 32111006ba..e721351a28 100644 --- a/dwds/lib/src/debugging/metadata/provider.dart +++ b/dwds/lib/src/debugging/metadata/provider.dart @@ -1,10 +1,12 @@ // Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +import 'dart:convert'; import 'package:async/async.dart'; import 'package:dwds/src/debugging/metadata/module_metadata.dart'; import 'package:dwds/src/readers/asset_reader.dart'; +import 'package:logging/logging.dart'; import 'package:path/path.dart' as p; /// A provider of metadata in which data is collected through DDC outputs. @@ -160,7 +162,39 @@ class MetadataProvider { /// Compute metadata information after reading the metadata contents and /// return a map from module names to their [ModuleMetadata]. Future> _processMetadata() async { - return _assetReader.loadMetadata(entrypoint); + final modules = {}; + final logger = Logger('MetadataProvider'); + final assetScheme = _assetReader.assetScheme; + final bootstrapSuffix = assetScheme.bootstrapSuffix; + + if (entrypoint.endsWith(bootstrapSuffix)) { + logger.info('Loading debug metadata...'); + final serverPath = entrypoint.replaceAll( + bootstrapSuffix, + assetScheme.mergedMetadataSuffix, + ); + final merged = await _assetReader.metadataContents(serverPath); + if (merged != null) { + for (final contents in merged.split('\n')) { + try { + if (contents.isEmpty || + contents.startsWith('// intentionally empty:')) { + continue; + } + final moduleJson = json.decode(contents); + final metadata = ModuleMetadata.fromJson( + moduleJson as Map, + ); + final moduleName = metadata.name; + modules[moduleName] = metadata; + logger.fine('Loaded debug metadata for module: $moduleName'); + } catch (e) { + logger.warning('Failed to parse metadata: $e'); + } + } + } + } + return modules; } /// Process all metadata, including SDK metadata, and compute caches once. diff --git a/dwds/lib/src/loaders/asset_scheme.dart b/dwds/lib/src/loaders/asset_scheme.dart index d4d77f2a31..d862a35778 100644 --- a/dwds/lib/src/loaders/asset_scheme.dart +++ b/dwds/lib/src/loaders/asset_scheme.dart @@ -51,7 +51,7 @@ class BuildRunnerAssetScheme implements AssetScheme { String get summaryDillSuffix => '.ddc.dill'; @override - String get bootstrapSuffix => '.dart.bootstrap.js'; + String get bootstrapSuffix => '.bootstrap.js'; @override String get mergedMetadataSuffix => '.ddc_merged_metadata'; diff --git a/dwds/lib/src/readers/asset_reader.dart b/dwds/lib/src/readers/asset_reader.dart index 56e163d1da..b388daf567 100644 --- a/dwds/lib/src/readers/asset_reader.dart +++ b/dwds/lib/src/readers/asset_reader.dart @@ -2,9 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:convert'; - -import 'package:dwds/src/debugging/metadata/module_metadata.dart'; import 'package:dwds/src/loaders/asset_scheme.dart'; import 'package:dwds/src/utilities/shared.dart'; import 'package:dwds/src/utilities/web_path_translator.dart'; @@ -31,55 +28,20 @@ abstract class AssetReader { /// The asset scheme used by this reader. AssetScheme get assetScheme; - /// Returns the contents of a Dart source file. + /// Returns the contents for a dart source at the provided server path, or + /// null if the resource does not exist. Future dartSourceContents(String serverPath); - /// Returns the contents of a source map file. + /// Returns the contents for a source map at the provided server path, or + /// null if the resource does not exist. Future sourceMapContents(String serverPath); - /// Returns the contents of a metadata file. + /// Returns the contents for the merged metadata output at the provided path, + /// or null if the resource does not exist. Future metadataContents(String serverPath); /// Closes connections Future close(); - - /// Loads debug metadata associated with the application [entrypoint]. - /// - /// Returns a map of module names to their corresponding [ModuleMetadata]. - Future> loadMetadata(String entrypoint) async { - final modules = {}; - final logger = Logger('AssetReader'); - // The merged metadata resides next to the entrypoint. - final bootstrapSuffix = assetScheme.bootstrapSuffix; - if (entrypoint.endsWith(bootstrapSuffix)) { - logger.info('Loading debug metadata...'); - final serverPath = entrypoint.replaceAll( - bootstrapSuffix, - assetScheme.mergedMetadataSuffix, - ); - final merged = await metadataContents(serverPath); - if (merged != null) { - for (final contents in merged.split('\n')) { - try { - if (contents.isEmpty || - contents.startsWith('// intentionally empty:')) { - continue; - } - final moduleJson = json.decode(contents); - final metadata = ModuleMetadata.fromJson( - moduleJson as Map, - ); - final moduleName = metadata.name; - modules[moduleName] = metadata; - logger.fine('Loaded debug metadata for module: $moduleName'); - } catch (e) { - logger.warning('Failed to parse metadata: $e'); - } - } - } - } - return modules; - } } abstract class PathResolver { From 507db34e159fecab626c71b9f6ed2601dd78b62e Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 30 Jul 2026 16:25:22 -0700 Subject: [PATCH 082/134] Using const asset schemes and cleaning up code --- dwds/lib/src/loaders/asset_scheme.dart | 4 + .../build_runner_strategy_provider.dart | 4 +- .../frontend_server_strategy_provider.dart | 41 +++-- dwds/lib/src/readers/asset_reader.dart | 149 +++++----------- dwds/lib/src/utilities/dart_uri.dart | 87 +++++++-- .../src/utilities/web_path_translator.dart | 96 +++++++++- .../utilities/web_path_translator_test.dart | 83 +++++++-- webdev/lib/src/serve/webdev_server.dart | 168 ++++++++---------- 8 files changed, 386 insertions(+), 246 deletions(-) diff --git a/dwds/lib/src/loaders/asset_scheme.dart b/dwds/lib/src/loaders/asset_scheme.dart index d862a35778..e339802e92 100644 --- a/dwds/lib/src/loaders/asset_scheme.dart +++ b/dwds/lib/src/loaders/asset_scheme.dart @@ -35,6 +35,8 @@ abstract class AssetScheme { /// Asset scheme for package:build assets. class BuildRunnerAssetScheme implements AssetScheme { + const BuildRunnerAssetScheme(); + @override String get jsSuffix => '.ddc.js'; @@ -59,6 +61,8 @@ class BuildRunnerAssetScheme implements AssetScheme { /// Asset scheme for Frontend Server assets. class FrontendServerAssetScheme implements AssetScheme { + const FrontendServerAssetScheme(); + @override String get jsSuffix => '.dart.lib.js'; diff --git a/dwds/lib/src/loaders/build_runner_strategy_provider.dart b/dwds/lib/src/loaders/build_runner_strategy_provider.dart index 3b712deb16..8706aa8414 100644 --- a/dwds/lib/src/loaders/build_runner_strategy_provider.dart +++ b/dwds/lib/src/loaders/build_runner_strategy_provider.dart @@ -39,7 +39,7 @@ class BuildRunnerRequireStrategyProvider with BuildRunnerStrategyProviderMixin { _moduleInfoForProvider, _assetReader, _buildSettings, - BuildRunnerAssetScheme(), + const BuildRunnerAssetScheme(), packageConfigPath: _packageConfigPath, ); @@ -81,7 +81,7 @@ class BuildRunnerDdcLibraryBundleStrategyProvider _assetReader, _buildSettings, (path) => null, // g3RelativePath - BuildRunnerAssetScheme(), + const BuildRunnerAssetScheme(), packageConfigPath: _packageConfigPath, injectScriptLoad: injectScriptLoad, reloadedSourcesUri: _reloadedSourcesUri, diff --git a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart index da1d268017..477dfde221 100644 --- a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart +++ b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart @@ -132,7 +132,7 @@ class FrontendServerDdcStrategyProvider }); @override - AssetScheme get assetScheme => FrontendServerAssetScheme(); + AssetScheme get assetScheme => const FrontendServerAssetScheme(); @override DdcStrategy get strategy => _ddcStrategy; @@ -183,7 +183,7 @@ class FrontendServerDdcLibraryBundleStrategyProvider } @override - AssetScheme get assetScheme => FrontendServerAssetScheme(); + AssetScheme get assetScheme => const FrontendServerAssetScheme(); @override DdcLibraryBundleStrategy get strategy => _libraryBundleStrategy; @@ -231,7 +231,7 @@ class FrontendServerBuildDaemonStrategyProvider } @override - AssetScheme get assetScheme => BuildRunnerAssetScheme(); + AssetScheme get assetScheme => const BuildRunnerAssetScheme(); @override DdcLibraryBundleStrategy get strategy => _libraryBundleStrategy; @@ -275,26 +275,29 @@ class FrontendServerBuildDaemonStrategyProvider MetadataProvider metadataProvider, String serverPath, ) async { - final remappedPath = WebPathTranslator.translateModuleExtension( + // Try looking up with the build runner path. + var module = await super._moduleForServerPath(metadataProvider, serverPath); + if (module != null) return module; + final remappedPath = WebPathTranslator.translateBuildRunnerToFesPath( serverPath, - from: BuildRunnerAssetScheme(), - to: FrontendServerAssetScheme(), - ); - final module = await super._moduleForServerPath( - metadataProvider, - remappedPath, ); + module = await super._moduleForServerPath(metadataProvider, remappedPath); if (module != null) return module; - // Strip the top-level served directory prefix (e.g. 'web/') from root - // modules to match the served path. Package dependencies ('packages/') - // are not modified. + // Look up root modules with directory prefixes (e.g. 'web/' or 'example/'). + // Package dependencies ('packages/') are matched above. final modulePathToModule = await metadataProvider.modulePathToModule; - for (final entry in modulePathToModule.entries) { - final strippedKey = _stripPrefix(entry.key); - if (strippedKey == serverPath || strippedKey == remappedPath) { - return entry.value; - } + final appUri = _buildSettings.appEntrypoint; + final validPrefixes = [ + if (appUri != null && appUri.pathSegments.isNotEmpty) + appUri.pathSegments.first, + ...WebPathTranslator.defaultWebDirs, + ]; + for (final prefix in validPrefixes) { + final match = + modulePathToModule['$prefix/$remappedPath'] ?? + modulePathToModule['$prefix/$serverPath']; + if (match != null) return match; } return null; } @@ -380,7 +383,7 @@ class FrontendServerRequireStrategyProvider ); @override - AssetScheme get assetScheme => FrontendServerAssetScheme(); + AssetScheme get assetScheme => const FrontendServerAssetScheme(); @override RequireStrategy get strategy => _requireStrategy; diff --git a/dwds/lib/src/readers/asset_reader.dart b/dwds/lib/src/readers/asset_reader.dart index b388daf567..4f39dd19f9 100644 --- a/dwds/lib/src/readers/asset_reader.dart +++ b/dwds/lib/src/readers/asset_reader.dart @@ -59,14 +59,45 @@ abstract class PathResolver { bool get useDebuggerModuleNames; } -class FrontendServerPathResolver implements PathResolver { - final _logger = Logger('FrontendServerPathResolver'); +abstract class PathResolverBase implements PathResolver { + final Logger _logger; @override final PackageConfig? packageConfig; @override final bool useDebuggerModuleNames; final String? packageRoot; + PathResolverBase({ + this.packageConfig, + this.useDebuggerModuleNames = false, + this.packageRoot, + required String loggerName, + }) : _logger = Logger(loggerName); + + @override + Uri? serverPathToResolvedUri(String serverPath) { + serverPath = stripLeadingSlashes(serverPath).replaceAll('\\', '/'); + final segments = serverPath.split('/'); + if (segments.first == 'packages') { + final config = packageConfig; + if (config == null) { + _logger.severe('Cannot resolve packages without packageConfig'); + return null; + } + final packagePath = serverPathToAppUri(serverPath); + if (packagePath == null) return null; + return config.resolve(Uri.parse(packagePath)); + } else if (packageRoot != null) { + return Uri.file(p.join(packageRoot!, serverPath)); + } + _logger.severe( + 'Cannot resolve path without packages/ prefix or packageRoot: $serverPath', + ); + return null; + } +} + +class FrontendServerPathResolver extends PathResolverBase { static Future create( FileSystem fileSystem, Uri packageConfigFile, { @@ -82,10 +113,10 @@ class FrontendServerPathResolver implements PathResolver { } FrontendServerPathResolver({ - this.packageConfig, - this.useDebuggerModuleNames = false, - this.packageRoot, - }); + super.packageConfig, + super.useDebuggerModuleNames = false, + super.packageRoot, + }) : super(loggerName: 'FrontendServerPathResolver'); @override String? appUriToServerPath(String appUrl, {bool? useDebuggerModuleNames}) { @@ -128,41 +159,11 @@ class FrontendServerPathResolver implements PathResolver { // web/main.dart -> web/main.dart serverPath = stripLeadingSlashes(serverPath).replaceAll('\\', '/'); if (!serverPath.startsWith('packages/')) return serverPath; - final pathWithoutLib = WebPathTranslator.removeLibSegment(serverPath); - return pathWithoutLib.replaceFirst('packages/', 'package:'); - } - - @override - Uri? serverPathToResolvedUri(String serverPath) { - serverPath = stripLeadingSlashes(serverPath).replaceAll('\\', '/'); - final segments = serverPath.split('/'); - if (segments.first == 'packages') { - final config = packageConfig; - if (config == null) { - _logger.severe('Cannot resolve packages without packageConfig'); - return null; - } - final packagePath = serverPathToAppUri(serverPath); - if (packagePath == null) return null; - return config.resolve(Uri.parse(packagePath)); - } else if (packageRoot != null) { - return Uri.file(p.join(packageRoot!, serverPath)); - } - _logger.severe( - 'Cannot resolve path without packages/ prefix or packageRoot: $serverPath', - ); - return null; + return WebPathTranslator.packagePathToPackageUri(serverPath); } } -class BuildRunnerPathResolver implements PathResolver { - final _logger = Logger('BuildRunnerPathResolver'); - @override - final PackageConfig? packageConfig; - @override - final bool useDebuggerModuleNames; - final String? packageRoot; - +class BuildRunnerPathResolver extends PathResolverBase { static Future create( FileSystem fileSystem, Uri packageConfigFile, { @@ -178,10 +179,10 @@ class BuildRunnerPathResolver implements PathResolver { } BuildRunnerPathResolver({ - this.packageConfig, - this.useDebuggerModuleNames = false, - this.packageRoot, - }); + super.packageConfig, + super.useDebuggerModuleNames = false, + super.packageRoot, + }) : super(loggerName: 'BuildRunnerPathResolver'); @override String? appUriToServerPath(String appUrl, {bool? useDebuggerModuleNames}) { @@ -230,43 +231,14 @@ class BuildRunnerPathResolver implements PathResolver { if (!serverPath.startsWith('packages/')) return serverPath; return serverPath.replaceFirst('packages/', 'package:'); } - - @override - Uri? serverPathToResolvedUri(String serverPath) { - serverPath = stripLeadingSlashes(serverPath).replaceAll('\\', '/'); - final segments = serverPath.split('/'); - if (segments.first == 'packages') { - final config = packageConfig; - if (config == null) { - _logger.severe('Cannot resolve packages without packageConfig'); - return null; - } - final packagePath = serverPathToAppUri(serverPath); - if (packagePath == null) return null; - return config.resolve(Uri.parse(packagePath)); - } else if (packageRoot != null) { - return Uri.file(p.join(packageRoot!, serverPath)); - } - _logger.severe( - 'Cannot resolve path without packages/ prefix or packageRoot: $serverPath', - ); - return null; - } } -class FlutterPathResolver implements PathResolver { - final _logger = Logger('FlutterPathResolver'); - @override - final PackageConfig? packageConfig; - @override - final bool useDebuggerModuleNames; - final String? packageRoot; - +class FlutterPathResolver extends PathResolverBase { FlutterPathResolver({ - this.packageConfig, - this.useDebuggerModuleNames = false, - this.packageRoot, - }); + super.packageConfig, + super.useDebuggerModuleNames = false, + super.packageRoot, + }) : super(loggerName: 'FlutterPathResolver'); @override String? appUriToServerPath(String appUrl, {bool? useDebuggerModuleNames}) { @@ -304,29 +276,6 @@ class FlutterPathResolver implements PathResolver { // web/main.dart -> web/main.dart serverPath = stripLeadingSlashes(serverPath).replaceAll('\\', '/'); if (!serverPath.startsWith('packages/')) return serverPath; - final pathWithoutLib = WebPathTranslator.removeLibSegment(serverPath); - return pathWithoutLib.replaceFirst('packages/', 'package:'); - } - - @override - Uri? serverPathToResolvedUri(String serverPath) { - serverPath = stripLeadingSlashes(serverPath).replaceAll('\\', '/'); - final segments = serverPath.split('/'); - if (segments.first == 'packages') { - final config = packageConfig; - if (config == null) { - _logger.severe('Cannot resolve packages without packageConfig'); - return null; - } - final packagePath = serverPathToAppUri(serverPath); - if (packagePath == null) return null; - return config.resolve(Uri.parse(packagePath)); - } else if (packageRoot != null) { - return Uri.file(p.join(packageRoot!, serverPath)); - } - _logger.severe( - 'Cannot resolve path without packages/ prefix or packageRoot: $serverPath', - ); - return null; + return WebPathTranslator.packagePathToPackageUri(serverPath); } } diff --git a/dwds/lib/src/utilities/dart_uri.dart b/dwds/lib/src/utilities/dart_uri.dart index c880920e41..0f0fc3755f 100644 --- a/dwds/lib/src/utilities/dart_uri.dart +++ b/dwds/lib/src/utilities/dart_uri.dart @@ -96,31 +96,86 @@ class DartUri { /// [root] is the directory the app is served from (such as 'web') and is used /// to translate served URI paths to their on-disk paths. factory DartUri._fromRelativePath(String uri, {String? root}) { + uri = _normalizeUri(uri); + // Strip the root from [uri]. + final basePath = _stripRoot(uri, root); + // Normalize package paths. + final normalizedPath = _normalizePackagePath(basePath); + // Re-attach root if needed. + final finalPath = _ensureRoot(normalizedPath, root); + return DartUri._(finalPath); + } + + /// Normalizes [uri] by converting backslashes and stripping leading + /// dots/slashes. + /// + /// Examples: + /// - `web\main.dart` -> `web/main.dart` + /// - `./web/main.dart` -> `web/main.dart` + /// - `/web/main.dart` -> `web/main.dart` + static String _normalizeUri(String uri) { uri = uri.replaceAll('\\', '/'); if (uri.startsWith('.')) uri = uri.substring(1); if (uri.startsWith('/')) uri = uri.substring(1); - // Strip the [root] if provided. For example, with '/abc' as root: - // abc/packages/foo/bar.dart -> DartUri('packages/foo/bar.dart', '/abc') - if (root != null && root.isNotEmpty) { - root = root.replaceAll('\\', '/'); - final cleanRoot = stripLeadingSlashes(root); - if (cleanRoot.isNotEmpty) { - final rootPrefix = cleanRoot.endsWith('/') ? cleanRoot : '$cleanRoot/'; - if (uri.startsWith(rootPrefix)) { - final stripped = uri.substring(rootPrefix.length); - return DartUri(stripped, root); - } - } + return uri; + } + + /// Strips the [root] prefix from the URI if it is present. + /// + /// Examples: + /// - `web/packages/foo.dart` (root: `web`) -> `packages/foo.dart` + /// - `packages/foo.dart` (root: `web`) -> `packages/foo.dart` + /// - `web/packages/foo.dart` (root: `/web`) -> `packages/foo.dart` + static String _stripRoot(String uri, String? root) { + if (root == null || root.isEmpty) return uri; + final cleanRoot = _getCleanRootPrefix(root); + if (cleanRoot.isEmpty) return uri; + return uri.startsWith(cleanRoot) ? uri.substring(cleanRoot.length) : uri; + } + + /// Ensures the URI starts with [root] if provided. + /// + /// Examples: + /// - `packages/foo.dart` (root: `web`) -> `web/packages/foo.dart` + /// - `web/packages/foo.dart` (root: `web`) -> `web/packages/foo.dart` + /// - `packages/foo.dart` (root: `/web`) -> `/web/packages/foo.dart` + static String _ensureRoot(String uri, String? root) { + if (root == null || root.isEmpty) return uri; + final cleanRoot = _getCleanRootPrefix(root); + if (cleanRoot.isEmpty || !uri.startsWith(cleanRoot)) { + return p.url.join(root, uri); } + return uri; + } + + /// Cleans up and formats [root]. + /// + /// Examples: + /// - `web` -> `web/` + /// - `/web` -> `web/` + /// - `web/` -> `web/` + /// - `/` -> `` + static String _getCleanRootPrefix(String root) { + final cleanRoot = stripLeadingSlashes(root.replaceAll('\\', '/')); + if (cleanRoot.isEmpty) return ''; + return cleanRoot.endsWith('/') ? cleanRoot : '$cleanRoot/'; + } + /// Normalizes package paths, considering project names and 'lib' segments. + /// + /// Examples: + /// - `lib/main.dart` -> `packages/my_app/main.dart` + /// - `packages/foo/bar.dart` -> `packages/foo/lib/bar.dart` (FrontendServer) + /// - `packages/foo/lib/bar.dart` -> `packages/foo/bar.dart` (BuildRunner) + static String _normalizePackagePath(String uri) { uri = WebPathTranslator.translateLibPathToPackagePath( uri, globalToolConfiguration.appMetadata.workspaceName, ); - if (root != null) { - uri = p.url.join(root, uri); - } - return DartUri._(uri); + return WebPathTranslator.canonicalizePackagePath( + uri, + globalToolConfiguration.loadStrategy, + ); } /// The canonical web server path part of the URI. diff --git a/dwds/lib/src/utilities/web_path_translator.dart b/dwds/lib/src/utilities/web_path_translator.dart index 73808ccbe5..fb1840b522 100644 --- a/dwds/lib/src/utilities/web_path_translator.dart +++ b/dwds/lib/src/utilities/web_path_translator.dart @@ -2,9 +2,13 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. import 'package:dwds/src/loaders/asset_scheme.dart'; +import 'package:dwds/src/loaders/strategy.dart'; /// Translates paths across DDC, Frontend Server, DWDS, and package:build. class WebPathTranslator { + static const _fesScheme = FrontendServerAssetScheme(); + static const _buildRunnerScheme = BuildRunnerAssetScheme(); + static String _modifyLibSegment(String serverPath, {required bool add}) { serverPath = serverPath.replaceAll('\\', '/'); if (!serverPath.startsWith('packages/')) return serverPath; @@ -23,13 +27,13 @@ class WebPathTranslator { /// Adds 'lib' to a package path. /// - /// Example: packages/foo/bar.dart -> packages/foo/lib/bar.dart + /// Example: `packages/foo/bar.dart` -> `packages/foo/lib/bar.dart` static String addLibSegment(String serverPath) => _modifyLibSegment(serverPath, add: true); /// Removes 'lib' from a package path. /// - /// Example: packages/foo/lib/bar.dart -> packages/foo/bar.dart + /// Example: `packages/foo/lib/bar.dart` -> `packages/foo/bar.dart` static String removeLibSegment(String serverPath) => _modifyLibSegment(serverPath, add: false); @@ -54,10 +58,63 @@ class WebPathTranslator { return uri; } - /// Maps module extensions between layouts. + /// Converts a `packages/` server path to a `package:` URI string. + /// + /// Examples: + /// `packages/foo/lib/bar.dart` -> `package:foo/bar.dart` + /// `packages/foo/bar.dart` -> `package:foo/bar.dart` + static String? packagePathToPackageUri(String path) { + if (!path.startsWith('packages/')) return null; + final pathWithoutLib = removeLibSegment(path); + return 'package:${pathWithoutLib.substring('packages/'.length)}'; + } + + /// Canonicalizes a `packages/` server path using the provided [LoadStrategy]. /// - /// For example, from [FrontendServerAssetScheme] to - /// [BuildRunnerAssetScheme]: + /// Converts `packages/foo/lib/bar.dart` or `packages/foo/bar.dart` to the + /// load strategy's canonical server path. Otherwise returns [path]. + static String canonicalizePackagePath( + String path, + LoadStrategy loadStrategy, + ) { + if (!path.startsWith('packages/')) return path; + final packageUri = packagePathToPackageUri(path); + if (packageUri != null) { + final canonicalPath = loadStrategy.serverPathForAppUri(packageUri); + if (canonicalPath != null) { + var result = canonicalPath; + while (result.startsWith('/')) { + result = result.substring(1); + } + return result; + } + } + return path; + } + + /// Translates package paths between layouts based on asset schemes. + /// + /// For example, from [FrontendServerAssetScheme] to [BuildRunnerAssetScheme]: + /// `packages/foo/lib/bar.dart` -> `packages/foo/bar.dart` + /// From [BuildRunnerAssetScheme] to [FrontendServerAssetScheme]: + /// `packages/foo/bar.dart` -> `packages/foo/lib/bar.dart` + static String translatePackagePath( + String path, { + required AssetScheme from, + required AssetScheme to, + }) { + if (from is FrontendServerAssetScheme && to is BuildRunnerAssetScheme) { + return removeLibSegment(path); + } + if (from is BuildRunnerAssetScheme && to is FrontendServerAssetScheme) { + return addLibSegment(path); + } + return path; + } + + /// Maps module extensions between layouts based on asset schemes. + /// + /// For example, from [FrontendServerAssetScheme] to [BuildRunnerAssetScheme]: /// `main.dart.lib` -> `main.ddc` /// `main.dart.lib.js` -> `main.ddc.js` static String translateModuleExtension( @@ -69,12 +126,35 @@ class WebPathTranslator { return path.replaceAll(from.descriptorSuffix, to.descriptorSuffix); } - /// Maps '.dart.lib' (FES suffix) to '.ddc' (package:build suffix). + /// Maps a Frontend Server suffix ('.dart.lib') to a package:build ('.ddc') + /// suffix. static String translateFesToBuildRunnerPath(String path) { + final withoutLib = translatePackagePath( + path, + from: _fesScheme, + to: _buildRunnerScheme, + ); return translateModuleExtension( + withoutLib, + from: _fesScheme, + to: _buildRunnerScheme, + ); + } + + /// Maps a package:build (build_runner) path to a Frontend Server path. + /// + /// Adds 'lib/' to package paths and replaces Build Runner suffixes with + /// Frontend Server suffixes (e.g. '.ddc' -> '.dart.lib'). + static String translateBuildRunnerToFesPath(String path) { + final withLib = translatePackagePath( path, - from: FrontendServerAssetScheme(), - to: BuildRunnerAssetScheme(), + from: _buildRunnerScheme, + to: _fesScheme, + ); + return translateModuleExtension( + withLib, + from: _buildRunnerScheme, + to: _fesScheme, ); } diff --git a/dwds/test/utilities/web_path_translator_test.dart b/dwds/test/utilities/web_path_translator_test.dart index 217e2a3c56..cb6434e916 100644 --- a/dwds/test/utilities/web_path_translator_test.dart +++ b/dwds/test/utilities/web_path_translator_test.dart @@ -6,6 +6,9 @@ import 'package:dwds/src/loaders/asset_scheme.dart'; import 'package:dwds/src/utilities/web_path_translator.dart'; import 'package:test/test.dart'; +const fesAssetScheme = FrontendServerAssetScheme(); +const buildAssetScheme = BuildRunnerAssetScheme(); + void main() { group('WebPathTranslator', () { group('addLibSegment', () { @@ -60,6 +63,31 @@ void main() { }); }); + group('packagePathToPackageUri', () { + test('converts packages/ paths with lib to package: URIs', () { + expect( + WebPathTranslator.packagePathToPackageUri( + 'packages/foo/lib/bar.dart', + ), + 'package:foo/bar.dart', + ); + }); + + test('converts packages/ paths without lib to package: URIs', () { + expect( + WebPathTranslator.packagePathToPackageUri('packages/foo/bar.dart'), + 'package:foo/bar.dart', + ); + }); + + test('returns null for non-package paths', () { + expect( + WebPathTranslator.packagePathToPackageUri('web/main.dart'), + isNull, + ); + }); + }); + group('translateLibPathToPackagePath', () { test('translates lib/ paths to packages/ paths', () { // Checks: lib/foo.dart -> packages/my_package/foo.dart @@ -117,6 +145,41 @@ void main() { ); }); + group('translatePackagePath', () { + test('removes lib/ segment when translating FES to BuildRunner', () { + expect( + WebPathTranslator.translatePackagePath( + 'packages/foo/lib/bar.dart', + from: fesAssetScheme, + to: buildAssetScheme, + ), + 'packages/foo/bar.dart', + ); + }); + + test('adds lib/ segment when translating BuildRunner to FES', () { + expect( + WebPathTranslator.translatePackagePath( + 'packages/foo/bar.dart', + from: buildAssetScheme, + to: fesAssetScheme, + ), + 'packages/foo/lib/bar.dart', + ); + }); + + test('is no-op when schemes are identical', () { + expect( + WebPathTranslator.translatePackagePath( + 'packages/foo/lib/bar.dart', + from: fesAssetScheme, + to: fesAssetScheme, + ), + 'packages/foo/lib/bar.dart', + ); + }); + }); + group('translateModuleExtension', () { test( 'translates .dart.lib to .ddc (frontendServerOnly to buildRunner)', @@ -125,8 +188,8 @@ void main() { expect( WebPathTranslator.translateModuleExtension( 'main.dart.lib', - from: FrontendServerAssetScheme(), - to: BuildRunnerAssetScheme(), + from: fesAssetScheme, + to: buildAssetScheme, ), 'main.ddc', ); @@ -134,8 +197,8 @@ void main() { expect( WebPathTranslator.translateModuleExtension( 'main.dart.lib.js', - from: FrontendServerAssetScheme(), - to: BuildRunnerAssetScheme(), + from: fesAssetScheme, + to: buildAssetScheme, ), 'main.ddc.js', ); @@ -149,8 +212,8 @@ void main() { expect( WebPathTranslator.translateModuleExtension( 'main.ddc', - from: BuildRunnerAssetScheme(), - to: FrontendServerAssetScheme(), + from: buildAssetScheme, + to: fesAssetScheme, ), 'main.dart.lib', ); @@ -158,8 +221,8 @@ void main() { expect( WebPathTranslator.translateModuleExtension( 'main.ddc.js', - from: BuildRunnerAssetScheme(), - to: FrontendServerAssetScheme(), + from: buildAssetScheme, + to: fesAssetScheme, ), 'main.dart.lib.js', ); @@ -171,8 +234,8 @@ void main() { expect( WebPathTranslator.translateModuleExtension( 'main.dart.lib', - from: FrontendServerAssetScheme(), - to: FrontendServerAssetScheme(), + from: fesAssetScheme, + to: fesAssetScheme, ), 'main.dart.lib', ); diff --git a/webdev/lib/src/serve/webdev_server.dart b/webdev/lib/src/serve/webdev_server.dart index 08a8853ae8..efeff0eb78 100644 --- a/webdev/lib/src/serve/webdev_server.dart +++ b/webdev/lib/src/serve/webdev_server.dart @@ -320,111 +320,28 @@ class WebDevServer { !options.configuration.release) { // Use the daemon expression compiler when web hot reload is enabled // to reuse the Frontend Server's in-memory state. - Future readFesPort() async { - try { - final file = File( - p.join('.dart_tool', 'build', 'fes_manager_config'), - ); - if (await file.exists()) { - final content = await file.readAsString(); - final json = jsonDecode(content) as Map; - return json['port'] as int?; - } - } catch (e) { - _logger.warning('Failed to read FES config', e); - } - return null; - } - - var cachedFesPort = await readFesPort(); + var cachedFesPort = await _readFesPort(); // Pre-initialize the Frontend Server if a port and canonical URI // are found. Required for cached builds. if (cachedFesPort != null && canonicalUri != null) { _logger.info( 'Early initializing Frontend Server with $canonicalUri', ); - Socket? socket; try { - socket = await Socket.connect( - InternetAddress.loopbackIPv4, - cachedFesPort, - ); - socket.writeln( - jsonEncode({ - 'instruction': 'COMPILE', - 'entrypoint': canonicalUri, - }), - ); - await socket.flush(); - final responseStr = await socket - .cast>() - .transform(utf8.decoder) - .transform(const LineSplitter()) - .first; + final responseStr = await _sendFesRawRequest(cachedFesPort, { + 'instruction': 'COMPILE', + 'entrypoint': canonicalUri, + }); _logger.fine('Early initialization response: $responseStr'); } catch (e) { _logger.warning('Failed to early initialize FES', e); - } finally { - await socket?.close(); - } - } - - Future> sendRequestToFes( - int port, - Map request, - ) async { - final socket = await Socket.connect( - InternetAddress.loopbackIPv4, - port, - ); - try { - socket.writeln(jsonEncode(request)); - final responseStr = await socket - .cast>() - .transform(utf8.decoder) - .transform(const LineSplitter()) - .first; - final compileResult = jsonDecode(responseStr); - - if (compileResult is! Map) { - return { - 'result': - 'Unexpected response format from FES. ' - 'Expected a Map but got: $compileResult', - 'isError': true, - }; - } - - final error = compileResult['error'] as String?; - final errorCount = compileResult['errorCount'] as int?; - final errorMessage = compileResult['errorMessage'] as String?; - if (error != null || (errorCount != null && errorCount > 0)) { - return { - 'result': - 'FES error: ${error ?? errorMessage ?? 'Unknown error'}', - 'isError': true, - }; - } - - final expressionData = compileResult['expressionData'] as String?; - if (expressionData == null) { - return { - 'result': 'Missing expressionData in FES compile result', - 'isError': true, - }; - } - - final decodedResult = utf8.decode(base64.decode(expressionData)); - return {'result': decodedResult, 'isError': false}; - } finally { - await socket.close(); } } ddcService = DaemonExpressionCompiler((request) async { if (cachedFesPort != null) { try { - return await sendRequestToFes(cachedFesPort!, request); + return await _sendRequestToFes(cachedFesPort!, request); } catch (e) { _logger.warning( 'Failed to connect to FES at $cachedFesPort, re-reading config file', @@ -434,10 +351,10 @@ class WebDevServer { } } - final port = await readFesPort(); + final port = await _readFesPort(); if (port != null) { cachedFesPort = port; - return await sendRequestToFes(port, request); + return await _sendRequestToFes(port, request); } return { 'result': @@ -600,3 +517,72 @@ String ddcUriToLibraryId(Uri uri) { ); return '$prefix.dart'; } + +Future _readFesPort() async { + try { + final file = File(p.join('.dart_tool', 'build', 'fes_manager_config')); + if (await file.exists()) { + final content = await file.readAsString(); + final json = jsonDecode(content) as Map; + return json['port'] as int?; + } + } catch (e) { + _logger.warning('Failed to read FES config', e); + } + return null; +} + +Future _sendFesRawRequest( + int port, + Map request, +) async { + final socket = await Socket.connect(InternetAddress.loopbackIPv4, port); + try { + socket.writeln(jsonEncode(request)); + await socket.flush(); + final responseStr = await socket + .cast>() + .transform(utf8.decoder) + .transform(const LineSplitter()) + .first; + return jsonDecode(responseStr); + } finally { + await socket.close(); + } +} + +Future> _sendRequestToFes( + int port, + Map request, +) async { + final compileResult = await _sendFesRawRequest(port, request); + if (compileResult is! Map) { + return { + 'result': + 'Unexpected response format from FES. ' + 'Expected a Map but got: $compileResult', + 'isError': true, + }; + } + + final error = compileResult['error'] as String?; + final errorCount = compileResult['errorCount'] as int?; + final errorMessage = compileResult['errorMessage'] as String?; + if (error != null || (errorCount != null && errorCount > 0)) { + return { + 'result': 'FES error: ${error ?? errorMessage ?? 'Unknown error'}', + 'isError': true, + }; + } + + final expressionData = compileResult['expressionData'] as String?; + if (expressionData == null) { + return { + 'result': 'Missing expressionData in FES compile result', + 'isError': true, + }; + } + + final decodedResult = utf8.decode(base64.decode(expressionData)); + return {'result': decodedResult, 'isError': false}; +} From dc5d44aa9e209caad870f5a7c0fe78bdcd0389a1 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 30 Jul 2026 16:28:39 -0700 Subject: [PATCH 083/134] Fixing analysis issues --- dwds/lib/src/readers/frontend_server_asset_reader.dart | 2 +- dwds/lib/src/readers/proxy_server_asset_reader.dart | 4 ++-- dwds/test/frontend_server_common/asset_server.dart | 2 +- dwds/test/integration/fixtures/fakes.dart | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dwds/lib/src/readers/frontend_server_asset_reader.dart b/dwds/lib/src/readers/frontend_server_asset_reader.dart index 56a51f16ac..eada7fc7a4 100644 --- a/dwds/lib/src/readers/frontend_server_asset_reader.dart +++ b/dwds/lib/src/readers/frontend_server_asset_reader.dart @@ -49,7 +49,7 @@ class FrontendServerAssetReader extends AssetReader { PathResolver? pathResolver, }) : _packageRoot = packageRoot, _basePath = basePath ?? '', - _assetScheme = assetScheme ?? FrontendServerAssetScheme(), + _assetScheme = assetScheme ?? const FrontendServerAssetScheme(), _pathResolver = pathResolver ?? FrontendServerPathResolver(), _mapOriginal = File('$outputPath.map'), _mapIncremental = File('$outputPath.incremental.map'), diff --git a/dwds/lib/src/readers/proxy_server_asset_reader.dart b/dwds/lib/src/readers/proxy_server_asset_reader.dart index d169208ddd..c1cc6ef076 100644 --- a/dwds/lib/src/readers/proxy_server_asset_reader.dart +++ b/dwds/lib/src/readers/proxy_server_asset_reader.dart @@ -44,13 +44,13 @@ class ProxyServerAssetReader extends AssetReader { return ProxyServerAssetReader._( handler, client, - assetScheme ?? BuildRunnerAssetScheme(), + assetScheme ?? const BuildRunnerAssetScheme(), ); } ProxyServerAssetReader.fromHandler(this._handler, {AssetScheme? assetScheme}) : _client = null, - _assetScheme = assetScheme ?? BuildRunnerAssetScheme(); + _assetScheme = assetScheme ?? const BuildRunnerAssetScheme(); @override String get basePath => ''; diff --git a/dwds/test/frontend_server_common/asset_server.dart b/dwds/test/frontend_server_common/asset_server.dart index eeb39ce909..d40e2b1809 100644 --- a/dwds/test/frontend_server_common/asset_server.dart +++ b/dwds/test/frontend_server_common/asset_server.dart @@ -48,7 +48,7 @@ class TestAssetServer extends AssetReader { this._fileSystem, this._sdkLayout, { AssetScheme? assetScheme, - }) : _assetScheme = assetScheme ?? FrontendServerAssetScheme() { + }) : _assetScheme = assetScheme ?? const FrontendServerAssetScheme() { _basePath = _parseBasePathFromIndexHtml(index); } diff --git a/dwds/test/integration/fixtures/fakes.dart b/dwds/test/integration/fixtures/fakes.dart index de8c70fc57..413626b4d5 100644 --- a/dwds/test/integration/fixtures/fakes.dart +++ b/dwds/test/integration/fixtures/fakes.dart @@ -218,7 +218,7 @@ class FakeWebkitDebugger implements WebkitDebugger { (MetadataProvider _) async => {}, FakeAssetReader(), buildSettings, - BuildRunnerAssetScheme(), + const BuildRunnerAssetScheme(), ), ), ); @@ -358,7 +358,7 @@ class FakeStrategy extends LoadStrategy { ); @override - AssetScheme get assetScheme => BuildRunnerAssetScheme(); + AssetScheme get assetScheme => const BuildRunnerAssetScheme(); @override Future bootstrapFor(String entrypoint) async => 'dummy_bootstrap'; @@ -438,7 +438,7 @@ class FakeAssetReader extends AssetReader { this.dartSource, this.sourceMap, AssetScheme? assetScheme, - }) : _assetScheme = assetScheme ?? FrontendServerAssetScheme(); + }) : _assetScheme = assetScheme ?? const FrontendServerAssetScheme(); @override String get basePath => ''; From e3acde381457fdce96ca7ef76a200465c182cd1b Mon Sep 17 00:00:00 2001 From: MarkZ Date: Fri, 31 Jul 2026 11:53:15 -0700 Subject: [PATCH 084/134] adding todo --- dwds/lib/src/debugging/location.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dwds/lib/src/debugging/location.dart b/dwds/lib/src/debugging/location.dart index cc5bc6fc71..7b450f3114 100644 --- a/dwds/lib/src/debugging/location.dart +++ b/dwds/lib/src/debugging/location.dart @@ -407,6 +407,8 @@ class Locations { if (Uri.tryParse(sourceUrl)?.isAbsolute == true) { path = sourceUrl; } else { + // TODO(markzipan): Check if platform-specific separators can be handled + // upstream in the SDK. // Source map URLS are relative to the script. They may have platform // separators or they may use URL semantics. To be sure, we split and // re-join them. From e77a5bb499f90c7de132388a17f1cd85dfc1c281 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Mon, 3 Aug 2026 15:24:01 -0700 Subject: [PATCH 085/134] Removing extraneous diffs --- .../src/readers/frontend_server_asset_reader.dart | 14 +++++++------- .../lib/src/readers/proxy_server_asset_reader.dart | 2 +- dwds/test/frontend_server_common/asset_server.dart | 2 +- dwds/test/integration/fixtures/fakes.dart | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dwds/lib/src/readers/frontend_server_asset_reader.dart b/dwds/lib/src/readers/frontend_server_asset_reader.dart index eada7fc7a4..6dc36c3a10 100644 --- a/dwds/lib/src/readers/frontend_server_asset_reader.dart +++ b/dwds/lib/src/readers/frontend_server_asset_reader.dart @@ -13,7 +13,7 @@ import 'package:path/path.dart' as p; /// A reader for Dart sources and related source maps provided by the Frontend /// Server. -class FrontendServerAssetReader extends AssetReader { +class FrontendServerAssetReader implements AssetReader { final _logger = Logger('FrontendServerAssetReader'); final File _mapOriginal; final File _mapIncremental; @@ -103,12 +103,6 @@ class FrontendServerAssetReader extends AssetReader { return null; } - @override - Future metadataContents(String serverPath) { - // TODO(grouma) - Implement the merged metadata reader. - throw UnimplementedError(); - } - /// Updates the internal caches by reading the Frontend Server output files. /// /// Will only read the incremental files on additional calls. @@ -139,6 +133,12 @@ class FrontendServerAssetReader extends AssetReader { } } + @override + Future metadataContents(String serverPath) { + // TODO(grouma) - Implement the merged metadata reader. + throw UnimplementedError(); + } + /// Strips the [_basePath] prefix from the [serverPath]. /// /// Example (if [_basePath] is 'foo/bar'): diff --git a/dwds/lib/src/readers/proxy_server_asset_reader.dart b/dwds/lib/src/readers/proxy_server_asset_reader.dart index c1cc6ef076..285a239a83 100644 --- a/dwds/lib/src/readers/proxy_server_asset_reader.dart +++ b/dwds/lib/src/readers/proxy_server_asset_reader.dart @@ -14,7 +14,7 @@ import 'package:shelf/shelf.dart'; import 'package:shelf_proxy/shelf_proxy.dart'; /// A reader for resources provided by a proxy server. -class ProxyServerAssetReader extends AssetReader { +class ProxyServerAssetReader implements AssetReader { final _logger = Logger('ProxyServerAssetReader'); final Handler _handler; diff --git a/dwds/test/frontend_server_common/asset_server.dart b/dwds/test/frontend_server_common/asset_server.dart index d40e2b1809..7d45443b83 100644 --- a/dwds/test/frontend_server_common/asset_server.dart +++ b/dwds/test/frontend_server_common/asset_server.dart @@ -18,7 +18,7 @@ import 'package:logging/logging.dart'; import 'package:mime/mime.dart' as mime; import 'package:shelf/shelf.dart' as shelf; -class TestAssetServer extends AssetReader { +class TestAssetServer implements AssetReader { late final String _basePath; final String index; diff --git a/dwds/test/integration/fixtures/fakes.dart b/dwds/test/integration/fixtures/fakes.dart index 413626b4d5..6757b54096 100644 --- a/dwds/test/integration/fixtures/fakes.dart +++ b/dwds/test/integration/fixtures/fakes.dart @@ -427,7 +427,7 @@ class FakeStrategy extends LoadStrategy { throw UnimplementedError(); } -class FakeAssetReader extends AssetReader { +class FakeAssetReader implements AssetReader { String? metadata; final String? dartSource; final String? sourceMap; From 35125438fb5e3b083a51ef0293d4e00e016d614b Mon Sep 17 00:00:00 2001 From: MarkZ Date: Mon, 3 Aug 2026 16:43:11 -0700 Subject: [PATCH 086/134] Resolving comments --- dwds/lib/src/loaders/asset_scheme.dart | 4 +- dwds/lib/src/readers/asset_reader.dart | 39 ++++++++----------- .../services/daemon_expression_compiler.dart | 2 +- 3 files changed, 20 insertions(+), 25 deletions(-) diff --git a/dwds/lib/src/loaders/asset_scheme.dart b/dwds/lib/src/loaders/asset_scheme.dart index e339802e92..1442b74acb 100644 --- a/dwds/lib/src/loaders/asset_scheme.dart +++ b/dwds/lib/src/loaders/asset_scheme.dart @@ -34,7 +34,7 @@ abstract class AssetScheme { } /// Asset scheme for package:build assets. -class BuildRunnerAssetScheme implements AssetScheme { +final class BuildRunnerAssetScheme implements AssetScheme { const BuildRunnerAssetScheme(); @override @@ -60,7 +60,7 @@ class BuildRunnerAssetScheme implements AssetScheme { } /// Asset scheme for Frontend Server assets. -class FrontendServerAssetScheme implements AssetScheme { +final class FrontendServerAssetScheme implements AssetScheme { const FrontendServerAssetScheme(); @override diff --git a/dwds/lib/src/readers/asset_reader.dart b/dwds/lib/src/readers/asset_reader.dart index 4f39dd19f9..b44c5f8995 100644 --- a/dwds/lib/src/readers/asset_reader.dart +++ b/dwds/lib/src/readers/asset_reader.dart @@ -45,36 +45,31 @@ abstract class AssetReader { } abstract class PathResolver { - /// Computes the server path for a given application URL. - String? appUriToServerPath(String appUrl, {bool? useDebuggerModuleNames}); - - /// Computes the application URI (e.g., package: URI) for a given server path. - String? serverPathToAppUri(String serverPath); - - /// Computes the resolved file URI for a server path. - Uri? serverPathToResolvedUri(String serverPath); - - PackageConfig? get packageConfig; - - bool get useDebuggerModuleNames; -} - -abstract class PathResolverBase implements PathResolver { final Logger _logger; - @override final PackageConfig? packageConfig; - @override final bool useDebuggerModuleNames; final String? packageRoot; - PathResolverBase({ + PathResolver({ this.packageConfig, this.useDebuggerModuleNames = false, this.packageRoot, required String loggerName, }) : _logger = Logger(loggerName); - @override + /// Computes the server path for a given application URL. + /// + /// Returns `null` if [appUrl] is not supported by the resolver. + String? appUriToServerPath(String appUrl, {bool? useDebuggerModuleNames}); + + /// Computes the application URI (e.g., package: URI) for a given server path. + /// + /// Returns `null` if the path cannot be translated to a validapp URI. + String? serverPathToAppUri(String serverPath); + + /// Computes the resolved file URI for a given server path. + /// + /// Returns `null` if a URI cannot be resolved. Uri? serverPathToResolvedUri(String serverPath) { serverPath = stripLeadingSlashes(serverPath).replaceAll('\\', '/'); final segments = serverPath.split('/'); @@ -97,7 +92,7 @@ abstract class PathResolverBase implements PathResolver { } } -class FrontendServerPathResolver extends PathResolverBase { +final class FrontendServerPathResolver extends PathResolver { static Future create( FileSystem fileSystem, Uri packageConfigFile, { @@ -163,7 +158,7 @@ class FrontendServerPathResolver extends PathResolverBase { } } -class BuildRunnerPathResolver extends PathResolverBase { +final class BuildRunnerPathResolver extends PathResolver { static Future create( FileSystem fileSystem, Uri packageConfigFile, { @@ -233,7 +228,7 @@ class BuildRunnerPathResolver extends PathResolverBase { } } -class FlutterPathResolver extends PathResolverBase { +final class FlutterPathResolver extends PathResolver { FlutterPathResolver({ super.packageConfig, super.useDebuggerModuleNames = false, diff --git a/dwds/lib/src/services/daemon_expression_compiler.dart b/dwds/lib/src/services/daemon_expression_compiler.dart index 8b35853ee1..5d020f5b9b 100644 --- a/dwds/lib/src/services/daemon_expression_compiler.dart +++ b/dwds/lib/src/services/daemon_expression_compiler.dart @@ -10,7 +10,7 @@ import 'package:dwds/src/services/expression_compiler.dart'; /// build daemon. /// /// We assume the build daemon already has a Frontend Server intialized. -class DaemonExpressionCompiler implements ExpressionCompiler { +final class DaemonExpressionCompiler implements ExpressionCompiler { final Future> Function(Map request) _sendRequest; From 7a0ee6018bddf91dafa03cee400c1cb2f218fd7b Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 6 Aug 2026 16:56:27 -0700 Subject: [PATCH 087/134] Moving tests to webdev or dwds where necessary to match SDK --- .../test/integration/breakpoint_amd_test.dart | 5 +- .../breakpoint_ddc_library_bundle_test.dart | 5 +- dwds/test/integration/callstack_amd_test.dart | 5 +- .../callstack_ddc_library_bundle_test.dart | 5 +- .../chrome_proxy_service_amd_test.dart | 5 +- ...proxy_service_ddc_library_bundle_test.dart | 5 +- .../circular_evaluate_amd_test.dart | 7 +- ...ular_evaluate_ddc_library_bundle_test.dart | 7 +- .../dart_uri_file_uri_amd_test.dart | 5 +- ..._uri_file_uri_ddc_library_bundle_test.dart | 5 +- dwds/test/integration/dart_uri_test.dart | 5 +- .../integration/debug_service_amd_test.dart | 3 +- ...debug_service_ddc_library_bundle_test.dart | 3 +- dwds/test/integration/debugger_test.dart | 7 +- dwds/test/integration/devtools_amd_test.dart | 3 +- .../devtools_ddc_library_bundle_test.dart | 3 +- dwds/test/integration/evaluate_amd_test.dart | 7 +- .../evaluate_ddc_library_bundle_test.dart | 7 +- dwds/test/integration/events_amd_test.dart | 5 +- .../events_ddc_library_bundle_test.dart | 5 +- .../integration/execution_context_test.dart | 3 +- .../expression_compiler_service_amd_test.dart | 3 +- ...piler_service_ddc_library_bundle_test.dart | 3 +- .../expression_evaluator_test.dart | 8 +- .../integration/extension_debugger_test.dart | 5 +- .../integration/handlers/injector_test.dart | 3 +- ...d_breakpoints_ddc_library_bundle_test.dart | 5 +- .../hot_reload_ddc_library_bundle_test.dart | 5 +- .../integration/hot_restart_amd_test.dart | 5 +- ...t_breakpoints_ddc_library_bundle_test.dart | 5 +- .../hot_restart_correctness_amd_test.dart | 5 +- ...t_correctness_ddc_library_bundle_test.dart | 5 +- .../hot_restart_ddc_library_bundle_test.dart | 5 +- dwds/test/integration/inspector_amd_test.dart | 9 +- .../inspector_ddc_library_bundle_test.dart | 16 +- .../instances/class_inspection_amd_test.dart | 5 +- ...ss_inspection_ddc_library_bundle_test.dart | 5 +- .../instances/dot_shorthands_amd_test.dart | 5 +- ...ot_shorthands_ddc_library_bundle_test.dart | 5 +- .../instances/instance_amd_test.dart | 5 +- .../instance_ddc_library_bundle_test.dart | 5 +- .../instance_inspection_amd_test.dart | 5 +- ...ce_inspection_ddc_library_bundle_test.dart | 5 +- .../patterns_inspection_amd_test.dart | 5 +- ...ns_inspection_ddc_library_bundle_test.dart | 5 +- .../instances/record_inspection_amd_test.dart | 5 +- ...rd_inspection_ddc_library_bundle_test.dart | 5 +- .../record_type_inspection_amd_test.dart | 5 +- ...pe_inspection_ddc_library_bundle_test.dart | 5 +- .../instances/type_inspection_amd_test.dart | 5 +- ...pe_inspection_ddc_library_bundle_test.dart | 5 +- dwds/test/integration/listviews_amd_test.dart | 5 +- .../listviews_ddc_library_bundle_test.dart | 5 +- .../integration/load_strategy_amd_test.dart | 5 +- ...load_strategy_ddc_library_bundle_test.dart | 5 +- dwds/test/integration/location_test.dart | 5 +- dwds/test/integration/metadata_test.dart | 5 +- .../integration/package_uri_mapper_test.dart | 3 +- .../integration/parts_evaluate_amd_test.dart | 7 +- ...arts_evaluate_ddc_library_bundle_test.dart | 7 +- .../frontend_server_asset_reader_test.dart | 7 +- dwds/test/integration/refresh_amd_test.dart | 3 +- .../refresh_ddc_library_bundle_test.dart | 3 +- .../integration/run_request_amd_test.dart | 3 +- .../run_request_ddc_library_bundle_test.dart | 3 +- .../test/integration/screenshot_amd_test.dart | 3 +- .../screenshot_ddc_library_bundle_test.dart | 3 +- .../sdk_configuration_amd_test.dart | 3 +- ...configuration_ddc_library_bundle_test.dart | 3 +- dwds/test/integration/skip_list_test.dart | 3 +- dwds/test/integration/utilities_test.dart | 3 +- .../integration/variable_scope_amd_test.dart | 3 +- ...ariable_scope_ddc_library_bundle_test.dart | 3 +- dwds_test_common/analysis_options.yaml | 2 + .../lib}/fixtures/context.dart | 70 +- .../lib}/fixtures/debugger_data.dart | 0 .../lib}/fixtures/fakes.dart | 0 .../lib}/fixtures/project.dart | 9 +- .../lib}/fixtures/server.dart | 0 .../lib}/fixtures/utilities.dart | 2 +- .../frontend_server_common/asset_server.dart | 3 +- .../frontend_server_common/bootstrap.dart | 0 .../lib}/frontend_server_common/devfs.dart | 8 +- .../frontend_server_client.dart | 8 +- .../resident_runner.dart | 2 +- .../frontend_server_common/utilities.dart | 0 .../lib}/frontend_server_common/uuid.dart | 0 .../lib/integration/asset_handler.dart | 4 +- .../lib/integration/breakpoint.dart | 10 +- .../lib/integration/callstack.dart | 10 +- .../lib/integration/chrome_proxy_service.dart | 659 ++++++++++-------- .../lib/integration/class_inspection.dart | 12 +- .../lib/integration/dart_uri_file_uri.dart | 8 +- .../lib/integration/dds_port.dart | 10 +- .../lib/integration/debug_service.dart | 18 +- .../lib/integration/devtools.dart | 8 +- .../lib/integration/dot_shorthands.dart | 10 +- .../lib/integration/evaluate.dart | 12 +- .../lib/integration/evaluate_circular.dart | 10 +- .../lib/integration/evaluate_parts.dart | 10 +- .../lib/integration/events.dart | 10 +- .../expression_compiler_service.dart | 3 +- .../lib/integration/hot_reload.dart | 10 +- .../integration/hot_reload_breakpoints.dart | 10 +- .../lib/integration/hot_restart.dart | 9 +- .../integration/hot_restart_breakpoints.dart | 10 +- .../integration/hot_restart_correctness.dart | 4 +- .../lib/integration/inspector.dart | 8 +- .../lib/integration/instance.dart | 10 +- .../lib/integration/instance_inspection.dart | 10 +- .../lib/integration/listviews.dart | 8 +- .../lib/integration/load_strategy.dart | 10 +- .../lib/integration/patterns_inspection.dart | 10 +- .../readers/proxy_server_asset_reader.dart | 8 +- .../lib/integration/record_inspection.dart | 10 +- .../integration/record_type_inspection.dart | 10 +- .../lib/integration/refresh.dart | 10 +- .../lib/integration/run_request.dart | 10 +- .../lib/integration/screenshot.dart | 10 +- .../lib/integration/sdk_configuration.dart | 8 +- .../lib/integration}/test_inspector.dart | 2 +- .../lib/integration/type_inspection.dart | 10 +- .../lib/integration/variable_scope.dart | 10 +- dwds_test_common/pubspec.yaml | 17 +- .../test}/asset_handler_amd_test.dart | 3 +- ...asset_handler_ddc_library_bundle_test.dart | 3 +- .../test}/dds_port_amd_test.dart | 3 +- .../dds_port_ddc_library_bundle_test.dart | 3 +- webdev/test/inspector_amd_test.dart | 28 + .../inspector_ddc_library_bundle_test.dart | 36 + .../proxy_server_asset_reader_amd_test.dart | 3 +- ..._asset_reader_ddc_library_bundle_test.dart | 3 +- 132 files changed, 796 insertions(+), 745 deletions(-) rename {dwds/test/integration => dwds_test_common/lib}/fixtures/context.dart (96%) rename {dwds/test/integration => dwds_test_common/lib}/fixtures/debugger_data.dart (100%) rename {dwds/test/integration => dwds_test_common/lib}/fixtures/fakes.dart (100%) rename {dwds/test/integration => dwds_test_common/lib}/fixtures/project.dart (98%) rename {dwds/test/integration => dwds_test_common/lib}/fixtures/server.dart (100%) rename {dwds/test/integration => dwds_test_common/lib}/fixtures/utilities.dart (99%) rename {dwds/test => dwds_test_common/lib}/frontend_server_common/asset_server.dart (99%) rename {dwds/test => dwds_test_common/lib}/frontend_server_common/bootstrap.dart (100%) rename {dwds/test => dwds_test_common/lib}/frontend_server_common/devfs.dart (98%) rename {dwds/test => dwds_test_common/lib}/frontend_server_common/frontend_server_client.dart (99%) rename {dwds/test => dwds_test_common/lib}/frontend_server_common/resident_runner.dart (98%) rename {dwds/test => dwds_test_common/lib}/frontend_server_common/utilities.dart (100%) rename {dwds/test => dwds_test_common/lib}/frontend_server_common/uuid.dart (100%) rename dwds/test/integration/handlers/asset_handler_common.dart => dwds_test_common/lib/integration/asset_handler.dart (95%) rename dwds/test/integration/breakpoint_common.dart => dwds_test_common/lib/integration/breakpoint.dart (97%) rename dwds/test/integration/callstack_common.dart => dwds_test_common/lib/integration/callstack.dart (97%) rename dwds/test/integration/common/chrome_proxy_service_common.dart => dwds_test_common/lib/integration/chrome_proxy_service.dart (86%) rename dwds/test/integration/instances/common/class_inspection_common.dart => dwds_test_common/lib/integration/class_inspection.dart (93%) rename dwds/test/integration/dart_uri_file_uri_common.dart => dwds_test_common/lib/integration/dart_uri_file_uri.dart (95%) rename dwds/test/integration/dds_port_common.dart => dwds_test_common/lib/integration/dds_port.dart (90%) rename dwds/test/integration/debug_service_common.dart => dwds_test_common/lib/integration/debug_service.dart (87%) rename dwds/test/integration/devtools_common.dart => dwds_test_common/lib/integration/devtools.dart (97%) rename dwds/test/integration/instances/common/dot_shorthands_common.dart => dwds_test_common/lib/integration/dot_shorthands.dart (95%) rename dwds/test/integration/evaluate_common.dart => dwds_test_common/lib/integration/evaluate.dart (99%) rename dwds/test/integration/evaluate_circular_common.dart => dwds_test_common/lib/integration/evaluate_circular.dart (95%) rename dwds/test/integration/evaluate_parts_common.dart => dwds_test_common/lib/integration/evaluate_parts.dart (96%) rename dwds/test/integration/events_common.dart => dwds_test_common/lib/integration/events.dart (98%) rename dwds/test/integration/expression_compiler_service_common.dart => dwds_test_common/lib/integration/expression_compiler_service.dart (99%) rename dwds/test/integration/hot_reload_common.dart => dwds_test_common/lib/integration/hot_reload.dart (96%) rename dwds/test/integration/hot_reload_breakpoints_common.dart => dwds_test_common/lib/integration/hot_reload_breakpoints.dart (98%) rename dwds/test/integration/common/hot_restart_common.dart => dwds_test_common/lib/integration/hot_restart.dart (98%) rename dwds/test/integration/hot_restart_breakpoints_common.dart => dwds_test_common/lib/integration/hot_restart_breakpoints.dart (98%) rename dwds/test/integration/common/hot_restart_correctness_common.dart => dwds_test_common/lib/integration/hot_restart_correctness.dart (98%) rename dwds/test/integration/inspector_common.dart => dwds_test_common/lib/integration/inspector.dart (98%) rename dwds/test/integration/instances/common/instance_common.dart => dwds_test_common/lib/integration/instance.dart (98%) rename dwds/test/integration/instances/common/instance_inspection_common.dart => dwds_test_common/lib/integration/instance_inspection.dart (98%) rename dwds/test/integration/listviews_common.dart => dwds_test_common/lib/integration/listviews.dart (88%) rename dwds/test/integration/load_strategy_common.dart => dwds_test_common/lib/integration/load_strategy.dart (96%) rename dwds/test/integration/instances/common/patterns_inspection_common.dart => dwds_test_common/lib/integration/patterns_inspection.dart (96%) rename dwds/test/integration/readers/proxy_server_asset_reader_common.dart => dwds_test_common/lib/integration/readers/proxy_server_asset_reader.dart (90%) rename dwds/test/integration/instances/common/record_inspection_common.dart => dwds_test_common/lib/integration/record_inspection.dart (98%) rename dwds/test/integration/instances/common/record_type_inspection_common.dart => dwds_test_common/lib/integration/record_type_inspection.dart (98%) rename dwds/test/integration/refresh_common.dart => dwds_test_common/lib/integration/refresh.dart (92%) rename dwds/test/integration/run_request_common.dart => dwds_test_common/lib/integration/run_request.dart (93%) rename dwds/test/integration/screenshot_common.dart => dwds_test_common/lib/integration/screenshot.dart (81%) rename dwds/test/integration/sdk_configuration_common.dart => dwds_test_common/lib/integration/sdk_configuration.dart (96%) rename {dwds/test/integration/instances/common => dwds_test_common/lib/integration}/test_inspector.dart (99%) rename dwds/test/integration/instances/common/type_inspection_common.dart => dwds_test_common/lib/integration/type_inspection.dart (98%) rename dwds/test/integration/variable_scope_common.dart => dwds_test_common/lib/integration/variable_scope.dart (98%) rename {dwds/test/integration/handlers => webdev/test}/asset_handler_amd_test.dart (89%) rename {dwds/test/integration/handlers => webdev/test}/asset_handler_ddc_library_bundle_test.dart (91%) rename {dwds/test/integration => webdev/test}/dds_port_amd_test.dart (89%) rename {dwds/test/integration => webdev/test}/dds_port_ddc_library_bundle_test.dart (92%) create mode 100644 webdev/test/inspector_amd_test.dart create mode 100644 webdev/test/inspector_ddc_library_bundle_test.dart rename {dwds/test/integration/readers => webdev/test}/proxy_server_asset_reader_amd_test.dart (87%) rename {dwds/test/integration/readers => webdev/test}/proxy_server_asset_reader_ddc_library_bundle_test.dart (87%) diff --git a/dwds/test/integration/breakpoint_amd_test.dart b/dwds/test/integration/breakpoint_amd_test.dart index c2b1947a16..739f260ae8 100644 --- a/dwds/test/integration/breakpoint_amd_test.dart +++ b/dwds/test/integration/breakpoint_amd_test.dart @@ -7,12 +7,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/breakpoint.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'breakpoint_common.dart'; -import 'fixtures/context.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart b/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart index d8e93ec94d..fc8e82e21f 100644 --- a/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart +++ b/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart @@ -7,12 +7,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/breakpoint.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'breakpoint_common.dart'; -import 'fixtures/context.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/callstack_amd_test.dart b/dwds/test/integration/callstack_amd_test.dart index e511a65e90..cef3c29378 100644 --- a/dwds/test/integration/callstack_amd_test.dart +++ b/dwds/test/integration/callstack_amd_test.dart @@ -7,12 +7,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/callstack.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'callstack_common.dart'; -import 'fixtures/context.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/callstack_ddc_library_bundle_test.dart b/dwds/test/integration/callstack_ddc_library_bundle_test.dart index 64cedfe03e..342e3582f4 100644 --- a/dwds/test/integration/callstack_ddc_library_bundle_test.dart +++ b/dwds/test/integration/callstack_ddc_library_bundle_test.dart @@ -7,12 +7,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/callstack.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'callstack_common.dart'; -import 'fixtures/context.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/chrome_proxy_service_amd_test.dart b/dwds/test/integration/chrome_proxy_service_amd_test.dart index fef60fc277..b78f23a596 100644 --- a/dwds/test/integration/chrome_proxy_service_amd_test.dart +++ b/dwds/test/integration/chrome_proxy_service_amd_test.dart @@ -8,12 +8,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/chrome_proxy_service.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'common/chrome_proxy_service_common.dart'; -import 'fixtures/context.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart b/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart index bddb5a0db0..7fde9b316e 100644 --- a/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart +++ b/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart @@ -8,12 +8,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/chrome_proxy_service.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'common/chrome_proxy_service_common.dart'; -import 'fixtures/context.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/circular_evaluate_amd_test.dart b/dwds/test/integration/circular_evaluate_amd_test.dart index 44d0d5557d..45f6a7e157 100644 --- a/dwds/test/integration/circular_evaluate_amd_test.dart +++ b/dwds/test/integration/circular_evaluate_amd_test.dart @@ -10,13 +10,12 @@ library; import 'dart:io'; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/fixtures/project.dart'; +import 'package:dwds_test_common/integration/evaluate_circular.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'evaluate_circular_common.dart'; -import 'fixtures/context.dart'; -import 'fixtures/project.dart'; - void main() async { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart b/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart index 5401ec8761..b62337df92 100644 --- a/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart +++ b/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart @@ -10,13 +10,12 @@ library; import 'dart:io'; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/fixtures/project.dart'; +import 'package:dwds_test_common/integration/evaluate_circular.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'evaluate_circular_common.dart'; -import 'fixtures/context.dart'; -import 'fixtures/project.dart'; - void main() async { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/dart_uri_file_uri_amd_test.dart b/dwds/test/integration/dart_uri_file_uri_amd_test.dart index 88df58d541..0a4350bec7 100644 --- a/dwds/test/integration/dart_uri_file_uri_amd_test.dart +++ b/dwds/test/integration/dart_uri_file_uri_amd_test.dart @@ -7,12 +7,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/dart_uri_file_uri.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'dart_uri_file_uri_common.dart'; -import 'fixtures/context.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/dart_uri_file_uri_ddc_library_bundle_test.dart b/dwds/test/integration/dart_uri_file_uri_ddc_library_bundle_test.dart index e6dd1986ca..022d5d2df9 100644 --- a/dwds/test/integration/dart_uri_file_uri_ddc_library_bundle_test.dart +++ b/dwds/test/integration/dart_uri_file_uri_ddc_library_bundle_test.dart @@ -7,12 +7,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/dart_uri_file_uri.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'dart_uri_file_uri_common.dart'; -import 'fixtures/context.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/dart_uri_test.dart b/dwds/test/integration/dart_uri_test.dart index f4d963f414..f8e66ad84b 100644 --- a/dwds/test/integration/dart_uri_test.dart +++ b/dwds/test/integration/dart_uri_test.dart @@ -7,13 +7,12 @@ library; import 'package:dwds/src/utilities/dart_uri.dart'; +import 'package:dwds_test_common/fixtures/fakes.dart'; +import 'package:dwds_test_common/fixtures/utilities.dart'; import 'package:dwds_test_common/logging.dart'; import 'package:path/path.dart' as p; import 'package:test/test.dart'; -import 'fixtures/fakes.dart'; -import 'fixtures/utilities.dart'; - class TestStrategy extends FakeStrategy { TestStrategy(super.assetReader); diff --git a/dwds/test/integration/debug_service_amd_test.dart b/dwds/test/integration/debug_service_amd_test.dart index c9b17f24ea..53b9424d51 100644 --- a/dwds/test/integration/debug_service_amd_test.dart +++ b/dwds/test/integration/debug_service_amd_test.dart @@ -6,11 +6,10 @@ @Timeout(Duration(minutes: 2)) library; +import 'package:dwds_test_common/integration/debug_service.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'debug_service_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/debug_service_ddc_library_bundle_test.dart b/dwds/test/integration/debug_service_ddc_library_bundle_test.dart index 06fe831e68..414b144632 100644 --- a/dwds/test/integration/debug_service_ddc_library_bundle_test.dart +++ b/dwds/test/integration/debug_service_ddc_library_bundle_test.dart @@ -7,11 +7,10 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/integration/debug_service.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'debug_service_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/debugger_test.dart b/dwds/test/integration/debugger_test.dart index 5786af38ea..83a9c25d95 100644 --- a/dwds/test/integration/debugger_test.dart +++ b/dwds/test/integration/debugger_test.dart @@ -12,16 +12,15 @@ import 'package:dwds/src/debugging/debugger.dart'; import 'package:dwds/src/debugging/frame_computer.dart'; import 'package:dwds/src/debugging/location.dart'; import 'package:dwds/src/debugging/skip_list.dart'; +import 'package:dwds_test_common/fixtures/debugger_data.dart'; +import 'package:dwds_test_common/fixtures/fakes.dart'; +import 'package:dwds_test_common/fixtures/utilities.dart'; import 'package:logging/logging.dart'; import 'package:test/test.dart'; import 'package:vm_service/vm_service.dart' hide LogRecord; import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart' show CallFrame, DebuggerPausedEvent, StackTrace, WipCallFrame, WipScript; -import 'fixtures/debugger_data.dart'; -import 'fixtures/fakes.dart'; -import 'fixtures/utilities.dart'; - late FakeChromeAppInspector inspector; late Debugger debugger; late FakeWebkitDebugger webkitDebugger; diff --git a/dwds/test/integration/devtools_amd_test.dart b/dwds/test/integration/devtools_amd_test.dart index 1ce6a598fa..8e49c51b05 100644 --- a/dwds/test/integration/devtools_amd_test.dart +++ b/dwds/test/integration/devtools_amd_test.dart @@ -7,11 +7,10 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/integration/devtools.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'devtools_common.dart'; - void main() { final provider = TestSdkConfigurationProvider( ddcModuleFormat: ModuleFormat.amd, diff --git a/dwds/test/integration/devtools_ddc_library_bundle_test.dart b/dwds/test/integration/devtools_ddc_library_bundle_test.dart index b6ad5bbaf2..c6a15273ed 100644 --- a/dwds/test/integration/devtools_ddc_library_bundle_test.dart +++ b/dwds/test/integration/devtools_ddc_library_bundle_test.dart @@ -7,11 +7,10 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/integration/devtools.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'devtools_common.dart'; - void main() { final provider = TestSdkConfigurationProvider( ddcModuleFormat: ModuleFormat.ddc, diff --git a/dwds/test/integration/evaluate_amd_test.dart b/dwds/test/integration/evaluate_amd_test.dart index 5bedc792d9..e00194a536 100644 --- a/dwds/test/integration/evaluate_amd_test.dart +++ b/dwds/test/integration/evaluate_amd_test.dart @@ -10,13 +10,12 @@ library; import 'dart:io'; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/fixtures/project.dart'; +import 'package:dwds_test_common/integration/evaluate.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'evaluate_common.dart'; -import 'fixtures/context.dart'; -import 'fixtures/project.dart'; - void main() async { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/evaluate_ddc_library_bundle_test.dart b/dwds/test/integration/evaluate_ddc_library_bundle_test.dart index 3ace1355b3..50dc307a4d 100644 --- a/dwds/test/integration/evaluate_ddc_library_bundle_test.dart +++ b/dwds/test/integration/evaluate_ddc_library_bundle_test.dart @@ -10,13 +10,12 @@ library; import 'dart:io'; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/fixtures/project.dart'; +import 'package:dwds_test_common/integration/evaluate.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'evaluate_common.dart'; -import 'fixtures/context.dart'; -import 'fixtures/project.dart'; - void main() async { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/events_amd_test.dart b/dwds/test/integration/events_amd_test.dart index e098986f7c..cd347f81d7 100644 --- a/dwds/test/integration/events_amd_test.dart +++ b/dwds/test/integration/events_amd_test.dart @@ -10,13 +10,12 @@ import 'dart:io'; import 'package:dwds/src/events.dart'; import 'package:dwds/src/utilities/server.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/events.dart'; import 'package:dwds_test_common/logging.dart'; 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(); tearDownAll(provider.dispose); diff --git a/dwds/test/integration/events_ddc_library_bundle_test.dart b/dwds/test/integration/events_ddc_library_bundle_test.dart index 4f850e22a6..6f71f57a07 100644 --- a/dwds/test/integration/events_ddc_library_bundle_test.dart +++ b/dwds/test/integration/events_ddc_library_bundle_test.dart @@ -6,12 +6,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/events.dart'; 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. const debug = false; diff --git a/dwds/test/integration/execution_context_test.dart b/dwds/test/integration/execution_context_test.dart index 5ec431aa0a..d382f389b9 100644 --- a/dwds/test/integration/execution_context_test.dart +++ b/dwds/test/integration/execution_context_test.dart @@ -12,12 +12,11 @@ import 'package:dwds/data/devtools_request.dart'; import 'package:dwds/data/extension_request.dart'; import 'package:dwds/src/debugging/execution_context.dart'; import 'package:dwds/src/servers/extension_debugger.dart'; +import 'package:dwds_test_common/fixtures/fakes.dart'; import 'package:dwds_test_common/logging.dart'; import 'package:test/test.dart'; import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart'; -import 'fixtures/fakes.dart'; - void main() async { const debug = false; diff --git a/dwds/test/integration/expression_compiler_service_amd_test.dart b/dwds/test/integration/expression_compiler_service_amd_test.dart index 19c8bdc3ae..e4f50a7830 100644 --- a/dwds/test/integration/expression_compiler_service_amd_test.dart +++ b/dwds/test/integration/expression_compiler_service_amd_test.dart @@ -8,10 +8,9 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/integration/expression_compiler_service.dart'; import 'package:test/test.dart'; -import 'expression_compiler_service_common.dart'; - void main() async { testAll( compilerOptions: CompilerOptions( diff --git a/dwds/test/integration/expression_compiler_service_ddc_library_bundle_test.dart b/dwds/test/integration/expression_compiler_service_ddc_library_bundle_test.dart index 53ce3674a1..f0955d7cdb 100644 --- a/dwds/test/integration/expression_compiler_service_ddc_library_bundle_test.dart +++ b/dwds/test/integration/expression_compiler_service_ddc_library_bundle_test.dart @@ -8,10 +8,9 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/integration/expression_compiler_service.dart'; import 'package:test/test.dart'; -import 'expression_compiler_service_common.dart'; - void main() async { testAll( compilerOptions: CompilerOptions( diff --git a/dwds/test/integration/expression_evaluator_test.dart b/dwds/test/integration/expression_evaluator_test.dart index 92a0be7316..72c4445634 100644 --- a/dwds/test/integration/expression_evaluator_test.dart +++ b/dwds/test/integration/expression_evaluator_test.dart @@ -14,15 +14,13 @@ import 'package:dwds/src/debugging/skip_list.dart'; import 'package:dwds/src/services/batched_expression_evaluator.dart'; import 'package:dwds/src/services/expression_evaluator.dart'; import 'package:dwds/src/utilities/shared.dart'; - +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/fixtures/fakes.dart'; +import 'package:dwds_test_common/fixtures/utilities.dart'; import 'package:test/test.dart'; import 'package:vm_service/vm_service.dart' hide LogRecord; import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart'; -import 'fixtures/context.dart'; -import 'fixtures/fakes.dart'; -import 'fixtures/utilities.dart'; - late ExpressionEvaluator? _evaluator; late ExpressionEvaluator? _batchedEvaluator; diff --git a/dwds/test/integration/extension_debugger_test.dart b/dwds/test/integration/extension_debugger_test.dart index 024ead4849..907be2f60a 100644 --- a/dwds/test/integration/extension_debugger_test.dart +++ b/dwds/test/integration/extension_debugger_test.dart @@ -11,12 +11,11 @@ import 'dart:convert'; import 'package:dwds/data/devtools_request.dart'; import 'package:dwds/data/extension_request.dart'; import 'package:dwds/src/servers/extension_debugger.dart'; +import 'package:dwds_test_common/fixtures/debugger_data.dart'; +import 'package:dwds_test_common/fixtures/fakes.dart'; import 'package:test/test.dart'; import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart'; -import 'fixtures/debugger_data.dart'; -import 'fixtures/fakes.dart'; - late FakeSseConnection connection; late ExtensionDebugger extensionDebugger; diff --git a/dwds/test/integration/handlers/injector_test.dart b/dwds/test/integration/handlers/injector_test.dart index b791deaa7c..9d887c119e 100644 --- a/dwds/test/integration/handlers/injector_test.dart +++ b/dwds/test/integration/handlers/injector_test.dart @@ -9,13 +9,12 @@ import 'dart:io'; import 'package:dwds/src/handlers/injector.dart'; import 'package:dwds/src/version.dart'; +import 'package:dwds_test_common/fixtures/utilities.dart'; import 'package:http/http.dart' as http; import 'package:shelf/shelf.dart'; import 'package:shelf/shelf_io.dart' as shelf_io; import 'package:test/test.dart'; -import '../fixtures/utilities.dart'; - void main() { late HttpServer server; const entryEtag = 'entry etag'; diff --git a/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart b/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart index fb6f10835d..894c14ea2d 100644 --- a/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart +++ b/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart @@ -8,12 +8,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/hot_reload_breakpoints.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/context.dart'; -import 'hot_reload_breakpoints_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart b/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart index 724af17bb3..b86a5a03d1 100644 --- a/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart +++ b/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart @@ -8,12 +8,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/hot_reload.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/context.dart'; -import 'hot_reload_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/hot_restart_amd_test.dart b/dwds/test/integration/hot_restart_amd_test.dart index 8e1bb8320f..a75d42f72e 100644 --- a/dwds/test/integration/hot_restart_amd_test.dart +++ b/dwds/test/integration/hot_restart_amd_test.dart @@ -8,12 +8,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/hot_restart.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'common/hot_restart_common.dart'; -import 'fixtures/context.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; 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 5020f5695e..5f1b3dc9a3 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 @@ -8,12 +8,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/hot_restart_breakpoints.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/context.dart'; -import 'hot_restart_breakpoints_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/hot_restart_correctness_amd_test.dart b/dwds/test/integration/hot_restart_correctness_amd_test.dart index e034ff3afb..f3016e496f 100644 --- a/dwds/test/integration/hot_restart_correctness_amd_test.dart +++ b/dwds/test/integration/hot_restart_correctness_amd_test.dart @@ -8,12 +8,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/hot_restart_correctness.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'common/hot_restart_correctness_common.dart'; -import 'fixtures/context.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; 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 3a2388ddde..3a996b6f7a 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 @@ -8,12 +8,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/hot_restart_correctness.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'common/hot_restart_correctness_common.dart'; -import 'fixtures/context.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; 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 c78304f1c4..06324aad57 100644 --- a/dwds/test/integration/hot_restart_ddc_library_bundle_test.dart +++ b/dwds/test/integration/hot_restart_ddc_library_bundle_test.dart @@ -8,12 +8,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/hot_restart.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'common/hot_restart_common.dart'; -import 'fixtures/context.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/inspector_amd_test.dart b/dwds/test/integration/inspector_amd_test.dart index cddd268687..6c7c39738c 100644 --- a/dwds/test/integration/inspector_amd_test.dart +++ b/dwds/test/integration/inspector_amd_test.dart @@ -7,12 +7,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/inspector.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/context.dart'; -import 'inspector_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; @@ -23,10 +22,6 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - runTests(provider: provider, compilationMode: CompilationMode.buildDaemon); - }); - group('Frontend Server |', () { runTests( provider: provider, diff --git a/dwds/test/integration/inspector_ddc_library_bundle_test.dart b/dwds/test/integration/inspector_ddc_library_bundle_test.dart index f45d95568e..28ad61deb7 100644 --- a/dwds/test/integration/inspector_ddc_library_bundle_test.dart +++ b/dwds/test/integration/inspector_ddc_library_bundle_test.dart @@ -7,12 +7,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/inspector.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/context.dart'; -import 'inspector_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; @@ -24,17 +23,6 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - runTests(provider: provider, compilationMode: CompilationMode.buildDaemon); - }); - - group('Build Daemon and Frontend Server |', () { - runTests( - provider: provider, - compilationMode: CompilationMode.buildDaemonAndFrontendServer, - ); - }); - group('Frontend Server |', () { runTests( provider: provider, diff --git a/dwds/test/integration/instances/class_inspection_amd_test.dart b/dwds/test/integration/instances/class_inspection_amd_test.dart index dd9102c807..de30126a49 100644 --- a/dwds/test/integration/instances/class_inspection_amd_test.dart +++ b/dwds/test/integration/instances/class_inspection_amd_test.dart @@ -8,12 +8,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/class_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/context.dart'; -import 'common/class_inspection_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart index abf912dbab..fb60d7d92b 100644 --- a/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart @@ -8,12 +8,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/class_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/context.dart'; -import 'common/class_inspection_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/instances/dot_shorthands_amd_test.dart b/dwds/test/integration/instances/dot_shorthands_amd_test.dart index 7ae4963827..b2b13003ec 100644 --- a/dwds/test/integration/instances/dot_shorthands_amd_test.dart +++ b/dwds/test/integration/instances/dot_shorthands_amd_test.dart @@ -8,12 +8,11 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/dot_shorthands.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/context.dart'; -import 'common/dot_shorthands_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart b/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart index d575a22a52..8b50cda34d 100644 --- a/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart @@ -8,12 +8,11 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/dot_shorthands.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/context.dart'; -import 'common/dot_shorthands_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/instances/instance_amd_test.dart b/dwds/test/integration/instances/instance_amd_test.dart index af28c889cb..1e95cb4810 100644 --- a/dwds/test/integration/instances/instance_amd_test.dart +++ b/dwds/test/integration/instances/instance_amd_test.dart @@ -7,12 +7,11 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/instance.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/context.dart'; -import 'common/instance_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart b/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart index 400c598fb1..cf7b25f619 100644 --- a/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart @@ -7,12 +7,11 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/instance.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/context.dart'; -import 'common/instance_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/instances/instance_inspection_amd_test.dart b/dwds/test/integration/instances/instance_inspection_amd_test.dart index 1d526c53f0..5368d8574c 100644 --- a/dwds/test/integration/instances/instance_inspection_amd_test.dart +++ b/dwds/test/integration/instances/instance_inspection_amd_test.dart @@ -8,12 +8,11 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/instance_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/context.dart'; -import 'common/instance_inspection_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart index 9cdcb00f4c..7093744fb6 100644 --- a/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart @@ -8,12 +8,11 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/instance_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/context.dart'; -import 'common/instance_inspection_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/instances/patterns_inspection_amd_test.dart b/dwds/test/integration/instances/patterns_inspection_amd_test.dart index cb52f7307f..af35b0fece 100644 --- a/dwds/test/integration/instances/patterns_inspection_amd_test.dart +++ b/dwds/test/integration/instances/patterns_inspection_amd_test.dart @@ -8,12 +8,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/patterns_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/context.dart'; -import 'common/patterns_inspection_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart index 713f35161e..2fe82c5d50 100644 --- a/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart @@ -8,12 +8,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/patterns_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/context.dart'; -import 'common/patterns_inspection_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/instances/record_inspection_amd_test.dart b/dwds/test/integration/instances/record_inspection_amd_test.dart index 0cd64a97ee..dc229ad6e0 100644 --- a/dwds/test/integration/instances/record_inspection_amd_test.dart +++ b/dwds/test/integration/instances/record_inspection_amd_test.dart @@ -8,12 +8,11 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/record_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/context.dart'; -import 'common/record_inspection_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart index f50b8d65f4..6c00ffa722 100644 --- a/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart @@ -8,12 +8,11 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/record_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/context.dart'; -import 'common/record_inspection_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/instances/record_type_inspection_amd_test.dart b/dwds/test/integration/instances/record_type_inspection_amd_test.dart index 618ef53ed1..dd78fa7231 100644 --- a/dwds/test/integration/instances/record_type_inspection_amd_test.dart +++ b/dwds/test/integration/instances/record_type_inspection_amd_test.dart @@ -8,12 +8,11 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/record_type_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/context.dart'; -import 'common/record_type_inspection_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart index c5bec24ba1..8f3faf9af8 100644 --- a/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart @@ -8,12 +8,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/record_type_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/context.dart'; -import 'common/record_type_inspection_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/instances/type_inspection_amd_test.dart b/dwds/test/integration/instances/type_inspection_amd_test.dart index 717952e2b2..218773cd0f 100644 --- a/dwds/test/integration/instances/type_inspection_amd_test.dart +++ b/dwds/test/integration/instances/type_inspection_amd_test.dart @@ -8,12 +8,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/type_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/context.dart'; -import 'common/type_inspection_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart index b019786e56..ac1a761da2 100644 --- a/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart @@ -8,12 +8,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/type_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/context.dart'; -import 'common/type_inspection_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/listviews_amd_test.dart b/dwds/test/integration/listviews_amd_test.dart index d04aa8f3e0..09e39fe139 100644 --- a/dwds/test/integration/listviews_amd_test.dart +++ b/dwds/test/integration/listviews_amd_test.dart @@ -7,12 +7,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/listviews.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/context.dart'; -import 'listviews_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/listviews_ddc_library_bundle_test.dart b/dwds/test/integration/listviews_ddc_library_bundle_test.dart index 71cefbccc0..a586e66488 100644 --- a/dwds/test/integration/listviews_ddc_library_bundle_test.dart +++ b/dwds/test/integration/listviews_ddc_library_bundle_test.dart @@ -7,12 +7,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/listviews.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/context.dart'; -import 'listviews_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/load_strategy_amd_test.dart b/dwds/test/integration/load_strategy_amd_test.dart index fbcdc37214..c242321817 100644 --- a/dwds/test/integration/load_strategy_amd_test.dart +++ b/dwds/test/integration/load_strategy_amd_test.dart @@ -7,12 +7,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/load_strategy.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/context.dart'; -import 'load_strategy_common.dart'; - void main() { // Run independent tests once. runIndependentTests(); diff --git a/dwds/test/integration/load_strategy_ddc_library_bundle_test.dart b/dwds/test/integration/load_strategy_ddc_library_bundle_test.dart index e8f9cb6205..9028e9d017 100644 --- a/dwds/test/integration/load_strategy_ddc_library_bundle_test.dart +++ b/dwds/test/integration/load_strategy_ddc_library_bundle_test.dart @@ -7,12 +7,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/load_strategy.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/context.dart'; -import 'load_strategy_common.dart'; - void main() { // Run independent tests once. runIndependentTests(); diff --git a/dwds/test/integration/location_test.dart b/dwds/test/integration/location_test.dart index e3a9143204..6c81acf079 100644 --- a/dwds/test/integration/location_test.dart +++ b/dwds/test/integration/location_test.dart @@ -7,11 +7,10 @@ library; import 'package:dwds/src/debugging/location.dart'; import 'package:dwds/src/utilities/dart_uri.dart'; +import 'package:dwds_test_common/fixtures/fakes.dart'; +import 'package:dwds_test_common/fixtures/utilities.dart'; import 'package:test/test.dart'; -import 'fixtures/fakes.dart'; -import 'fixtures/utilities.dart'; - final sourceMapContents = '{"version":3,"sourceRoot":"","sources":["main.dart"],"names":[],' '"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUwB,IAAtB,WAAM;AAKJ,' diff --git a/dwds/test/integration/metadata_test.dart b/dwds/test/integration/metadata_test.dart index 50d12c8e1d..a02797a926 100644 --- a/dwds/test/integration/metadata_test.dart +++ b/dwds/test/integration/metadata_test.dart @@ -9,11 +9,10 @@ import 'dart:convert'; import 'package:dwds/src/debugging/metadata/module_metadata.dart'; import 'package:dwds/src/debugging/metadata/provider.dart'; +import 'package:dwds_test_common/fixtures/fakes.dart'; +import 'package:dwds_test_common/fixtures/utilities.dart'; import 'package:test/test.dart'; -import 'fixtures/fakes.dart'; -import 'fixtures/utilities.dart'; - const _emptySourceMetadata = '{"version":"1.0.0","name":"web/main","closureName":"load__web__main",' '"sourceMapUri":"foo/web/main.ddc.js.map",' diff --git a/dwds/test/integration/package_uri_mapper_test.dart b/dwds/test/integration/package_uri_mapper_test.dart index a23fdfff9f..f104ae1c47 100644 --- a/dwds/test/integration/package_uri_mapper_test.dart +++ b/dwds/test/integration/package_uri_mapper_test.dart @@ -9,12 +9,11 @@ library; import 'dart:io'; import 'package:dwds/dwds.dart'; +import 'package:dwds_test_common/fixtures/project.dart'; import 'package:file/local.dart'; import 'package:path/path.dart' as p; import 'package:test/test.dart'; -import 'fixtures/project.dart'; - void main() { final project = TestProject.testPackage(); diff --git a/dwds/test/integration/parts_evaluate_amd_test.dart b/dwds/test/integration/parts_evaluate_amd_test.dart index 132ae9bcce..0be74cd323 100644 --- a/dwds/test/integration/parts_evaluate_amd_test.dart +++ b/dwds/test/integration/parts_evaluate_amd_test.dart @@ -10,13 +10,12 @@ library; import 'dart:io'; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/fixtures/project.dart'; +import 'package:dwds_test_common/integration/evaluate_parts.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'evaluate_parts_common.dart'; -import 'fixtures/context.dart'; -import 'fixtures/project.dart'; - void main() async { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart b/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart index a06b7ab0ba..cab8d87fdf 100644 --- a/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart +++ b/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart @@ -10,13 +10,12 @@ library; import 'dart:io'; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/fixtures/project.dart'; +import 'package:dwds_test_common/integration/evaluate_parts.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'evaluate_parts_common.dart'; -import 'fixtures/context.dart'; -import 'fixtures/project.dart'; - void main() async { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/readers/frontend_server_asset_reader_test.dart b/dwds/test/integration/readers/frontend_server_asset_reader_test.dart index e6a57931aa..3e3c780e2b 100644 --- a/dwds/test/integration/readers/frontend_server_asset_reader_test.dart +++ b/dwds/test/integration/readers/frontend_server_asset_reader_test.dart @@ -8,16 +8,13 @@ library; import 'dart:io'; import 'package:dwds/src/readers/frontend_server_asset_reader.dart'; +import 'package:dwds_test_common/fixtures/project.dart'; import 'package:dwds_test_common/test_sdk_layout.dart'; import 'package:dwds_test_common/utilities.dart'; import 'package:path/path.dart' as p; import 'package:test/test.dart'; -import '../fixtures/project.dart'; - -final fixturesDir = absolutePath( - pathFromDwds: p.join('test', 'integration', 'fixtures'), -); +final fixturesDir = absolutePath(pathFromFixtures: ''); void main() { late FrontendServerAssetReader assetReader; diff --git a/dwds/test/integration/refresh_amd_test.dart b/dwds/test/integration/refresh_amd_test.dart index f4ffaffe92..0b347d6da4 100644 --- a/dwds/test/integration/refresh_amd_test.dart +++ b/dwds/test/integration/refresh_amd_test.dart @@ -8,11 +8,10 @@ @Timeout(Duration(minutes: 2)) library; +import 'package:dwds_test_common/integration/refresh.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'refresh_common.dart'; - void main() { final provider = TestSdkConfigurationProvider(); tearDownAll(provider.dispose); diff --git a/dwds/test/integration/refresh_ddc_library_bundle_test.dart b/dwds/test/integration/refresh_ddc_library_bundle_test.dart index 6820f6421b..ca00b1dd4e 100644 --- a/dwds/test/integration/refresh_ddc_library_bundle_test.dart +++ b/dwds/test/integration/refresh_ddc_library_bundle_test.dart @@ -9,11 +9,10 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/integration/refresh.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'refresh_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/run_request_amd_test.dart b/dwds/test/integration/run_request_amd_test.dart index 4f1edd356e..af220fd19b 100644 --- a/dwds/test/integration/run_request_amd_test.dart +++ b/dwds/test/integration/run_request_amd_test.dart @@ -6,11 +6,10 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/integration/run_request.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'run_request_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/run_request_ddc_library_bundle_test.dart b/dwds/test/integration/run_request_ddc_library_bundle_test.dart index 4e51bb3b5d..17b2f106e1 100644 --- a/dwds/test/integration/run_request_ddc_library_bundle_test.dart +++ b/dwds/test/integration/run_request_ddc_library_bundle_test.dart @@ -6,11 +6,10 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/integration/run_request.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'run_request_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/screenshot_amd_test.dart b/dwds/test/integration/screenshot_amd_test.dart index 771e205bd3..6b293664d1 100644 --- a/dwds/test/integration/screenshot_amd_test.dart +++ b/dwds/test/integration/screenshot_amd_test.dart @@ -6,11 +6,10 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/integration/screenshot.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'screenshot_common.dart'; - void main() { final provider = TestSdkConfigurationProvider( ddcModuleFormat: ModuleFormat.amd, diff --git a/dwds/test/integration/screenshot_ddc_library_bundle_test.dart b/dwds/test/integration/screenshot_ddc_library_bundle_test.dart index 0fc43cb1b0..a1d88ade1f 100644 --- a/dwds/test/integration/screenshot_ddc_library_bundle_test.dart +++ b/dwds/test/integration/screenshot_ddc_library_bundle_test.dart @@ -6,11 +6,10 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/integration/screenshot.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'screenshot_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/sdk_configuration_amd_test.dart b/dwds/test/integration/sdk_configuration_amd_test.dart index 9e965433ed..9d4102c48d 100644 --- a/dwds/test/integration/sdk_configuration_amd_test.dart +++ b/dwds/test/integration/sdk_configuration_amd_test.dart @@ -7,11 +7,10 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/integration/sdk_configuration.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'sdk_configuration_common.dart'; - void main() { // Run independent tests once. runIndependentTests(); diff --git a/dwds/test/integration/sdk_configuration_ddc_library_bundle_test.dart b/dwds/test/integration/sdk_configuration_ddc_library_bundle_test.dart index 243f9c6d52..dd8c72d7a8 100644 --- a/dwds/test/integration/sdk_configuration_ddc_library_bundle_test.dart +++ b/dwds/test/integration/sdk_configuration_ddc_library_bundle_test.dart @@ -7,11 +7,10 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/integration/sdk_configuration.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'sdk_configuration_common.dart'; - void main() { // Run independent tests once. runIndependentTests(); diff --git a/dwds/test/integration/skip_list_test.dart b/dwds/test/integration/skip_list_test.dart index 55ed079ec9..e8355c12ec 100644 --- a/dwds/test/integration/skip_list_test.dart +++ b/dwds/test/integration/skip_list_test.dart @@ -8,11 +8,10 @@ library; import 'package:dwds/src/debugging/location.dart'; import 'package:dwds/src/debugging/skip_list.dart'; import 'package:dwds/src/utilities/dart_uri.dart'; +import 'package:dwds_test_common/fixtures/utilities.dart'; import 'package:source_maps/parser.dart'; import 'package:test/test.dart'; -import 'fixtures/utilities.dart'; - void main() { setGlobalsForTesting(); late SkipLists skipLists; diff --git a/dwds/test/integration/utilities_test.dart b/dwds/test/integration/utilities_test.dart index 83231ea955..a2e43ec42e 100644 --- a/dwds/test/integration/utilities_test.dart +++ b/dwds/test/integration/utilities_test.dart @@ -6,11 +6,10 @@ library; import 'package:dwds/src/utilities/shared.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:test/test.dart'; import 'package:vm_service/vm_service.dart'; -import 'fixtures/context.dart'; - void main() { group('wrapInErrorHandlerAsync', () { test('returns future success value if callback succeeds', () async { diff --git a/dwds/test/integration/variable_scope_amd_test.dart b/dwds/test/integration/variable_scope_amd_test.dart index f4d562f87a..e3c4f23d1d 100644 --- a/dwds/test/integration/variable_scope_amd_test.dart +++ b/dwds/test/integration/variable_scope_amd_test.dart @@ -6,11 +6,10 @@ @Timeout(Duration(minutes: 2)) library; +import 'package:dwds_test_common/integration/variable_scope.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'variable_scope_common.dart'; - void main() { // set to true for debug logging. const debug = false; diff --git a/dwds/test/integration/variable_scope_ddc_library_bundle_test.dart b/dwds/test/integration/variable_scope_ddc_library_bundle_test.dart index e5a4963ef7..b19a560a11 100644 --- a/dwds/test/integration/variable_scope_ddc_library_bundle_test.dart +++ b/dwds/test/integration/variable_scope_ddc_library_bundle_test.dart @@ -7,11 +7,10 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/integration/variable_scope.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'variable_scope_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds_test_common/analysis_options.yaml b/dwds_test_common/analysis_options.yaml index 3faabb59de..1ff5013039 100644 --- a/dwds_test_common/analysis_options.yaml +++ b/dwds_test_common/analysis_options.yaml @@ -3,3 +3,5 @@ include: package:dart_flutter_team_lints/analysis_options.yaml analyzer: exclude: - fixtures/** + errors: + implementation_imports: ignore diff --git a/dwds/test/integration/fixtures/context.dart b/dwds_test_common/lib/fixtures/context.dart similarity index 96% rename from dwds/test/integration/fixtures/context.dart rename to dwds_test_common/lib/fixtures/context.dart index 7d179023f6..416b5d4d3c 100644 --- a/dwds/test/integration/fixtures/context.dart +++ b/dwds_test_common/lib/fixtures/context.dart @@ -12,25 +12,15 @@ import 'dart:typed_data'; import 'package:build_daemon/client.dart'; import 'package:build_daemon/data/build_status.dart'; import 'package:build_daemon/data/build_target.dart'; -import 'package:dwds/asset_reader.dart'; -import 'package:dwds/dart_web_debug_service.dart'; -import 'package:dwds/src/connections/app_connection.dart'; -import 'package:dwds/src/connections/debug_connection.dart'; +import 'package:dwds/dwds.dart'; +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds/src/connections/debug_connection.dart' + show fetchChromeProxyService; import 'package:dwds/src/debugging/webkit_debugger.dart'; -import 'package:dwds/src/loaders/build_runner_strategy_provider.dart'; -import 'package:dwds/src/loaders/frontend_server_strategy_provider.dart'; -import 'package:dwds/src/loaders/strategy.dart'; -import 'package:dwds/src/readers/proxy_server_asset_reader.dart'; import 'package:dwds/src/services/chrome/chrome_proxy_service.dart'; -import 'package:dwds/src/services/daemon_expression_compiler.dart'; -import 'package:dwds/src/services/expression_compiler.dart'; -import 'package:dwds/src/services/expression_compiler_service.dart'; import 'package:dwds/src/utilities/dart_uri.dart'; -import 'package:dwds/src/utilities/web_path_translator.dart'; import 'package:dwds/src/utilities/server.dart'; -import 'package:dwds_test_common/logging.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; -import 'package:dwds_test_common/utilities.dart'; +import 'package:dwds/src/utilities/web_path_translator.dart'; import 'package:file/local.dart'; import 'package:http/http.dart'; import 'package:http/io_client.dart'; @@ -45,8 +35,11 @@ import 'package:vm_service/vm_service_io.dart'; import 'package:webdriver/async_io.dart'; import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart'; -import '../../frontend_server_common/devfs.dart'; -import '../../frontend_server_common/resident_runner.dart'; +import '../frontend_server_common/devfs.dart'; +import '../frontend_server_common/resident_runner.dart'; +import '../logging.dart'; +import '../test_sdk_configuration.dart'; +import '../utilities.dart'; import 'project.dart'; import 'server.dart'; import 'utilities.dart'; @@ -548,11 +541,12 @@ class TestContext { ); packagesFile.parent.createSync(recursive: true); - // Make all relative rootUris absolute based on the original packagesFile location - // so they don't break when the file is moved to the test scratch space. - final originalJson = jsonDecode( - sourcePackagesFile.readAsStringSync(), - ) as Map; + // Make all relative rootUris absolute based on the original + // packagesFile location so they don't break when the file is + // moved to the test scratch space. + final originalJson = + jsonDecode(sourcePackagesFile.readAsStringSync()) + as Map; final packagesList = originalJson['packages'] as List; for (final package in packagesList) { final packageMap = package as Map; @@ -578,10 +572,12 @@ class TestContext { // Consult the test project's package config to resolve // build_web_compilers, but fall back to a checkout of // package:build. - final buildWebCompilers = packagesList.firstWhere( - (pkg) => (pkg as Map)['name'] == 'build_web_compilers', - orElse: () => null, - ) as Map?; + final buildWebCompilers = + packagesList.firstWhere( + (pkg) => (pkg as Map)['name'] == 'build_web_compilers', + orElse: () => null, + ) + as Map?; String fesManagerPath; if (buildWebCompilers != null) { final pkgRootUri = Uri.parse( @@ -681,11 +677,13 @@ class TestContext { ); if (daemonLogFile.existsSync()) { _logger.warning( - 'Daemon startup log content:\n${daemonLogFile.readAsStringSync()}', + 'Daemon startup log content:\n' + '${daemonLogFile.readAsStringSync()}', ); } else { _logger.warning( - 'Daemon startup log file does not exist at: ${daemonLogFile.path}', + 'Daemon startup log file does not exist at: ' + '${daemonLogFile.path}', ); } rethrow; @@ -1367,7 +1365,7 @@ class TestContext { } // In Build Daemon + Frontend Server mode, the Build Daemon already compiles - // edited files automatically. We must await the successful build completion. + // edited files automatically. We must await successful build completion. if (_testSettings.compilationMode.usesBuildDaemon) { await waitForSuccessfulBuild(allowFailure: allowFailure); return; @@ -1387,7 +1385,7 @@ class TestContext { // its initial build is already done. To ensure test waits for a new compile // cycle (instead of instantly finishing), we: // 1. Wait for `BuildStatus.started` (confirming a new build has begun) - // 2. Wait for `BuildStatus.succeeded` (only if we've already seen `started`) + // 2. Wait for `BuildStatus.succeeded` (if we've already seen `started`) final buildStartCompleter = Completer(); final buildSuccessCompleter = Completer(); final subscription = daemonClient.buildResults.listen((results) { @@ -1425,8 +1423,9 @@ class TestContext { } } if (buildStartCompleter.isCompleted && isSucceededEvent) { - if (!buildSuccessCompleter.isCompleted) + if (!buildSuccessCompleter.isCompleted) { buildSuccessCompleter.complete(); + } } }); @@ -1448,7 +1447,7 @@ class TestContext { await buildSuccessCompleter.future.timeout( timeout ?? const Duration(seconds: 60), ); - } catch (e, s) { + } catch (e) { if (e is TimeoutException) { // Return if an edit did not trigger a rebuild/recompile. if (!isWaitingForSuccess) { @@ -1534,10 +1533,9 @@ 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/debugger_data.dart b/dwds_test_common/lib/fixtures/debugger_data.dart similarity index 100% rename from dwds/test/integration/fixtures/debugger_data.dart rename to dwds_test_common/lib/fixtures/debugger_data.dart diff --git a/dwds/test/integration/fixtures/fakes.dart b/dwds_test_common/lib/fixtures/fakes.dart similarity index 100% rename from dwds/test/integration/fixtures/fakes.dart rename to dwds_test_common/lib/fixtures/fakes.dart diff --git a/dwds/test/integration/fixtures/project.dart b/dwds_test_common/lib/fixtures/project.dart similarity index 98% rename from dwds/test/integration/fixtures/project.dart rename to dwds_test_common/lib/fixtures/project.dart index de42e6c874..a71844eea9 100644 --- a/dwds/test/integration/fixtures/project.dart +++ b/dwds_test_common/lib/fixtures/project.dart @@ -3,11 +3,12 @@ // BSD-style license that can be found in the LICENSE file. import 'dart:io'; -import 'package:dwds_test_common/utilities.dart'; import 'package:io/io.dart'; import 'package:path/path.dart' as p; import 'package:yaml/yaml.dart'; +import '../utilities.dart'; + enum IndexBaseMode { noBase, base } /// Project definitions from projects defined in webdev/fixtures. @@ -202,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')) { diff --git a/dwds/test/integration/fixtures/server.dart b/dwds_test_common/lib/fixtures/server.dart similarity index 100% rename from dwds/test/integration/fixtures/server.dart rename to dwds_test_common/lib/fixtures/server.dart diff --git a/dwds/test/integration/fixtures/utilities.dart b/dwds_test_common/lib/fixtures/utilities.dart similarity index 99% rename from dwds/test/integration/fixtures/utilities.dart rename to dwds_test_common/lib/fixtures/utilities.dart index 952cb3949a..d486de8e8a 100644 --- a/dwds/test/integration/fixtures/utilities.dart +++ b/dwds_test_common/lib/fixtures/utilities.dart @@ -54,7 +54,7 @@ Future connectClient( process.stderr .transform(utf8.decoder) .transform(const LineSplitter()) - .listen((line) => stderrBuffer.add(line)); + .listen(stderrBuffer.add); final result = await Future.any([ daemonStartup.future, diff --git a/dwds/test/frontend_server_common/asset_server.dart b/dwds_test_common/lib/frontend_server_common/asset_server.dart similarity index 99% rename from dwds/test/frontend_server_common/asset_server.dart rename to dwds_test_common/lib/frontend_server_common/asset_server.dart index 7d45443b83..35e045d7ed 100644 --- a/dwds/test/frontend_server_common/asset_server.dart +++ b/dwds_test_common/lib/frontend_server_common/asset_server.dart @@ -12,12 +12,13 @@ import 'dart:typed_data'; import 'package:dwds/asset_reader.dart'; import 'package:dwds/config.dart'; import 'package:dwds/src/loaders/asset_scheme.dart'; -import 'package:dwds_test_common/test_sdk_layout.dart'; import 'package:file/file.dart'; import 'package:logging/logging.dart'; import 'package:mime/mime.dart' as mime; import 'package:shelf/shelf.dart' as shelf; +import '../test_sdk_layout.dart'; + class TestAssetServer implements AssetReader { late final String _basePath; final String index; diff --git a/dwds/test/frontend_server_common/bootstrap.dart b/dwds_test_common/lib/frontend_server_common/bootstrap.dart similarity index 100% rename from dwds/test/frontend_server_common/bootstrap.dart rename to dwds_test_common/lib/frontend_server_common/bootstrap.dart diff --git a/dwds/test/frontend_server_common/devfs.dart b/dwds_test_common/lib/frontend_server_common/devfs.dart similarity index 98% rename from dwds/test/frontend_server_common/devfs.dart rename to dwds_test_common/lib/frontend_server_common/devfs.dart index 329040e61a..a9991f4736 100644 --- a/dwds/test/frontend_server_common/devfs.dart +++ b/dwds_test_common/lib/frontend_server_common/devfs.dart @@ -10,13 +10,12 @@ import 'dart:io'; import 'package:dwds/asset_reader.dart'; import 'package:dwds/config.dart'; import 'package:dwds/expression_compiler.dart'; -// ignore: implementation_imports import 'package:dwds/src/debugging/metadata/module_metadata.dart'; import 'package:dwds/utilities.dart'; -import 'package:dwds_test_common/test_sdk_layout.dart'; import 'package:file/file.dart'; import 'package:path/path.dart' as p; +import '../test_sdk_layout.dart'; import 'asset_server.dart'; import 'bootstrap.dart'; import 'frontend_server_client.dart'; @@ -267,8 +266,9 @@ 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_common/lib/frontend_server_common/frontend_server_client.dart similarity index 99% rename from dwds/test/frontend_server_common/frontend_server_client.dart rename to dwds_test_common/lib/frontend_server_common/frontend_server_client.dart index ac52fc87cc..ccfce39b3a 100644 --- a/dwds/test/frontend_server_common/frontend_server_client.dart +++ b/dwds_test_common/lib/frontend_server_common/frontend_server_client.dart @@ -9,10 +9,10 @@ import 'dart:convert'; import 'dart:io'; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/test_sdk_layout.dart'; import 'package:logging/logging.dart'; import 'package:package_config/package_config.dart'; +import '../test_sdk_layout.dart'; import 'utilities.dart'; import 'uuid.dart'; @@ -24,10 +24,8 @@ 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/frontend_server_common/resident_runner.dart b/dwds_test_common/lib/frontend_server_common/resident_runner.dart similarity index 98% rename from dwds/test/frontend_server_common/resident_runner.dart rename to dwds_test_common/lib/frontend_server_common/resident_runner.dart index 60a5bb48ec..fda6cc1cac 100644 --- a/dwds/test/frontend_server_common/resident_runner.dart +++ b/dwds_test_common/lib/frontend_server_common/resident_runner.dart @@ -10,10 +10,10 @@ import 'dart:async'; import 'package:dwds/asset_reader.dart'; import 'package:dwds/config.dart'; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/test_sdk_layout.dart'; import 'package:file/file.dart'; import 'package:logging/logging.dart'; +import '../test_sdk_layout.dart'; import 'devfs.dart'; import 'frontend_server_client.dart'; diff --git a/dwds/test/frontend_server_common/utilities.dart b/dwds_test_common/lib/frontend_server_common/utilities.dart similarity index 100% rename from dwds/test/frontend_server_common/utilities.dart rename to dwds_test_common/lib/frontend_server_common/utilities.dart diff --git a/dwds/test/frontend_server_common/uuid.dart b/dwds_test_common/lib/frontend_server_common/uuid.dart similarity index 100% rename from dwds/test/frontend_server_common/uuid.dart rename to dwds_test_common/lib/frontend_server_common/uuid.dart diff --git a/dwds/test/integration/handlers/asset_handler_common.dart b/dwds_test_common/lib/integration/asset_handler.dart similarity index 95% rename from dwds/test/integration/handlers/asset_handler_common.dart rename to dwds_test_common/lib/integration/asset_handler.dart index 7f3ba6362f..757ad5560e 100644 --- a/dwds/test/integration/handlers/asset_handler_common.dart +++ b/dwds_test_common/lib/integration/asset_handler.dart @@ -2,14 +2,14 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'package:dwds_test_common/logging.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:shelf/shelf.dart'; import 'package:test/test.dart'; import '../fixtures/context.dart'; import '../fixtures/project.dart'; import '../fixtures/utilities.dart'; +import '../logging.dart'; +import '../test_sdk_configuration.dart'; void testAll({required TestSdkConfigurationProvider provider}) { group('Asset handler', () { diff --git a/dwds/test/integration/breakpoint_common.dart b/dwds_test_common/lib/integration/breakpoint.dart similarity index 97% rename from dwds/test/integration/breakpoint_common.dart rename to dwds_test_common/lib/integration/breakpoint.dart index 88dea2d2a9..a7e9790d15 100644 --- a/dwds/test/integration/breakpoint_common.dart +++ b/dwds_test_common/lib/integration/breakpoint.dart @@ -2,15 +2,15 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'package:dwds_test_common/logging.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; import 'package:vm_service/vm_service.dart'; import 'package:vm_service_interface/vm_service_interface.dart'; -import 'fixtures/context.dart'; -import 'fixtures/project.dart'; -import 'fixtures/utilities.dart'; +import '../fixtures/context.dart'; +import '../fixtures/project.dart'; +import '../fixtures/utilities.dart'; +import '../logging.dart'; +import '../test_sdk_configuration.dart'; void testBreakpoint({ required TestSdkConfigurationProvider provider, diff --git a/dwds/test/integration/callstack_common.dart b/dwds_test_common/lib/integration/callstack.dart similarity index 97% rename from dwds/test/integration/callstack_common.dart rename to dwds_test_common/lib/integration/callstack.dart index e0782f6e4e..2b86bf6f16 100644 --- a/dwds/test/integration/callstack_common.dart +++ b/dwds_test_common/lib/integration/callstack.dart @@ -2,15 +2,15 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'package:dwds_test_common/logging.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; import 'package:vm_service/vm_service.dart'; import 'package:vm_service_interface/vm_service_interface.dart'; -import 'fixtures/context.dart'; -import 'fixtures/project.dart'; -import 'fixtures/utilities.dart'; +import '../fixtures/context.dart'; +import '../fixtures/project.dart'; +import '../fixtures/utilities.dart'; +import '../logging.dart'; +import '../test_sdk_configuration.dart'; void testCallStack({ required TestSdkConfigurationProvider provider, diff --git a/dwds/test/integration/common/chrome_proxy_service_common.dart b/dwds_test_common/lib/integration/chrome_proxy_service.dart similarity index 86% rename from dwds/test/integration/common/chrome_proxy_service_common.dart rename to dwds_test_common/lib/integration/chrome_proxy_service.dart index c5cbe3f7b1..787fa7f82f 100644 --- a/dwds/test/integration/common/chrome_proxy_service_common.dart +++ b/dwds_test_common/lib/integration/chrome_proxy_service.dart @@ -15,8 +15,6 @@ import 'package:dwds/expression_compiler.dart'; import 'package:dwds/src/services/chrome/chrome_proxy_service.dart'; import 'package:dwds/src/utilities/dart_uri.dart'; import 'package:dwds/src/utilities/shared.dart'; -import 'package:dwds_test_common/logging.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:http/http.dart' as http; import 'package:path/path.dart' as path; import 'package:test/test.dart'; @@ -26,6 +24,8 @@ import 'package:vm_service_interface/vm_service_interface.dart'; import '../fixtures/context.dart'; import '../fixtures/project.dart'; import '../fixtures/utilities.dart'; +import '../logging.dart'; +import '../test_sdk_configuration.dart'; void runTests({ required TestSdkConfigurationProvider provider, @@ -470,10 +470,11 @@ 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 { @@ -637,10 +638,12 @@ 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([ @@ -682,41 +685,42 @@ 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); @@ -729,11 +733,9 @@ 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); @@ -748,11 +750,13 @@ 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'); @@ -760,11 +764,9 @@ 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'); @@ -797,17 +799,21 @@ 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); @@ -819,17 +825,21 @@ 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); @@ -842,17 +852,21 @@ 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); @@ -862,17 +876,21 @@ 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); @@ -886,17 +904,21 @@ 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); @@ -909,17 +931,21 @@ 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); @@ -931,17 +957,21 @@ 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); @@ -951,17 +981,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); @@ -976,17 +1006,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); @@ -997,17 +1027,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); @@ -1021,17 +1051,12 @@ 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); @@ -1047,17 +1072,21 @@ 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); @@ -1071,17 +1100,21 @@ 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); @@ -1091,17 +1124,21 @@ 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); @@ -1111,17 +1148,21 @@ 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); @@ -1133,17 +1174,21 @@ 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); @@ -1155,17 +1200,21 @@ 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); @@ -1176,12 +1225,14 @@ 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([ @@ -1230,12 +1281,14 @@ 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([ @@ -1282,51 +1335,63 @@ 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'); @@ -1686,8 +1751,9 @@ void runTests({ }); test('break on exceptions with setIsolatePauseMode', () async { - final oldPauseMode = (await service.getIsolate(isolateId!)) - .exceptionPauseMode; + final oldPauseMode = (await service.getIsolate( + isolateId!, + )).exceptionPauseMode; await service.setIsolatePauseMode( isolateId!, exceptionPauseMode: ExceptionPauseMode.kAll, @@ -1755,11 +1821,9 @@ 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 { @@ -2022,14 +2086,12 @@ void runTests({ final vm = await service.getVM(); final isolateId = vm.isolates!.first.id!; - final resolvedUris = await service.lookupResolvedPackageUris( - isolateId, - [ - 'package:does/not/exist.dart', - 'dart:does_not_exist', - 'file:///does_not_exist.dart', - ], - ); + final resolvedUris = await service + .lookupResolvedPackageUris(isolateId, [ + 'package:does/not/exist.dart', + 'dart:does_not_exist', + 'file:///does_not_exist.dart', + ]); expect(resolvedUris.uris, [null, null, null]); }, ); @@ -2525,8 +2587,9 @@ void runTests({ predicate( (Event event) => event.kind == EventKind.kWriteEvent && - String.fromCharCodes(base64.decode(event.bytes!)) - .contains('hello'), + String.fromCharCodes( + base64.decode(event.bytes!), + ).contains('hello'), ), ), ); @@ -2542,8 +2605,9 @@ void runTests({ predicate( (Event event) => event.kind == EventKind.kWriteEvent && - String.fromCharCodes(base64.decode(event.bytes!)) - .contains('Error'), + String.fromCharCodes( + base64.decode(event.bytes!), + ).contains('Error'), ), ), ); @@ -2559,8 +2623,9 @@ void runTests({ predicate( (Event event) => event.kind == EventKind.kWriteEvent && - String.fromCharCodes(base64.decode(event.bytes!)) - .contains('main.dart'), + String.fromCharCodes( + base64.decode(event.bytes!), + ).contains('main.dart'), ), ), ); diff --git a/dwds/test/integration/instances/common/class_inspection_common.dart b/dwds_test_common/lib/integration/class_inspection.dart similarity index 93% rename from dwds/test/integration/instances/common/class_inspection_common.dart rename to dwds_test_common/lib/integration/class_inspection.dart index da77bcc776..dae9aa3ff1 100644 --- a/dwds/test/integration/instances/common/class_inspection_common.dart +++ b/dwds_test_common/lib/integration/class_inspection.dart @@ -7,15 +7,15 @@ @Timeout(Duration(minutes: 2)) library; -import 'package:dwds_test_common/logging.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; import 'package:vm_service/vm_service.dart'; -import '../../fixtures/context.dart'; -import '../../fixtures/project.dart'; -import '../../fixtures/utilities.dart'; -import '../common/test_inspector.dart'; +import '../fixtures/context.dart'; +import '../fixtures/project.dart'; +import '../fixtures/utilities.dart'; +import '../logging.dart'; +import '../test_sdk_configuration.dart'; +import 'test_inspector.dart'; void runTests({ required TestSdkConfigurationProvider provider, diff --git a/dwds/test/integration/dart_uri_file_uri_common.dart b/dwds_test_common/lib/integration/dart_uri_file_uri.dart similarity index 95% rename from dwds/test/integration/dart_uri_file_uri_common.dart rename to dwds_test_common/lib/integration/dart_uri_file_uri.dart index 283292a7db..417c51a777 100644 --- a/dwds/test/integration/dart_uri_file_uri_common.dart +++ b/dwds_test_common/lib/integration/dart_uri_file_uri.dart @@ -3,13 +3,13 @@ // BSD-style license that can be found in the LICENSE file. import 'package:dwds/src/utilities/dart_uri.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:path/path.dart' as p; import 'package:test/test.dart'; -import 'fixtures/context.dart'; -import 'fixtures/project.dart'; -import 'fixtures/utilities.dart'; +import '../fixtures/context.dart'; +import '../fixtures/project.dart'; +import '../fixtures/utilities.dart'; +import '../test_sdk_configuration.dart'; // This tests converting file Uris into our internal paths. // diff --git a/dwds/test/integration/dds_port_common.dart b/dwds_test_common/lib/integration/dds_port.dart similarity index 90% rename from dwds/test/integration/dds_port_common.dart rename to dwds_test_common/lib/integration/dds_port.dart index 480f4e2024..97586f08a5 100644 --- a/dwds/test/integration/dds_port_common.dart +++ b/dwds_test_common/lib/integration/dds_port.dart @@ -5,13 +5,13 @@ import 'dart:io'; import 'package:dwds/dwds.dart'; -import 'package:dwds_test_common/logging.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/context.dart'; -import 'fixtures/project.dart'; -import 'fixtures/utilities.dart'; +import '../fixtures/context.dart'; +import '../fixtures/project.dart'; +import '../fixtures/utilities.dart'; +import '../logging.dart'; +import '../test_sdk_configuration.dart'; void testAll({required TestSdkConfigurationProvider provider}) { late TestContext context; diff --git a/dwds/test/integration/debug_service_common.dart b/dwds_test_common/lib/integration/debug_service.dart similarity index 87% rename from dwds/test/integration/debug_service_common.dart rename to dwds_test_common/lib/integration/debug_service.dart index 1dd3cce050..36e9cacec1 100644 --- a/dwds/test/integration/debug_service_common.dart +++ b/dwds_test_common/lib/integration/debug_service.dart @@ -5,14 +5,14 @@ import 'dart:io'; import 'package:dwds/dwds.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; import 'package:vm_service/vm_service.dart'; import 'package:vm_service/vm_service_io.dart'; -import 'fixtures/context.dart'; -import 'fixtures/project.dart'; -import 'fixtures/utilities.dart'; +import '../fixtures/context.dart'; +import '../fixtures/project.dart'; +import '../fixtures/utilities.dart'; +import '../test_sdk_configuration.dart'; void testAll({required TestSdkConfigurationProvider provider}) { final context = TestContext(TestProject.test, provider); @@ -47,8 +47,9 @@ void testAll({required TestSdkConfigurationProvider provider}) { test('Accepts connections with the auth token', () async { expect( - vmServiceConnectUri('${context.debugConnection.uri}/ws') - .then((client) => client.dispose()), + vmServiceConnectUri( + '${context.debugConnection.uri}/ws', + ).then((client) => client.dispose()), completes, ); }); @@ -72,8 +73,9 @@ void testAll({required TestSdkConfigurationProvider provider}) { // However, once DDS is disconnected, additional clients can connect again. await fakeDds.dispose(); expect( - vmServiceConnectUri('${context.debugConnection.uri}/ws') - .then((client) => client.dispose()), + vmServiceConnectUri( + '${context.debugConnection.uri}/ws', + ).then((client) => client.dispose()), completes, ); }); diff --git a/dwds/test/integration/devtools_common.dart b/dwds_test_common/lib/integration/devtools.dart similarity index 97% rename from dwds/test/integration/devtools_common.dart rename to dwds_test_common/lib/integration/devtools.dart index 8d8a4e6def..de8a161e6c 100644 --- a/dwds/test/integration/devtools_common.dart +++ b/dwds_test_common/lib/integration/devtools.dart @@ -5,15 +5,15 @@ import 'dart:io'; import 'package:dwds/src/config/tool_configuration.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; import 'package:vm_service/vm_service.dart'; // ignore: deprecated_member_use import 'package:webdriver/io.dart'; -import 'fixtures/context.dart'; -import 'fixtures/project.dart'; -import 'fixtures/utilities.dart'; +import '../fixtures/context.dart'; +import '../fixtures/project.dart'; +import '../fixtures/utilities.dart'; +import '../test_sdk_configuration.dart'; Future _waitForPageReady(TestContext context) async { var attempt = 100; diff --git a/dwds/test/integration/instances/common/dot_shorthands_common.dart b/dwds_test_common/lib/integration/dot_shorthands.dart similarity index 95% rename from dwds/test/integration/instances/common/dot_shorthands_common.dart rename to dwds_test_common/lib/integration/dot_shorthands.dart index f37bd6f7f8..bdb6a5deac 100644 --- a/dwds/test/integration/instances/common/dot_shorthands_common.dart +++ b/dwds_test_common/lib/integration/dot_shorthands.dart @@ -2,15 +2,15 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'package:dwds_test_common/logging.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:path/path.dart' show basename; import 'package:test/test.dart'; import 'package:vm_service/vm_service.dart'; -import '../../fixtures/context.dart'; -import '../../fixtures/project.dart'; -import '../../fixtures/utilities.dart'; +import '../fixtures/context.dart'; +import '../fixtures/project.dart'; +import '../fixtures/utilities.dart'; +import '../logging.dart'; +import '../test_sdk_configuration.dart'; import 'test_inspector.dart'; void runTests({ diff --git a/dwds/test/integration/evaluate_common.dart b/dwds_test_common/lib/integration/evaluate.dart similarity index 99% rename from dwds/test/integration/evaluate_common.dart rename to dwds_test_common/lib/integration/evaluate.dart index 3e3f8b51c4..2a11822f85 100644 --- a/dwds/test/integration/evaluate_common.dart +++ b/dwds_test_common/lib/integration/evaluate.dart @@ -9,16 +9,16 @@ library; import 'dart:async'; import 'package:dwds/src/services/expression_evaluator.dart'; -import 'package:dwds_test_common/logging.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; -import 'package:dwds_test_common/utilities.dart' show dartSdkIsAtLeast; import 'package:test/test.dart'; import 'package:vm_service/vm_service.dart'; import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart'; -import 'fixtures/context.dart'; -import 'fixtures/project.dart'; -import 'fixtures/utilities.dart'; +import '../fixtures/context.dart'; +import '../fixtures/project.dart'; +import '../fixtures/utilities.dart'; +import '../logging.dart'; +import '../test_sdk_configuration.dart'; +import '../utilities.dart' show dartSdkIsAtLeast; void testAll({ required TestSdkConfigurationProvider provider, diff --git a/dwds/test/integration/evaluate_circular_common.dart b/dwds_test_common/lib/integration/evaluate_circular.dart similarity index 95% rename from dwds/test/integration/evaluate_circular_common.dart rename to dwds_test_common/lib/integration/evaluate_circular.dart index 8aa570008c..fab3ccea37 100644 --- a/dwds/test/integration/evaluate_circular_common.dart +++ b/dwds_test_common/lib/integration/evaluate_circular.dart @@ -6,15 +6,15 @@ @Timeout(Duration(minutes: 2)) library; -import 'package:dwds_test_common/logging.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; import 'package:vm_service/vm_service.dart'; import 'package:vm_service_interface/vm_service_interface.dart'; -import 'fixtures/context.dart'; -import 'fixtures/project.dart'; -import 'fixtures/utilities.dart'; +import '../fixtures/context.dart'; +import '../fixtures/project.dart'; +import '../fixtures/utilities.dart'; +import '../logging.dart'; +import '../test_sdk_configuration.dart'; void testAll({ required TestSdkConfigurationProvider provider, diff --git a/dwds/test/integration/evaluate_parts_common.dart b/dwds_test_common/lib/integration/evaluate_parts.dart similarity index 96% rename from dwds/test/integration/evaluate_parts_common.dart rename to dwds_test_common/lib/integration/evaluate_parts.dart index 21c6155435..5bbdb282e6 100644 --- a/dwds/test/integration/evaluate_parts_common.dart +++ b/dwds_test_common/lib/integration/evaluate_parts.dart @@ -2,15 +2,15 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'package:dwds_test_common/logging.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; import 'package:vm_service/vm_service.dart'; import 'package:vm_service_interface/vm_service_interface.dart'; -import 'fixtures/context.dart'; -import 'fixtures/project.dart'; -import 'fixtures/utilities.dart'; +import '../fixtures/context.dart'; +import '../fixtures/project.dart'; +import '../fixtures/utilities.dart'; +import '../logging.dart'; +import '../test_sdk_configuration.dart'; void testAll({ required TestSdkConfigurationProvider provider, diff --git a/dwds/test/integration/events_common.dart b/dwds_test_common/lib/integration/events.dart similarity index 98% rename from dwds/test/integration/events_common.dart rename to dwds_test_common/lib/integration/events.dart index c8e050d12c..490d5642eb 100644 --- a/dwds/test/integration/events_common.dart +++ b/dwds_test_common/lib/integration/events.dart @@ -6,16 +6,16 @@ import 'dart:async'; import 'dart:io'; import 'package:dwds/src/events.dart'; -import 'package:dwds_test_common/logging.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; import 'package:vm_service/vm_service.dart'; import 'package:vm_service_interface/vm_service_interface.dart'; import 'package:webdriver/async_core.dart'; -import 'fixtures/context.dart'; -import 'fixtures/project.dart'; -import 'fixtures/utilities.dart'; +import '../fixtures/context.dart'; +import '../fixtures/project.dart'; +import '../fixtures/utilities.dart'; +import '../logging.dart'; +import '../test_sdk_configuration.dart'; void testWithDwds({ required TestSdkConfigurationProvider provider, diff --git a/dwds/test/integration/expression_compiler_service_common.dart b/dwds_test_common/lib/integration/expression_compiler_service.dart similarity index 99% rename from dwds/test/integration/expression_compiler_service_common.dart rename to dwds_test_common/lib/integration/expression_compiler_service.dart index 3b5482eb45..fc516af6f0 100644 --- a/dwds/test/integration/expression_compiler_service_common.dart +++ b/dwds_test_common/lib/integration/expression_compiler_service.dart @@ -14,11 +14,12 @@ import 'package:dwds/sdk_configuration.dart'; import 'package:dwds/src/services/expression_compiler.dart'; import 'package:dwds/src/services/expression_compiler_service.dart'; import 'package:dwds/src/utilities/server.dart'; -import 'package:dwds_test_common/logging.dart'; import 'package:logging/logging.dart'; import 'package:shelf/shelf.dart'; import 'package:test/test.dart'; +import '../logging.dart'; + ExpressionCompilerService get service => _service!; late ExpressionCompilerService? _service; diff --git a/dwds/test/integration/hot_reload_common.dart b/dwds_test_common/lib/integration/hot_reload.dart similarity index 96% rename from dwds/test/integration/hot_reload_common.dart rename to dwds_test_common/lib/integration/hot_reload.dart index 6a2a05374f..c7a1aab3a6 100644 --- a/dwds/test/integration/hot_reload_common.dart +++ b/dwds_test_common/lib/integration/hot_reload.dart @@ -4,14 +4,14 @@ import 'dart:async'; -import 'package:dwds_test_common/logging.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; import 'package:vm_service/vm_service.dart'; -import 'fixtures/context.dart'; -import 'fixtures/project.dart'; -import 'fixtures/utilities.dart'; +import '../fixtures/context.dart'; +import '../fixtures/project.dart'; +import '../fixtures/utilities.dart'; +import '../logging.dart'; +import '../test_sdk_configuration.dart'; const originalString = 'Hello World!'; const newString = 'Bonjour le monde!'; diff --git a/dwds/test/integration/hot_reload_breakpoints_common.dart b/dwds_test_common/lib/integration/hot_reload_breakpoints.dart similarity index 98% rename from dwds/test/integration/hot_reload_breakpoints_common.dart rename to dwds_test_common/lib/integration/hot_reload_breakpoints.dart index 276781b3ab..80601410b6 100644 --- a/dwds/test/integration/hot_reload_breakpoints_common.dart +++ b/dwds_test_common/lib/integration/hot_reload_breakpoints.dart @@ -4,14 +4,14 @@ import 'dart:async'; -import 'package:dwds_test_common/logging.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; import 'package:vm_service/vm_service.dart'; -import 'fixtures/context.dart'; -import 'fixtures/project.dart'; -import 'fixtures/utilities.dart'; +import '../fixtures/context.dart'; +import '../fixtures/project.dart'; +import '../fixtures/utilities.dart'; +import '../logging.dart'; +import '../test_sdk_configuration.dart'; void runTests({ required TestSdkConfigurationProvider provider, diff --git a/dwds/test/integration/common/hot_restart_common.dart b/dwds_test_common/lib/integration/hot_restart.dart similarity index 98% rename from dwds/test/integration/common/hot_restart_common.dart rename to dwds_test_common/lib/integration/hot_restart.dart index 586e0fb38b..5f4c07c130 100644 --- a/dwds/test/integration/common/hot_restart_common.dart +++ b/dwds_test_common/lib/integration/hot_restart.dart @@ -11,14 +11,14 @@ import 'dart:async'; import 'package:dwds/dwds.dart'; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/logging.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; import 'package:vm_service/vm_service.dart'; import '../fixtures/context.dart'; import '../fixtures/project.dart'; import '../fixtures/utilities.dart'; +import '../logging.dart'; +import '../test_sdk_configuration.dart'; const originalString = 'Hello World!'; const newString = 'Bonjour le monde!'; @@ -318,8 +318,9 @@ void runTests({ final eventsDone = expectLater( client.onIsolateEvent, emitsThrough( - _hasKind(EventKind.kServiceExtensionAdded) - .having((e) => e.extensionRPC, 'service', 'ext.bar'), + _hasKind( + EventKind.kServiceExtensionAdded, + ).having((e) => e.extensionRPC, 'service', 'ext.bar'), ), ); diff --git a/dwds/test/integration/hot_restart_breakpoints_common.dart b/dwds_test_common/lib/integration/hot_restart_breakpoints.dart similarity index 98% rename from dwds/test/integration/hot_restart_breakpoints_common.dart rename to dwds_test_common/lib/integration/hot_restart_breakpoints.dart index 18b40c18ab..c2f0ff78ae 100644 --- a/dwds/test/integration/hot_restart_breakpoints_common.dart +++ b/dwds_test_common/lib/integration/hot_restart_breakpoints.dart @@ -4,16 +4,16 @@ import 'dart:async'; -import 'package:dwds_test_common/logging.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; import 'package:vm_service/vm_service.dart'; import 'package:vm_service_interface/vm_service_interface.dart'; import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart'; -import 'fixtures/context.dart'; -import 'fixtures/project.dart'; -import 'fixtures/utilities.dart'; +import '../fixtures/context.dart'; +import '../fixtures/project.dart'; +import '../fixtures/utilities.dart'; +import '../logging.dart'; +import '../test_sdk_configuration.dart'; void runTests({ required TestSdkConfigurationProvider provider, diff --git a/dwds/test/integration/common/hot_restart_correctness_common.dart b/dwds_test_common/lib/integration/hot_restart_correctness.dart similarity index 98% rename from dwds/test/integration/common/hot_restart_correctness_common.dart rename to dwds_test_common/lib/integration/hot_restart_correctness.dart index e85af538bd..c4bf858908 100644 --- a/dwds/test/integration/common/hot_restart_correctness_common.dart +++ b/dwds_test_common/lib/integration/hot_restart_correctness.dart @@ -11,14 +11,14 @@ import 'dart:async'; import 'package:dwds/dwds.dart'; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/logging.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; import 'package:vm_service/vm_service.dart'; import '../fixtures/context.dart'; import '../fixtures/project.dart'; import '../fixtures/utilities.dart'; +import '../logging.dart'; +import '../test_sdk_configuration.dart'; const originalString = 'variableToModifyToForceRecompile = 23'; const newString = 'variableToModifyToForceRecompile = 45'; diff --git a/dwds/test/integration/inspector_common.dart b/dwds_test_common/lib/integration/inspector.dart similarity index 98% rename from dwds/test/integration/inspector_common.dart rename to dwds_test_common/lib/integration/inspector.dart index e374c6f2af..98c6a4e019 100644 --- a/dwds/test/integration/inspector_common.dart +++ b/dwds_test_common/lib/integration/inspector.dart @@ -6,14 +6,14 @@ import 'package:dwds/dwds.dart'; import 'package:dwds/expression_compiler.dart'; import 'package:dwds/src/debugging/chrome_inspector.dart'; import 'package:dwds/src/utilities/conversions.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; import 'package:vm_service/vm_service.dart'; import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart'; -import 'fixtures/context.dart'; -import 'fixtures/project.dart'; -import 'fixtures/utilities.dart'; +import '../fixtures/context.dart'; +import '../fixtures/project.dart'; +import '../fixtures/utilities.dart'; +import '../test_sdk_configuration.dart'; void runTests({ required TestSdkConfigurationProvider provider, diff --git a/dwds/test/integration/instances/common/instance_common.dart b/dwds_test_common/lib/integration/instance.dart similarity index 98% rename from dwds/test/integration/instances/common/instance_common.dart rename to dwds_test_common/lib/integration/instance.dart index 492c49badf..3b4baca595 100644 --- a/dwds/test/integration/instances/common/instance_common.dart +++ b/dwds_test_common/lib/integration/instance.dart @@ -5,15 +5,15 @@ import 'package:dwds/expression_compiler.dart'; import 'package:dwds/src/config/tool_configuration.dart'; import 'package:dwds/src/debugging/chrome_inspector.dart'; -import 'package:dwds_test_common/logging.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; import 'package:vm_service/vm_service.dart'; import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart'; -import '../../fixtures/context.dart'; -import '../../fixtures/project.dart'; -import '../../fixtures/utilities.dart'; +import '../fixtures/context.dart'; +import '../fixtures/project.dart'; +import '../fixtures/utilities.dart'; +import '../logging.dart'; +import '../test_sdk_configuration.dart'; import 'test_inspector.dart'; void runTypeSystemVerificationTests({ diff --git a/dwds/test/integration/instances/common/instance_inspection_common.dart b/dwds_test_common/lib/integration/instance_inspection.dart similarity index 98% rename from dwds/test/integration/instances/common/instance_inspection_common.dart rename to dwds_test_common/lib/integration/instance_inspection.dart index 13f91262f1..2793504342 100644 --- a/dwds/test/integration/instances/common/instance_inspection_common.dart +++ b/dwds_test_common/lib/integration/instance_inspection.dart @@ -2,14 +2,14 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'package:dwds_test_common/logging.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; import 'package:vm_service/vm_service.dart'; -import '../../fixtures/context.dart'; -import '../../fixtures/project.dart'; -import '../../fixtures/utilities.dart'; +import '../fixtures/context.dart'; +import '../fixtures/project.dart'; +import '../fixtures/utilities.dart'; +import '../logging.dart'; +import '../test_sdk_configuration.dart'; import 'test_inspector.dart'; void runTests({ diff --git a/dwds/test/integration/listviews_common.dart b/dwds_test_common/lib/integration/listviews.dart similarity index 88% rename from dwds/test/integration/listviews_common.dart rename to dwds_test_common/lib/integration/listviews.dart index 85b2cd3f7d..9a57b7574f 100644 --- a/dwds/test/integration/listviews_common.dart +++ b/dwds_test_common/lib/integration/listviews.dart @@ -2,12 +2,12 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/context.dart'; -import 'fixtures/project.dart'; -import 'fixtures/utilities.dart'; +import '../fixtures/context.dart'; +import '../fixtures/project.dart'; +import '../fixtures/utilities.dart'; +import '../test_sdk_configuration.dart'; void runTests({ required TestSdkConfigurationProvider provider, diff --git a/dwds/test/integration/load_strategy_common.dart b/dwds_test_common/lib/integration/load_strategy.dart similarity index 96% rename from dwds/test/integration/load_strategy_common.dart rename to dwds_test_common/lib/integration/load_strategy.dart index 8f76ac287d..0189d3a388 100644 --- a/dwds/test/integration/load_strategy_common.dart +++ b/dwds_test_common/lib/integration/load_strategy.dart @@ -4,14 +4,14 @@ import 'package:dwds/dwds.dart'; import 'package:dwds/src/config/tool_configuration.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:path/path.dart' as p; import 'package:test/test.dart'; -import 'fixtures/context.dart'; -import 'fixtures/fakes.dart'; -import 'fixtures/project.dart'; -import 'fixtures/utilities.dart'; +import '../fixtures/context.dart'; +import '../fixtures/fakes.dart'; +import '../fixtures/project.dart'; +import '../fixtures/utilities.dart'; +import '../test_sdk_configuration.dart'; void runIndependentTests() { group('Fake Strategy', () { diff --git a/dwds/test/integration/instances/common/patterns_inspection_common.dart b/dwds_test_common/lib/integration/patterns_inspection.dart similarity index 96% rename from dwds/test/integration/instances/common/patterns_inspection_common.dart rename to dwds_test_common/lib/integration/patterns_inspection.dart index 8255c56864..794d669056 100644 --- a/dwds/test/integration/instances/common/patterns_inspection_common.dart +++ b/dwds_test_common/lib/integration/patterns_inspection.dart @@ -2,14 +2,14 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'package:dwds_test_common/logging.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; import 'package:vm_service/vm_service.dart'; -import '../../fixtures/context.dart'; -import '../../fixtures/project.dart'; -import '../../fixtures/utilities.dart'; +import '../fixtures/context.dart'; +import '../fixtures/project.dart'; +import '../fixtures/utilities.dart'; +import '../logging.dart'; +import '../test_sdk_configuration.dart'; import 'test_inspector.dart'; void runTests({ diff --git a/dwds/test/integration/readers/proxy_server_asset_reader_common.dart b/dwds_test_common/lib/integration/readers/proxy_server_asset_reader.dart similarity index 90% rename from dwds/test/integration/readers/proxy_server_asset_reader_common.dart rename to dwds_test_common/lib/integration/readers/proxy_server_asset_reader.dart index 0818f875cd..543fabb012 100644 --- a/dwds/test/integration/readers/proxy_server_asset_reader_common.dart +++ b/dwds_test_common/lib/integration/readers/proxy_server_asset_reader.dart @@ -3,12 +3,12 @@ // BSD-style license that can be found in the LICENSE file. import 'package:dwds/src/readers/proxy_server_asset_reader.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/context.dart'; -import '../fixtures/project.dart'; -import '../fixtures/utilities.dart'; +import '../../fixtures/context.dart'; +import '../../fixtures/project.dart'; +import '../../fixtures/utilities.dart'; +import '../../test_sdk_configuration.dart'; void testAll({required TestSdkConfigurationProvider provider}) { group('ProxyServerAssetReader', () { diff --git a/dwds/test/integration/instances/common/record_inspection_common.dart b/dwds_test_common/lib/integration/record_inspection.dart similarity index 98% rename from dwds/test/integration/instances/common/record_inspection_common.dart rename to dwds_test_common/lib/integration/record_inspection.dart index ef4c65cd22..fa6d8fa3a9 100644 --- a/dwds/test/integration/instances/common/record_inspection_common.dart +++ b/dwds_test_common/lib/integration/record_inspection.dart @@ -2,14 +2,14 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'package:dwds_test_common/logging.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; import 'package:vm_service/vm_service.dart'; -import '../../fixtures/context.dart'; -import '../../fixtures/project.dart'; -import '../../fixtures/utilities.dart'; +import '../fixtures/context.dart'; +import '../fixtures/project.dart'; +import '../fixtures/utilities.dart'; +import '../logging.dart'; +import '../test_sdk_configuration.dart'; import 'test_inspector.dart'; void runTests({ diff --git a/dwds/test/integration/instances/common/record_type_inspection_common.dart b/dwds_test_common/lib/integration/record_type_inspection.dart similarity index 98% rename from dwds/test/integration/instances/common/record_type_inspection_common.dart rename to dwds_test_common/lib/integration/record_type_inspection.dart index 82eb5c3e03..02105b15fc 100644 --- a/dwds/test/integration/instances/common/record_type_inspection_common.dart +++ b/dwds_test_common/lib/integration/record_type_inspection.dart @@ -2,14 +2,14 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'package:dwds_test_common/logging.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; import 'package:vm_service/vm_service.dart'; -import '../../fixtures/context.dart'; -import '../../fixtures/project.dart'; -import '../../fixtures/utilities.dart'; +import '../fixtures/context.dart'; +import '../fixtures/project.dart'; +import '../fixtures/utilities.dart'; +import '../logging.dart'; +import '../test_sdk_configuration.dart'; import 'test_inspector.dart'; void runTests({ diff --git a/dwds/test/integration/refresh_common.dart b/dwds_test_common/lib/integration/refresh.dart similarity index 92% rename from dwds/test/integration/refresh_common.dart rename to dwds_test_common/lib/integration/refresh.dart index b4a2f2a65e..55dd8a1094 100644 --- a/dwds/test/integration/refresh_common.dart +++ b/dwds_test_common/lib/integration/refresh.dart @@ -4,15 +4,15 @@ import 'dart:async'; -import 'package:dwds_test_common/logging.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; import 'package:vm_service/vm_service.dart'; import 'package:vm_service_interface/vm_service_interface.dart'; -import 'fixtures/context.dart'; -import 'fixtures/project.dart'; -import 'fixtures/utilities.dart'; +import '../fixtures/context.dart'; +import '../fixtures/project.dart'; +import '../fixtures/utilities.dart'; +import '../logging.dart'; +import '../test_sdk_configuration.dart'; void testAll({required TestSdkConfigurationProvider provider}) { final context = TestContext(TestProject.test, provider); diff --git a/dwds/test/integration/run_request_common.dart b/dwds_test_common/lib/integration/run_request.dart similarity index 93% rename from dwds/test/integration/run_request_common.dart rename to dwds_test_common/lib/integration/run_request.dart index 9c35903bcc..4e4dc947b6 100644 --- a/dwds/test/integration/run_request_common.dart +++ b/dwds_test_common/lib/integration/run_request.dart @@ -4,15 +4,15 @@ import 'dart:async'; -import 'package:dwds_test_common/logging.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; import 'package:vm_service/vm_service.dart'; import 'package:vm_service_interface/vm_service_interface.dart'; -import 'fixtures/context.dart'; -import 'fixtures/project.dart'; -import 'fixtures/utilities.dart'; +import '../fixtures/context.dart'; +import '../fixtures/project.dart'; +import '../fixtures/utilities.dart'; +import '../logging.dart'; +import '../test_sdk_configuration.dart'; void testAll({required TestSdkConfigurationProvider provider}) { final context = TestContext(TestProject.test, provider); diff --git a/dwds/test/integration/screenshot_common.dart b/dwds_test_common/lib/integration/screenshot.dart similarity index 81% rename from dwds/test/integration/screenshot_common.dart rename to dwds_test_common/lib/integration/screenshot.dart index 4b530a6ffc..5e56feadb1 100644 --- a/dwds/test/integration/screenshot_common.dart +++ b/dwds_test_common/lib/integration/screenshot.dart @@ -2,13 +2,13 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'package:dwds_test_common/logging.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/context.dart'; -import 'fixtures/project.dart'; -import 'fixtures/utilities.dart'; +import '../fixtures/context.dart'; +import '../fixtures/project.dart'; +import '../fixtures/utilities.dart'; +import '../logging.dart'; +import '../test_sdk_configuration.dart'; void testAll({required TestSdkConfigurationProvider provider}) { final context = TestContext(TestProject.test, provider); diff --git a/dwds/test/integration/sdk_configuration_common.dart b/dwds_test_common/lib/integration/sdk_configuration.dart similarity index 96% rename from dwds/test/integration/sdk_configuration_common.dart rename to dwds_test_common/lib/integration/sdk_configuration.dart index e36dd8038d..5d30e29ae2 100644 --- a/dwds/test/integration/sdk_configuration_common.dart +++ b/dwds_test_common/lib/integration/sdk_configuration.dart @@ -5,11 +5,12 @@ import 'dart:io'; import 'package:dwds/src/utilities/sdk_configuration.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:file/memory.dart'; import 'package:path/path.dart' as p; import 'package:test/test.dart'; +import '../test_sdk_configuration.dart'; + var _throwsDoesNotExistException = throwsA( isA().having( (e) => '$e', @@ -64,8 +65,9 @@ void runIndependentTests() { final workerDir = p.dirname(compilerWorkerPath); Directory(workerDir).createSync(recursive: true); - File(defaultSdkConfiguration.compilerWorkerPath!) - .copySync(compilerWorkerPath); + File( + defaultSdkConfiguration.compilerWorkerPath!, + ).copySync(compilerWorkerPath); expect(sdkConfiguration.sdkDirectory, equals(sdkDirectory)); expect(sdkConfiguration.sdkSummaryPath, equals(sdkSummaryPath)); diff --git a/dwds/test/integration/instances/common/test_inspector.dart b/dwds_test_common/lib/integration/test_inspector.dart similarity index 99% rename from dwds/test/integration/instances/common/test_inspector.dart rename to dwds_test_common/lib/integration/test_inspector.dart index 4423659911..3f12e2407d 100644 --- a/dwds/test/integration/instances/common/test_inspector.dart +++ b/dwds_test_common/lib/integration/test_inspector.dart @@ -8,7 +8,7 @@ import 'package:path/path.dart' show basename; import 'package:test/test.dart'; import 'package:vm_service/vm_service.dart'; -import '../../fixtures/context.dart'; +import '../fixtures/context.dart'; class TestInspector { TestInspector(this.context); diff --git a/dwds/test/integration/instances/common/type_inspection_common.dart b/dwds_test_common/lib/integration/type_inspection.dart similarity index 98% rename from dwds/test/integration/instances/common/type_inspection_common.dart rename to dwds_test_common/lib/integration/type_inspection.dart index cc45462d98..624b8dea5a 100644 --- a/dwds/test/integration/instances/common/type_inspection_common.dart +++ b/dwds_test_common/lib/integration/type_inspection.dart @@ -3,14 +3,14 @@ // BSD-style license that can be found in the LICENSE file. import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/logging.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; import 'package:vm_service/vm_service.dart'; -import '../../fixtures/context.dart'; -import '../../fixtures/project.dart'; -import '../../fixtures/utilities.dart'; +import '../fixtures/context.dart'; +import '../fixtures/project.dart'; +import '../fixtures/utilities.dart'; +import '../logging.dart'; +import '../test_sdk_configuration.dart'; import 'test_inspector.dart'; void runTests({ diff --git a/dwds/test/integration/variable_scope_common.dart b/dwds_test_common/lib/integration/variable_scope.dart similarity index 98% rename from dwds/test/integration/variable_scope_common.dart rename to dwds_test_common/lib/integration/variable_scope.dart index a1191aa21b..398a0977c0 100644 --- a/dwds/test/integration/variable_scope_common.dart +++ b/dwds_test_common/lib/integration/variable_scope.dart @@ -6,14 +6,14 @@ import 'dart:async'; import 'package:dwds/src/debugging/dart_scope.dart'; import 'package:dwds/src/services/chrome/chrome_proxy_service.dart'; -import 'package:dwds_test_common/logging.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; import 'package:vm_service/vm_service.dart'; -import 'fixtures/context.dart'; -import 'fixtures/project.dart'; -import 'fixtures/utilities.dart'; +import '../fixtures/context.dart'; +import '../fixtures/project.dart'; +import '../fixtures/utilities.dart'; +import '../logging.dart'; +import '../test_sdk_configuration.dart'; void testAll({required TestSdkConfigurationProvider provider}) { final context = TestContext(TestProject.testScopes, provider); diff --git a/dwds_test_common/pubspec.yaml b/dwds_test_common/pubspec.yaml index e93dd697fe..bd7218ef92 100644 --- a/dwds_test_common/pubspec.yaml +++ b/dwds_test_common/pubspec.yaml @@ -6,12 +6,25 @@ environment: sdk: ^3.12.0-0 dependencies: - dwds: any + build_daemon: ^4.1.4 + dds: ^5.3.0 + dwds: + path: ../dwds file: ">=6.0.0 <8.0.0" + http: any + io: ^1.0.5 logging: ^1.0.1 + mime: ^2.0.0 + package_config: '>=2.0.2 <4.0.0' path: ^1.8.1 pub_semver: ^2.1.1 + shelf: ^1.3.0 + shelf_proxy: any test: ^1.21.1 - + vm_service: ">=14.2.4 <16.0.0" + vm_service_interface: any + webdriver: any + webkit_inspection_protocol: ^1.0.1 + yaml: ^3.1.3 dev_dependencies: dart_flutter_team_lints: ^3.5.2 diff --git a/dwds/test/integration/handlers/asset_handler_amd_test.dart b/webdev/test/asset_handler_amd_test.dart similarity index 89% rename from dwds/test/integration/handlers/asset_handler_amd_test.dart rename to webdev/test/asset_handler_amd_test.dart index c5d84ba150..dc099aefb0 100644 --- a/dwds/test/integration/handlers/asset_handler_amd_test.dart +++ b/webdev/test/asset_handler_amd_test.dart @@ -6,11 +6,10 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/integration/asset_handler.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'asset_handler_common.dart'; - void main() { final provider = TestSdkConfigurationProvider( ddcModuleFormat: ModuleFormat.amd, diff --git a/dwds/test/integration/handlers/asset_handler_ddc_library_bundle_test.dart b/webdev/test/asset_handler_ddc_library_bundle_test.dart similarity index 91% rename from dwds/test/integration/handlers/asset_handler_ddc_library_bundle_test.dart rename to webdev/test/asset_handler_ddc_library_bundle_test.dart index dbfe9835f4..7c4d6a3d78 100644 --- a/dwds/test/integration/handlers/asset_handler_ddc_library_bundle_test.dart +++ b/webdev/test/asset_handler_ddc_library_bundle_test.dart @@ -6,11 +6,10 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/integration/asset_handler.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'asset_handler_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/dwds/test/integration/dds_port_amd_test.dart b/webdev/test/dds_port_amd_test.dart similarity index 89% rename from dwds/test/integration/dds_port_amd_test.dart rename to webdev/test/dds_port_amd_test.dart index 6fbbf45ec6..86fbd79fab 100644 --- a/dwds/test/integration/dds_port_amd_test.dart +++ b/webdev/test/dds_port_amd_test.dart @@ -6,11 +6,10 @@ @Timeout(Duration(minutes: 2)) library; +import 'package:dwds_test_common/integration/dds_port.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'dds_port_common.dart'; - void main() { final provider = TestSdkConfigurationProvider(); tearDownAll(provider.dispose); diff --git a/dwds/test/integration/dds_port_ddc_library_bundle_test.dart b/webdev/test/dds_port_ddc_library_bundle_test.dart similarity index 92% rename from dwds/test/integration/dds_port_ddc_library_bundle_test.dart rename to webdev/test/dds_port_ddc_library_bundle_test.dart index f8125a3e85..fa768123a9 100644 --- a/dwds/test/integration/dds_port_ddc_library_bundle_test.dart +++ b/webdev/test/dds_port_ddc_library_bundle_test.dart @@ -7,11 +7,10 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/integration/dds_port.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'dds_port_common.dart'; - void main() { // Enable verbose logging for debugging. const debug = false; diff --git a/webdev/test/inspector_amd_test.dart b/webdev/test/inspector_amd_test.dart new file mode 100644 index 0000000000..e111983ff1 --- /dev/null +++ b/webdev/test/inspector_amd_test.dart @@ -0,0 +1,28 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/inspector.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + runTests(provider: provider, compilationMode: CompilationMode.buildDaemon); + }); +} diff --git a/webdev/test/inspector_ddc_library_bundle_test.dart b/webdev/test/inspector_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..493d97e456 --- /dev/null +++ b/webdev/test/inspector_ddc_library_bundle_test.dart @@ -0,0 +1,36 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/inspector.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + runTests(provider: provider, compilationMode: CompilationMode.buildDaemon); + }); + + group('Build Daemon and Frontend Server |', () { + runTests( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); +} diff --git a/dwds/test/integration/readers/proxy_server_asset_reader_amd_test.dart b/webdev/test/proxy_server_asset_reader_amd_test.dart similarity index 87% rename from dwds/test/integration/readers/proxy_server_asset_reader_amd_test.dart rename to webdev/test/proxy_server_asset_reader_amd_test.dart index e7d2d05592..d240700024 100644 --- a/dwds/test/integration/readers/proxy_server_asset_reader_amd_test.dart +++ b/webdev/test/proxy_server_asset_reader_amd_test.dart @@ -6,11 +6,10 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/integration/readers/proxy_server_asset_reader.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'proxy_server_asset_reader_common.dart'; - void main() { final provider = TestSdkConfigurationProvider( ddcModuleFormat: ModuleFormat.amd, diff --git a/dwds/test/integration/readers/proxy_server_asset_reader_ddc_library_bundle_test.dart b/webdev/test/proxy_server_asset_reader_ddc_library_bundle_test.dart similarity index 87% rename from dwds/test/integration/readers/proxy_server_asset_reader_ddc_library_bundle_test.dart rename to webdev/test/proxy_server_asset_reader_ddc_library_bundle_test.dart index ee42cfd2d0..a8266ced49 100644 --- a/dwds/test/integration/readers/proxy_server_asset_reader_ddc_library_bundle_test.dart +++ b/webdev/test/proxy_server_asset_reader_ddc_library_bundle_test.dart @@ -6,11 +6,10 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/integration/readers/proxy_server_asset_reader.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'proxy_server_asset_reader_common.dart'; - void main() { final provider = TestSdkConfigurationProvider( ddcModuleFormat: ModuleFormat.ddc, From 1dcd91f2435fe0f015ccc4b3cd8e84cc0609c948 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Fri, 7 Aug 2026 10:29:23 -0700 Subject: [PATCH 088/134] Adding analysis error ignore tags --- dwds_test_common/lib/fixtures/utilities.dart | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dwds_test_common/lib/fixtures/utilities.dart b/dwds_test_common/lib/fixtures/utilities.dart index d486de8e8a..64b77ebc35 100644 --- a/dwds_test_common/lib/fixtures/utilities.dart +++ b/dwds_test_common/lib/fixtures/utilities.dart @@ -105,7 +105,7 @@ class TestDebugSettings extends DebugSettings { TestContext context, { bool serveFromDds = false, }) : super( - // ignore: deprecated_member_use_from_same_package + // ignore: deprecated_member_use devToolsLauncher: serveFromDds ? null : (hostname) async { @@ -136,11 +136,14 @@ class TestDebugSettings extends DebugSettings { required super.useSseForDebugBackend, required super.useSseForDebugProxy, required super.useSseForInjectedClient, + // ignore: deprecated_member_use required super.spawnDds, + // ignore: deprecated_member_use required super.ddsPort, required super.enableDevToolsLaunch, required super.launchDevToolsInNewWindow, required super.emitDebugEvents, + // ignore: deprecated_member_use required super.devToolsLauncher, required super.expressionCompiler, required super.urlEncoder, @@ -167,15 +170,15 @@ class TestDebugSettings extends DebugSettings { useSseForDebugProxy: useSse ?? useSseForDebugProxy, useSseForDebugBackend: useSse ?? useSseForDebugBackend, useSseForInjectedClient: useSse ?? useSseForInjectedClient, - // ignore: deprecated_member_use_from_same_package + // ignore: deprecated_member_use spawnDds: spawnDds ?? this.spawnDds, - // ignore: deprecated_member_use_from_same_package + // ignore: deprecated_member_use ddsPort: ddsPort ?? this.ddsPort, enableDevToolsLaunch: enableDevToolsLaunch ?? this.enableDevToolsLaunch, launchDevToolsInNewWindow: launchDevToolsInNewWindow ?? this.launchDevToolsInNewWindow, emitDebugEvents: emitDebugEvents ?? this.emitDebugEvents, - // ignore: deprecated_member_use_from_same_package + // ignore: deprecated_member_use devToolsLauncher: devToolsLauncher ?? this.devToolsLauncher, expressionCompiler: expressionCompiler ?? this.expressionCompiler, urlEncoder: urlEncoder ?? this.urlEncoder, From 9af74df11118605dfb6f49c2b9c8bc41bc9deaf9 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Fri, 7 Aug 2026 12:05:10 -0700 Subject: [PATCH 089/134] Fixing asset reader test --- .../integration/readers/frontend_server_asset_reader_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dwds/test/integration/readers/frontend_server_asset_reader_test.dart b/dwds/test/integration/readers/frontend_server_asset_reader_test.dart index 3e3c780e2b..7e72792591 100644 --- a/dwds/test/integration/readers/frontend_server_asset_reader_test.dart +++ b/dwds/test/integration/readers/frontend_server_asset_reader_test.dart @@ -14,7 +14,7 @@ import 'package:dwds_test_common/utilities.dart'; import 'package:path/path.dart' as p; import 'package:test/test.dart'; -final fixturesDir = absolutePath(pathFromFixtures: ''); +final fixturesDir = absolutePath(pathFromDwds: 'test/integration/fixtures'); void main() { late FrontendServerAssetReader assetReader; From 2e1b65fd9de21412bc98e28743c80e5a0bb7fda6 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Wed, 12 Aug 2026 14:21:57 -0700 Subject: [PATCH 090/134] moving tests to webdev --- dwds/lib/src/handlers/injected_client_js.dart | 2238 ++++++----------- .../test/integration/breakpoint_amd_test.dart | 7 - .../breakpoint_ddc_library_bundle_test.dart | 14 - dwds/test/integration/callstack_amd_test.dart | 7 - .../callstack_ddc_library_bundle_test.dart | 14 - ...proxy_service_ddc_library_bundle_test.dart | 34 - .../circular_evaluate_amd_test.dart | 4 - ...ular_evaluate_ddc_library_bundle_test.dart | 11 - .../dart_uri_file_uri_amd_test.dart | 4 - ..._uri_file_uri_ddc_library_bundle_test.dart | 11 - dwds/test/integration/evaluate_amd_test.dart | 4 - .../evaluate_ddc_library_bundle_test.dart | 11 - dwds/test/integration/events_amd_test.dart | 7 - .../events_ddc_library_bundle_test.dart | 7 - ...d_breakpoints_ddc_library_bundle_test.dart | 7 - .../hot_reload_ddc_library_bundle_test.dart | 7 - ...t_breakpoints_ddc_library_bundle_test.dart | 11 - ...t_correctness_ddc_library_bundle_test.dart | 30 - .../hot_restart_ddc_library_bundle_test.dart | 31 - .../instances/class_inspection_amd_test.dart | 34 - ...ss_inspection_ddc_library_bundle_test.dart | 34 - .../instances/dot_shorthands_amd_test.dart | 34 - ...ot_shorthands_ddc_library_bundle_test.dart | 34 - .../instances/instance_amd_test.dart | 46 - .../instance_ddc_library_bundle_test.dart | 32 - .../instance_inspection_amd_test.dart | 34 - ...ce_inspection_ddc_library_bundle_test.dart | 34 - .../patterns_inspection_amd_test.dart | 34 - ...ns_inspection_ddc_library_bundle_test.dart | 34 - .../instances/record_inspection_amd_test.dart | 34 - ...rd_inspection_ddc_library_bundle_test.dart | 30 - .../record_type_inspection_amd_test.dart | 34 - ...pe_inspection_ddc_library_bundle_test.dart | 30 - .../instances/type_inspection_amd_test.dart | 34 - ...pe_inspection_ddc_library_bundle_test.dart | 34 - dwds/test/integration/listviews_amd_test.dart | 4 - .../listviews_ddc_library_bundle_test.dart | 11 - .../integration/load_strategy_amd_test.dart | 7 - ...load_strategy_ddc_library_bundle_test.dart | 14 - .../integration/parts_evaluate_amd_test.dart | 4 - ...arts_evaluate_ddc_library_bundle_test.dart | 19 - webdev/test/breakpoint_amd_test.dart | 31 + .../breakpoint_ddc_library_bundle_test.dart | 39 + webdev/test/callstack_amd_test.dart | 31 + .../callstack_ddc_library_bundle_test.dart | 39 + .../test}/chrome_proxy_service_amd_test.dart | 0 ...proxy_service_ddc_library_bundle_test.dart | 55 + webdev/test/circular_evaluate_amd_test.dart | 32 + ...ular_evaluate_ddc_library_bundle_test.dart | 40 + webdev/test/class_inspection_amd_test.dart | 53 + ...ss_inspection_ddc_library_bundle_test.dart | 53 + webdev/test/dart_uri_file_uri_amd_test.dart | 28 + ..._uri_file_uri_ddc_library_bundle_test.dart | 36 + .../test}/debug_service_amd_test.dart | 0 ...debug_service_ddc_library_bundle_test.dart | 0 .../test}/devtools_amd_test.dart | 0 .../devtools_ddc_library_bundle_test.dart | 0 webdev/test/dot_shorthands_amd_test.dart | 53 + ...ot_shorthands_ddc_library_bundle_test.dart | 53 + webdev/test/evaluate_amd_test.dart | 32 + .../evaluate_ddc_library_bundle_test.dart | 42 + webdev/test/events_amd_test.dart | 29 + .../test/events_ddc_library_bundle_test.dart | 31 + ...d_breakpoints_ddc_library_bundle_test.dart | 33 + .../hot_reload_ddc_library_bundle_test.dart | 33 + .../test}/hot_restart_amd_test.dart | 0 ...t_breakpoints_ddc_library_bundle_test.dart | 37 + .../hot_restart_correctness_amd_test.dart | 0 ...t_correctness_ddc_library_bundle_test.dart | 51 + .../hot_restart_ddc_library_bundle_test.dart | 52 + webdev/test/instance_amd_test.dart | 65 + .../instance_ddc_library_bundle_test.dart | 52 + webdev/test/instance_inspection_amd_test.dart | 53 + ...ce_inspection_ddc_library_bundle_test.dart | 53 + webdev/test/listviews_amd_test.dart | 28 + .../listviews_ddc_library_bundle_test.dart | 36 + webdev/test/load_strategy_amd_test.dart | 34 + ...load_strategy_ddc_library_bundle_test.dart | 42 + webdev/test/parts_evaluate_amd_test.dart | 32 + ...arts_evaluate_ddc_library_bundle_test.dart | 48 + webdev/test/patterns_inspection_amd_test.dart | 53 + ...ns_inspection_ddc_library_bundle_test.dart | 53 + webdev/test/record_inspection_amd_test.dart | 53 + ...rd_inspection_ddc_library_bundle_test.dart | 50 + .../test/record_type_inspection_amd_test.dart | 53 + ...pe_inspection_ddc_library_bundle_test.dart | 50 + .../test}/refresh_amd_test.dart | 0 .../refresh_ddc_library_bundle_test.dart | 0 .../test}/run_request_amd_test.dart | 0 .../run_request_ddc_library_bundle_test.dart | 0 .../test}/screenshot_amd_test.dart | 0 .../screenshot_ddc_library_bundle_test.dart | 0 webdev/test/type_inspection_amd_test.dart | 53 + ...pe_inspection_ddc_library_bundle_test.dart | 53 + .../test}/variable_scope_amd_test.dart | 0 ...ariable_scope_ddc_library_bundle_test.dart | 0 96 files changed, 2553 insertions(+), 2255 deletions(-) create mode 100644 webdev/test/breakpoint_amd_test.dart create mode 100644 webdev/test/breakpoint_ddc_library_bundle_test.dart create mode 100644 webdev/test/callstack_amd_test.dart create mode 100644 webdev/test/callstack_ddc_library_bundle_test.dart rename {dwds/test/integration => webdev/test}/chrome_proxy_service_amd_test.dart (100%) create mode 100644 webdev/test/chrome_proxy_service_ddc_library_bundle_test.dart create mode 100644 webdev/test/circular_evaluate_amd_test.dart create mode 100644 webdev/test/circular_evaluate_ddc_library_bundle_test.dart create mode 100644 webdev/test/class_inspection_amd_test.dart create mode 100644 webdev/test/class_inspection_ddc_library_bundle_test.dart create mode 100644 webdev/test/dart_uri_file_uri_amd_test.dart create mode 100644 webdev/test/dart_uri_file_uri_ddc_library_bundle_test.dart rename {dwds/test/integration => webdev/test}/debug_service_amd_test.dart (100%) rename {dwds/test/integration => webdev/test}/debug_service_ddc_library_bundle_test.dart (100%) rename {dwds/test/integration => webdev/test}/devtools_amd_test.dart (100%) rename {dwds/test/integration => webdev/test}/devtools_ddc_library_bundle_test.dart (100%) create mode 100644 webdev/test/dot_shorthands_amd_test.dart create mode 100644 webdev/test/dot_shorthands_ddc_library_bundle_test.dart create mode 100644 webdev/test/evaluate_amd_test.dart create mode 100644 webdev/test/evaluate_ddc_library_bundle_test.dart create mode 100644 webdev/test/events_amd_test.dart create mode 100644 webdev/test/events_ddc_library_bundle_test.dart create mode 100644 webdev/test/hot_reload_breakpoints_ddc_library_bundle_test.dart create mode 100644 webdev/test/hot_reload_ddc_library_bundle_test.dart rename {dwds/test/integration => webdev/test}/hot_restart_amd_test.dart (100%) create mode 100644 webdev/test/hot_restart_breakpoints_ddc_library_bundle_test.dart rename {dwds/test/integration => webdev/test}/hot_restart_correctness_amd_test.dart (100%) create mode 100644 webdev/test/hot_restart_correctness_ddc_library_bundle_test.dart create mode 100644 webdev/test/hot_restart_ddc_library_bundle_test.dart create mode 100644 webdev/test/instance_amd_test.dart create mode 100644 webdev/test/instance_ddc_library_bundle_test.dart create mode 100644 webdev/test/instance_inspection_amd_test.dart create mode 100644 webdev/test/instance_inspection_ddc_library_bundle_test.dart create mode 100644 webdev/test/listviews_amd_test.dart create mode 100644 webdev/test/listviews_ddc_library_bundle_test.dart create mode 100644 webdev/test/load_strategy_amd_test.dart create mode 100644 webdev/test/load_strategy_ddc_library_bundle_test.dart create mode 100644 webdev/test/parts_evaluate_amd_test.dart create mode 100644 webdev/test/parts_evaluate_ddc_library_bundle_test.dart create mode 100644 webdev/test/patterns_inspection_amd_test.dart create mode 100644 webdev/test/patterns_inspection_ddc_library_bundle_test.dart create mode 100644 webdev/test/record_inspection_amd_test.dart create mode 100644 webdev/test/record_inspection_ddc_library_bundle_test.dart create mode 100644 webdev/test/record_type_inspection_amd_test.dart create mode 100644 webdev/test/record_type_inspection_ddc_library_bundle_test.dart rename {dwds/test/integration => webdev/test}/refresh_amd_test.dart (100%) rename {dwds/test/integration => webdev/test}/refresh_ddc_library_bundle_test.dart (100%) rename {dwds/test/integration => webdev/test}/run_request_amd_test.dart (100%) rename {dwds/test/integration => webdev/test}/run_request_ddc_library_bundle_test.dart (100%) rename {dwds/test/integration => webdev/test}/screenshot_amd_test.dart (100%) rename {dwds/test/integration => webdev/test}/screenshot_ddc_library_bundle_test.dart (100%) create mode 100644 webdev/test/type_inspection_amd_test.dart create mode 100644 webdev/test/type_inspection_ddc_library_bundle_test.dart rename {dwds/test/integration => webdev/test}/variable_scope_amd_test.dart (100%) rename {dwds/test/integration => webdev/test}/variable_scope_ddc_library_bundle_test.dart (100%) diff --git a/dwds/lib/src/handlers/injected_client_js.dart b/dwds/lib/src/handlers/injected_client_js.dart index 93c9b319b6..06635d89ca 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.14.0-edge.30b941a500c61ffb45fe23e49ae0576eada8d371.\n" +const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-values), the Dart to JavaScript compiler version: 3.14.0-edge.49708da8bbb61fcaf57229ecfad88ee2db967f44.\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" @@ -3830,15 +3830,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return A._TimerImpl\$(milliseconds < 0 ? 0 : milliseconds, callback);\n" " },\n" " _TimerImpl\$(milliseconds, callback) {\n" -" var t1 = new A._TimerImpl(true);\n" +" var t1 = new A._TimerImpl();\n" " t1._TimerImpl\$2(milliseconds, callback);\n" " return t1;\n" " },\n" -" _TimerImpl\$periodic(milliseconds, callback) {\n" -" var t1 = new A._TimerImpl(false);\n" -" t1._TimerImpl\$periodic\$2(milliseconds, callback);\n" -" return t1;\n" -" },\n" " _makeAsyncAwaitCompleter(\$T) {\n" " return new A._AsyncAwaitCompleter(new A._Future(\$.Zone__current, \$T._eval\$1(\"_Future<0>\")), \$T._eval\$1(\"_AsyncAwaitCompleter<0>\"));\n" " },\n" @@ -3876,91 +3871,20 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " _wrapJsFunctionForAsync(\$function) {\n" " var \$protected = function(fn, ERROR) {\n" -" return function(errorCode, result) {\n" -" while (true) {\n" -" try {\n" -" fn(errorCode, result);\n" -" break;\n" -" } catch (error) {\n" -" result = error;\n" -" errorCode = ERROR;\n" +" return function(errorCode, result) {\n" +" while (true) {\n" +" try {\n" +" fn(errorCode, result);\n" +" break;\n" +" } catch (error) {\n" +" result = error;\n" +" errorCode = ERROR;\n" +" }\n" " }\n" -" }\n" -" };\n" -" }(\$function, 1);\n" -" return \$.Zone__current.registerBinaryCallback\$3\$1(new A._wrapJsFunctionForAsync_closure(\$protected), type\$.void, type\$.int, type\$.dynamic);\n" -" },\n" -" _asyncStarHelper(object, bodyFunctionOrErrorCode, controller) {\n" -" var t1, t2, t3,\n" -" _s10_ = \"controller\";\n" -" if (bodyFunctionOrErrorCode === 0) {\n" -" t1 = controller.cancelationFuture;\n" -" if (t1 != null)\n" -" t1._completeWithValue\$1(null);\n" -" else {\n" -" t1 = controller.___AsyncStarStreamController_controller_A;\n" -" t1 === \$ && A.throwLateFieldNI(_s10_);\n" -" t1.close\$0();\n" -" }\n" -" return;\n" -" } else if (bodyFunctionOrErrorCode === 1) {\n" -" t1 = controller.cancelationFuture;\n" -" if (t1 != null) {\n" -" t2 = A.unwrapException(object);\n" -" t3 = A.getTraceFromException(object);\n" -" t1._completeErrorObject\$1(new A.AsyncError(t2, t3));\n" -" } else {\n" -" t1 = A.unwrapException(object);\n" -" t2 = A.getTraceFromException(object);\n" -" t3 = controller.___AsyncStarStreamController_controller_A;\n" -" t3 === \$ && A.throwLateFieldNI(_s10_);\n" -" t3.addError\$2(t1, t2);\n" -" controller.___AsyncStarStreamController_controller_A.close\$0();\n" -" }\n" -" return;\n" -" }\n" -" type\$.void_Function_int_dynamic._as(bodyFunctionOrErrorCode);\n" -" if (object instanceof A._IterationMarker) {\n" -" if (controller.cancelationFuture != null) {\n" -" bodyFunctionOrErrorCode.call\$2(2, null);\n" -" return;\n" -" }\n" -" t1 = object.state;\n" -" if (t1 === 0) {\n" -" t1 = object.value;\n" -" t2 = controller.___AsyncStarStreamController_controller_A;\n" -" t2 === \$ && A.throwLateFieldNI(_s10_);\n" -" t2.add\$1(0, controller.\$ti._precomputed1._as(t1));\n" -" A.scheduleMicrotask(new A._asyncStarHelper_closure(controller, bodyFunctionOrErrorCode));\n" -" return;\n" -" } else if (t1 === 1) {\n" -" t1 = controller.\$ti._eval\$1(\"Stream<1>\")._as(type\$.Stream_dynamic._as(object.value));\n" -" t2 = controller.___AsyncStarStreamController_controller_A;\n" -" t2 === \$ && A.throwLateFieldNI(_s10_);\n" -" t2.addStream\$2\$cancelOnError(t1, false).then\$1\$1(new A._asyncStarHelper_closure0(controller, bodyFunctionOrErrorCode), type\$.Null);\n" -" return;\n" -" }\n" -" }\n" -" A._awaitOnObject(object, bodyFunctionOrErrorCode);\n" -" },\n" -" _streamOfController(controller) {\n" -" var t1 = controller.___AsyncStarStreamController_controller_A;\n" -" t1 === \$ && A.throwLateFieldNI(\"controller\");\n" -" return new A._ControllerStream(t1, A._instanceType(t1)._eval\$1(\"_ControllerStream<1>\"));\n" -" },\n" -" _AsyncStarStreamController\$(body, \$T) {\n" -" var t1 = new A._AsyncStarStreamController(\$T._eval\$1(\"_AsyncStarStreamController<0>\"));\n" -" t1._AsyncStarStreamController\$1(body, \$T);\n" -" return t1;\n" -" },\n" -" _makeAsyncStarStreamController(body, \$T) {\n" -" return A._AsyncStarStreamController\$(body, \$T);\n" -" },\n" -" _IterationMarker_yieldStar(values) {\n" -" return new A._IterationMarker(values, 1);\n" -" },\n" -" _IterationMarker_yieldSingle(value) {\n" -" return new A._IterationMarker(value, 0);\n" +" };\n" +" }(\$function, 1),\n" +" t1 = \$.Zone__current;\n" +" return t1._registerBinaryCallbackZoned\$3\$2(t1, type\$.void_Function_int_dynamic._as(new A._wrapJsFunctionForAsync_closure(\$protected)), type\$.void, type\$.int, type\$.dynamic);\n" " },\n" " AsyncError_defaultStackTrace(error) {\n" " var stackTrace;\n" @@ -4016,9 +3940,9 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _interceptError(error, stackTrace) {\n" " var replacement, t1, t2,\n" " zone = \$.Zone__current;\n" -" if (zone === B.C__RootZone)\n" +" if (zone === B.Zone_jYP)\n" " return null;\n" -" replacement = zone.errorCallback\$2(error, stackTrace);\n" +" replacement = zone._errorCallbackZoned\$3(zone, error, stackTrace);\n" " if (replacement == null)\n" " return null;\n" " t1 = replacement.error;\n" @@ -4029,7 +3953,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " _interceptUserError(error, stackTrace) {\n" " var replacement;\n" -" if (\$.Zone__current !== B.C__RootZone) {\n" +" if (\$.Zone__current !== B.Zone_jYP) {\n" " replacement = A._interceptError(error, stackTrace);\n" " if (replacement != null)\n" " return replacement;\n" @@ -4055,7 +3979,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return t1;\n" " },\n" " _Future__chainCoreFuture(source, target, sync) {\n" -" var t2, t3, ignoreError, listeners, _box_0 = {},\n" +" var t2, t3, ignoreError, listeners, targetZone, _box_0 = {},\n" " t1 = _box_0.source = source;\n" " for (t2 = type\$._Future_dynamic; t3 = t1._state, (t3 & 4) !== 0; t1 = source) {\n" " source = t2._as(t1._resultOrListeners);\n" @@ -4089,7 +4013,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return;\n" " }\n" " target._state ^= 2;\n" -" target._zone.scheduleMicrotask\$1(new A._Future__chainCoreFuture_closure(_box_0, target));\n" +" targetZone = target._zone;\n" +" targetZone._scheduleMicrotaskZoned\$2(targetZone, new A._Future__chainCoreFuture_closure(_box_0, target));\n" " },\n" " _Future__propagateToListeners(source, listeners) {\n" " var t2, t3, _box_0, t4, t5, hasError, asyncError, nextListener, nextListener0, sourceResult, t6, zone, oldZone, result, current, _box_1 = {},\n" @@ -4102,7 +4027,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " if (listeners == null) {\n" " if (hasError && (t4 & 1) === 0) {\n" " asyncError = t2._as(t1._resultOrListeners);\n" -" t1._zone.handleUncaughtError\$2(asyncError.error, asyncError.stackTrace);\n" +" t1 = t1._zone;\n" +" t1._handleUncaughtErrorZoned\$3(t1, asyncError.error, asyncError.stackTrace);\n" " }\n" " return;\n" " }\n" @@ -4125,15 +4051,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t6 = true;\n" " if (t6) {\n" " zone = t1.result._zone;\n" -" if (hasError) {\n" +" if (hasError && t4._zone._handleUncaughtErrorFunction != zone._handleUncaughtErrorFunction) {\n" +" t2._as(sourceResult);\n" " t1 = t4._zone;\n" -" t1 = !(t1 === zone || t1.get\$errorZone() === zone.get\$errorZone());\n" -" } else\n" -" t1 = false;\n" -" if (t1) {\n" -" t1 = _box_1.source;\n" -" asyncError = t2._as(t1._resultOrListeners);\n" -" t1._zone.handleUncaughtError\$2(asyncError.error, asyncError.stackTrace);\n" +" t1._handleUncaughtErrorZoned\$3(t1, sourceResult.error, sourceResult.stackTrace);\n" " return;\n" " }\n" " oldZone = \$.Zone__current;\n" @@ -4141,7 +4062,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " \$.Zone__current = zone;\n" " else\n" " oldZone = null;\n" -" t1 = _box_0.listener.state;\n" +" t1 = t1.state;\n" " if ((t1 & 15) === 8)\n" " new A._Future__propagateToListeners_handleWhenCompleteCallback(_box_0, _box_1, hasError).call\$0();\n" " else if (t5) {\n" @@ -4192,10 +4113,12 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " },\n" " _registerErrorHandler(errorHandler, zone) {\n" -" if (type\$.dynamic_Function_Object_StackTrace._is(errorHandler))\n" -" return zone.registerBinaryCallback\$3\$1(errorHandler, type\$.dynamic, type\$.Object, type\$.StackTrace);\n" -" if (type\$.dynamic_Function_Object._is(errorHandler))\n" -" return zone.registerUnaryCallback\$2\$1(errorHandler, type\$.dynamic, type\$.Object);\n" +" var t1 = type\$.dynamic_Function_Object_StackTrace;\n" +" if (t1._is(errorHandler))\n" +" return zone._registerBinaryCallbackZoned\$3\$2(zone, t1._as(errorHandler), type\$.dynamic, type\$.Object, type\$.StackTrace);\n" +" t1 = type\$.dynamic_Function_Object;\n" +" if (t1._is(errorHandler))\n" +" return zone._registerUnaryCallbackZoned\$2\$2(zone, t1._as(errorHandler), type\$.dynamic, type\$.Object);\n" " throw A.wrapException(A.ArgumentError\$value(errorHandler, \"onError\", string\$.Error_));\n" " },\n" " _microtaskLoop() {\n" @@ -4252,32 +4175,27 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " },\n" " scheduleMicrotask(callback) {\n" -" var t1, _null = null,\n" -" currentZone = \$.Zone__current;\n" -" if (B.C__RootZone === currentZone) {\n" -" A._rootScheduleMicrotask(_null, _null, B.C__RootZone, callback);\n" +" var currentZone = \$.Zone__current;\n" +" if (B.Zone_jYP === currentZone) {\n" +" A._rootScheduleMicrotask(B.Zone_jYP, callback);\n" " return;\n" " }\n" -" if (B.C__RootZone === currentZone.get\$_scheduleMicrotask().zone)\n" -" t1 = B.C__RootZone.get\$errorZone() === currentZone.get\$errorZone();\n" -" else\n" -" t1 = false;\n" -" if (t1) {\n" -" A._rootScheduleMicrotask(_null, _null, currentZone, currentZone.registerCallback\$1\$1(callback, type\$.void));\n" +" if (currentZone._scheduleMicrotaskFunction == null && currentZone._handleUncaughtErrorFunction == null) {\n" +" A._rootScheduleMicrotask(currentZone, currentZone._registerCallbackZoned\$1\$2(currentZone, callback, type\$.void));\n" " return;\n" " }\n" -" t1 = \$.Zone__current;\n" -" t1.scheduleMicrotask\$1(t1.bindCallbackGuarded\$1(callback));\n" +" currentZone._scheduleMicrotaskZoned\$2(currentZone, currentZone.bindCallbackGuarded\$1(callback));\n" " },\n" " StreamIterator_StreamIterator(stream, \$T) {\n" " A.checkNotNullable(stream, \"stream\", type\$.Object);\n" " return new A._StreamIterator(\$T._eval\$1(\"_StreamIterator<0>\"));\n" " },\n" -" StreamController_StreamController(onCancel, onListen, onResume, \$T) {\n" -" return new A._AsyncStreamController(onListen, null, onResume, onCancel, \$T._eval\$1(\"_AsyncStreamController<0>\"));\n" +" StreamController_StreamController(\$T) {\n" +" var _null = null;\n" +" return new A._AsyncStreamController(_null, _null, _null, _null, \$T._eval\$1(\"_AsyncStreamController<0>\"));\n" " },\n" " _runGuarded(notificationHandler) {\n" -" var e, s, exception;\n" +" var e, s, exception, t1;\n" " if (notificationHandler == null)\n" " return;\n" " try {\n" @@ -4285,31 +4203,31 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" -" \$.Zone__current.handleUncaughtError\$2(e, s);\n" +" t1 = \$.Zone__current;\n" +" t1._handleUncaughtErrorZoned\$3(t1, A._asObject(e), type\$.StackTrace._as(s));\n" " }\n" " },\n" -" _AddStreamState_makeErrorHandler(controller) {\n" -" return new A._AddStreamState_makeErrorHandler_closure(controller);\n" -" },\n" " _BufferingStreamSubscription__registerDataHandler(zone, handleData, \$T) {\n" " var t1 = handleData == null ? A.async___nullDataHandler\$closure() : handleData;\n" -" return zone.registerUnaryCallback\$2\$1(t1, type\$.void, \$T);\n" +" return zone._registerUnaryCallbackZoned\$2\$2(zone, type\$.\$env_1_1_void._bind\$1(\$T)._eval\$1(\"1(2)\")._as(t1), type\$.void, \$T);\n" " },\n" " _BufferingStreamSubscription__registerErrorHandler(zone, handleError) {\n" " if (handleError == null)\n" " handleError = A.async___nullErrorHandler\$closure();\n" " if (type\$.void_Function_Object_StackTrace._is(handleError))\n" -" return zone.registerBinaryCallback\$3\$1(handleError, type\$.dynamic, type\$.Object, type\$.StackTrace);\n" +" return zone._registerBinaryCallbackZoned\$3\$2(zone, type\$.dynamic_Function_Object_StackTrace._as(handleError), type\$.dynamic, type\$.Object, type\$.StackTrace);\n" " if (type\$.void_Function_Object._is(handleError))\n" -" return zone.registerUnaryCallback\$2\$1(handleError, type\$.dynamic, type\$.Object);\n" +" return zone._registerUnaryCallbackZoned\$2\$2(zone, type\$.dynamic_Function_Object._as(handleError), type\$.dynamic, type\$.Object);\n" " throw A.wrapException(A.ArgumentError\$(string\$.handle, null));\n" " },\n" " _nullDataHandler(value) {\n" " },\n" " _nullErrorHandler(error, stackTrace) {\n" +" var t1;\n" " A._asObject(error);\n" " type\$.StackTrace._as(stackTrace);\n" -" \$.Zone__current.handleUncaughtError\$2(error, stackTrace);\n" +" t1 = \$.Zone__current;\n" +" t1._handleUncaughtErrorZoned\$3(t1, error, stackTrace);\n" " },\n" " _nullDoneHandler() {\n" " },\n" @@ -4322,34 +4240,35 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " Timer_Timer(duration, callback) {\n" " var t1 = \$.Zone__current;\n" -" if (t1 === B.C__RootZone)\n" -" return t1.createTimer\$2(duration, callback);\n" -" return t1.createTimer\$2(duration, t1.bindCallbackGuarded\$1(callback));\n" +" if (t1 === B.Zone_jYP)\n" +" return t1._createTimerZoned\$3(t1, duration, type\$.void_Function._as(callback));\n" +" return t1._createTimerZoned\$3(t1, duration, type\$.void_Function._as(t1.bindCallbackGuarded\$1(callback)));\n" " },\n" " runZonedGuarded(body, onError, \$R) {\n" -" var error, stackTrace, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, exception, _null = null, zoneSpecification = null, zoneValues = null,\n" +" var error, stackTrace, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, newZone, exception, _null = null, zoneSpecification = null, zoneValues = null,\n" " parentZone = \$.Zone__current,\n" -" errorHandler = new A.runZonedGuarded_closure(parentZone, onError);\n" +" t1 = new A.runZonedGuarded_errorHandler(parentZone, onError);\n" " if (zoneSpecification == null)\n" -" zoneSpecification = new A.ZoneSpecification(errorHandler, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null);\n" +" zoneSpecification = new A.ZoneSpecification(t1, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null);\n" " else {\n" -" t1 = zoneSpecification;\n" -" t2 = t1.run;\n" -" t3 = t1.runUnary;\n" -" t4 = t1.runBinary;\n" -" t5 = t1.registerCallback;\n" -" t6 = t1.registerUnaryCallback;\n" -" t7 = t1.registerBinaryCallback;\n" -" t8 = t1.errorCallback;\n" -" t9 = t1.scheduleMicrotask;\n" -" t10 = t1.createTimer;\n" -" t11 = t1.createPeriodicTimer;\n" -" t12 = t1.print;\n" -" t1 = t1.fork;\n" -" zoneSpecification = new A.ZoneSpecification(errorHandler, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t1);\n" +" t2 = zoneSpecification;\n" +" t3 = t2.run;\n" +" t4 = t2.runUnary;\n" +" t5 = t2.runBinary;\n" +" t6 = t2.registerCallback;\n" +" t7 = t2.registerUnaryCallback;\n" +" t8 = t2.registerBinaryCallback;\n" +" t9 = t2.errorCallback;\n" +" t10 = t2.scheduleMicrotask;\n" +" t11 = t2.createTimer;\n" +" t12 = t2.createPeriodicTimer;\n" +" t13 = t2.print;\n" +" t2 = t2.fork;\n" +" zoneSpecification = new A.ZoneSpecification(t1, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t2);\n" " }\n" " try {\n" -" t1 = parentZone.fork\$2\$specification\$zoneValues(zoneSpecification, zoneValues).run\$1\$1(body, \$R);\n" +" newZone = parentZone._forkZoned\$3(parentZone, zoneSpecification, zoneValues);\n" +" t1 = newZone._runZoned\$1\$2(newZone, body, \$R);\n" " return t1;\n" " } catch (exception) {\n" " error = A.unwrapException(exception);\n" @@ -4358,125 +4277,22 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " return _null;\n" " },\n" -" _rootHandleUncaughtError(\$self, \$parent, zone, error, stackTrace) {\n" -" A._rootHandleError(error, stackTrace);\n" -" },\n" -" _rootHandleError(error, stackTrace) {\n" -" A._schedulePriorityAsyncCallback(new A._rootHandleError_closure(error, stackTrace));\n" -" },\n" -" _rootRun(\$self, \$parent, zone, f, \$R) {\n" -" var old, t1;\n" -" type\$.nullable_Zone._as(\$self);\n" -" type\$.nullable_ZoneDelegate._as(\$parent);\n" -" type\$.Zone._as(zone);\n" -" \$R._eval\$1(\"0()\")._as(f);\n" -" t1 = \$.Zone__current;\n" -" if (t1 === zone)\n" -" return f.call\$0();\n" -" \$.Zone__current = zone;\n" -" old = t1;\n" -" try {\n" -" t1 = f.call\$0();\n" -" return t1;\n" -" } finally {\n" -" \$.Zone__current = old;\n" -" }\n" +" ZoneDelegate\$_() {\n" +" return new A.ZoneDelegate(B.Zone_jYP);\n" " },\n" -" _rootRunUnary(\$self, \$parent, zone, f, arg, \$R, \$T) {\n" -" var old, t1;\n" -" type\$.nullable_Zone._as(\$self);\n" -" type\$.nullable_ZoneDelegate._as(\$parent);\n" -" type\$.Zone._as(zone);\n" -" \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(f);\n" -" \$T._as(arg);\n" -" t1 = \$.Zone__current;\n" -" if (t1 === zone)\n" -" return f.call\$1(arg);\n" -" \$.Zone__current = zone;\n" -" old = t1;\n" -" try {\n" -" t1 = f.call\$1(arg);\n" -" return t1;\n" -" } finally {\n" -" \$.Zone__current = old;\n" -" }\n" +" _rootHandleUncaughtError(error, stackTrace) {\n" +" A._schedulePriorityAsyncCallback(new A._rootHandleUncaughtError_closure(error, stackTrace));\n" " },\n" -" _rootRunBinary(\$self, \$parent, zone, f, arg1, arg2, \$R, \$T1, \$T2) {\n" -" var old, t1;\n" -" type\$.nullable_Zone._as(\$self);\n" -" type\$.nullable_ZoneDelegate._as(\$parent);\n" -" type\$.Zone._as(zone);\n" -" \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(f);\n" -" \$T1._as(arg1);\n" -" \$T2._as(arg2);\n" -" t1 = \$.Zone__current;\n" -" if (t1 === zone)\n" -" return f.call\$2(arg1, arg2);\n" -" \$.Zone__current = zone;\n" -" old = t1;\n" -" try {\n" -" t1 = f.call\$2(arg1, arg2);\n" -" return t1;\n" -" } finally {\n" -" \$.Zone__current = old;\n" -" }\n" -" },\n" -" _rootRegisterCallback(\$self, \$parent, zone, f, \$R) {\n" -" var t1 = type\$.Zone;\n" -" t1._as(\$self);\n" -" type\$.ZoneDelegate._as(\$parent);\n" -" t1._as(zone);\n" -" return \$R._eval\$1(\"0()\")._as(f);\n" -" },\n" -" _rootRegisterUnaryCallback(\$self, \$parent, zone, f, \$R, \$T) {\n" -" var t1 = type\$.Zone;\n" -" t1._as(\$self);\n" -" type\$.ZoneDelegate._as(\$parent);\n" -" t1._as(zone);\n" -" return \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(f);\n" -" },\n" -" _rootRegisterBinaryCallback(\$self, \$parent, zone, f, \$R, \$T1, \$T2) {\n" -" var t1 = type\$.Zone;\n" -" t1._as(\$self);\n" -" type\$.ZoneDelegate._as(\$parent);\n" -" t1._as(zone);\n" -" return \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(f);\n" -" },\n" -" _rootErrorCallback(\$self, \$parent, zone, error, stackTrace) {\n" -" var t1 = type\$.Zone;\n" -" t1._as(\$self);\n" -" type\$.ZoneDelegate._as(\$parent);\n" -" t1._as(zone);\n" -" A._asObject(error);\n" -" type\$.nullable_StackTrace._as(stackTrace);\n" -" return null;\n" +" _rootScheduleMicrotask(zone, callback) {\n" +" if (B.Zone_jYP !== zone)\n" +" callback = zone._handleUncaughtErrorFunction != null ? zone.bindCallbackGuarded\$1(callback) : zone.bindCallback\$1\$1(callback, type\$.void);\n" +" A._scheduleAsyncCallback(callback);\n" " },\n" -" _rootScheduleMicrotask(\$self, \$parent, zone, f) {\n" -" var t1, t2;\n" -" type\$.void_Function._as(f);\n" -" if (B.C__RootZone !== zone) {\n" -" t1 = B.C__RootZone.get\$errorZone();\n" -" t2 = zone.get\$errorZone();\n" -" f = t1 !== t2 ? zone.bindCallbackGuarded\$1(f) : zone.bindCallback\$1\$1(f, type\$.void);\n" -" }\n" -" A._scheduleAsyncCallback(f);\n" -" },\n" -" _rootCreateTimer(\$self, \$parent, zone, duration, callback) {\n" -" callback = zone.bindCallback\$1\$1(type\$.void_Function._as(callback), type\$.void);\n" -" return A.Timer__createTimer(duration, callback);\n" -" },\n" -" _rootCreatePeriodicTimer(\$self, \$parent, zone, duration, callback) {\n" -" var milliseconds;\n" -" callback = zone.bindUnaryCallback\$2\$1(type\$.void_Function_Timer._as(callback), type\$.void, type\$.Timer);\n" -" milliseconds = duration.get\$inMilliseconds();\n" -" return A._TimerImpl\$periodic(milliseconds.\$lt(0, 0) ? 0 : milliseconds, callback);\n" -" },\n" -" _rootPrint(\$self, \$parent, zone, line) {\n" -" A.printString(line);\n" -" },\n" -" _rootFork(\$self, \$parent, zone, specification, zoneValues) {\n" -" var t1 = new A._CustomZone(zone.get\$_run(), zone.get\$_runUnary(), zone.get\$_runBinary(), zone.get\$_registerCallback(), zone.get\$_registerUnaryCallback(), zone.get\$_registerBinaryCallback(), zone.get\$_errorCallback(), zone.get\$_scheduleMicrotask(), zone.get\$_createTimer(), zone.get\$_createPeriodicTimer(), zone.get\$_print(), zone.get\$_fork(), zone.get\$_handleUncaughtError(), zone.get\$_zoneValues(), zone);\n" -" t1._handleUncaughtError = new A._ZoneHandleUncaughtError(t1, specification.handleUncaughtError);\n" +" _rootFork(zone, specification, zoneValues) {\n" +" var t1 = new A.ZoneDelegate(B.Zone_jYP),\n" +" t2 = new A._ZoneHandleUncaughtError(B.Zone_jYP, specification.handleUncaughtError);\n" +" t1 = t1._zone = new A.Zone(zone, t1, zone._runFunction, zone._runUnaryFunction, zone._runBinaryFunction, zone._registerCallbackFunction, zone._registerUnaryCallbackFunction, zone._registerBinaryCallbackFunction, zone._errorCallbackFunction, zone._scheduleMicrotaskFunction, zone._createTimerFunction, zone._createPeriodicTimerFunction, zone._printFunction, zone._forkFunction, t2, zone._zoneValues);\n" +" t2.zone = t1;\n" " return t1;\n" " },\n" " _AsyncRun__initializeScheduleImmediate_internalCallback: function _AsyncRun__initializeScheduleImmediate_internalCallback(t0) {\n" @@ -4493,22 +4309,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _AsyncRun__scheduleImmediateWithSetImmediate_internalCallback: function _AsyncRun__scheduleImmediateWithSetImmediate_internalCallback(t0) {\n" " this.callback = t0;\n" " },\n" -" _TimerImpl: function _TimerImpl(t0) {\n" -" this._once = t0;\n" +" _TimerImpl: function _TimerImpl() {\n" " this._handle = null;\n" -" this._tick = 0;\n" " },\n" " _TimerImpl_internalCallback: function _TimerImpl_internalCallback(t0, t1) {\n" " this.\$this = t0;\n" " this.callback = t1;\n" " },\n" -" _TimerImpl\$periodic_closure: function _TimerImpl\$periodic_closure(t0, t1, t2, t3) {\n" -" var _ = this;\n" -" _.\$this = t0;\n" -" _.milliseconds = t1;\n" -" _.start = t2;\n" -" _.callback = t3;\n" -" },\n" " _AsyncAwaitCompleter: function _AsyncAwaitCompleter(t0, t1) {\n" " this._future = t0;\n" " this.isSync = false;\n" @@ -4523,45 +4330,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _wrapJsFunctionForAsync_closure: function _wrapJsFunctionForAsync_closure(t0) {\n" " this.\$protected = t0;\n" " },\n" -" _asyncStarHelper_closure: function _asyncStarHelper_closure(t0, t1) {\n" -" this.controller = t0;\n" -" this.bodyFunction = t1;\n" -" },\n" -" _asyncStarHelper_closure0: function _asyncStarHelper_closure0(t0, t1) {\n" -" this.controller = t0;\n" -" this.bodyFunction = t1;\n" -" },\n" -" _AsyncStarStreamController: function _AsyncStarStreamController(t0) {\n" -" var _ = this;\n" -" _.___AsyncStarStreamController_controller_A = \$;\n" -" _.isSuspended = false;\n" -" _.cancelationFuture = null;\n" -" _.\$ti = t0;\n" -" },\n" -" _AsyncStarStreamController__resumeBody: function _AsyncStarStreamController__resumeBody(t0) {\n" -" this.body = t0;\n" -" },\n" -" _AsyncStarStreamController__resumeBody_closure: function _AsyncStarStreamController__resumeBody_closure(t0) {\n" -" this.body = t0;\n" -" },\n" -" _AsyncStarStreamController_closure0: function _AsyncStarStreamController_closure0(t0) {\n" -" this._resumeBody = t0;\n" -" },\n" -" _AsyncStarStreamController_closure1: function _AsyncStarStreamController_closure1(t0, t1) {\n" -" this.\$this = t0;\n" -" this._resumeBody = t1;\n" -" },\n" -" _AsyncStarStreamController_closure: function _AsyncStarStreamController_closure(t0, t1) {\n" -" this.\$this = t0;\n" -" this.body = t1;\n" -" },\n" -" _AsyncStarStreamController__closure: function _AsyncStarStreamController__closure(t0) {\n" -" this.body = t0;\n" -" },\n" -" _IterationMarker: function _IterationMarker(t0, t1) {\n" -" this.value = t0;\n" -" this.state = t1;\n" -" },\n" " AsyncError: function AsyncError(t0, t1) {\n" " this.error = t0;\n" " this.stackTrace = t1;\n" @@ -4721,21 +4489,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this._async\$_target = t0;\n" " this.\$ti = t1;\n" " },\n" -" _AddStreamState: function _AddStreamState() {\n" -" },\n" -" _AddStreamState_makeErrorHandler_closure: function _AddStreamState_makeErrorHandler_closure(t0) {\n" -" this.controller = t0;\n" -" },\n" -" _AddStreamState_cancel_closure: function _AddStreamState_cancel_closure(t0) {\n" -" this.\$this = t0;\n" -" },\n" -" _StreamControllerAddStreamState: function _StreamControllerAddStreamState(t0, t1, t2, t3) {\n" -" var _ = this;\n" -" _._varData = t0;\n" -" _.addStreamFuture = t1;\n" -" _.addSubscription = t2;\n" -" _.\$ti = t3;\n" -" },\n" " _BufferingStreamSubscription: function _BufferingStreamSubscription() {\n" " },\n" " _BufferingStreamSubscription_asFuture_closure: function _BufferingStreamSubscription_asFuture_closure(t0, t1) {\n" @@ -4798,6 +4551,26 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _EmptyStream: function _EmptyStream(t0) {\n" " this.\$ti = t0;\n" " },\n" +" _MultiStream: function _MultiStream(t0, t1, t2) {\n" +" this.isBroadcast = t0;\n" +" this._onListen = t1;\n" +" this.\$ti = t2;\n" +" },\n" +" _MultiStream_listen_closure: function _MultiStream_listen_closure(t0, t1) {\n" +" this.\$this = t0;\n" +" this.controller = t1;\n" +" },\n" +" _MultiStreamController: function _MultiStreamController(t0, t1, t2, t3, t4) {\n" +" var _ = this;\n" +" _._varData = null;\n" +" _._state = 0;\n" +" _._doneFuture = null;\n" +" _.onListen = t0;\n" +" _.onPause = t1;\n" +" _.onResume = t2;\n" +" _.onCancel = t3;\n" +" _.\$ti = t4;\n" +" },\n" " _cancelAndValue_closure: function _cancelAndValue_closure(t0, t1) {\n" " this.future = t0;\n" " this.value = t1;\n" @@ -4821,119 +4594,51 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this._source = t1;\n" " this.\$ti = t2;\n" " },\n" -" _ZoneRun: function _ZoneRun(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" -" _ZoneRunUnary: function _ZoneRunUnary(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" -" _ZoneRunBinary: function _ZoneRunBinary(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" -" _ZoneRegisterCallback: function _ZoneRegisterCallback(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" -" _ZoneRegisterUnaryCallback: function _ZoneRegisterUnaryCallback(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" -" _ZoneRegisterBinaryCallback: function _ZoneRegisterBinaryCallback(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" -" _ZoneErrorCallback: function _ZoneErrorCallback(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" -" _ZoneScheduleMicrotask: function _ZoneScheduleMicrotask(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" -" _ZoneCreateTimer: function _ZoneCreateTimer(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" -" _ZoneCreatePeriodicTimer: function _ZoneCreatePeriodicTimer() {\n" -" },\n" -" _ZonePrint: function _ZonePrint(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" -" _ZoneFork: function _ZoneFork(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" " _ZoneHandleUncaughtError: function _ZoneHandleUncaughtError(t0, t1) {\n" " this.zone = t0;\n" " this.\$function = t1;\n" " },\n" -" _ZoneValues: function _ZoneValues(t0, t1) {\n" -" this.zone = t0;\n" -" this.map = t1;\n" -" },\n" -" _Zone: function _Zone() {\n" -" },\n" -" _CustomZone: function _CustomZone(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) {\n" +" Zone: function Zone(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) {\n" " var _ = this;\n" -" _._run = t0;\n" -" _._runUnary = t1;\n" -" _._runBinary = t2;\n" -" _._registerCallback = t3;\n" -" _._registerUnaryCallback = t4;\n" -" _._registerBinaryCallback = t5;\n" -" _._errorCallback = t6;\n" -" _._scheduleMicrotask = t7;\n" -" _._createTimer = t8;\n" -" _._createPeriodicTimer = t9;\n" -" _._print = t10;\n" -" _._fork = t11;\n" -" _._handleUncaughtError = t12;\n" -" _._zoneValues = t13;\n" -" _._delegateCache = null;\n" -" _.parent = t14;\n" -" },\n" -" _CustomZone_bindCallback_closure: function _CustomZone_bindCallback_closure(t0, t1, t2) {\n" +" _._parent = t0;\n" +" _._delegate = t1;\n" +" _._runFunction = t2;\n" +" _._runUnaryFunction = t3;\n" +" _._runBinaryFunction = t4;\n" +" _._registerCallbackFunction = t5;\n" +" _._registerUnaryCallbackFunction = t6;\n" +" _._registerBinaryCallbackFunction = t7;\n" +" _._errorCallbackFunction = t8;\n" +" _._scheduleMicrotaskFunction = t9;\n" +" _._createTimerFunction = t10;\n" +" _._createPeriodicTimerFunction = t11;\n" +" _._printFunction = t12;\n" +" _._forkFunction = t13;\n" +" _._handleUncaughtErrorFunction = t14;\n" +" _._zoneValues = t15;\n" +" },\n" +" Zone_bindCallback_closure: function Zone_bindCallback_closure(t0, t1, t2) {\n" " this.\$this = t0;\n" " this.registered = t1;\n" " this.R = t2;\n" " },\n" -" _CustomZone_bindCallbackGuarded_closure: function _CustomZone_bindCallbackGuarded_closure(t0, t1) {\n" +" Zone_bindCallbackGuarded_closure: function Zone_bindCallbackGuarded_closure(t0, t1) {\n" " this.\$this = t0;\n" " this.registered = t1;\n" " },\n" -" _CustomZone_bindUnaryCallbackGuarded_closure: function _CustomZone_bindUnaryCallbackGuarded_closure(t0, t1, t2) {\n" +" Zone_bindUnaryCallbackGuarded_closure: function Zone_bindUnaryCallbackGuarded_closure(t0, t1, t2) {\n" " this.\$this = t0;\n" " this.registered = t1;\n" " this.T = t2;\n" " },\n" -" _RootZone: function _RootZone() {\n" -" },\n" -" _RootZone_bindCallback_closure: function _RootZone_bindCallback_closure(t0, t1, t2) {\n" -" this.\$this = t0;\n" -" this.f = t1;\n" -" this.R = t2;\n" -" },\n" -" _RootZone_bindCallbackGuarded_closure: function _RootZone_bindCallbackGuarded_closure(t0, t1) {\n" -" this.\$this = t0;\n" -" this.f = t1;\n" -" },\n" -" _RootZone_bindUnaryCallbackGuarded_closure: function _RootZone_bindUnaryCallbackGuarded_closure(t0, t1, t2) {\n" -" this.\$this = t0;\n" -" this.f = t1;\n" -" this.T = t2;\n" -" },\n" -" runZonedGuarded_closure: function runZonedGuarded_closure(t0, t1) {\n" +" runZonedGuarded_errorHandler: function runZonedGuarded_errorHandler(t0, t1) {\n" " this.parentZone = t0;\n" " this.onError = t1;\n" " },\n" -" _ZoneDelegate: function _ZoneDelegate(t0) {\n" -" this._delegationTarget = t0;\n" +" ZoneDelegate: function ZoneDelegate(t0) {\n" +" this._zone = t0;\n" " },\n" -" _rootHandleError_closure: function _rootHandleError_closure(t0, t1) {\n" +" _rootHandleUncaughtError_closure: function _rootHandleUncaughtError_closure(t0, t1) {\n" " this.error = t0;\n" " this.stackTrace = t1;\n" " },\n" @@ -5268,7 +4973,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this._data = null;\n" " },\n" " _JsonMapKeyIterable: function _JsonMapKeyIterable(t0) {\n" -" this._parent = t0;\n" +" this._convert\$_parent = t0;\n" " },\n" " _Utf8Decoder__decoder_closure: function _Utf8Decoder__decoder_closure() {\n" " },\n" @@ -7648,35 +7353,35 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " BaseResponse: function BaseResponse() {\n" " },\n" -" _rethrowAsClientException(e, st, request) {\n" -" var t1, message;\n" -" if (type\$.JSObject._is(e))\n" -" t1 = A._asString(e.name) === \"AbortError\";\n" -" else\n" -" t1 = false;\n" -" if (t1)\n" -" A.Error_throwWithStackTrace(new A.RequestAbortedException(\"Request aborted by `abortTrigger`\", request.url), st);\n" +" _toClientException(e, request) {\n" +" var message;\n" +" if (type\$.JSObject._is(e) && \"AbortError\" === A._asString(e.name))\n" +" return new A.RequestAbortedException(\"Request aborted by `abortTrigger`\", request.url);\n" " if (!(e instanceof A.ClientException)) {\n" " message = J.toString\$0\$(e);\n" " if (B.JSString_methods.startsWith\$1(message, \"TypeError: \"))\n" " message = B.JSString_methods.substring\$1(message, 11);\n" " e = new A.ClientException(message, request.url);\n" " }\n" -" A.Error_throwWithStackTrace(e, st);\n" +" return e;\n" " },\n" -" _readBody(request, response) {\n" -" return A._readBody\$body(request, response);\n" +" _rethrowAsClientException(e, st, request) {\n" +" A.Error_throwWithStackTrace(A._toClientException(e, request), st);\n" " },\n" -" _readBody\$body(request, response) {\n" -" var \$async\$_readBody = A._wrapJsFunctionForAsync(function(\$async\$errorCode, \$async\$result) {\n" -" switch (\$async\$errorCode) {\n" -" case 2:\n" -" \$async\$next = \$async\$nextWhenCanceled;\n" -" \$async\$goto = \$async\$next.pop();\n" -" break;\n" -" case 1:\n" -" \$async\$errorStack.push(\$async\$result);\n" -" \$async\$goto = \$async\$handler;\n" +" _bodyToStream(request, response) {\n" +" return new A._MultiStream(false, new A._bodyToStream_closure(request, response), type\$._MultiStream_List_int);\n" +" },\n" +" _readStreamBody(request, response, controller) {\n" +" return A._readStreamBody\$body(request, response, controller);\n" +" },\n" +" _readStreamBody\$body(request, response, controller) {\n" +" var \$async\$goto = 0,\n" +" \$async\$completer = A._makeAsyncAwaitCompleter(type\$.void),\n" +" \$async\$returnValue, \$async\$handler = 2, \$async\$errorStack = [], chunk, e, s, t2, t3, t4, t5, exception, t6, t7, _box_0, t1, reader, \$async\$exception;\n" +" var \$async\$_readStreamBody = A._wrapJsFunctionForAsync(function(\$async\$errorCode, \$async\$result) {\n" +" if (\$async\$errorCode === 1) {\n" +" \$async\$errorStack.push(\$async\$result);\n" +" \$async\$goto = \$async\$handler;\n" " }\n" " for (;;)\n" " switch (\$async\$goto) {\n" @@ -7684,114 +7389,124 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " // Function start\n" " _box_0 = {};\n" " t1 = A._asJSObjectQ(response.body);\n" -" bodyStreamReader = t1 == null ? null : A._asJSObject(t1.getReader());\n" -" if (bodyStreamReader == null) {\n" -" // goto return\n" -" \$async\$goto = 1;\n" -" break;\n" -" }\n" -" isDone = false;\n" -" _box_0.isError = false;\n" -" \$async\$handler = 4;\n" -" t1 = type\$.NativeUint8List, t2 = type\$.JSObject;\n" -" case 7:\n" +" reader = t1 == null ? null : A._asJSObject(t1.getReader());\n" +" \$async\$goto = reader == null ? 3 : 4;\n" +" break;\n" +" case 3:\n" +" // then\n" +" \$async\$goto = 5;\n" +" return A._asyncAwait(controller.close\$0(), \$async\$_readStreamBody);\n" +" case 5:\n" +" // returning from await.\n" +" // goto return\n" +" \$async\$goto = 1;\n" +" break;\n" +" case 4:\n" +" // join\n" +" _box_0.resumeSignal = null;\n" +" _box_0.hadError = _box_0.cancelled = false;\n" +" controller.set\$onResume(new A._readStreamBody_closure(_box_0));\n" +" controller.set\$onCancel(new A._readStreamBody_closure0(_box_0, reader, request));\n" +" t1 = type\$.NativeUint8List, t2 = controller.\$ti._precomputed1, t3 = type\$.JSObject, t4 = type\$._Future_void, t5 = type\$._AsyncCompleter_void;\n" +" case 6:\n" " // for condition\n" " // trivial condition\n" -" \$async\$goto = 9;\n" -" return A._asyncStarHelper(A.promiseToFuture(A._asJSObject(bodyStreamReader.read()), t2), \$async\$_readBody, \$async\$controller);\n" -" case 9:\n" +" chunk = null;\n" +" \$async\$handler = 9;\n" +" \$async\$goto = 12;\n" +" return A._asyncAwait(A.promiseToFuture(A._asJSObject(reader.read()), t3), \$async\$_readStreamBody);\n" +" case 12:\n" " // returning from await.\n" " chunk = \$async\$result;\n" -" if (A._asBool(chunk.done)) {\n" -" isDone = true;\n" -" // goto after for\n" -" \$async\$goto = 8;\n" -" break;\n" -" }\n" -" t3 = chunk.value;\n" -" t3.toString;\n" -" \$async\$goto = 10;\n" -" \$async\$nextWhenCanceled = [1, 5];\n" -" return A._asyncStarHelper(A._IterationMarker_yieldSingle(t1._as(t3)), \$async\$_readBody, \$async\$controller);\n" -" case 10:\n" -" // after yield\n" -" // goto for condition\n" -" \$async\$goto = 7;\n" -" break;\n" -" case 8:\n" -" // after for\n" -" \$async\$next.push(6);\n" -" // goto finally\n" -" \$async\$goto = 5;\n" +" \$async\$handler = 2;\n" +" // goto after finally\n" +" \$async\$goto = 11;\n" " break;\n" -" case 4:\n" +" case 9:\n" " // catch\n" -" \$async\$handler = 3;\n" +" \$async\$handler = 8;\n" " \$async\$exception = \$async\$errorStack.pop();\n" " e = A.unwrapException(\$async\$exception);\n" -" st = A.getTraceFromException(\$async\$exception);\n" -" _box_0.isError = true;\n" -" A._rethrowAsClientException(e, st, request);\n" -" \$async\$next.push(6);\n" -" // goto finally\n" -" \$async\$goto = 5;\n" -" break;\n" -" case 3:\n" -" // uncaught\n" -" \$async\$next = [2];\n" -" case 5:\n" -" // finally\n" -" \$async\$handler = 2;\n" -" \$async\$goto = !isDone ? 11 : 12;\n" +" s = A.getTraceFromException(\$async\$exception);\n" +" \$async\$goto = !_box_0.cancelled ? 13 : 14;\n" " break;\n" -" case 11:\n" +" case 13:\n" " // then\n" -" \$async\$handler = 14;\n" -" \$async\$goto = 17;\n" -" return A._asyncStarHelper(A.promiseToFuture(A._asJSObject(bodyStreamReader.cancel()), type\$.nullable_Object).catchError\$2\$test(new A._readBody_closure(), new A._readBody_closure0(_box_0)), \$async\$_readBody, \$async\$controller);\n" -" case 17:\n" +" _box_0.hadError = true;\n" +" t1 = A._toClientException(e, request);\n" +" t2 = type\$.nullable_StackTrace._as(s);\n" +" t3 = controller._state;\n" +" if (t3 >= 4)\n" +" A.throwExpression(controller._badEventState\$0());\n" +" if ((t3 & 1) !== 0) {\n" +" t3 = controller.get\$_subscription();\n" +" t3._addError\$2(t1, t2 == null ? B._StringStackTrace_OdL : t2);\n" +" }\n" +" \$async\$goto = 15;\n" +" return A._asyncAwait(controller.close\$0(), \$async\$_readStreamBody);\n" +" case 15:\n" " // returning from await.\n" -" \$async\$handler = 2;\n" -" // goto after finally\n" -" \$async\$goto = 16;\n" -" break;\n" " case 14:\n" -" // catch\n" -" \$async\$handler = 13;\n" -" \$async\$exception1 = \$async\$errorStack.pop();\n" -" e0 = A.unwrapException(\$async\$exception1);\n" -" st0 = A.getTraceFromException(\$async\$exception1);\n" -" if (!_box_0.isError)\n" -" A._rethrowAsClientException(e0, st0, request);\n" +" // join\n" +" // goto after for\n" +" \$async\$goto = 7;\n" +" break;\n" " // goto after finally\n" -" \$async\$goto = 16;\n" +" \$async\$goto = 11;\n" " break;\n" -" case 13:\n" +" case 8:\n" " // uncaught\n" " // goto rethrow\n" " \$async\$goto = 2;\n" " break;\n" -" case 16:\n" +" case 11:\n" " // after finally\n" -" case 12:\n" -" // join\n" -" // goto the next finally handler\n" -" \$async\$goto = \$async\$next.pop();\n" +" if (A._asBool(chunk.done)) {\n" +" controller.closeSync\$0();\n" +" // goto after for\n" +" \$async\$goto = 7;\n" +" break;\n" +" } else {\n" +" t6 = chunk.value;\n" +" t6.toString;\n" +" t6 = t2._as(t1._as(t6));\n" +" t7 = controller._state;\n" +" if (t7 >= 4)\n" +" A.throwExpression(controller._badEventState\$0());\n" +" if ((t7 & 1) !== 0)\n" +" controller.get\$_subscription()._add\$1(t6);\n" +" }\n" +" t6 = controller._state;\n" +" \$async\$goto = ((t6 & 1) !== 0 ? (controller.get\$_subscription()._state & 4) !== 0 : (t6 & 2) === 0) ? 16 : 17;\n" " break;\n" -" case 6:\n" -" // after finally\n" -" case 1:\n" -" // return\n" -" return A._asyncStarHelper(null, 0, \$async\$controller);\n" -" case 2:\n" -" // rethrow\n" -" return A._asyncStarHelper(\$async\$errorStack.at(-1), 1, \$async\$controller);\n" -" }\n" +" case 16:\n" +" // then\n" +" t6 = _box_0.resumeSignal;\n" +" \$async\$goto = 18;\n" +" return A._asyncAwait((t6 == null ? _box_0.resumeSignal = new A._AsyncCompleter(new A._Future(\$.Zone__current, t4), t5) : t6).future, \$async\$_readStreamBody);\n" +" case 18:\n" +" // returning from await.\n" +" case 17:\n" +" // join\n" +" if ((controller._state & 1) === 0) {\n" +" // goto after for\n" +" \$async\$goto = 7;\n" +" break;\n" +" }\n" +" // goto for condition\n" +" \$async\$goto = 6;\n" +" break;\n" +" case 7:\n" +" // after for\n" +" case 1:\n" +" // return\n" +" return A._asyncReturn(\$async\$returnValue, \$async\$completer);\n" +" case 2:\n" +" // rethrow\n" +" return A._asyncRethrow(\$async\$errorStack.at(-1), \$async\$completer);\n" +" }\n" " });\n" -" var \$async\$goto = 0,\n" -" \$async\$controller = A._makeAsyncStarStreamController(\$async\$_readBody, type\$.List_int),\n" -" \$async\$nextWhenCanceled, \$async\$handler = 2, \$async\$errorStack = [], \$async\$next = [], isDone, chunk, e, st, e0, st0, t2, t3, exception, _box_0, t1, bodyStreamReader, \$async\$exception, \$async\$exception1;\n" -" return A._streamOfController(\$async\$controller);\n" +" return A._asyncStartSync(\$async\$_readStreamBody, \$async\$completer);\n" " },\n" " BrowserClient: function BrowserClient(t0) {\n" " this.withCredentials = false;\n" @@ -7800,10 +7515,17 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " BrowserClient_send_closure: function BrowserClient_send_closure(t0) {\n" " this.headers = t0;\n" " },\n" -" _readBody_closure: function _readBody_closure() {\n" +" _bodyToStream_closure: function _bodyToStream_closure(t0, t1) {\n" +" this.request = t0;\n" +" this.response = t1;\n" +" },\n" +" _readStreamBody_closure: function _readStreamBody_closure(t0) {\n" +" this._box_0 = t0;\n" " },\n" -" _readBody_closure0: function _readBody_closure0(t0) {\n" +" _readStreamBody_closure0: function _readStreamBody_closure0(t0, t1, t2) {\n" " this._box_0 = t0;\n" +" this.reader = t1;\n" +" this.request = t2;\n" " },\n" " ByteStream: function ByteStream(t0) {\n" " this._stream = t0;\n" @@ -8390,10 +8112,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _.text = t3;\n" " },\n" " SseClient\$(serverUrl, debugKey) {\n" -" var t3, t4, t5, _null = null,\n" +" var t3, t4, t5,\n" " t1 = type\$.String,\n" -" t2 = A.StreamController_StreamController(_null, _null, _null, t1);\n" -" t1 = A.StreamController_StreamController(_null, _null, _null, t1);\n" +" t2 = A.StreamController_StreamController(t1);\n" +" t1 = A.StreamController_StreamController(t1);\n" " t3 = A.Logger_Logger(\"SseClient\");\n" " t4 = \$.Zone__current;\n" " t5 = A.generateId();\n" @@ -8458,7 +8180,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " _wrapZone(callback, \$T) {\n" " var t1 = \$.Zone__current;\n" -" if (t1 === B.C__RootZone)\n" +" if (t1 === B.Zone_jYP)\n" " return callback;\n" " return t1.bindUnaryCallbackGuarded\$1\$1(callback, \$T);\n" " },\n" @@ -8508,7 +8230,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t1 = type\$.JSArray_nullable_Object._as(new t1());\n" " webSocket = A._asJSObject(new t2(t3, t1));\n" " webSocket.binaryType = \"arraybuffer\";\n" -" browserSocket = new A.BrowserWebSocket(webSocket, A.StreamController_StreamController(null, null, null, type\$.WebSocketEvent));\n" +" browserSocket = new A.BrowserWebSocket(webSocket, A.StreamController_StreamController(type\$.WebSocketEvent));\n" " t1 = new A._Future(\$.Zone__current, type\$._Future_BrowserWebSocket);\n" " webSocketConnected = new A._AsyncCompleter(t1, type\$._AsyncCompleter_BrowserWebSocket);\n" " if (A._asInt(webSocket.readyState) === 1)\n" @@ -9964,12 +9686,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return result;\n" " return result + other;\n" " },\n" -" \$tdiv(receiver, other) {\n" -" if ((receiver | 0) === receiver)\n" -" if (other >= 1)\n" -" return receiver / other | 0;\n" -" return this._tdivSlow\$1(receiver, other);\n" -" },\n" " _tdivFast\$1(receiver, other) {\n" " return (receiver | 0) === receiver ? receiver / other | 0 : this._tdivSlow\$1(receiver, other);\n" " },\n" @@ -10204,20 +9920,30 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return this.__internal\$_source.cancel\$0();\n" " },\n" " onData\$1(handleData) {\n" -" var t1 = this.\$ti;\n" +" var t2,\n" +" t1 = this.\$ti;\n" " t1._eval\$1(\"~(2)?\")._as(handleData);\n" -" this.__internal\$_handleData = handleData == null ? null : this.__internal\$_zone.registerUnaryCallback\$2\$1(handleData, type\$.dynamic, t1._rest[1]);\n" +" if (handleData == null)\n" +" t1 = null;\n" +" else {\n" +" t2 = this.__internal\$_zone;\n" +" t1 = t1._rest[1];\n" +" t1 = t2._registerUnaryCallbackZoned\$2\$2(t2, type\$.\$env_1_1_dynamic._bind\$1(t1)._eval\$1(\"1(2)\")._as(handleData), type\$.dynamic, t1);\n" +" }\n" +" this.__internal\$_handleData = t1;\n" " },\n" " onError\$1(handleError) {\n" -" var _this = this;\n" +" var t1, _this = this;\n" " _this.__internal\$_source.onError\$1(handleError);\n" " if (handleError == null)\n" " _this.__internal\$_handleError = null;\n" -" else if (type\$.void_Function_Object_StackTrace._is(handleError))\n" -" _this.__internal\$_handleError = _this.__internal\$_zone.registerBinaryCallback\$3\$1(handleError, type\$.dynamic, type\$.Object, type\$.StackTrace);\n" -" else if (type\$.void_Function_Object._is(handleError))\n" -" _this.__internal\$_handleError = _this.__internal\$_zone.registerUnaryCallback\$2\$1(handleError, type\$.dynamic, type\$.Object);\n" -" else\n" +" else if (type\$.void_Function_Object_StackTrace._is(handleError)) {\n" +" t1 = _this.__internal\$_zone;\n" +" _this.__internal\$_handleError = t1._registerBinaryCallbackZoned\$3\$2(t1, type\$.dynamic_Function_Object_StackTrace._as(handleError), type\$.dynamic, type\$.Object, type\$.StackTrace);\n" +" } else if (type\$.void_Function_Object._is(handleError)) {\n" +" t1 = _this.__internal\$_zone;\n" +" _this.__internal\$_handleError = t1._registerUnaryCallbackZoned\$2\$2(t1, type\$.dynamic_Function_Object._as(handleError), type\$.dynamic, type\$.Object);\n" +" } else\n" " throw A.wrapException(A.ArgumentError\$(string\$.handle, null));\n" " },\n" " __internal\$_onData\$1(data) {\n" @@ -10234,9 +9960,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " error = A.unwrapException(exception);\n" " stack = A.getTraceFromException(exception);\n" " handleError = _this.__internal\$_handleError;\n" -" if (handleError == null)\n" -" _this.__internal\$_zone.handleUncaughtError\$2(error, stack);\n" -" else {\n" +" if (handleError == null) {\n" +" t1 = _this.__internal\$_zone;\n" +" t1._handleUncaughtErrorZoned\$3(t1, A._asObject(error), type\$.StackTrace._as(stack));\n" +" } else {\n" " t1 = type\$.Object;\n" " t2 = _this.__internal\$_zone;\n" " if (type\$.void_Function_Object_StackTrace._is(handleError))\n" @@ -10423,7 +10150,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$0() {\n" " return A.Future_Future\$value(null, type\$.void);\n" " },\n" -" \$signature: 9\n" +" \$signature: 6\n" " };\n" " A.SentinelValue.prototype = {};\n" " A.EfficientLengthIterable.prototype = {};\n" @@ -10989,9 +10716,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$2(a0, a1) {\n" " return this._genericClosure.call\$1\$2(a0, a1, this.\$ti._rest[0]);\n" " },\n" -" call\$4(a0, a1, a2, a3) {\n" -" return this._genericClosure.call\$1\$4(a0, a1, a2, a3, this.\$ti._rest[0]);\n" -" },\n" " \$signature() {\n" " return A.instantiatedGenericFunctionType(A.closureFunctionType(this._genericClosure), this.\$ti);\n" " }\n" @@ -11428,13 +11152,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$2(o, tag) {\n" " return this.getUnknownTag(o, tag);\n" " },\n" -" \$signature: 31\n" +" \$signature: 73\n" " };\n" " A.initHooks_closure1.prototype = {\n" " call\$1(tag) {\n" " return this.prototypeForTag(A._asString(tag));\n" " },\n" -" \$signature: 30\n" +" \$signature: 59\n" " };\n" " A._Record.prototype = {\n" " get\$runtimeType(_) {\n" @@ -11942,7 +11666,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t1.storedCallback = null;\n" " f.call\$0();\n" " },\n" -" \$signature: 4\n" +" \$signature: 8\n" " };\n" " A._AsyncRun__initializeScheduleImmediate_closure.prototype = {\n" " call\$1(callback) {\n" @@ -11952,7 +11676,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t2 = this.span;\n" " t1.firstChild ? t1.removeChild(t2) : t1.appendChild(t2);\n" " },\n" -" \$signature: 49\n" +" \$signature: 43\n" " };\n" " A._AsyncRun__scheduleImmediateJsOverride_internalCallback.prototype = {\n" " call\$0() {\n" @@ -11973,12 +11697,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " else\n" " throw A.wrapException(A.UnsupportedError\$(\"`setTimeout()` not found.\"));\n" " },\n" -" _TimerImpl\$periodic\$2(milliseconds, callback) {\n" -" if (self.setTimeout != null)\n" -" this._handle = self.setInterval(A.convertDartClosureToJS(new A._TimerImpl\$periodic_closure(this, milliseconds, Date.now(), callback), 0), milliseconds);\n" -" else\n" -" throw A.wrapException(A.UnsupportedError\$(\"Periodic timer.\"));\n" -" },\n" " get\$isActive() {\n" " return this._handle != null;\n" " },\n" @@ -11987,10 +11705,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " var t1 = this._handle;\n" " if (t1 == null)\n" " return;\n" -" if (this._once)\n" -" self.clearTimeout(t1);\n" -" else\n" -" self.clearInterval(t1);\n" +" self.clearTimeout(t1);\n" " this._handle = null;\n" " } else\n" " throw A.wrapException(A.UnsupportedError\$(\"Canceling a timer.\"));\n" @@ -11999,29 +11714,11 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._TimerImpl_internalCallback.prototype = {\n" " call\$0() {\n" -" var t1 = this.\$this;\n" -" t1._handle = null;\n" -" t1._tick = 1;\n" +" this.\$this._handle = null;\n" " this.callback.call\$0();\n" " },\n" " \$signature: 0\n" " };\n" -" A._TimerImpl\$periodic_closure.prototype = {\n" -" call\$0() {\n" -" var duration, _this = this,\n" -" t1 = _this.\$this,\n" -" tick = t1._tick + 1,\n" -" t2 = _this.milliseconds;\n" -" if (t2 > 0) {\n" -" duration = Date.now() - _this.start;\n" -" if (duration > (tick + 1) * t2)\n" -" tick = B.JSInt_methods.\$tdiv(duration, t2);\n" -" }\n" -" t1._tick = tick;\n" -" _this.callback.call\$1(t1);\n" -" },\n" -" \$signature: 1\n" -" };\n" " A._AsyncAwaitCompleter.prototype = {\n" " complete\$1(value) {\n" " var t2, _this = this,\n" @@ -12052,104 +11749,19 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(result) {\n" " return this.bodyFunction.call\$2(0, result);\n" " },\n" -" \$signature: 5\n" +" \$signature: 4\n" " };\n" " A._awaitOnObject_closure0.prototype = {\n" " call\$2(error, stackTrace) {\n" " this.bodyFunction.call\$2(1, new A.ExceptionAndStackTrace(error, type\$.StackTrace._as(stackTrace)));\n" " },\n" -" \$signature: 54\n" +" \$signature: 48\n" " };\n" " A._wrapJsFunctionForAsync_closure.prototype = {\n" " call\$2(errorCode, result) {\n" " this.\$protected(A._asInt(errorCode), result);\n" " },\n" -" \$signature: 59\n" -" };\n" -" A._asyncStarHelper_closure.prototype = {\n" -" call\$0() {\n" -" var t3,\n" -" t1 = this.controller,\n" -" t2 = t1.___AsyncStarStreamController_controller_A;\n" -" t2 === \$ && A.throwLateFieldNI(\"controller\");\n" -" t3 = t2._state;\n" -" if ((t3 & 1) !== 0 ? (t2.get\$_subscription()._state & 4) !== 0 : (t3 & 2) === 0) {\n" -" t1.isSuspended = true;\n" -" return;\n" -" }\n" -" t1 = t1.cancelationFuture != null ? 2 : 0;\n" -" this.bodyFunction.call\$2(t1, null);\n" -" },\n" -" \$signature: 0\n" -" };\n" -" A._asyncStarHelper_closure0.prototype = {\n" -" call\$1(__wc0_formal) {\n" -" var errorCode = this.controller.cancelationFuture != null ? 2 : 0;\n" -" this.bodyFunction.call\$2(errorCode, null);\n" -" },\n" -" \$signature: 4\n" -" };\n" -" A._AsyncStarStreamController.prototype = {\n" -" _AsyncStarStreamController\$1(body, \$T) {\n" -" var _this = this,\n" -" t1 = new A._AsyncStarStreamController__resumeBody(body);\n" -" _this.___AsyncStarStreamController_controller_A = _this.\$ti._eval\$1(\"StreamController<1>\")._as(A.StreamController_StreamController(new A._AsyncStarStreamController_closure(_this, body), new A._AsyncStarStreamController_closure0(t1), new A._AsyncStarStreamController_closure1(_this, t1), \$T));\n" -" }\n" -" };\n" -" A._AsyncStarStreamController__resumeBody.prototype = {\n" -" call\$0() {\n" -" A.scheduleMicrotask(new A._AsyncStarStreamController__resumeBody_closure(this.body));\n" -" },\n" -" \$signature: 1\n" -" };\n" -" A._AsyncStarStreamController__resumeBody_closure.prototype = {\n" -" call\$0() {\n" -" this.body.call\$2(0, null);\n" -" },\n" -" \$signature: 0\n" -" };\n" -" A._AsyncStarStreamController_closure0.prototype = {\n" -" call\$0() {\n" -" this._resumeBody.call\$0();\n" -" },\n" -" \$signature: 0\n" -" };\n" -" A._AsyncStarStreamController_closure1.prototype = {\n" -" call\$0() {\n" -" var t1 = this.\$this;\n" -" if (t1.isSuspended) {\n" -" t1.isSuspended = false;\n" -" this._resumeBody.call\$0();\n" -" }\n" -" },\n" -" \$signature: 0\n" -" };\n" -" A._AsyncStarStreamController_closure.prototype = {\n" -" call\$0() {\n" -" var t1 = this.\$this,\n" -" t2 = t1.___AsyncStarStreamController_controller_A;\n" -" t2 === \$ && A.throwLateFieldNI(\"controller\");\n" -" if ((t2._state & 4) === 0) {\n" -" t1.cancelationFuture = new A._Future(\$.Zone__current, type\$._Future_dynamic);\n" -" if (t1.isSuspended) {\n" -" t1.isSuspended = false;\n" -" A.scheduleMicrotask(new A._AsyncStarStreamController__closure(this.body));\n" -" }\n" -" return t1.cancelationFuture;\n" -" }\n" -" },\n" -" \$signature: 60\n" -" };\n" -" A._AsyncStarStreamController__closure.prototype = {\n" -" call\$0() {\n" -" this.body.call\$2(2, null);\n" -" },\n" -" \$signature: 0\n" -" };\n" -" A._IterationMarker.prototype = {\n" -" toString\$0(_) {\n" -" return \"IterationMarker(\" + this.state + \", \" + A.S(this.value) + \")\";\n" -" }\n" +" \$signature: 55\n" " };\n" " A.AsyncError.prototype = {\n" " toString\$0(_) {\n" @@ -12235,9 +11847,11 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._FutureListener.prototype = {\n" " matchesErrorTest\$1(asyncError) {\n" +" var t1;\n" " if ((this.state & 15) !== 6)\n" " return true;\n" -" return this.result._zone.runUnary\$2\$2(type\$.bool_Function_Object._as(this.callback), asyncError.error, type\$.bool, type\$.Object);\n" +" t1 = this.result._zone;\n" +" return t1._runUnaryZoned\$2\$3(t1, type\$.bool_Function_Object._as(this.callback), asyncError.error, type\$.bool, type\$.Object);\n" " },\n" " handleError\$1(asyncError) {\n" " var exception, _this = this,\n" @@ -12248,9 +11862,9 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t3 = asyncError.error,\n" " t4 = _this.result._zone;\n" " if (type\$.dynamic_Function_Object_StackTrace._is(errorCallback))\n" -" result = t4.runBinary\$3\$3(errorCallback, t3, asyncError.stackTrace, t1, t2, type\$.StackTrace);\n" +" result = t4._runBinaryZoned\$3\$4(t4, errorCallback, t3, asyncError.stackTrace, t1, t2, type\$.StackTrace);\n" " else\n" -" result = t4.runUnary\$2\$2(type\$.dynamic_Function_Object._as(errorCallback), t3, t1, t2);\n" +" result = t4._runUnaryZoned\$2\$3(t4, type\$.dynamic_Function_Object._as(errorCallback), t3, t1, t2);\n" " try {\n" " t1 = _this.\$ti._eval\$1(\"2/\")._as(result);\n" " return t1;\n" @@ -12266,15 +11880,16 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._Future.prototype = {\n" " then\$1\$2\$onError(f, onError, \$R) {\n" -" var currentZone, result, t2,\n" +" var currentZone, t2, result,\n" " t1 = this.\$ti;\n" " t1._bind\$1(\$R)._eval\$1(\"1/(2)\")._as(f);\n" " currentZone = \$.Zone__current;\n" -" if (currentZone === B.C__RootZone) {\n" +" if (currentZone === B.Zone_jYP) {\n" " if (onError != null && !type\$.dynamic_Function_Object_StackTrace._is(onError) && !type\$.dynamic_Function_Object._is(onError))\n" " throw A.wrapException(A.ArgumentError\$value(onError, \"onError\", string\$.Error_));\n" " } else {\n" -" f = currentZone.registerUnaryCallback\$2\$1(f, \$R._eval\$1(\"0/\"), t1._precomputed1);\n" +" t2 = t1._precomputed1;\n" +" f = currentZone._registerUnaryCallbackZoned\$2\$2(currentZone, \$R._eval\$1(\"@<0/>\")._bind\$1(t2)._eval\$1(\"1(2)\")._as(f), \$R._eval\$1(\"0/\"), t2);\n" " if (onError != null)\n" " onError = A._registerErrorHandler(onError, currentZone);\n" " }\n" @@ -12294,32 +11909,23 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this._addListener\$1(new A._FutureListener(result, 19, f, onError, t1._eval\$1(\"@<1>\")._bind\$1(\$E)._eval\$1(\"_FutureListener<1,2>\")));\n" " return result;\n" " },\n" -" catchError\$2\$test(onError, test) {\n" -" var t1, t2, result;\n" -" type\$.nullable_bool_Function_Object._as(test);\n" -" t1 = this.\$ti;\n" -" t2 = \$.Zone__current;\n" -" result = new A._Future(t2, t1);\n" -" if (t2 !== B.C__RootZone) {\n" -" onError = A._registerErrorHandler(onError, t2);\n" -" if (test != null)\n" -" test = t2.registerUnaryCallback\$2\$1(test, type\$.bool, type\$.Object);\n" -" }\n" -" t2 = test == null ? 2 : 6;\n" -" this._addListener\$1(new A._FutureListener(result, t2, test, onError, t1._eval\$1(\"_FutureListener<1,1>\")));\n" -" return result;\n" -" },\n" " catchError\$1(onError) {\n" -" return this.catchError\$2\$test(onError, null);\n" +" var t1 = this.\$ti,\n" +" resultZone = \$.Zone__current,\n" +" result = new A._Future(resultZone, t1);\n" +" if (resultZone !== B.Zone_jYP)\n" +" onError = A._registerErrorHandler(onError, resultZone);\n" +" this._addListener\$1(new A._FutureListener(result, 2, null, onError, t1._eval\$1(\"_FutureListener<1,1>\")));\n" +" return result;\n" " },\n" " whenComplete\$1(action) {\n" -" var t1, t2, result;\n" +" var t1, resultZone, result;\n" " type\$.dynamic_Function._as(action);\n" " t1 = this.\$ti;\n" -" t2 = \$.Zone__current;\n" -" result = new A._Future(t2, t1);\n" -" if (t2 !== B.C__RootZone)\n" -" action = t2.registerCallback\$1\$1(action, type\$.dynamic);\n" +" resultZone = \$.Zone__current;\n" +" result = new A._Future(resultZone, t1);\n" +" if (resultZone !== B.Zone_jYP)\n" +" action = resultZone._registerCallbackZoned\$1\$2(resultZone, action, type\$.dynamic);\n" " this._addListener\$1(new A._FutureListener(result, 8, action, null, t1._eval\$1(\"_FutureListener<1,1>\")));\n" " return result;\n" " },\n" @@ -12346,7 +11952,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " _this._cloneResult\$1(source);\n" " }\n" -" _this._zone.scheduleMicrotask\$1(new A._Future__addListener_closure(_this, listener));\n" +" t1 = _this._zone;\n" +" t1._scheduleMicrotaskZoned\$2(t1, new A._Future__addListener_closure(_this, listener));\n" " }\n" " },\n" " _prependListeners\$1(listeners) {\n" @@ -12374,7 +11981,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _this._cloneResult\$1(source);\n" " }\n" " _box_0.listeners = _this._reverseListeners\$1(listeners);\n" -" _this._zone.scheduleMicrotask\$1(new A._Future__prependListeners_closure(_box_0, _this));\n" +" t1 = _this._zone;\n" +" t1._scheduleMicrotaskZoned\$2(t1, new A._Future__prependListeners_closure(_box_0, _this));\n" " }\n" " },\n" " _removeListeners\$0() {\n" @@ -12413,14 +12021,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " A._Future__propagateToListeners(_this, listeners);\n" " },\n" " _completeWithResultOf\$1(source) {\n" -" var t1, t2, listeners, _this = this;\n" -" if ((source._state & 16) !== 0) {\n" -" t1 = _this._zone;\n" -" t2 = source._zone;\n" -" t1 = !(t1 === t2 || t1.get\$errorZone() === t2.get\$errorZone());\n" -" } else\n" -" t1 = false;\n" -" if (t1)\n" +" var listeners, _this = this;\n" +" if ((source._state & 16) !== 0 && _this._zone._handleUncaughtErrorFunction != source._zone._handleUncaughtErrorFunction)\n" " return;\n" " listeners = _this._removeListeners\$0();\n" " _this._cloneResult\$1(source);\n" @@ -12446,18 +12048,21 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this._asyncCompleteWithValue\$1(value);\n" " },\n" " _asyncCompleteWithValue\$1(value) {\n" -" var _this = this;\n" +" var t1, _this = this;\n" " _this.\$ti._precomputed1._as(value);\n" " _this._state ^= 2;\n" -" _this._zone.scheduleMicrotask\$1(new A._Future__asyncCompleteWithValue_closure(_this, value));\n" +" t1 = _this._zone;\n" +" t1._scheduleMicrotaskZoned\$2(t1, new A._Future__asyncCompleteWithValue_closure(_this, value));\n" " },\n" " _chainFuture\$1(value) {\n" " A._Future__chainCoreFuture(this.\$ti._eval\$1(\"Future<1>\")._as(value), this, false);\n" " return;\n" " },\n" " _asyncCompleteErrorObject\$1(error) {\n" +" var t1;\n" " this._state ^= 2;\n" -" this._zone.scheduleMicrotask\$1(new A._Future__asyncCompleteErrorObject_closure(this, error));\n" +" t1 = this._zone;\n" +" t1._scheduleMicrotaskZoned\$2(t1, new A._Future__asyncCompleteErrorObject_closure(this, error));\n" " },\n" " timeout\$2\$onTimeout(timeLimit, onTimeout) {\n" " var t3, _future, _this = this, t1 = {},\n" @@ -12471,7 +12076,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t3 = \$.Zone__current;\n" " _future = new A._Future(t3, t2);\n" " t1.timer = null;\n" -" t1.timer = A.Timer_Timer(timeLimit, new A._Future_timeout_closure(_this, _future, t3, t3.registerCallback\$1\$1(onTimeout, t2._eval\$1(\"1/\"))));\n" +" t1.timer = A.Timer_Timer(timeLimit, new A._Future_timeout_closure(_this, _future, t3, t3._registerCallbackZoned\$1\$2(t3, t2._eval\$1(\"1/()\")._as(onTimeout), t2._eval\$1(\"1/\"))));\n" " _this.then\$1\$2\$onError(new A._Future_timeout_closure0(t1, _this, _future), new A._Future_timeout_closure1(t1, _future), type\$.Null);\n" " return _future;\n" " },\n" @@ -12509,10 +12114,11 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._Future__propagateToListeners_handleWhenCompleteCallback.prototype = {\n" " call\$0() {\n" -" var e, s, t1, exception, t2, t3, originalSource, joinedResult, _this = this, completeResult = null;\n" +" var e, s, t1, t2, exception, t3, originalSource, joinedResult, _this = this, completeResult = null;\n" " try {\n" " t1 = _this._box_0.listener;\n" -" completeResult = t1.result._zone.run\$1\$1(type\$.dynamic_Function._as(t1.callback), type\$.dynamic);\n" +" t2 = t1.result._zone;\n" +" completeResult = t2._runZoned\$1\$2(t2, type\$.dynamic_Function._as(t1.callback), type\$.dynamic);\n" " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" @@ -12554,7 +12160,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(__wc0_formal) {\n" " this.joinedResult._completeWithResultOf\$1(this.originalSource);\n" " },\n" -" \$signature: 4\n" +" \$signature: 8\n" " };\n" " A._Future__propagateToListeners_handleWhenCompleteCallback_closure0.prototype = {\n" " call\$2(e, s) {\n" @@ -12566,14 +12172,15 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._Future__propagateToListeners_handleValueCallback.prototype = {\n" " call\$0() {\n" -" var e, s, t1, t2, t3, t4, t5, exception;\n" +" var e, s, t1, t2, t3, t4, t5, t6, exception;\n" " try {\n" " t1 = this._box_0;\n" " t2 = t1.listener;\n" " t3 = t2.\$ti;\n" " t4 = t3._precomputed1;\n" " t5 = t4._as(this.sourceResult);\n" -" t1.listenerValueOrError = t2.result._zone.runUnary\$2\$2(t3._eval\$1(\"2/(1)\")._as(t2.callback), t5, t3._eval\$1(\"2/\"), t4);\n" +" t6 = t2.result._zone;\n" +" t1.listenerValueOrError = t6._runUnaryZoned\$2\$3(t6, t3._eval\$1(\"2/(1)\")._as(t2.callback), t5, t3._eval\$1(\"2/\"), t4);\n" " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" @@ -12622,9 +12229,11 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._Future_timeout_closure.prototype = {\n" " call\$0() {\n" -" var e, s, exception, t1, t2, _this = this;\n" +" var e, s, t1, t2, exception, _this = this;\n" " try {\n" -" _this._future._complete\$1(_this.zone.run\$1\$1(_this.onTimeoutHandler, _this.\$this.\$ti._eval\$1(\"1/\")));\n" +" t1 = _this.zone;\n" +" t2 = _this.\$this.\$ti;\n" +" _this._future._complete\$1(t1._runZoned\$1\$2(t1, t2._eval\$1(\"1/()\")._as(_this.onTimeoutHandler), t2._eval\$1(\"1/\")));\n" " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" @@ -12733,10 +12342,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " if ((_this._state & 8) === 0)\n" " return A._instanceType(_this)._eval\$1(\"_PendingEvents<1>?\")._as(_this._varData);\n" " t1 = A._instanceType(_this);\n" -" return t1._eval\$1(\"_PendingEvents<1>?\")._as(t1._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(_this._varData)._varData);\n" +" return t1._eval\$1(\"_PendingEvents<1>?\")._as(t1._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(_this._varData).get\$_varData());\n" " },\n" " _ensurePendingEvents\$0() {\n" -" var events, t1, state, _this = this;\n" +" var events, t1, _this = this;\n" " if ((_this._state & 8) === 0) {\n" " events = _this._varData;\n" " if (events == null)\n" @@ -12744,16 +12353,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return A._instanceType(_this)._eval\$1(\"_PendingEvents<1>\")._as(events);\n" " }\n" " t1 = A._instanceType(_this);\n" -" state = t1._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(_this._varData);\n" -" events = state._varData;\n" -" if (events == null)\n" -" events = state._varData = new A._PendingEvents(t1._eval\$1(\"_PendingEvents<1>\"));\n" +" events = t1._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(_this._varData).get\$_varData();\n" " return t1._eval\$1(\"_PendingEvents<1>\")._as(events);\n" " },\n" " get\$_subscription() {\n" " var varData = this._varData;\n" " if ((this._state & 8) !== 0)\n" -" varData = type\$._StreamControllerAddStreamState_nullable_Object._as(varData)._varData;\n" +" varData = type\$._StreamControllerAddStreamState_nullable_Object._as(varData).get\$_varData();\n" " return A._instanceType(this)._eval\$1(\"_ControllerSubscription<1>\")._as(varData);\n" " },\n" " _badEventState\$0() {\n" @@ -12761,31 +12367,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return new A.StateError(\"Cannot add event after closing\");\n" " return new A.StateError(\"Cannot add event while adding a stream\");\n" " },\n" -" addStream\$2\$cancelOnError(source, cancelOnError) {\n" -" var t2, t3, t4, t5, t6, _this = this,\n" -" t1 = A._instanceType(_this);\n" -" t1._eval\$1(\"Stream<1>\")._as(source);\n" -" t2 = _this._state;\n" -" if (t2 >= 4)\n" -" throw A.wrapException(_this._badEventState\$0());\n" -" if ((t2 & 2) !== 0) {\n" -" t1 = new A._Future(\$.Zone__current, type\$._Future_dynamic);\n" -" t1._asyncComplete\$1(null);\n" -" return t1;\n" -" }\n" -" t2 = _this._varData;\n" -" t3 = cancelOnError === true;\n" -" t4 = new A._Future(\$.Zone__current, type\$._Future_dynamic);\n" -" t5 = t1._eval\$1(\"~(1)\")._as(_this.get\$_add());\n" -" t6 = t3 ? A._AddStreamState_makeErrorHandler(_this) : _this.get\$_addError();\n" -" t6 = source.listen\$4\$cancelOnError\$onDone\$onError(t5, t3, _this.get\$_close(), t6);\n" -" t3 = _this._state;\n" -" if ((t3 & 1) !== 0 ? (_this.get\$_subscription()._state & 4) !== 0 : (t3 & 2) === 0)\n" -" t6.pause\$0();\n" -" _this._varData = new A._StreamControllerAddStreamState(t2, t4, t6, t1._eval\$1(\"_StreamControllerAddStreamState<1>\"));\n" -" _this._state |= 8;\n" -" return t4;\n" -" },\n" " _ensureDoneFuture\$0() {\n" " var t1 = this._doneFuture;\n" " if (t1 == null)\n" @@ -12799,16 +12380,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " throw A.wrapException(_this._badEventState\$0());\n" " _this._add\$1(value);\n" " },\n" -" addError\$2(error, stackTrace) {\n" -" var _0_0;\n" -" if (this._state >= 4)\n" -" throw A.wrapException(this._badEventState\$0());\n" -" _0_0 = A._interceptUserError(error, stackTrace);\n" -" this._addError\$2(_0_0.error, _0_0.stackTrace);\n" -" },\n" -" addError\$1(error) {\n" -" return this.addError\$2(error, null);\n" -" },\n" " close\$0() {\n" " var _this = this,\n" " t1 = _this._state;\n" @@ -12836,23 +12407,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " else if ((t2 & 3) === 0)\n" " _this._ensurePendingEvents\$0().add\$1(0, new A._DelayedData(value, t1._eval\$1(\"_DelayedData<1>\")));\n" " },\n" -" _addError\$2(error, stackTrace) {\n" -" var t1;\n" -" A._asObject(error);\n" -" type\$.StackTrace._as(stackTrace);\n" -" t1 = this._state;\n" -" if ((t1 & 1) !== 0)\n" -" this._sendError\$2(error, stackTrace);\n" -" else if ((t1 & 3) === 0)\n" -" this._ensurePendingEvents\$0().add\$1(0, new A._DelayedError(error, stackTrace));\n" -" },\n" -" _close\$0() {\n" -" var _this = this,\n" -" addState = A._instanceType(_this)._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(_this._varData);\n" -" _this._varData = addState._varData;\n" -" _this._state &= 4294967287;\n" -" addState.addStreamFuture._asyncComplete\$1(null);\n" -" },\n" " _subscribe\$4(onData, onError, onDone, cancelOnError) {\n" " var t2, t3, t4, t5, t6, t7, subscription, pendingEvents, addState, _this = this,\n" " t1 = A._instanceType(_this);\n" @@ -12866,12 +12420,12 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t5 = A._BufferingStreamSubscription__registerDataHandler(t2, onData, t1._precomputed1);\n" " t6 = A._BufferingStreamSubscription__registerErrorHandler(t2, onError);\n" " t7 = onDone == null ? A.async___nullDoneHandler\$closure() : onDone;\n" -" subscription = new A._ControllerSubscription(_this, t5, t6, t2.registerCallback\$1\$1(t7, type\$.void), t2, t3 | t4, t1._eval\$1(\"_ControllerSubscription<1>\"));\n" +" subscription = new A._ControllerSubscription(_this, t5, t6, t2._registerCallbackZoned\$1\$2(t2, type\$.void_Function._as(t7), type\$.void), t2, t3 | t4, t1._eval\$1(\"_ControllerSubscription<1>\"));\n" " pendingEvents = _this.get\$_pendingEvents();\n" " if (((_this._state |= 1) & 8) !== 0) {\n" " addState = t1._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(_this._varData);\n" -" addState._varData = subscription;\n" -" addState.addSubscription.resume\$0();\n" +" addState.set\$_varData(subscription);\n" +" addState.resume\$0();\n" " } else\n" " _this._varData = subscription;\n" " subscription._setPendingEvents\$1(pendingEvents);\n" @@ -12915,6 +12469,12 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " set\$onListen(onListen) {\n" " this.onListen = type\$.nullable_void_Function._as(onListen);\n" " },\n" +" set\$onResume(onResume) {\n" +" this.onResume = type\$.nullable_void_Function._as(onResume);\n" +" },\n" +" set\$onCancel(onCancel) {\n" +" this.onCancel = type\$.nullable_void_Function._as(onCancel);\n" +" },\n" " \$isStreamSink: 1,\n" " \$isStreamController: 1,\n" " \$is_StreamControllerLifecycle: 1,\n" @@ -12937,7 +12497,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._AsyncStreamControllerDispatch.prototype = {\n" " _sendData\$1(data) {\n" -" var t1 = this.\$ti;\n" +" var t1 = A._instanceType(this);\n" " t1._precomputed1._as(data);\n" " this.get\$_subscription()._addPending\$1(new A._DelayedData(data, t1._eval\$1(\"_DelayedData<1>\")));\n" " },\n" @@ -12970,7 +12530,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t2 = A._instanceType(t1);\n" " t2._eval\$1(\"StreamSubscription<1>\")._as(this);\n" " if ((t1._state & 8) !== 0)\n" -" t2._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(t1._varData).addSubscription.pause\$0();\n" +" t2._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(t1._varData).pause\$0();\n" " A._runGuarded(t1.onPause);\n" " },\n" " _onResume\$0() {\n" @@ -12978,32 +12538,11 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t2 = A._instanceType(t1);\n" " t2._eval\$1(\"StreamSubscription<1>\")._as(this);\n" " if ((t1._state & 8) !== 0)\n" -" t2._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(t1._varData).addSubscription.resume\$0();\n" +" t2._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(t1._varData).resume\$0();\n" " A._runGuarded(t1.onResume);\n" " }\n" " };\n" " A._StreamSinkWrapper.prototype = {\$isStreamSink: 1};\n" -" A._AddStreamState.prototype = {\n" -" cancel\$0() {\n" -" var cancel = this.addSubscription.cancel\$0();\n" -" return cancel.whenComplete\$1(new A._AddStreamState_cancel_closure(this));\n" -" }\n" -" };\n" -" A._AddStreamState_makeErrorHandler_closure.prototype = {\n" -" call\$2(e, s) {\n" -" var t1 = this.controller;\n" -" t1._addError\$2(A._asObject(e), type\$.StackTrace._as(s));\n" -" t1._close\$0();\n" -" },\n" -" \$signature: 3\n" -" };\n" -" A._AddStreamState_cancel_closure.prototype = {\n" -" call\$0() {\n" -" this.\$this.addStreamFuture._asyncComplete\$1(null);\n" -" },\n" -" \$signature: 1\n" -" };\n" -" A._StreamControllerAddStreamState.prototype = {};\n" " A._BufferingStreamSubscription.prototype = {\n" " _setPendingEvents\$1(pendingEvents) {\n" " var _this = this;\n" @@ -13457,7 +12996,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t1 = new A._DoneStreamSubscription(t2, t1._eval\$1(\"_DoneStreamSubscription<1>\"));\n" " A.scheduleMicrotask(t1.get\$_onMicrotask());\n" " if (onDone != null)\n" -" t1._onDone = t2.registerCallback\$1\$1(onDone, type\$.void);\n" +" t1._onDone = t2._registerCallbackZoned\$1\$2(t2, type\$.void_Function._as(onDone), type\$.void);\n" " return t1;\n" " },\n" " listen\$3\$onDone\$onError(onData, onDone, onError) {\n" @@ -13467,6 +13006,44 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return this.listen\$4\$cancelOnError\$onDone\$onError(onData, cancelOnError, onDone, null);\n" " }\n" " };\n" +" A._MultiStream.prototype = {\n" +" listen\$4\$cancelOnError\$onDone\$onError(onData, cancelOnError, onDone, onError) {\n" +" var controller, _null = null,\n" +" t1 = this.\$ti;\n" +" t1._eval\$1(\"~(1)?\")._as(onData);\n" +" type\$.nullable_void_Function._as(onDone);\n" +" controller = new A._MultiStreamController(_null, _null, _null, _null, t1._eval\$1(\"_MultiStreamController<1>\"));\n" +" controller.set\$onListen(new A._MultiStream_listen_closure(this, controller));\n" +" return controller._subscribe\$4(onData, onError, onDone, cancelOnError === true);\n" +" },\n" +" listen\$3\$onDone\$onError(onData, onDone, onError) {\n" +" return this.listen\$4\$cancelOnError\$onDone\$onError(onData, null, onDone, onError);\n" +" },\n" +" listen\$3\$cancelOnError\$onDone(onData, cancelOnError, onDone) {\n" +" return this.listen\$4\$cancelOnError\$onDone\$onError(onData, cancelOnError, onDone, null);\n" +" }\n" +" };\n" +" A._MultiStream_listen_closure.prototype = {\n" +" call\$0() {\n" +" this.\$this._onListen.call\$1(this.controller);\n" +" },\n" +" \$signature: 0\n" +" };\n" +" A._MultiStreamController.prototype = {\n" +" closeSync\$0() {\n" +" var _this = this,\n" +" t1 = _this._state;\n" +" if ((t1 & 4) !== 0)\n" +" return;\n" +" if (t1 >= 4)\n" +" throw A.wrapException(_this._badEventState\$0());\n" +" t1 |= 4;\n" +" _this._state = t1;\n" +" if ((t1 & 1) !== 0)\n" +" _this.get\$_subscription()._close\$0();\n" +" },\n" +" \$isMultiStreamController: 1\n" +" };\n" " A._cancelAndValue_closure.prototype = {\n" " call\$0() {\n" " return this.future._complete\$1(this.value);\n" @@ -13485,7 +13062,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t5 = A._BufferingStreamSubscription__registerDataHandler(t2, onData, t1._rest[1]);\n" " t6 = A._BufferingStreamSubscription__registerErrorHandler(t2, onError);\n" " t7 = onDone == null ? A.async___nullDoneHandler\$closure() : onDone;\n" -" t1 = new A._ForwardingStreamSubscription(this, t5, t6, t2.registerCallback\$1\$1(t7, type\$.void), t2, t3 | t4, t1._eval\$1(\"_ForwardingStreamSubscription<1,2>\"));\n" +" t1 = new A._ForwardingStreamSubscription(this, t5, t6, t2._registerCallbackZoned\$1\$2(t2, type\$.void_Function._as(t7), type\$.void), t2, t3 | t4, t1._eval\$1(\"_ForwardingStreamSubscription<1,2>\"));\n" " t1._subscription = this._source.listen\$3\$onDone\$onError(t1.get\$_handleData(), t1.get\$_handleDone(), t1.get\$_handleError());\n" " return t1;\n" " },\n" @@ -13567,453 +13144,270 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " sink._add\$1(outputEvent);\n" " }\n" " };\n" -" A._ZoneRun.prototype = {};\n" -" A._ZoneRunUnary.prototype = {};\n" -" A._ZoneRunBinary.prototype = {};\n" -" A._ZoneRegisterCallback.prototype = {};\n" -" A._ZoneRegisterUnaryCallback.prototype = {};\n" -" A._ZoneRegisterBinaryCallback.prototype = {};\n" -" A._ZoneErrorCallback.prototype = {};\n" -" A._ZoneScheduleMicrotask.prototype = {};\n" -" A._ZoneCreateTimer.prototype = {};\n" -" A._ZoneCreatePeriodicTimer.prototype = {};\n" -" A._ZonePrint.prototype = {};\n" -" A._ZoneFork.prototype = {};\n" -" A._ZoneHandleUncaughtError.prototype = {\n" -" function\$5(arg0, arg1, arg2, arg3, arg4) {\n" -" return this.\$function.call\$5(arg0, arg1, arg2, arg3, arg4);\n" -" }\n" -" };\n" -" A._ZoneValues.prototype = {};\n" -" A._Zone.prototype = {\n" -" _processUncaughtError\$3(zone, error, stackTrace) {\n" -" var implementation, implZone, parentZone, currentZone, e, s, t1, exception;\n" -" type\$.StackTrace._as(stackTrace);\n" -" implementation = this.get\$_handleUncaughtError();\n" -" implZone = implementation.zone;\n" -" if (implZone === B.C__RootZone) {\n" -" A._rootHandleError(error, stackTrace);\n" -" return;\n" -" }\n" -" t1 = implZone.get\$parent();\n" -" t1.toString;\n" -" parentZone = t1;\n" -" currentZone = \$.Zone__current;\n" -" try {\n" -" \$.Zone__current = parentZone;\n" -" implementation.function\$5(implZone, implZone.get\$_parentDelegate(), zone, error, stackTrace);\n" -" \$.Zone__current = currentZone;\n" -" } catch (exception) {\n" -" e = A.unwrapException(exception);\n" -" s = A.getTraceFromException(exception);\n" -" \$.Zone__current = currentZone;\n" -" t1 = error === e ? stackTrace : s;\n" -" parentZone._processUncaughtError\$3(implZone, e, t1);\n" -" }\n" -" },\n" -" \$isZone: 1\n" -" };\n" -" A._CustomZone.prototype = {\n" -" get\$_delegate() {\n" -" var t1 = this._delegateCache;\n" -" return t1 == null ? this._delegateCache = new A._ZoneDelegate(this) : t1;\n" -" },\n" -" get\$_parentDelegate() {\n" -" return this.parent.get\$_delegate();\n" -" },\n" -" get\$errorZone() {\n" -" return this._handleUncaughtError.zone;\n" +" A._ZoneHandleUncaughtError.prototype = {};\n" +" A.Zone.prototype = {\n" +" run\$1\$1(action, \$R) {\n" +" return this._runZoned\$1\$2(this, \$R._eval\$1(\"0()\")._as(action), \$R);\n" " },\n" -" runGuarded\$1(f) {\n" -" var e, s, exception;\n" -" type\$.void_Function._as(f);\n" -" try {\n" -" this.run\$1\$1(f, type\$.void);\n" -" } catch (exception) {\n" -" e = A.unwrapException(exception);\n" -" s = A.getTraceFromException(exception);\n" -" this._processUncaughtError\$3(this, A._asObject(e), type\$.StackTrace._as(s));\n" -" }\n" -" },\n" -" runUnaryGuarded\$1\$2(f, arg, \$T) {\n" -" var e, s, exception;\n" -" \$T._eval\$1(\"~(0)\")._as(f);\n" -" \$T._as(arg);\n" -" try {\n" -" this.runUnary\$2\$2(f, arg, type\$.void, \$T);\n" -" } catch (exception) {\n" -" e = A.unwrapException(exception);\n" -" s = A.getTraceFromException(exception);\n" -" this._processUncaughtError\$3(this, A._asObject(e), type\$.StackTrace._as(s));\n" -" }\n" -" },\n" -" runBinaryGuarded\$2\$3(f, arg1, arg2, \$T1, \$T2) {\n" -" var e, s, exception;\n" -" \$T1._eval\$1(\"@<0>\")._bind\$1(\$T2)._eval\$1(\"~(1,2)\")._as(f);\n" -" \$T1._as(arg1);\n" -" \$T2._as(arg2);\n" -" try {\n" -" this.runBinary\$3\$3(f, arg1, arg2, type\$.void, \$T1, \$T2);\n" -" } catch (exception) {\n" -" e = A.unwrapException(exception);\n" -" s = A.getTraceFromException(exception);\n" -" this._processUncaughtError\$3(this, A._asObject(e), type\$.StackTrace._as(s));\n" -" }\n" -" },\n" -" bindCallback\$1\$1(f, \$R) {\n" -" return new A._CustomZone_bindCallback_closure(this, this.registerCallback\$1\$1(\$R._eval\$1(\"0()\")._as(f), \$R), \$R);\n" -" },\n" -" bindCallbackGuarded\$1(f) {\n" -" return new A._CustomZone_bindCallbackGuarded_closure(this, this.registerCallback\$1\$1(type\$.void_Function._as(f), type\$.void));\n" -" },\n" -" bindUnaryCallbackGuarded\$1\$1(f, \$T) {\n" -" return new A._CustomZone_bindUnaryCallbackGuarded_closure(this, this.registerUnaryCallback\$2\$1(\$T._eval\$1(\"~(0)\")._as(f), type\$.void, \$T), \$T);\n" -" },\n" -" handleUncaughtError\$2(error, stackTrace) {\n" -" this._processUncaughtError\$3(this, error, type\$.StackTrace._as(stackTrace));\n" -" },\n" -" fork\$2\$specification\$zoneValues(specification, zoneValues) {\n" -" var implementation = this._fork,\n" -" zone = implementation.zone;\n" -" return implementation.\$function.call\$5(zone, zone.get\$_parentDelegate(), this, specification, zoneValues);\n" -" },\n" -" run\$1\$1(f, \$R) {\n" -" var implementation, zone;\n" -" \$R._eval\$1(\"0()\")._as(f);\n" -" implementation = this._run;\n" -" zone = implementation.zone;\n" -" return implementation.\$function.call\$1\$4(zone, zone.get\$_parentDelegate(), this, f, \$R);\n" -" },\n" -" runUnary\$2\$2(f, arg, \$R, \$T) {\n" -" var implementation, zone;\n" -" \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(f);\n" -" \$T._as(arg);\n" -" implementation = this._runUnary;\n" -" zone = implementation.zone;\n" -" return implementation.\$function.call\$2\$5(zone, zone.get\$_parentDelegate(), this, f, arg, \$R, \$T);\n" -" },\n" -" runBinary\$3\$3(f, arg1, arg2, \$R, \$T1, \$T2) {\n" -" var implementation, zone;\n" -" \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(f);\n" -" \$T1._as(arg1);\n" -" \$T2._as(arg2);\n" -" implementation = this._runBinary;\n" -" zone = implementation.zone;\n" -" return implementation.\$function.call\$3\$6(zone, zone.get\$_parentDelegate(), this, f, arg1, arg2, \$R, \$T1, \$T2);\n" -" },\n" -" registerCallback\$1\$1(callback, \$R) {\n" -" var implementation, zone;\n" -" \$R._eval\$1(\"0()\")._as(callback);\n" -" implementation = this._registerCallback;\n" -" zone = implementation.zone;\n" -" return implementation.\$function.call\$1\$4(zone, zone.get\$_parentDelegate(), this, callback, \$R);\n" -" },\n" -" registerUnaryCallback\$2\$1(callback, \$R, \$T) {\n" -" var implementation, zone;\n" -" \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(callback);\n" -" implementation = this._registerUnaryCallback;\n" -" zone = implementation.zone;\n" -" return implementation.\$function.call\$2\$4(zone, zone.get\$_parentDelegate(), this, callback, \$R, \$T);\n" -" },\n" -" registerBinaryCallback\$3\$1(callback, \$R, \$T1, \$T2) {\n" -" var implementation, zone;\n" -" \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(callback);\n" -" implementation = this._registerBinaryCallback;\n" -" zone = implementation.zone;\n" -" return implementation.\$function.call\$3\$4(zone, zone.get\$_parentDelegate(), this, callback, \$R, \$T1, \$T2);\n" -" },\n" -" errorCallback\$2(error, stackTrace) {\n" -" var implementation = this._errorCallback,\n" -" zone = implementation.zone;\n" -" if (zone === B.C__RootZone)\n" -" return null;\n" -" return implementation.\$function.call\$5(zone, zone.get\$_parentDelegate(), this, error, stackTrace);\n" -" },\n" -" scheduleMicrotask\$1(f) {\n" -" var implementation, zone;\n" -" type\$.void_Function._as(f);\n" -" implementation = this._scheduleMicrotask;\n" -" zone = implementation.zone;\n" -" return implementation.\$function.call\$4(zone, zone.get\$_parentDelegate(), this, f);\n" -" },\n" -" createTimer\$2(duration, f) {\n" -" var implementation, zone;\n" -" type\$.void_Function._as(f);\n" -" implementation = this._createTimer;\n" -" zone = implementation.zone;\n" -" return implementation.\$function.call\$5(zone, zone.get\$_parentDelegate(), this, duration, f);\n" -" },\n" -" get\$_run() {\n" -" return this._run;\n" -" },\n" -" get\$_runUnary() {\n" -" return this._runUnary;\n" -" },\n" -" get\$_runBinary() {\n" -" return this._runBinary;\n" -" },\n" -" get\$_registerCallback() {\n" -" return this._registerCallback;\n" -" },\n" -" get\$_registerUnaryCallback() {\n" -" return this._registerUnaryCallback;\n" -" },\n" -" get\$_registerBinaryCallback() {\n" -" return this._registerBinaryCallback;\n" -" },\n" -" get\$_errorCallback() {\n" -" return this._errorCallback;\n" -" },\n" -" get\$_scheduleMicrotask() {\n" -" return this._scheduleMicrotask;\n" -" },\n" -" get\$_createTimer() {\n" -" return this._createTimer;\n" -" },\n" -" get\$_createPeriodicTimer() {\n" -" return this._createPeriodicTimer;\n" -" },\n" -" get\$_print() {\n" -" return this._print;\n" -" },\n" -" get\$_fork() {\n" -" return this._fork;\n" -" },\n" -" get\$_handleUncaughtError() {\n" -" return this._handleUncaughtError;\n" -" },\n" -" get\$_zoneValues() {\n" -" return this._zoneValues;\n" -" },\n" -" get\$parent() {\n" -" return this.parent;\n" -" }\n" -" };\n" -" A._CustomZone_bindCallback_closure.prototype = {\n" -" call\$0() {\n" -" return this.\$this.run\$1\$1(this.registered, this.R);\n" -" },\n" -" \$signature() {\n" -" return this.R._eval\$1(\"0()\");\n" -" }\n" -" };\n" -" A._CustomZone_bindCallbackGuarded_closure.prototype = {\n" -" call\$0() {\n" -" return this.\$this.runGuarded\$1(this.registered);\n" -" },\n" -" \$signature: 0\n" -" };\n" -" A._CustomZone_bindUnaryCallbackGuarded_closure.prototype = {\n" -" call\$1(arg) {\n" -" var t1 = this.T;\n" -" return this.\$this.runUnaryGuarded\$1\$2(this.registered, t1._as(arg), t1);\n" -" },\n" -" \$signature() {\n" -" return this.T._eval\$1(\"~(0)\");\n" -" }\n" -" };\n" -" A._RootZone.prototype = {\n" -" get\$_run() {\n" -" return B._ZoneRun__RootZone__rootRun;\n" -" },\n" -" get\$_runUnary() {\n" -" return B._ZoneRunUnary__RootZone__rootRunUnary;\n" -" },\n" -" get\$_runBinary() {\n" -" return B._ZoneRunBinary__RootZone__rootRunBinary;\n" -" },\n" -" get\$_registerCallback() {\n" -" return B._ZoneRegisterCallback__RootZone__rootRegisterCallback;\n" -" },\n" -" get\$_registerUnaryCallback() {\n" -" return B._ZoneRegisterUnaryCallback_a9v;\n" -" },\n" -" get\$_registerBinaryCallback() {\n" -" return B._ZoneRegisterBinaryCallback_sk0;\n" -" },\n" -" get\$_errorCallback() {\n" -" return B._ZoneErrorCallback__RootZone__rootErrorCallback;\n" -" },\n" -" get\$_scheduleMicrotask() {\n" -" return B._ZoneScheduleMicrotask__RootZone__rootScheduleMicrotask;\n" -" },\n" -" get\$_createTimer() {\n" -" return B._ZoneCreateTimer__RootZone__rootCreateTimer;\n" -" },\n" -" get\$_createPeriodicTimer() {\n" -" return B.C__ZoneCreatePeriodicTimer;\n" -" },\n" -" get\$_print() {\n" -" return B._ZonePrint__RootZone__rootPrint;\n" -" },\n" -" get\$_fork() {\n" -" return B._ZoneFork__RootZone__rootFork;\n" -" },\n" -" get\$_handleUncaughtError() {\n" -" return B._ZoneHandleUncaughtError_wQ6;\n" -" },\n" -" get\$_zoneValues() {\n" -" return B._ZoneValues__RootZone_Map_empty;\n" -" },\n" -" get\$parent() {\n" -" return null;\n" -" },\n" -" get\$_delegate() {\n" -" var t1 = \$._RootZone__rootDelegate;\n" -" return t1 == null ? \$._RootZone__rootDelegate = new A._ZoneDelegate(this) : t1;\n" -" },\n" -" get\$_parentDelegate() {\n" -" var t1 = \$._RootZone__rootDelegate;\n" -" return t1 == null ? \$._RootZone__rootDelegate = new A._ZoneDelegate(this) : t1;\n" -" },\n" -" get\$errorZone() {\n" -" return this;\n" -" },\n" -" runGuarded\$1(f) {\n" -" var e, s, exception;\n" -" type\$.void_Function._as(f);\n" -" try {\n" -" if (B.C__RootZone === \$.Zone__current) {\n" -" f.call\$0();\n" -" return;\n" -" }\n" -" A._rootRun(null, null, this, f, type\$.void);\n" +" runGuarded\$1(action) {\n" +" var e, s, t1, exception, _this = this;\n" +" type\$.void_Function._as(action);\n" +" try {\n" +" t1 = _this._runZoned\$1\$2(_this, action, type\$.void);\n" +" return t1;\n" " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" -" A._rootHandleError(A._asObject(e), type\$.StackTrace._as(s));\n" +" _this._handleUncaughtErrorZoned\$3(_this, e, s);\n" " }\n" " },\n" -" runUnaryGuarded\$1\$2(f, arg, \$T) {\n" -" var e, s, exception;\n" -" \$T._eval\$1(\"~(0)\")._as(f);\n" -" \$T._as(arg);\n" +" runUnaryGuarded\$1\$2(action, argument, \$T) {\n" +" var e, s, t1, exception, _this = this;\n" +" \$T._eval\$1(\"~(0)\")._as(action);\n" +" \$T._as(argument);\n" " try {\n" -" if (B.C__RootZone === \$.Zone__current) {\n" -" f.call\$1(arg);\n" -" return;\n" -" }\n" -" A._rootRunUnary(null, null, this, f, arg, type\$.void, \$T);\n" +" t1 = _this._runUnaryZoned\$2\$3(_this, action, argument, type\$.void, \$T);\n" +" return t1;\n" " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" -" A._rootHandleError(A._asObject(e), type\$.StackTrace._as(s));\n" +" _this._handleUncaughtErrorZoned\$3(_this, e, s);\n" " }\n" " },\n" -" runBinaryGuarded\$2\$3(f, arg1, arg2, \$T1, \$T2) {\n" -" var e, s, exception;\n" -" \$T1._eval\$1(\"@<0>\")._bind\$1(\$T2)._eval\$1(\"~(1,2)\")._as(f);\n" -" \$T1._as(arg1);\n" -" \$T2._as(arg2);\n" +" runBinaryGuarded\$2\$3(action, argument1, argument2, \$T1, \$T2) {\n" +" var e, s, t1, exception, _this = this;\n" +" \$T1._eval\$1(\"@<0>\")._bind\$1(\$T2)._eval\$1(\"~(1,2)\")._as(action);\n" +" \$T1._as(argument1);\n" +" \$T2._as(argument2);\n" " try {\n" -" if (B.C__RootZone === \$.Zone__current) {\n" -" f.call\$2(arg1, arg2);\n" -" return;\n" -" }\n" -" A._rootRunBinary(null, null, this, f, arg1, arg2, type\$.void, \$T1, \$T2);\n" +" t1 = _this._runBinaryZoned\$3\$4(_this, action, argument1, argument2, type\$.void, \$T1, \$T2);\n" +" return t1;\n" " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" -" A._rootHandleError(A._asObject(e), type\$.StackTrace._as(s));\n" +" _this._handleUncaughtErrorZoned\$3(_this, e, s);\n" " }\n" " },\n" -" bindCallback\$1\$1(f, \$R) {\n" -" return new A._RootZone_bindCallback_closure(this, \$R._eval\$1(\"0()\")._as(f), \$R);\n" +" bindCallback\$1\$1(callback, \$R) {\n" +" return new A.Zone_bindCallback_closure(this, this._registerCallbackZoned\$1\$2(this, \$R._eval\$1(\"0()\")._as(callback), \$R), \$R);\n" " },\n" -" bindCallbackGuarded\$1(f) {\n" -" return new A._RootZone_bindCallbackGuarded_closure(this, type\$.void_Function._as(f));\n" +" bindCallbackGuarded\$1(callback) {\n" +" return new A.Zone_bindCallbackGuarded_closure(this, this._registerCallbackZoned\$1\$2(this, type\$.void_Function._as(callback), type\$.void));\n" " },\n" -" bindUnaryCallbackGuarded\$1\$1(f, \$T) {\n" -" return new A._RootZone_bindUnaryCallbackGuarded_closure(this, \$T._eval\$1(\"~(0)\")._as(f), \$T);\n" +" bindUnaryCallbackGuarded\$1\$1(callback, \$T) {\n" +" return new A.Zone_bindUnaryCallbackGuarded_closure(this, this._registerUnaryCallbackZoned\$2\$2(this, \$T._eval\$1(\"~(0)\")._as(callback), type\$.void, \$T), \$T);\n" " },\n" -" handleUncaughtError\$2(error, stackTrace) {\n" -" A._rootHandleError(error, type\$.StackTrace._as(stackTrace));\n" +" get\$_parentDelegate() {\n" +" var t1 = this._parent;\n" +" t1 = t1 == null ? null : t1._delegate;\n" +" return t1 == null ? \$.\$get\$_rootDelegate() : t1;\n" +" },\n" +" _handleUncaughtErrorZoned\$3(zone, error, stackTrace) {\n" +" var implementation, implZone, parentZone, currentZone, e, s, t1, exception;\n" +" type\$.StackTrace._as(stackTrace);\n" +" implementation = this._handleUncaughtErrorFunction;\n" +" if (implementation == null) {\n" +" A._rootHandleUncaughtError(error, stackTrace);\n" +" return;\n" +" }\n" +" implZone = implementation.zone;\n" +" t1 = implZone._parent;\n" +" t1.toString;\n" +" parentZone = t1;\n" +" currentZone = \$.Zone__current;\n" +" try {\n" +" \$.Zone__current = parentZone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" implementation.\$function.call\$5(implZone, t1, zone, error, stackTrace);\n" +" \$.Zone__current = currentZone;\n" +" } catch (exception) {\n" +" e = A.unwrapException(exception);\n" +" s = A.getTraceFromException(exception);\n" +" \$.Zone__current = currentZone;\n" +" t1 = error === e ? stackTrace : s;\n" +" parentZone._handleUncaughtErrorZoned\$3(implZone, e, t1);\n" +" }\n" " },\n" -" fork\$2\$specification\$zoneValues(specification, zoneValues) {\n" -" return A._rootFork(null, null, this, specification, zoneValues);\n" +" _forkZoned\$3(zone, specification, zoneValues) {\n" +" var implZone, t1,\n" +" implementation = this._forkFunction;\n" +" if (implementation == null)\n" +" return A._rootFork(zone, specification, zoneValues);\n" +" implZone = implementation.zone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" return implementation.\$function.call\$5(implZone, t1, zone, specification, zoneValues);\n" " },\n" -" run\$1\$1(f, \$R) {\n" -" \$R._eval\$1(\"0()\")._as(f);\n" -" if (\$.Zone__current === B.C__RootZone)\n" -" return f.call\$0();\n" -" return A._rootRun(null, null, this, f, \$R);\n" +" _runZoned\$1\$2(zone, callback, \$R) {\n" +" var oldZone, implementation, t1, implZone;\n" +" \$R._eval\$1(\"0()\")._as(callback);\n" +" implementation = this._runFunction;\n" +" if (implementation == null) {\n" +" t1 = \$.Zone__current;\n" +" if (t1 === zone)\n" +" return callback.call\$0();\n" +" oldZone = t1;\n" +" \$.Zone__current = zone;\n" +" try {\n" +" t1 = callback.call\$0();\n" +" return t1;\n" +" } finally {\n" +" \$.Zone__current = oldZone;\n" +" }\n" +" }\n" +" implZone = implementation.zone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" return implementation.\$function.call\$1\$4(implZone, t1, zone, callback, \$R);\n" " },\n" -" runUnary\$2\$2(f, arg, \$R, \$T) {\n" -" \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(f);\n" -" \$T._as(arg);\n" -" if (\$.Zone__current === B.C__RootZone)\n" -" return f.call\$1(arg);\n" -" return A._rootRunUnary(null, null, this, f, arg, \$R, \$T);\n" +" _runUnaryZoned\$2\$3(zone, callback, argument, \$R, \$T) {\n" +" var oldZone, implementation, t1, implZone;\n" +" \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(callback);\n" +" \$T._as(argument);\n" +" implementation = this._runUnaryFunction;\n" +" if (implementation == null) {\n" +" t1 = \$.Zone__current;\n" +" if (t1 === zone)\n" +" return callback.call\$1(argument);\n" +" oldZone = t1;\n" +" \$.Zone__current = zone;\n" +" try {\n" +" t1 = callback.call\$1(argument);\n" +" return t1;\n" +" } finally {\n" +" \$.Zone__current = oldZone;\n" +" }\n" +" }\n" +" implZone = implementation.zone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" return implementation.\$function.call\$2\$5(implZone, t1, zone, callback, argument, \$R, \$T);\n" " },\n" -" runBinary\$3\$3(f, arg1, arg2, \$R, \$T1, \$T2) {\n" -" \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(f);\n" -" \$T1._as(arg1);\n" -" \$T2._as(arg2);\n" -" if (\$.Zone__current === B.C__RootZone)\n" -" return f.call\$2(arg1, arg2);\n" -" return A._rootRunBinary(null, null, this, f, arg1, arg2, \$R, \$T1, \$T2);\n" +" _runBinaryZoned\$3\$4(zone, callback, argument1, argument2, \$R, \$T1, \$T2) {\n" +" var oldZone, implementation, t1, implZone;\n" +" \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(callback);\n" +" \$T1._as(argument1);\n" +" \$T2._as(argument2);\n" +" implementation = this._runBinaryFunction;\n" +" if (implementation == null) {\n" +" t1 = \$.Zone__current;\n" +" if (t1 === zone)\n" +" return callback.call\$2(argument1, argument2);\n" +" oldZone = t1;\n" +" \$.Zone__current = zone;\n" +" try {\n" +" t1 = callback.call\$2(argument1, argument2);\n" +" return t1;\n" +" } finally {\n" +" \$.Zone__current = oldZone;\n" +" }\n" +" }\n" +" implZone = implementation.zone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" return implementation.\$function.call\$3\$6(implZone, t1, zone, callback, argument1, argument2, \$R, \$T1, \$T2);\n" " },\n" -" registerCallback\$1\$1(f, \$R) {\n" -" return \$R._eval\$1(\"0()\")._as(f);\n" +" _registerCallbackZoned\$1\$2(zone, callback, \$R) {\n" +" var implementation, implZone, t1;\n" +" \$R._eval\$1(\"0()\")._as(callback);\n" +" implementation = this._registerCallbackFunction;\n" +" if (implementation == null)\n" +" return callback;\n" +" implZone = implementation.zone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" return implementation.\$function.call\$1\$4(implZone, t1, zone, callback, \$R);\n" " },\n" -" registerUnaryCallback\$2\$1(f, \$R, \$T) {\n" -" return \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(f);\n" +" _registerUnaryCallbackZoned\$2\$2(zone, callback, \$R, \$T) {\n" +" var implementation, implZone, t1;\n" +" \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(callback);\n" +" implementation = this._registerUnaryCallbackFunction;\n" +" if (implementation == null)\n" +" return callback;\n" +" implZone = implementation.zone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" return implementation.\$function.call\$2\$4(implZone, t1, zone, callback, \$R, \$T);\n" " },\n" -" registerBinaryCallback\$3\$1(f, \$R, \$T1, \$T2) {\n" -" return \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(f);\n" +" _registerBinaryCallbackZoned\$3\$2(zone, callback, \$R, \$T1, \$T2) {\n" +" var implementation, implZone, t1;\n" +" \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(callback);\n" +" implementation = this._registerBinaryCallbackFunction;\n" +" if (implementation == null)\n" +" return callback;\n" +" implZone = implementation.zone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" return implementation.\$function.call\$3\$4(implZone, t1, zone, callback, \$R, \$T1, \$T2);\n" " },\n" -" errorCallback\$2(error, stackTrace) {\n" -" return null;\n" +" _errorCallbackZoned\$3(zone, error, stackTrace) {\n" +" var implZone, t1,\n" +" implementation = this._errorCallbackFunction;\n" +" if (implementation == null)\n" +" return null;\n" +" implZone = implementation.zone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" return implementation.\$function.call\$5(implZone, t1, zone, error, stackTrace);\n" " },\n" -" scheduleMicrotask\$1(f) {\n" -" A._rootScheduleMicrotask(null, null, this, type\$.void_Function._as(f));\n" +" _scheduleMicrotaskZoned\$2(zone, callback) {\n" +" var implementation, implZone, t1;\n" +" type\$.void_Function._as(callback);\n" +" implementation = this._scheduleMicrotaskFunction;\n" +" if (implementation == null) {\n" +" A._rootScheduleMicrotask(zone, callback);\n" +" return;\n" +" }\n" +" implZone = implementation.zone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" implementation.\$function.call\$4(implZone, t1, zone, callback);\n" " },\n" -" createTimer\$2(duration, f) {\n" -" return A.Timer__createTimer(duration, type\$.void_Function._as(f));\n" +" _createTimerZoned\$3(zone, duration, callback) {\n" +" var implementation, implZone, t1;\n" +" type\$.void_Function._as(callback);\n" +" implementation = this._createTimerFunction;\n" +" if (implementation == null)\n" +" return A.Timer__createTimer(duration, B.Zone_jYP !== zone ? zone.bindCallback\$1\$1(callback, type\$.void) : callback);\n" +" implZone = implementation.zone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" return implementation.\$function.call\$5(implZone, t1, zone, duration, callback);\n" " }\n" " };\n" -" A._RootZone_bindCallback_closure.prototype = {\n" +" A.Zone_bindCallback_closure.prototype = {\n" " call\$0() {\n" -" return this.\$this.run\$1\$1(this.f, this.R);\n" +" var t1 = this.\$this;\n" +" return t1._runZoned\$1\$2(t1, this.registered, this.R);\n" " },\n" " \$signature() {\n" " return this.R._eval\$1(\"0()\");\n" " }\n" " };\n" -" A._RootZone_bindCallbackGuarded_closure.prototype = {\n" +" A.Zone_bindCallbackGuarded_closure.prototype = {\n" " call\$0() {\n" -" return this.\$this.runGuarded\$1(this.f);\n" +" return this.\$this.runGuarded\$1(this.registered);\n" " },\n" " \$signature: 0\n" " };\n" -" A._RootZone_bindUnaryCallbackGuarded_closure.prototype = {\n" -" call\$1(arg) {\n" +" A.Zone_bindUnaryCallbackGuarded_closure.prototype = {\n" +" call\$1(argument) {\n" " var t1 = this.T;\n" -" return this.\$this.runUnaryGuarded\$1\$2(this.f, t1._as(arg), t1);\n" +" return this.\$this.runUnaryGuarded\$1\$2(this.registered, t1._as(argument), t1);\n" " },\n" " \$signature() {\n" " return this.T._eval\$1(\"~(0)\");\n" " }\n" " };\n" -" A.runZonedGuarded_closure.prototype = {\n" +" A.runZonedGuarded_errorHandler.prototype = {\n" " call\$5(\$self, \$parent, zone, error, stackTrace) {\n" -" var e, s, exception, t1;\n" +" var e, s, t1, exception, t2;\n" " try {\n" -" this.parentZone.runBinary\$3\$3(this.onError, error, stackTrace, type\$.void, type\$.Object, type\$.StackTrace);\n" +" t1 = this.parentZone;\n" +" t1._runBinaryZoned\$3\$4(t1, type\$.void_Function_Object_StackTrace._as(this.onError), error, stackTrace, type\$.void, type\$.Object, type\$.StackTrace);\n" " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" -" t1 = \$parent._delegationTarget;\n" -" if (e === error)\n" -" t1._processUncaughtError\$3(zone, error, stackTrace);\n" -" else\n" -" t1._processUncaughtError\$3(zone, A._asObject(e), type\$.StackTrace._as(s));\n" +" t1 = e === error ? stackTrace : s;\n" +" t2 = A._asObject(e);\n" +" type\$.StackTrace._as(t1);\n" +" \$parent._zone._handleUncaughtErrorZoned\$3(zone, t2, t1);\n" " }\n" " },\n" -" \$signature: 42\n" +" \$signature: 32\n" " };\n" -" A._ZoneDelegate.prototype = {\$isZoneDelegate: 1};\n" -" A._rootHandleError_closure.prototype = {\n" +" A.ZoneDelegate.prototype = {};\n" +" A._rootHandleUncaughtError_closure.prototype = {\n" " call\$0() {\n" " A.Error_throwWithStackTrace(this.error, this.stackTrace);\n" " },\n" @@ -14284,7 +13678,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(v) {\n" " return this.K._is(v);\n" " },\n" -" \$signature: 44\n" +" \$signature: 41\n" " };\n" " A._HashSet.prototype = {\n" " get\$iterator(_) {\n" @@ -14507,21 +13901,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " take\$1(receiver, count) {\n" " return A.SubListIterable\$(receiver, 0, A.checkNotNullable(count, \"count\", type\$.int), A.instanceType(receiver)._eval\$1(\"ListBase.E\"));\n" " },\n" -" toList\$1\$growable(receiver, growable) {\n" -" var t1, first, result, i, _this = this;\n" -" if (_this.get\$isEmpty(receiver)) {\n" -" t1 = J.JSArray_JSArray\$growable(0, A.instanceType(receiver)._eval\$1(\"ListBase.E\"));\n" -" return t1;\n" -" }\n" -" first = _this.\$index(receiver, 0);\n" -" result = A.List_List\$filled(_this.get\$length(receiver), first, true, A.instanceType(receiver)._eval\$1(\"ListBase.E\"));\n" -" for (i = 1; i < _this.get\$length(receiver); ++i)\n" -" B.JSArray_methods.\$indexSet(result, i, _this.\$index(receiver, i));\n" -" return result;\n" -" },\n" -" toList\$0(receiver) {\n" -" return this.toList\$1\$growable(receiver, true);\n" -" },\n" " add\$1(receiver, element) {\n" " var t1;\n" " A.instanceType(receiver)._eval\$1(\"ListBase.E\")._as(element);\n" @@ -15144,8 +14523,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " containsKey\$1(key) {\n" " if (this._processed == null)\n" " return this._data.containsKey\$1(key);\n" -" if (typeof key != \"string\")\n" -" return false;\n" " return Object.prototype.hasOwnProperty.call(this._original, key);\n" " },\n" " forEach\$1(_, f) {\n" @@ -15199,10 +14576,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._JsonMapKeyIterable.prototype = {\n" " get\$length(_) {\n" -" return this._parent.get\$length(0);\n" +" return this._convert\$_parent.get\$length(0);\n" " },\n" " elementAt\$1(_, index) {\n" -" var t1 = this._parent;\n" +" var t1 = this._convert\$_parent;\n" " if (t1._processed == null)\n" " t1 = t1.get\$keys().elementAt\$1(0, index);\n" " else {\n" @@ -15214,7 +14591,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return t1;\n" " },\n" " get\$iterator(_) {\n" -" var t1 = this._parent;\n" +" var t1 = this._convert\$_parent;\n" " if (t1._processed == null) {\n" " t1 = t1.get\$keys();\n" " t1 = t1.get\$iterator(t1);\n" @@ -15225,7 +14602,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return t1;\n" " },\n" " contains\$1(_, key) {\n" -" return this._parent.containsKey\$1(key);\n" +" return this._convert\$_parent.containsKey\$1(key);\n" " }\n" " };\n" " A._Utf8Decoder__decoder_closure.prototype = {\n" @@ -16433,7 +15810,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$2(msg, position) {\n" " throw A.wrapException(A.FormatException\$(\"Illegal IPv6 address, \" + msg, this.host, position));\n" " },\n" -" \$signature: 56\n" +" \$signature: 53\n" " };\n" " A._Uri.prototype = {\n" " get\$_text() {\n" @@ -16733,7 +16110,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(s) {\n" " return A._Uri__uriEncode(64, A._asString(s), B.C_Utf8Codec, false);\n" " },\n" -" \$signature: 10\n" +" \$signature: 9\n" " };\n" " A.UriData.prototype = {\n" " get\$uri() {\n" @@ -17073,7 +16450,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t1.call(t1, value);\n" " return value;\n" " },\n" -" \$signature: 11\n" +" \$signature: 10\n" " };\n" " A.FutureOfJSAnyToJSPromise_get_toJS__closure0.prototype = {\n" " call\$2(error, stackTrace) {\n" @@ -17091,7 +16468,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t1.call(t1, wrapper);\n" " return wrapper;\n" " },\n" -" \$signature: 68\n" +" \$signature: 61\n" " };\n" " A.FutureOfVoidToJSPromise_get_toJS_closure.prototype = {\n" " call\$2(resolve, reject) {\n" @@ -17105,7 +16482,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " var t1 = this.resolve;\n" " return t1.call(t1);\n" " },\n" -" \$signature: 74\n" +" \$signature: 67\n" " };\n" " A.FutureOfVoidToJSPromise_get_toJS__closure0.prototype = {\n" " call\$2(error, stackTrace) {\n" @@ -17148,13 +16525,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " } else\n" " return o;\n" " },\n" -" \$signature: 11\n" +" \$signature: 10\n" " };\n" " A.promiseToFuture_closure.prototype = {\n" " call\$1(r) {\n" " return this.completer.complete\$1(this.T._eval\$1(\"0/?\")._as(r));\n" " },\n" -" \$signature: 5\n" +" \$signature: 4\n" " };\n" " A.promiseToFuture_closure0.prototype = {\n" " call\$1(e) {\n" @@ -17162,7 +16539,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return this.completer.completeError\$1(new A.NullRejectionException(e === undefined));\n" " return this.completer.completeError\$1(e);\n" " },\n" -" \$signature: 5\n" +" \$signature: 4\n" " };\n" " A.dartify_convert.prototype = {\n" " call\$1(o) {\n" @@ -17214,7 +16591,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " return o;\n" " },\n" -" \$signature: 11\n" +" \$signature: 10\n" " };\n" " A._JSRandom.prototype = {\n" " nextInt\$1(max) {\n" @@ -17630,13 +17007,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(e) {\n" " return type\$.BuildStatus._as(e)._name === this.json;\n" " },\n" -" \$signature: 75\n" +" \$signature: 29\n" " };\n" " A.BuildStatus_BuildStatus\$fromJson_closure0.prototype = {\n" " call\$0() {\n" " throw A.wrapException(A.ArgumentError\$(\"Unknown BuildStatus: \" + this.json, null));\n" " },\n" -" \$signature: 89\n" +" \$signature: 74\n" " };\n" " A.BuildResult.prototype = {\n" " toJson\$0() {\n" @@ -17712,7 +17089,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(e) {\n" " return type\$.DebugEvent._as(e).toJson\$0();\n" " },\n" -" \$signature: 90\n" +" \$signature: 75\n" " };\n" " A.DebugInfo.prototype = {\n" " toJson\$0() {\n" @@ -18125,14 +17502,14 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(o) {\n" " return J.toString\$0\$(o);\n" " },\n" -" \$signature: 29\n" +" \$signature: 30\n" " };\n" " A.PersistentWebSocket.prototype = {\n" " get\$_incomingStreamController() {\n" " var result, _this = this,\n" " value = _this.__PersistentWebSocket__incomingStreamController_FI;\n" " if (value === \$) {\n" -" result = A.StreamController_StreamController(null, null, null, type\$.dynamic);\n" +" result = A.StreamController_StreamController(type\$.dynamic);\n" " result.set\$onListen(_this.get\$_listenWithRetry());\n" " _this.__PersistentWebSocket__incomingStreamController_FI !== \$ && A.throwLateFieldADI(\"_incomingStreamController\");\n" " _this.__PersistentWebSocket__incomingStreamController_FI = result;\n" @@ -18302,9 +17679,9 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(socket) {\n" " var _this = this;\n" " type\$.WebSocket._as(socket);\n" -" return new A.PersistentWebSocket(_this.logger, _this.debugName, _this.maxRetryAttempts, new A._AsyncCompleter(new A._Future(\$.Zone__current, type\$._Future_void), type\$._AsyncCompleter_void), _this.uri, _this.onReconnect, socket, A.StreamController_StreamController(null, null, null, type\$.dynamic));\n" +" return new A.PersistentWebSocket(_this.logger, _this.debugName, _this.maxRetryAttempts, new A._AsyncCompleter(new A._Future(\$.Zone__current, type\$._Future_void), type\$._AsyncCompleter_void), _this.uri, _this.onReconnect, socket, A.StreamController_StreamController(type\$.dynamic));\n" " },\n" -" \$signature: 32\n" +" \$signature: 31\n" " };\n" " A.PersistentWebSocket__listenWithRetry_attemptRetry.prototype = {\n" " call\$1(message) {\n" @@ -18398,7 +17775,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " });\n" " return A._asyncStartSync(\$async\$call\$1, \$async\$completer);\n" " },\n" -" \$signature: 34\n" +" \$signature: 33\n" " };\n" " A._PersistentWebSocket_Object_StreamChannelMixin.prototype = {};\n" " A.safeUnawaited_closure.prototype = {\n" @@ -18407,7 +17784,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" @@ -18476,13 +17853,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$2(key1, key2) {\n" " return A._asString(key1).toLowerCase() === A._asString(key2).toLowerCase();\n" " },\n" -" \$signature: 35\n" +" \$signature: 34\n" " };\n" " A.BaseRequest_closure0.prototype = {\n" " call\$1(key) {\n" " return B.JSString_methods.get\$hashCode(A._asString(key).toLowerCase());\n" " },\n" -" \$signature: 36\n" +" \$signature: 35\n" " };\n" " A.BaseResponse.prototype = {\n" " BaseResponse\$7\$contentLength\$headers\$isRedirect\$persistentConnection\$reasonPhrase\$request(statusCode, contentLength, headers, isRedirect, persistentConnection, reasonPhrase, request) {\n" @@ -18577,7 +17954,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }(A._callDartFunctionFast3, t2);\n" " result[\$.\$get\$DART_CLOSURE_DART_JSINTEROP_PROPERTY_NAME()] = t2;\n" " t1.forEach(result);\n" -" t1 = A._readBody(request, response);\n" +" t1 = A._bodyToStream(request, response);\n" " t2 = A._asInt(response.status);\n" " t4 = headers;\n" " t5 = contentLength0;\n" @@ -18636,20 +18013,77 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$2(value, header) {\n" " return this.call\$3(value, header, null);\n" " },\n" +" \$signature: 36\n" +" };\n" +" A._bodyToStream_closure.prototype = {\n" +" call\$1(listener) {\n" +" return A._readStreamBody(this.request, this.response, type\$.MultiStreamController_List_int._as(listener));\n" +" },\n" " \$signature: 37\n" " };\n" -" A._readBody_closure.prototype = {\n" -" call\$1(_) {\n" -" return null;\n" +" A._readStreamBody_closure.prototype = {\n" +" call\$0() {\n" +" var t1 = this._box_0,\n" +" _0_0 = t1.resumeSignal;\n" +" if (_0_0 != null) {\n" +" t1.resumeSignal = null;\n" +" _0_0.complete\$0();\n" +" }\n" " },\n" -" \$signature: 4\n" +" \$signature: 0\n" " };\n" -" A._readBody_closure0.prototype = {\n" -" call\$1(_) {\n" -" A._asObject(_);\n" -" return this._box_0.isError;\n" +" A._readStreamBody_closure0.prototype = {\n" +" call\$0() {\n" +" var \$async\$goto = 0,\n" +" \$async\$completer = A._makeAsyncAwaitCompleter(type\$.void),\n" +" \$async\$handler = 1, \$async\$errorStack = [], \$async\$self = this, e, s, exception, \$async\$exception;\n" +" var \$async\$call\$0 = A._wrapJsFunctionForAsync(function(\$async\$errorCode, \$async\$result) {\n" +" if (\$async\$errorCode === 1) {\n" +" \$async\$errorStack.push(\$async\$result);\n" +" \$async\$goto = \$async\$handler;\n" +" }\n" +" for (;;)\n" +" switch (\$async\$goto) {\n" +" case 0:\n" +" // Function start\n" +" \$async\$handler = 3;\n" +" \$async\$self._box_0.cancelled = true;\n" +" \$async\$goto = 6;\n" +" return A._asyncAwait(A.promiseToFuture(A._asJSObject(\$async\$self.reader.cancel()), type\$.nullable_Object), \$async\$call\$0);\n" +" case 6:\n" +" // returning from await.\n" +" \$async\$handler = 1;\n" +" // goto after finally\n" +" \$async\$goto = 5;\n" +" break;\n" +" case 3:\n" +" // catch\n" +" \$async\$handler = 2;\n" +" \$async\$exception = \$async\$errorStack.pop();\n" +" e = A.unwrapException(\$async\$exception);\n" +" s = A.getTraceFromException(\$async\$exception);\n" +" if (!\$async\$self._box_0.hadError)\n" +" A._rethrowAsClientException(e, s, \$async\$self.request);\n" +" // goto after finally\n" +" \$async\$goto = 5;\n" +" break;\n" +" case 2:\n" +" // uncaught\n" +" // goto rethrow\n" +" \$async\$goto = 1;\n" +" break;\n" +" case 5:\n" +" // after finally\n" +" // implicit return\n" +" return A._asyncReturn(null, \$async\$completer);\n" +" case 1:\n" +" // rethrow\n" +" return A._asyncRethrow(\$async\$errorStack.at(-1), \$async\$completer);\n" +" }\n" +" });\n" +" return A._asyncStartSync(\$async\$call\$0, \$async\$completer);\n" " },\n" -" \$signature: 38\n" +" \$signature: 6\n" " };\n" " A.ByteStream.prototype = {\n" " toBytes\$0() {\n" @@ -18664,7 +18098,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(bytes) {\n" " return this.completer.complete\$1(new Uint8Array(A._ensureNativeList(type\$.List_int._as(bytes))));\n" " },\n" -" \$signature: 39\n" +" \$signature: 38\n" " };\n" " A.ClientException.prototype = {\n" " toString\$0(_) {\n" @@ -18752,7 +18186,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " scanner.expectDone\$0();\n" " return A.MediaType\$(t4, t5, parameters);\n" " },\n" -" \$signature: 40\n" +" \$signature: 39\n" " };\n" " A.MediaType_toString_closure.prototype = {\n" " call\$2(attribute, value) {\n" @@ -18771,7 +18205,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " } else\n" " t1._contents = t3 + value;\n" " },\n" -" \$signature: 41\n" +" \$signature: 40\n" " };\n" " A.MediaType_toString__closure.prototype = {\n" " call\$1(match) {\n" @@ -18874,7 +18308,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " \$parent._children.\$indexSet(0, thisName, t1);\n" " return t1;\n" " },\n" -" \$signature: 43\n" +" \$signature: 42\n" " };\n" " A.Context.prototype = {\n" " absolute\$15(part1, part2, part3, part4, part5, part6, part7, part8, part9, part10, part11, part12, part13, part14, part15) {\n" @@ -19121,7 +18555,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " A._asStringQ(arg);\n" " return arg == null ? \"null\" : '\"' + arg + '\"';\n" " },\n" -" \$signature: 45\n" +" \$signature: 44\n" " };\n" " A.InternalStyle.prototype = {\n" " getRoot\$1(path) {\n" @@ -19575,7 +19009,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " var t1 = this.\$this;\n" " t1._onReleaseCompleters.removeFirst\$0().complete\$1(new A.PoolResource(t1));\n" " },\n" -" \$signature: 46\n" +" \$signature: 45\n" " };\n" " A.Pool__runOnRelease_closure0.prototype = {\n" " call\$2(error, stackTrace) {\n" @@ -19593,23 +19027,27 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " get\$lines() {\n" " return this._lineStarts.length;\n" " },\n" -" SourceFile\$decoded\$2\$url(decodedChars, url) {\n" -" var t1, t2, t3, i, c, j, t4;\n" -" for (t1 = this._decodedChars, t2 = t1.length, t3 = this._lineStarts, i = 0; i < t2; ++i) {\n" -" c = t1[i];\n" +" SourceFile\$_fromList\$2\$url(decodedChars, url) {\n" +" var t1, t2, t3, t4, t5, t6, i, c, j, t7;\n" +" for (t1 = this._decodedChars, t2 = t1.length, t3 = decodedChars.__internal\$_string, t4 = t3.length, t5 = t1.\$flags | 0, t6 = this._lineStarts, i = 0; i < t2; ++i) {\n" +" if (!(i < t4))\n" +" return A.ioore(t3, i);\n" +" c = t3.charCodeAt(i);\n" +" t5 & 2 && A.throwUnsupportedOperation(t1);\n" +" t1[i] = c;\n" " if (c === 13) {\n" " j = i + 1;\n" -" if (j < t2) {\n" -" if (!(j < t2))\n" -" return A.ioore(t1, j);\n" -" t4 = t1[j] !== 10;\n" +" if (j < t4) {\n" +" if (!(j < t4))\n" +" return A.ioore(t3, j);\n" +" t7 = t3.charCodeAt(j) !== 10;\n" " } else\n" -" t4 = true;\n" -" if (t4)\n" +" t7 = true;\n" +" if (t7)\n" " c = 10;\n" " }\n" " if (c === 10)\n" -" B.JSArray_methods.add\$1(t3, i + 1);\n" +" B.JSArray_methods.add\$1(t6, i + 1);\n" " }\n" " },\n" " getLine\$1(offset) {\n" @@ -20015,7 +19453,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$0() {\n" " return this.color;\n" " },\n" -" \$signature: 47\n" +" \$signature: 46\n" " };\n" " A.Highlighter\$__closure.prototype = {\n" " call\$1(line) {\n" @@ -20023,7 +19461,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t2 = A._arrayInstanceType(t1);\n" " return new A.WhereIterable(t1, t2._eval\$1(\"bool(1)\")._as(new A.Highlighter\$___closure()), t2._eval\$1(\"WhereIterable<1>\")).get\$length(0);\n" " },\n" -" \$signature: 48\n" +" \$signature: 47\n" " };\n" " A.Highlighter\$___closure.prototype = {\n" " call\$1(highlight) {\n" @@ -20036,21 +19474,21 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(line) {\n" " return type\$._Line._as(line).url;\n" " },\n" -" \$signature: 50\n" +" \$signature: 49\n" " };\n" " A.Highlighter__collateLines_closure.prototype = {\n" " call\$1(highlight) {\n" " var t1 = type\$._Highlight._as(highlight).span.get\$sourceUrl();\n" " return t1 == null ? new A.Object() : t1;\n" " },\n" -" \$signature: 51\n" +" \$signature: 50\n" " };\n" " A.Highlighter__collateLines_closure0.prototype = {\n" " call\$2(highlight1, highlight2) {\n" " var t1 = type\$._Highlight;\n" " return t1._as(highlight1).span.compareTo\$1(0, t1._as(highlight2).span);\n" " },\n" -" \$signature: 52\n" +" \$signature: 51\n" " };\n" " A.Highlighter__collateLines_closure1.prototype = {\n" " call\$1(entry) {\n" @@ -20093,7 +19531,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " return lines;\n" " },\n" -" \$signature: 53\n" +" \$signature: 78\n" " };\n" " A.Highlighter__collateLines__closure.prototype = {\n" " call\$1(highlight) {\n" @@ -20260,7 +19698,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " return A._Highlight__normalizeEndOfLine(A._Highlight__normalizeTrailingNewline(A._Highlight__normalizeNewlines(newSpan)));\n" " },\n" -" \$signature: 55\n" +" \$signature: 54\n" " };\n" " A._Line.prototype = {\n" " toString\$0(_) {\n" @@ -20473,8 +19911,18 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _this._outgoingController.close\$0();\n" " },\n" " _closeWithError\$1(error) {\n" -" var t1;\n" -" this._incomingController.addError\$1(error);\n" +" var _0_0, error0, stackTrace, t2,\n" +" t1 = this._incomingController;\n" +" if (t1._state >= 4)\n" +" A.throwExpression(t1._badEventState\$0());\n" +" _0_0 = A._interceptUserError(error, null);\n" +" error0 = _0_0.error;\n" +" stackTrace = _0_0.stackTrace;\n" +" t2 = t1._state;\n" +" if ((t2 & 1) !== 0)\n" +" t1._sendError\$2(error0, stackTrace);\n" +" else if ((t2 & 3) === 0)\n" +" t1._ensurePendingEvents\$0().add\$1(0, new A._DelayedError(error0, stackTrace));\n" " this.close\$0();\n" " t1 = this._onConnected;\n" " if ((t1.future._state & 30) === 0)\n" @@ -20628,7 +20076,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " });\n" " return A._asyncStartSync(\$async\$call\$0, \$async\$completer);\n" " },\n" -" \$signature: 58\n" +" \$signature: 57\n" " };\n" " A.StreamChannelMixin.prototype = {};\n" " A.StringScannerException.prototype = {\n" @@ -20675,7 +20123,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this._fail\$1(\"no more input\");\n" " },\n" " error\$3\$length\$position(message, \$length, position) {\n" -" var t2, t3, t4, t5, sourceFile, end,\n" +" var t2, t3, end, sourceFile, end0,\n" " t1 = this.string;\n" " if (position < 0)\n" " A.throwExpression(A.RangeError\$(\"position must be greater than or equal to 0.\"));\n" @@ -20685,17 +20133,16 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " if (t2)\n" " A.throwExpression(A.RangeError\$(\"position plus length must not go beyond the end of the string.\"));\n" " t2 = this.sourceUrl;\n" -" t3 = new A.CodeUnits(t1);\n" -" t4 = A._setArrayType([0], type\$.JSArray_int);\n" -" t5 = new Uint32Array(A._ensureNativeList(t3.toList\$0(t3)));\n" -" sourceFile = new A.SourceFile(t2, t4, t5);\n" -" sourceFile.SourceFile\$decoded\$2\$url(t3, t2);\n" -" end = position + \$length;\n" -" if (end > t5.length)\n" -" A.throwExpression(A.RangeError\$(\"End \" + end + string\$.x20must_ + sourceFile.get\$length(0) + \".\"));\n" +" t3 = A._setArrayType([0], type\$.JSArray_int);\n" +" end = t1.length;\n" +" sourceFile = new A.SourceFile(t2, t3, new Uint32Array(end));\n" +" sourceFile.SourceFile\$_fromList\$2\$url(new A.CodeUnits(t1), t2);\n" +" end0 = position + \$length;\n" +" if (end0 > end)\n" +" A.throwExpression(A.RangeError\$(\"End \" + end0 + string\$.x20must_ + sourceFile.get\$length(0) + \".\"));\n" " else if (position < 0)\n" " A.throwExpression(A.RangeError\$(\"Start may not be negative, was \" + position + \".\"));\n" -" throw A.wrapException(new A.StringScannerException(t1, message, new A._FileSpan(sourceFile, position, end)));\n" +" throw A.wrapException(new A.StringScannerException(t1, message, new A._FileSpan(sourceFile, position, end0)));\n" " },\n" " _fail\$1(\$name) {\n" " this.error\$3\$length\$position(\"expected \" + \$name + \".\", 0, this._string_scanner\$_position);\n" @@ -21001,8 +20448,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " 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(null, null, null, type\$.DebugEvent);\n" -" t5 = A.StreamController_StreamController(null, null, null, type\$.List_DebugEvent);\n" +" t4 = A.StreamController_StreamController(type\$.DebugEvent);\n" +" t5 = A.StreamController_StreamController(type\$.List_DebugEvent);\n" " debugEventController = new A.BatchedStreamController(t3, 1000, t4, t5, new A._AsyncCompleter(new A._Future(t2, type\$._Future_bool), type\$._AsyncCompleter_bool), type\$.BatchedStreamController_DebugEvent);\n" " t2 = A.List_List\$filled(A.QueueList__computeInitialCapacity(null), null, false, type\$.nullable_Result_DebugEvent);\n" " t3 = A.ListQueue\$(type\$._EventRequest_dynamic);\n" @@ -21024,25 +20471,25 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " });\n" " return A._asyncStartSync(\$async\$call\$0, \$async\$completer);\n" " },\n" -" \$signature: 9\n" +" \$signature: 6\n" " };\n" " A.main__closure.prototype = {\n" " call\$0() {\n" " return A.FutureOfJSAnyToJSPromise_get_toJS(this.manager._restarter.hotReloadStart\$1(A._asStringQ(init.G.\$reloadedSourcesPath)), 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" " return A.FutureOfJSAnyToJSPromise_get_toJS(this.manager.hotRestartBegin\$1(A._asStringQ(init.G.\$reloadedSourcesPath)), type\$.JSArray_nullable_Object);\n" " },\n" -" \$signature: 7\n" +" \$signature: 5\n" " };\n" " A.main__closure2.prototype = {\n" " call\$2(runId, pauseIsolatesOnStart) {\n" @@ -21062,7 +20509,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(runId) {\n" " return this.call\$2(runId, null);\n" " },\n" -" \$signature: 92\n" +" \$signature: 60\n" " };\n" " A.main__closure3.prototype = {\n" " call\$1(runId) {\n" @@ -21092,7 +20539,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " if (A._asBool(init.G.\$dartEmitDebugEvents))\n" " A._trySendEvent(this.client.get\$sink(), B.C_JsonCodec.encode\$2\$toEncodable(A._setArrayType([\"BatchedDebugEvents\", new A.BatchedDebugEvents(events).toJson\$0()], type\$.JSArray_Object), null), type\$.dynamic);\n" " },\n" -" \$signature: 63\n" +" \$signature: 62\n" " };\n" " A.main__closure6.prototype = {\n" " call\$2(kind, eventData) {\n" @@ -21104,7 +20551,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " A._trySendEvent(new A._StreamSinkWrapper(t1, A._instanceType(t1)._eval\$1(\"_StreamSinkWrapper<1>\")), new A.DebugEvent(kind, eventData, Date.now()), type\$.DebugEvent);\n" " }\n" " },\n" -" \$signature: 64\n" +" \$signature: 63\n" " };\n" " A.main__closure7.prototype = {\n" " call\$1(eventData) {\n" @@ -21316,7 +20763,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " A.main__closure10.prototype = {\n" " call\$1(error) {\n" " },\n" -" \$signature: 4\n" +" \$signature: 8\n" " };\n" " A.main__closure11.prototype = {\n" " call\$1(e) {\n" @@ -21335,25 +20782,25 @@ 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" " return A._dispatchEvent(\"dart-auth-response\", \"\" + A._asBool(isAuthenticated));\n" " },\n" -" \$signature: 65\n" +" \$signature: 64\n" " };\n" " A._sendHotReloadResponse_closure.prototype = {\n" " call\$3(id, success, errorMessage) {\n" " return new A.HotReloadResponse(id, success, errorMessage);\n" " },\n" -" \$signature: 66\n" +" \$signature: 65\n" " };\n" " A._sendHotRestartResponse_closure.prototype = {\n" " call\$3(id, success, errorMessage) {\n" " return new A.HotRestartResponse(id, success, errorMessage);\n" " },\n" -" \$signature: 67\n" +" \$signature: 66\n" " };\n" " A.DdcLibraryBundleRestarter.prototype = {\n" " _runMainWhenReady\$2(readyToRunMain, runMain) {\n" @@ -21761,7 +21208,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this.sub.cancel\$0();\n" " return value;\n" " },\n" -" \$signature: 69\n" +" \$signature: 68\n" " };\n" " A.ReloadingManager.prototype = {\n" " hotRestart\$3\$readyToRunMain\$reloadedSourcesPath\$runId(readyToRunMain, reloadedSourcesPath, runId) {\n" @@ -22327,7 +21774,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(e) {\n" " this.completer.completeError\$2(new A.HotReloadFailedException(A._asString(type\$.JavaScriptObject._as(e).message)), this.stackTrace);\n" " },\n" -" \$signature: 72\n" +" \$signature: 71\n" " };\n" " A._createScript_closure.prototype = {\n" " call\$0() {\n" @@ -22336,13 +21783,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return new A._createScript__closure();\n" " return new A._createScript__closure0(nonce);\n" " },\n" -" \$signature: 73\n" +" \$signature: 72\n" " };\n" " A._createScript__closure.prototype = {\n" " 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" @@ -22350,7 +21797,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" @@ -22389,52 +21836,23 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _instance_1_u = hunkHelpers._instance_1u,\n" " _static_1 = hunkHelpers._static_1,\n" " _static_0 = hunkHelpers._static_0,\n" -" _static = hunkHelpers.installStaticTearOff,\n" " _instance = hunkHelpers.installInstanceTearOff,\n" " _instance_2_u = hunkHelpers._instance_2u,\n" " _instance_0_u = hunkHelpers._instance_0u,\n" -" _instance_1_i = hunkHelpers._instance_1i;\n" +" _instance_1_i = hunkHelpers._instance_1i,\n" +" _static = hunkHelpers.installStaticTearOff;\n" " _static_2(J, \"_interceptors_JSArray__compareAny\$closure\", \"JSArray__compareAny\", 27);\n" -" _instance_1_u(A.CastStreamSubscription.prototype, \"get\$__internal\$_onData\", \"__internal\$_onData\$1\", 8);\n" +" _instance_1_u(A.CastStreamSubscription.prototype, \"get\$__internal\$_onData\", \"__internal\$_onData\$1\", 11);\n" " _static_1(A, \"async__AsyncRun__scheduleImmediateJsOverride\$closure\", \"_AsyncRun__scheduleImmediateJsOverride\", 14);\n" " _static_1(A, \"async__AsyncRun__scheduleImmediateWithSetImmediate\$closure\", \"_AsyncRun__scheduleImmediateWithSetImmediate\", 14);\n" " _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\", 5);\n" -" _static_2(A, \"async___nullErrorHandler\$closure\", \"_nullErrorHandler\", 6);\n" +" _static_1(A, \"async___nullDataHandler\$closure\", \"_nullDataHandler\", 4);\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\"], 76, 0);\n" -" _static(A, \"async___rootRun\$closure\", 4, null, [\"call\$1\$4\", \"call\$4\"], [\"_rootRun\", function(\$self, \$parent, zone, f) {\n" -" return A._rootRun(\$self, \$parent, zone, f, type\$.dynamic);\n" -" }], 77, 0);\n" -" _static(A, \"async___rootRunUnary\$closure\", 5, null, [\"call\$2\$5\", \"call\$5\"], [\"_rootRunUnary\", function(\$self, \$parent, zone, f, arg) {\n" -" var t1 = type\$.dynamic;\n" -" return A._rootRunUnary(\$self, \$parent, zone, f, arg, t1, t1);\n" -" }], 78, 0);\n" -" _static(A, \"async___rootRunBinary\$closure\", 6, null, [\"call\$3\$6\"], [\"_rootRunBinary\"], 79, 0);\n" -" _static(A, \"async___rootRegisterCallback\$closure\", 4, null, [\"call\$1\$4\", \"call\$4\"], [\"_rootRegisterCallback\", function(\$self, \$parent, zone, f) {\n" -" return A._rootRegisterCallback(\$self, \$parent, zone, f, type\$.dynamic);\n" -" }], 80, 0);\n" -" _static(A, \"async___rootRegisterUnaryCallback\$closure\", 4, null, [\"call\$2\$4\", \"call\$4\"], [\"_rootRegisterUnaryCallback\", function(\$self, \$parent, zone, f) {\n" -" var t1 = type\$.dynamic;\n" -" return A._rootRegisterUnaryCallback(\$self, \$parent, zone, f, t1, t1);\n" -" }], 81, 0);\n" -" _static(A, \"async___rootRegisterBinaryCallback\$closure\", 4, null, [\"call\$3\$4\", \"call\$4\"], [\"_rootRegisterBinaryCallback\", function(\$self, \$parent, zone, f) {\n" -" var t1 = type\$.dynamic;\n" -" return A._rootRegisterBinaryCallback(\$self, \$parent, zone, f, t1, t1, t1);\n" -" }], 82, 0);\n" -" _static(A, \"async___rootErrorCallback\$closure\", 5, null, [\"call\$5\"], [\"_rootErrorCallback\"], 83, 0);\n" -" _static(A, \"async___rootScheduleMicrotask\$closure\", 4, null, [\"call\$4\"], [\"_rootScheduleMicrotask\"], 84, 0);\n" -" _static(A, \"async___rootCreateTimer\$closure\", 5, null, [\"call\$5\"], [\"_rootCreateTimer\"], 85, 0);\n" -" _static(A, \"async___rootCreatePeriodicTimer\$closure\", 5, null, [\"call\$5\"], [\"_rootCreatePeriodicTimer\"], 86, 0);\n" -" _static(A, \"async___rootPrint\$closure\", 4, null, [\"call\$4\"], [\"_rootPrint\"], 87, 0);\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\"], 62, 0, 0);\n" -" _instance_2_u(A._Future.prototype, \"get\$_completeError\", \"_completeError\$2\", 6);\n" +" _instance(A._Completer.prototype, \"get\$completeError\", 0, 1, null, [\"call\$2\", \"call\$1\"], [\"completeError\$2\", \"completeError\$1\"], 58, 0, 0);\n" +" _instance_2_u(A._Future.prototype, \"get\$_completeError\", \"_completeError\$2\", 7);\n" " var _;\n" -" _instance_1_u(_ = A._StreamController.prototype, \"get\$_add\", \"_add\$1\", 8);\n" -" _instance_2_u(_, \"get\$_addError\", \"_addError\$2\", 6);\n" -" _instance_0_u(_, \"get\$_close\", \"_close\$0\", 0);\n" " _instance_0_u(_ = A._ControllerSubscription.prototype, \"get\$_onPause\", \"_onPause\$0\", 0);\n" " _instance_0_u(_, \"get\$_onResume\", \"_onResume\$0\", 0);\n" " _instance_0_u(_ = A._BufferingStreamSubscription.prototype, \"get\$_onPause\", \"_onPause\$0\", 0);\n" @@ -22442,59 +21860,59 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _instance_0_u(A._DoneStreamSubscription.prototype, \"get\$_onMicrotask\", \"_onMicrotask\$0\", 0);\n" " _instance_0_u(_ = A._ForwardingStreamSubscription.prototype, \"get\$_onPause\", \"_onPause\$0\", 0);\n" " _instance_0_u(_, \"get\$_onResume\", \"_onResume\$0\", 0);\n" -" _instance_1_u(_, \"get\$_handleData\", \"_handleData\$1\", 8);\n" -" _instance_2_u(_, \"get\$_handleError\", \"_handleError\$2\", 33);\n" +" _instance_1_u(_, \"get\$_handleData\", \"_handleData\$1\", 11);\n" +" _instance_2_u(_, \"get\$_handleError\", \"_handleError\$2\", 76);\n" " _instance_0_u(_, \"get\$_handleDone\", \"_handleDone\$0\", 0);\n" " _static_2(A, \"collection___defaultEquals\$closure\", \"_defaultEquals0\", 28);\n" " _static_1(A, \"collection___defaultHashCode\$closure\", \"_defaultHashCode\", 15);\n" " _static_2(A, \"collection_ListBase__compareAny\$closure\", \"ListBase__compareAny\", 27);\n" " _static_1(A, \"convert___defaultToEncodable\$closure\", \"_defaultToEncodable\", 16);\n" -" _instance_1_i(_ = A._ByteCallbackSink.prototype, \"get\$add\", \"add\$1\", 8);\n" +" _instance_1_i(_ = A._ByteCallbackSink.prototype, \"get\$add\", \"add\$1\", 11);\n" " _instance_0_u(_, \"get\$close\", \"close\$0\", 0);\n" " _static_1(A, \"core__identityHashCode\$closure\", \"identityHashCode\", 15);\n" " _static_2(A, \"core__identical\$closure\", \"identical\", 28);\n" -" _static_1(A, \"core_Uri_decodeComponent\$closure\", \"Uri_decodeComponent\", 10);\n" +" _static_1(A, \"core_Uri_decodeComponent\$closure\", \"Uri_decodeComponent\", 9);\n" " _static(A, \"math__max\$closure\", 2, null, [\"call\$1\$2\", \"call\$2\"], [\"max\", function(a, b) {\n" " return A.max(a, b, type\$.num);\n" -" }], 91, 0);\n" -" _instance_1_u(_ = A.PersistentWebSocket.prototype, \"get\$_writeToWebSocket\", \"_writeToWebSocket\$1\", 5);\n" -" _instance_0_u(_, \"get\$_listenWithRetry\", \"_listenWithRetry\$0\", 9);\n" -" _static_1(A, \"case_insensitive_map_CaseInsensitiveMap__canonicalizer\$closure\", \"CaseInsensitiveMap__canonicalizer\", 10);\n" +" }], 77, 0);\n" +" _instance_1_u(_ = A.PersistentWebSocket.prototype, \"get\$_writeToWebSocket\", \"_writeToWebSocket\$1\", 4);\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" " _instance_0_u(_, \"get\$_onOutgoingDone\", \"_onOutgoingDone\$0\", 0);\n" -" _instance_1_u(_, \"get\$_onOutgoingMessage\", \"_onOutgoingMessage\$1\", 57);\n" -" _static_1(A, \"client__initializeConnection\$closure\", \"initializeConnection\", 61);\n" +" _instance_1_u(_, \"get\$_onOutgoingMessage\", \"_onOutgoingMessage\$1\", 56);\n" +" _static_1(A, \"client__initializeConnection\$closure\", \"initializeConnection\", 52);\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\", 70);\n" -" _instance_2_u(_, \"get\$_moduleTopologicalCompare\", \"_moduleTopologicalCompare\$2\", 71);\n" +" _instance_1_u(_ = A.RequireRestarter.prototype, \"get\$_moduleParents\", \"_moduleParents\$1\", 69);\n" +" _instance_2_u(_, \"get\$_moduleTopologicalCompare\", \"_moduleTopologicalCompare\$2\", 70);\n" " })();\n" " (function inheritance() {\n" " var _mixin = hunkHelpers.mixin,\n" " _inherit = hunkHelpers.inherit,\n" " _inheritMany = hunkHelpers.inheritMany;\n" " _inherit(A.Object, null);\n" -" _inheritMany(A.Object, [A.JS_CONST, J.Interceptor, A.SafeToStringHook, J.ArrayIterator, A.Stream, A.CastStreamSubscription, A.Iterable, A.CastIterator, A.Closure, A.MapBase, A.Error, A.ListBase, A.SentinelValue, A.ListIterator, A.MappedIterator, A.WhereIterator, A.ExpandIterator, A.TakeIterator, A.SkipIterator, A.EmptyIterator, A.WhereTypeIterator, A.FixedLengthListMixin, A.UnmodifiableListMixin, A._Record, A.ConstantMap, A._KeysOrValuesOrElementsIterator, A.TypeErrorDecoder, A.NullThrownFromJavaScriptException, A.ExceptionAndStackTrace, A._StackTrace, A.LinkedHashMapCell, A.LinkedHashMapKeyIterator, A.LinkedHashMapValueIterator, A.LinkedHashMapEntryIterator, A.JSSyntaxRegExp, A._MatchImplementation, A._AllMatchesIterator, A.StringMatch, A._StringAllMatchesIterator, A._Cell, A._UnmodifiableNativeByteBufferView, A.Rti, A._FunctionParameters, A._Type, A._TimerImpl, A._AsyncAwaitCompleter, A._AsyncStarStreamController, A._IterationMarker, A.AsyncError, A._Completer, A._FutureListener, A._Future, A._AsyncCallbackEntry, A._StreamController, A._AsyncStreamControllerDispatch, A._BufferingStreamSubscription, A._StreamSinkWrapper, A._AddStreamState, A._DelayedEvent, A._DelayedDone, A._PendingEvents, A._DoneStreamSubscription, A._StreamIterator, A._ZoneRun, A._ZoneRunUnary, A._ZoneRunBinary, A._ZoneRegisterCallback, A._ZoneRegisterUnaryCallback, A._ZoneRegisterBinaryCallback, A._ZoneErrorCallback, A._ZoneScheduleMicrotask, A._ZoneCreateTimer, A._ZoneCreatePeriodicTimer, A._ZonePrint, A._ZoneFork, A._ZoneHandleUncaughtError, A._ZoneValues, A._Zone, A._ZoneDelegate, A.ZoneSpecification, A._HashMapKeyIterator, A.SetBase, A._HashSetIterator, A._UnmodifiableMapMixin, A.MapView, A._ListQueueIterator, A._SplayTreeNode, A._SplayTree, A._SplayTreeIterator, A.Codec, A.Converter, A.ByteConversionSink, A._JsonStringifier, A._Utf8Encoder, A._Utf8Decoder, A.DateTime, A.Duration, A._Enum, A.OutOfMemoryError, A.StackOverflowError, A._Exception, A.FormatException, A.MapEntry, A.Null, A._StringStackTrace, A.StringBuffer, A._Uri, A.UriData, A._SimpleUri, A.NullRejectionException, A._JSRandom, A._JSSecureRandom, A.AsyncMemoizer, A.ErrorResult, A.ValueResult, A.StreamQueue, A._NextRequest, A._HasNextRequest, A.CanonicalizedMap, A._QueueList_Object_ListMixin, A.BuildResult, A.ConnectRequest, A.DebugEvent, A.BatchedDebugEvents, A.DebugInfo, A.DevToolsRequest, A.DevToolsResponse, A.ErrorResponse, A.HotReloadRequest, A.HotReloadResponse, A.HotRestartRequest, A.HotRestartResponse, A.PingRequest, A.RegisterEvent, A.RunRequest, A.ServiceExtensionRequest, A.ServiceExtensionResponse, A.BatchedStreamController, A.SocketClient, A._PersistentWebSocket_Object_StreamChannelMixin, A.Uuid, A._StackState, A.ClientException, A.BaseClient, A.BaseRequest, A.BaseResponse, A.MediaType, A.Level, A.LogRecord, A.Logger, A.Context, A.Style, A.ParsedPath, A.PathException, A.Pool, A.PoolResource, A.SourceFile, A.SourceLocationMixin, A.SourceSpanMixin, A.Highlighter, A._Highlight, A._Line, A.SourceLocation, A.SourceSpanException, A.StreamChannelMixin, A.StringScanner, A.EventStreamProvider, A._EventStreamSubscription, A.BrowserWebSocket, A.WebSocketEvent, A.WebSocketException, A.DdcLibraryBundleRestarter, A.DdcRestarter, A.ReloadingManager, A.HotReloadFailedException, A.RequireRestarter]);\n" +" _inheritMany(A.Object, [A.JS_CONST, J.Interceptor, A.SafeToStringHook, J.ArrayIterator, A.Stream, A.CastStreamSubscription, A.Iterable, A.CastIterator, A.Closure, A.MapBase, A.Error, A.ListBase, A.SentinelValue, A.ListIterator, A.MappedIterator, A.WhereIterator, A.ExpandIterator, A.TakeIterator, A.SkipIterator, A.EmptyIterator, A.WhereTypeIterator, A.FixedLengthListMixin, A.UnmodifiableListMixin, A._Record, A.ConstantMap, A._KeysOrValuesOrElementsIterator, A.TypeErrorDecoder, A.NullThrownFromJavaScriptException, A.ExceptionAndStackTrace, A._StackTrace, A.LinkedHashMapCell, A.LinkedHashMapKeyIterator, A.LinkedHashMapValueIterator, A.LinkedHashMapEntryIterator, A.JSSyntaxRegExp, A._MatchImplementation, A._AllMatchesIterator, A.StringMatch, A._StringAllMatchesIterator, A._Cell, A._UnmodifiableNativeByteBufferView, A.Rti, A._FunctionParameters, A._Type, A._TimerImpl, A._AsyncAwaitCompleter, A.AsyncError, A._Completer, A._FutureListener, A._Future, A._AsyncCallbackEntry, A._StreamController, A._AsyncStreamControllerDispatch, A._BufferingStreamSubscription, A._StreamSinkWrapper, A._DelayedEvent, A._DelayedDone, A._PendingEvents, A._DoneStreamSubscription, A._StreamIterator, A._ZoneHandleUncaughtError, A.Zone, A.ZoneDelegate, A.ZoneSpecification, A._HashMapKeyIterator, A.SetBase, A._HashSetIterator, A._UnmodifiableMapMixin, A.MapView, A._ListQueueIterator, A._SplayTreeNode, A._SplayTree, A._SplayTreeIterator, A.Codec, A.Converter, A.ByteConversionSink, A._JsonStringifier, A._Utf8Encoder, A._Utf8Decoder, A.DateTime, A.Duration, A._Enum, A.OutOfMemoryError, A.StackOverflowError, A._Exception, A.FormatException, A.MapEntry, A.Null, A._StringStackTrace, A.StringBuffer, A._Uri, A.UriData, A._SimpleUri, A.NullRejectionException, A._JSRandom, A._JSSecureRandom, A.AsyncMemoizer, A.ErrorResult, A.ValueResult, A.StreamQueue, A._NextRequest, A._HasNextRequest, A.CanonicalizedMap, A._QueueList_Object_ListMixin, A.BuildResult, A.ConnectRequest, A.DebugEvent, A.BatchedDebugEvents, A.DebugInfo, A.DevToolsRequest, A.DevToolsResponse, A.ErrorResponse, A.HotReloadRequest, A.HotReloadResponse, A.HotRestartRequest, A.HotRestartResponse, A.PingRequest, A.RegisterEvent, A.RunRequest, A.ServiceExtensionRequest, A.ServiceExtensionResponse, A.BatchedStreamController, A.SocketClient, A._PersistentWebSocket_Object_StreamChannelMixin, A.Uuid, A._StackState, A.ClientException, A.BaseClient, A.BaseRequest, A.BaseResponse, A.MediaType, A.Level, A.LogRecord, A.Logger, A.Context, A.Style, A.ParsedPath, A.PathException, A.Pool, A.PoolResource, A.SourceFile, A.SourceLocationMixin, A.SourceSpanMixin, A.Highlighter, A._Highlight, A._Line, A.SourceLocation, A.SourceSpanException, A.StreamChannelMixin, A.StringScanner, A.EventStreamProvider, A._EventStreamSubscription, A.BrowserWebSocket, A.WebSocketEvent, A.WebSocketException, A.DdcLibraryBundleRestarter, A.DdcRestarter, A.ReloadingManager, A.HotReloadFailedException, A.RequireRestarter]);\n" " _inheritMany(J.Interceptor, [J.JSBool, J.JSNull, J.JavaScriptObject, J.JavaScriptBigInt, J.JavaScriptSymbol, J.JSNumber, J.JSString]);\n" " _inheritMany(J.JavaScriptObject, [J.LegacyJavaScriptObject, J.JSArray, A.NativeByteBuffer, A.NativeTypedData]);\n" " _inheritMany(J.LegacyJavaScriptObject, [J.PlainJavaScriptObject, J.UnknownJavaScriptObject, J.JavaScriptFunction]);\n" " _inherit(J.JSArraySafeToStringHook, A.SafeToStringHook);\n" " _inherit(J.JSUnmodifiableArray, J.JSArray);\n" " _inheritMany(J.JSNumber, [J.JSInt, J.JSNumNotInt]);\n" -" _inheritMany(A.Stream, [A.CastStream, A.StreamView, A._StreamImpl, A._EmptyStream, A._ForwardingStream, A._EventStream]);\n" +" _inheritMany(A.Stream, [A.CastStream, A.StreamView, A._StreamImpl, A._EmptyStream, A._MultiStream, A._ForwardingStream, A._EventStream]);\n" " _inheritMany(A.Iterable, [A._CastIterableBase, A.EfficientLengthIterable, A.MappedIterable, A.WhereIterable, A.ExpandIterable, A.TakeIterable, A.SkipIterable, A.WhereTypeIterable, A._KeysOrValues, A._AllMatchesIterable, A._StringAllMatchesIterable]);\n" " _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._asyncStarHelper_closure0, A._Future__propagateToListeners_handleWhenCompleteCallback_closure, A._Future_timeout_closure0, A.Stream_length_closure, A.Stream_first_closure0, A._CustomZone_bindUnaryCallbackGuarded_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._readBody_closure, A._readBody_closure0, 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._AddStreamState_makeErrorHandler_closure, 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" +" _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.Zone_bindUnaryCallbackGuarded_closure, A.runZonedGuarded_errorHandler, 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._asyncStarHelper_closure, A._AsyncStarStreamController__resumeBody, A._AsyncStarStreamController__resumeBody_closure, A._AsyncStarStreamController_closure0, A._AsyncStarStreamController_closure1, A._AsyncStarStreamController_closure, A._AsyncStarStreamController__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._AddStreamState_cancel_closure, A._BufferingStreamSubscription_asFuture_closure, A._BufferingStreamSubscription_asFuture__closure, A._BufferingStreamSubscription__sendError_sendError, A._BufferingStreamSubscription__sendDone_sendDone, A._PendingEvents_schedule_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.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.Closure0Args, [A.nullFuture_closure, A._AsyncRun__scheduleImmediateJsOverride_internalCallback, A._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, A._TimerImpl_internalCallback, 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.Zone_bindCallback_closure, A.Zone_bindCallbackGuarded_closure, A._rootHandleUncaughtError_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" @@ -22521,10 +21939,9 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _inherit(A._AsyncStreamController, A._StreamController);\n" " _inherit(A._ControllerStream, A._StreamImpl);\n" " _inheritMany(A._BufferingStreamSubscription, [A._ControllerSubscription, A._ForwardingStreamSubscription]);\n" -" _inherit(A._StreamControllerAddStreamState, A._AddStreamState);\n" " _inheritMany(A._DelayedEvent, [A._DelayedData, A._DelayedError]);\n" +" _inherit(A._MultiStreamController, A._AsyncStreamController);\n" " _inherit(A._MapStream, A._ForwardingStream);\n" -" _inheritMany(A._Zone, [A._CustomZone, A._RootZone]);\n" " _inherit(A._IdentityHashMap, A._HashMap);\n" " _inherit(A._SetBase, A.SetBase);\n" " _inherit(A._HashSet, A._SetBase);\n" @@ -22585,7 +22002,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)\", \"Null(@)\", \"~(@)\", \"~(Object,StackTrace)\", \"JSObject()\", \"~(Object?)\", \"Future<~>()\", \"String(String)\", \"Object?(Object?)\", \"bool(_Highlight)\", \"Null(JSObject)\", \"~(~())\", \"int(Object?)\", \"@(@)\", \"~(Object?,Object?)\", \"@()\", \"Null(JavaScriptFunction,JavaScriptFunction)\", \"bool()\", \"Future<~>(String)\", \"String(Match)\", \"bool(String)\", \"int()\", \"Null(String)\", \"Null(JavaScriptFunction)\", \"int(@,@)\", \"bool(Object?,Object?)\", \"String(@)\", \"@(String)\", \"@(@,String)\", \"PersistentWebSocket(WebSocket)\", \"~(@,StackTrace)\", \"Future<~>(WebSocketEvent)\", \"bool(String,String)\", \"int(String)\", \"Null(String,String[Object?])\", \"bool(Object)\", \"~(List)\", \"MediaType()\", \"~(String,String)\", \"~(Zone,ZoneDelegate,Zone,Object,StackTrace)\", \"Logger()\", \"bool(Object?)\", \"String(String?)\", \"Null(~)\", \"String?()\", \"int(_Line)\", \"Null(~())\", \"Object(_Line)\", \"Object(_Highlight)\", \"int(_Highlight,_Highlight)\", \"List<_Line>(MapEntry>)\", \"Null(@,StackTrace)\", \"SourceSpanWithContext()\", \"0&(String,int?)\", \"~(String?)\", \"Future()\", \"~(int,@)\", \"_Future<@>?()\", \"~(StreamSink<@>)\", \"~(Object[StackTrace?])\", \"~(List)\", \"Null(String,String)\", \"~(bool)\", \"HotReloadResponse(String,bool,String?)\", \"HotRestartResponse(String,bool,String?)\", \"JSObject(Object,StackTrace)\", \"bool(bool)\", \"List(String)\", \"int(String,String)\", \"Null(JavaScriptObject)\", \"JSObject()()\", \"Object?(~)\", \"bool(BuildStatus)\", \"~(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)\", \"Zone(Zone?,ZoneDelegate?,Zone,ZoneSpecification?,Map?)\", \"0&()\", \"Map(DebugEvent)\", \"0^(0^,0^)\", \"JSObject(String[bool?])\"],\n" +" types: [\"~()\", \"Null()\", \"~(JSObject)\", \"Null(Object,StackTrace)\", \"~(@)\", \"JSObject()\", \"Future<~>()\", \"~(Object,StackTrace)\", \"Null(@)\", \"String(String)\", \"Object?(Object?)\", \"~(Object?)\", \"bool(_Highlight)\", \"Null(JSObject)\", \"~(~())\", \"int(Object?)\", \"@(@)\", \"~(Object?,Object?)\", \"@()\", \"Null(JavaScriptFunction,JavaScriptFunction)\", \"bool()\", \"Future<~>(String)\", \"String(Match)\", \"bool(String)\", \"int()\", \"Null(String)\", \"Null(JavaScriptFunction)\", \"int(@,@)\", \"bool(Object?,Object?)\", \"bool(BuildStatus)\", \"String(@)\", \"PersistentWebSocket(WebSocket)\", \"~(Zone,ZoneDelegate,Zone,Object,StackTrace)\", \"Future<~>(WebSocketEvent)\", \"bool(String,String)\", \"int(String)\", \"Null(String,String[Object?])\", \"~(MultiStreamController>)\", \"~(List)\", \"MediaType()\", \"~(String,String)\", \"bool(Object?)\", \"Logger()\", \"Null(~())\", \"String(String?)\", \"Null(~)\", \"String?()\", \"int(_Line)\", \"Null(@,StackTrace)\", \"Object(_Line)\", \"Object(_Highlight)\", \"int(_Highlight,_Highlight)\", \"~(StreamSink<@>)\", \"0&(String,int?)\", \"SourceSpanWithContext()\", \"~(int,@)\", \"~(String?)\", \"Future()\", \"~(Object[StackTrace?])\", \"@(String)\", \"JSObject(String[bool?])\", \"JSObject(Object,StackTrace)\", \"~(List)\", \"Null(String,String)\", \"~(bool)\", \"HotReloadResponse(String,bool,String?)\", \"HotRestartResponse(String,bool,String?)\", \"Object?(~)\", \"bool(bool)\", \"List(String)\", \"int(String,String)\", \"Null(JavaScriptObject)\", \"JSObject()()\", \"@(@,String)\", \"0&()\", \"Map(DebugEvent)\", \"~(@,StackTrace)\", \"0^(0^,0^)\", \"List<_Line>(MapEntry>)\"],\n" " interceptorsByTag: null,\n" " leafTags: null,\n" " arrayRti: Symbol(\"\$ti\"),\n" @@ -22593,7 +22010,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\":[]},\"_Future\":{\"Future\":[\"1\"]},\"_TimerImpl\":{\"Timer\":[]},\"_AsyncAwaitCompleter\":{\"Completer\":[\"1\"]},\"_Completer\":{\"Completer\":[\"1\"]},\"_AsyncCompleter\":{\"_Completer\":[\"1\"],\"Completer\":[\"1\"]},\"_SyncCompleter\":{\"_Completer\":[\"1\"],\"Completer\":[\"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\"]},\"_StreamControllerAddStreamState\":{\"_AddStreamState\":[\"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\"},\"_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\":[]},\"_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_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\"},\"_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" @@ -22610,6 +22027,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " var type\$ = (function rtii() {\n" " var findType = A.findType;\n" " return {\n" +" \$env_1_1_dynamic: findType(\"@<@>\"),\n" +" \$env_1_1_void: findType(\"@<~>\"),\n" " AsyncError: findType(\"AsyncError\"),\n" " BatchedStreamController_DebugEvent: findType(\"BatchedStreamController\"),\n" " BrowserWebSocket: findType(\"BrowserWebSocket\"),\n" @@ -22667,6 +22086,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " Map_dynamic_dynamic: findType(\"Map<@,@>\"),\n" " MappedListIterable_String_dynamic: findType(\"MappedListIterable\"),\n" " MediaType: findType(\"MediaType\"),\n" +" MultiStreamController_List_int: findType(\"MultiStreamController>\"),\n" " NativeArrayBuffer: findType(\"NativeArrayBuffer\"),\n" " NativeTypedArrayOfInt: findType(\"NativeTypedArrayOfInt\"),\n" " NativeUint8List: findType(\"NativeUint8List\"),\n" @@ -22688,11 +22108,9 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " SplayTreeSet_String: findType(\"SplayTreeSet\"),\n" " StackTrace: findType(\"StackTrace\"),\n" " StreamQueue_DebugEvent: findType(\"StreamQueue\"),\n" -" Stream_dynamic: findType(\"Stream<@>\"),\n" " StreamedResponse: findType(\"StreamedResponse\"),\n" " String: findType(\"String\"),\n" " String_Function_Match: findType(\"String(Match)\"),\n" -" Timer: findType(\"Timer\"),\n" " TrustedGetRuntimeType: findType(\"TrustedGetRuntimeType\"),\n" " TwoPhaseRestarter: findType(\"TwoPhaseRestarter\"),\n" " TypeError: findType(\"TypeError\"),\n" @@ -22706,8 +22124,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " WebSocket: findType(\"WebSocket\"),\n" " WebSocketEvent: findType(\"WebSocketEvent\"),\n" " WhereTypeIterable_String: findType(\"WhereTypeIterable\"),\n" -" Zone: findType(\"Zone\"),\n" -" ZoneDelegate: findType(\"ZoneDelegate\"),\n" " _AsyncCompleter_BrowserWebSocket: findType(\"_AsyncCompleter\"),\n" " _AsyncCompleter_PoolResource: findType(\"_AsyncCompleter\"),\n" " _AsyncCompleter_String: findType(\"_AsyncCompleter\"),\n" @@ -22729,6 +22145,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _Highlight: findType(\"_Highlight\"),\n" " _IdentityHashMap_of_nullable_Object_and_nullable_Object: findType(\"_IdentityHashMap\"),\n" " _Line: findType(\"_Line\"),\n" +" _MultiStream_List_int: findType(\"_MultiStream>\"),\n" " _StreamControllerAddStreamState_nullable_Object: findType(\"_StreamControllerAddStreamState\"),\n" " _SyncCompleter_PoolResource: findType(\"_SyncCompleter\"),\n" " bool: findType(\"bool\"),\n" @@ -22752,13 +22169,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " nullable_StackTrace: findType(\"StackTrace?\"),\n" " nullable_String: findType(\"String?\"),\n" " nullable_String_Function_Match: findType(\"String(Match)?\"),\n" -" nullable_Zone: findType(\"Zone?\"),\n" -" nullable_ZoneDelegate: findType(\"ZoneDelegate?\"),\n" " nullable__DelayedEvent_dynamic: findType(\"_DelayedEvent<@>?\"),\n" " nullable__FutureListener_dynamic_dynamic: findType(\"_FutureListener<@,@>?\"),\n" " nullable__Highlight: findType(\"_Highlight?\"),\n" " nullable_bool: findType(\"bool?\"),\n" -" nullable_bool_Function_Object: findType(\"bool(Object)?\"),\n" " nullable_double: findType(\"double?\"),\n" " nullable_int: findType(\"int?\"),\n" " nullable_num: findType(\"num?\"),\n" @@ -22771,7 +22185,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " void_Function_Object: findType(\"~(Object)\"),\n" " void_Function_Object_StackTrace: findType(\"~(Object,StackTrace)\"),\n" " void_Function_String_dynamic: findType(\"~(String,@)\"),\n" -" void_Function_Timer: findType(\"~(Timer)\"),\n" " void_Function_int_dynamic: findType(\"~(int,@)\")\n" " };\n" " })();\n" @@ -22931,8 +22344,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " B.C_Uuid = new A.Uuid();\n" " B.C__DelayedDone = new A._DelayedDone();\n" " B.C__JSRandom = new A._JSRandom();\n" -" B.C__RootZone = new A._RootZone();\n" -" B.C__ZoneCreatePeriodicTimer = new A._ZoneCreatePeriodicTimer();\n" " B.Duration_0 = new A.Duration(0);\n" " B.Duration_5000000 = new A.Duration(5000000);\n" " B.JsonDecoder_null = new A.JsonDecoder(null);\n" @@ -22968,21 +22379,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " B.Type_Uint8ClampedList_04U = A.typeLiteral(\"Uint8ClampedList\");\n" " B.Type_Uint8List_8Eb = A.typeLiteral(\"Uint8List\");\n" " B.Utf8Decoder_false = new A.Utf8Decoder(false);\n" +" B.Zone_jYP = new A.Zone(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null);\n" " B._StringStackTrace_OdL = new A._StringStackTrace(\"\");\n" -" B._ZoneCreateTimer__RootZone__rootCreateTimer = new A._ZoneCreateTimer(B.C__RootZone, A.async___rootCreateTimer\$closure());\n" -" B._ZoneErrorCallback__RootZone__rootErrorCallback = new A._ZoneErrorCallback(B.C__RootZone, A.async___rootErrorCallback\$closure());\n" -" B._ZoneFork__RootZone__rootFork = new A._ZoneFork(B.C__RootZone, A.async___rootFork\$closure());\n" -" B._ZoneHandleUncaughtError_wQ6 = new A._ZoneHandleUncaughtError(B.C__RootZone, A.async___rootHandleUncaughtError\$closure());\n" -" B._ZonePrint__RootZone__rootPrint = new A._ZonePrint(B.C__RootZone, A.async___rootPrint\$closure());\n" -" B._ZoneRegisterBinaryCallback_sk0 = new A._ZoneRegisterBinaryCallback(B.C__RootZone, A.async___rootRegisterBinaryCallback\$closure());\n" -" B._ZoneRegisterCallback__RootZone__rootRegisterCallback = new A._ZoneRegisterCallback(B.C__RootZone, A.async___rootRegisterCallback\$closure());\n" -" B._ZoneRegisterUnaryCallback_a9v = new A._ZoneRegisterUnaryCallback(B.C__RootZone, A.async___rootRegisterUnaryCallback\$closure());\n" -" B._ZoneRunBinary__RootZone__rootRunBinary = new A._ZoneRunBinary(B.C__RootZone, A.async___rootRunBinary\$closure());\n" -" B._ZoneRunUnary__RootZone__rootRunUnary = new A._ZoneRunUnary(B.C__RootZone, A.async___rootRunUnary\$closure());\n" -" B._ZoneRun__RootZone__rootRun = new A._ZoneRun(B.C__RootZone, A.async___rootRun\$closure());\n" -" B._ZoneScheduleMicrotask__RootZone__rootScheduleMicrotask = new A._ZoneScheduleMicrotask(B.C__RootZone, A.async___rootScheduleMicrotask\$closure());\n" -" B.Map_empty1 = new A.ConstantStringMap(B.Object_empty, [], A.findType(\"ConstantStringMap\"));\n" -" B._ZoneValues__RootZone_Map_empty = new A._ZoneValues(B.C__RootZone, B.Map_empty1);\n" " })();\n" " (function staticFields() {\n" " \$._JS_INTEROP_INTERCEPTOR_TAG = null;\n" @@ -23002,8 +22400,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " \$._lastCallback = null;\n" " \$._lastPriorityCallback = null;\n" " \$._isInCallbackLoop = false;\n" -" \$.Zone__current = B.C__RootZone;\n" -" \$._RootZone__rootDelegate = null;\n" +" \$.Zone__current = B.Zone_jYP;\n" " \$.Uri__cachedBaseString = \"\";\n" " \$.Uri__cachedBaseUri = null;\n" " \$.LogRecord__nextNumber = 0;\n" @@ -23016,7 +22413,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " var _lazyFinal = hunkHelpers.lazyFinal;\n" " _lazyFinal(\$, \"DART_CLOSURE_PROPERTY_NAME\", \"\$get\$DART_CLOSURE_PROPERTY_NAME\", () => A.getIsolateAffinityTag(\"_\$dart_dartClosure\"));\n" " _lazyFinal(\$, \"DART_CLOSURE_DART_JSINTEROP_PROPERTY_NAME\", \"\$get\$DART_CLOSURE_DART_JSINTEROP_PROPERTY_NAME\", () => A.getIsolateAffinityTag(\"_\$dart_dartClosure_dartJSInterop\"));\n" -" _lazyFinal(\$, \"nullFuture\", \"\$get\$nullFuture\", () => B.C__RootZone.run\$1\$1(new A.nullFuture_closure(), type\$.Future_void));\n" +" _lazyFinal(\$, \"nullFuture\", \"\$get\$nullFuture\", () => B.Zone_jYP.run\$1\$1(new A.nullFuture_closure(), type\$.Future_void));\n" " _lazyFinal(\$, \"_safeToStringHooks\", \"\$get\$_safeToStringHooks\", () => A._setArrayType([new J.JSArraySafeToStringHook()], A.findType(\"JSArray\")));\n" " _lazyFinal(\$, \"TypeErrorDecoder_noSuchMethodPattern\", \"\$get\$TypeErrorDecoder_noSuchMethodPattern\", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokeCallErrorOn({\n" " toString: function() {\n" @@ -23064,6 +22461,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }()));\n" " _lazyFinal(\$, \"_AsyncRun__scheduleImmediateClosure\", \"\$get\$_AsyncRun__scheduleImmediateClosure\", () => A._AsyncRun__initializeScheduleImmediate());\n" " _lazyFinal(\$, \"Future__nullFuture\", \"\$get\$Future__nullFuture\", () => \$.\$get\$nullFuture());\n" +" _lazyFinal(\$, \"_rootDelegate\", \"\$get\$_rootDelegate\", () => A.ZoneDelegate\$_());\n" " _lazyFinal(\$, \"_Utf8Decoder__reusableBuffer\", \"\$get\$_Utf8Decoder__reusableBuffer\", () => A.NativeUint8List_NativeUint8List(4096));\n" " _lazyFinal(\$, \"_Utf8Decoder__decoder\", \"\$get\$_Utf8Decoder__decoder\", () => new A._Utf8Decoder__decoder_closure().call\$0());\n" " _lazyFinal(\$, \"_Utf8Decoder__decoderNonfatal\", \"\$get\$_Utf8Decoder__decoderNonfatal\", () => new A._Utf8Decoder__decoderNonfatal_closure().call\$0());\n" @@ -23153,11 +22551,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " Function.prototype.call\$0 = function() {\n" " return this();\n" " };\n" -" Function.prototype.call\$1\$1 = function(a) {\n" -" return this(a);\n" -" };\n" -" Function.prototype.call\$3\$3 = function(a, b, c) {\n" -" return this(a, b, c);\n" +" Function.prototype.call\$1\$4 = function(a, b, c, d) {\n" +" return this(a, b, c, d);\n" " };\n" " Function.prototype.call\$5 = function(a, b, c, d, e) {\n" " return this(a, b, c, d, e);\n" @@ -23165,38 +22560,23 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " Function.prototype.call\$3 = function(a, b, c) {\n" " return this(a, b, c);\n" " };\n" -" Function.prototype.call\$3\$6 = function(a, b, c, d, e, f) {\n" -" return this(a, b, c, d, e, f);\n" -" };\n" -" Function.prototype.call\$1\$4 = function(a, b, c, d) {\n" -" return this(a, b, c, d);\n" -" };\n" -" Function.prototype.call\$2\$1 = function(a) {\n" -" return this(a);\n" -" };\n" " Function.prototype.call\$4 = function(a, b, c, d) {\n" " return this(a, b, c, d);\n" " };\n" -" Function.prototype.call\$3\$1 = function(a) {\n" -" return this(a);\n" +" Function.prototype.call\$3\$6 = function(a, b, c, d, e, f) {\n" +" return this(a, b, c, d, e, f);\n" " };\n" " Function.prototype.call\$3\$4 = function(a, b, c, d) {\n" " return this(a, b, c, d);\n" " };\n" -" Function.prototype.call\$2\$4 = function(a, b, c, d) {\n" -" return this(a, b, c, d);\n" -" };\n" -" Function.prototype.call\$2\$2 = function(a, b) {\n" -" return this(a, b);\n" -" };\n" " Function.prototype.call\$2\$5 = function(a, b, c, d, e) {\n" " return this(a, b, c, d, e);\n" " };\n" -" Function.prototype.call\$2\$3 = function(a, b, c) {\n" -" return this(a, b, c);\n" +" Function.prototype.call\$2\$4 = function(a, b, c, d) {\n" +" return this(a, b, c, d);\n" " };\n" -" Function.prototype.call\$1\$2 = function(a, b) {\n" -" return this(a, b);\n" +" Function.prototype.call\$1\$1 = function(a) {\n" +" return this(a);\n" " };\n" " Function.prototype.call\$2\$0 = function() {\n" " return this();\n" diff --git a/dwds/test/integration/breakpoint_amd_test.dart b/dwds/test/integration/breakpoint_amd_test.dart index 739f260ae8..bbbac85a1a 100644 --- a/dwds/test/integration/breakpoint_amd_test.dart +++ b/dwds/test/integration/breakpoint_amd_test.dart @@ -22,13 +22,6 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - testBreakpoint( - provider: provider, - compilationMode: CompilationMode.buildDaemon, - ); - }); - group('Frontend Server |', () { testBreakpoint( provider: provider, diff --git a/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart b/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart index fc8e82e21f..dc9a957887 100644 --- a/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart +++ b/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart @@ -23,20 +23,6 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - testBreakpoint( - provider: provider, - compilationMode: CompilationMode.buildDaemon, - ); - }); - - group('Build Daemon and Frontend Server |', () { - testBreakpoint( - provider: provider, - compilationMode: CompilationMode.buildDaemonAndFrontendServer, - ); - }); - group('Frontend Server |', () { testBreakpoint( provider: provider, diff --git a/dwds/test/integration/callstack_amd_test.dart b/dwds/test/integration/callstack_amd_test.dart index cef3c29378..1cd257fd2b 100644 --- a/dwds/test/integration/callstack_amd_test.dart +++ b/dwds/test/integration/callstack_amd_test.dart @@ -22,13 +22,6 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - testCallStack( - provider: provider, - compilationMode: CompilationMode.buildDaemon, - ); - }); - group('Frontend Server |', () { testCallStack( provider: provider, diff --git a/dwds/test/integration/callstack_ddc_library_bundle_test.dart b/dwds/test/integration/callstack_ddc_library_bundle_test.dart index 342e3582f4..309638608f 100644 --- a/dwds/test/integration/callstack_ddc_library_bundle_test.dart +++ b/dwds/test/integration/callstack_ddc_library_bundle_test.dart @@ -23,20 +23,6 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - testCallStack( - provider: provider, - compilationMode: CompilationMode.buildDaemon, - ); - }); - - group('Build Daemon and Frontend Server |', () { - testCallStack( - provider: provider, - compilationMode: CompilationMode.buildDaemonAndFrontendServer, - ); - }); - group('Frontend Server |', () { testCallStack( provider: provider, diff --git a/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart b/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart index 7fde9b316e..aa3b20ad1b 100644 --- a/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart +++ b/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart @@ -35,38 +35,4 @@ void main() { canaryFeatures: canaryFeatures, ); }); - - group('canary: $canaryFeatures | Build Daemon |', () { - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: moduleFormat, - ); - final compilationMode = CompilationMode.buildDaemon; - tearDownAll(provider.dispose); - - runTests( - provider: provider, - moduleFormat: moduleFormat, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: $canaryFeatures | Build Daemon and Frontend Server |', () { - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: moduleFormat, - ); - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; - tearDownAll(provider.dispose); - - runTests( - provider: provider, - moduleFormat: moduleFormat, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); } diff --git a/dwds/test/integration/circular_evaluate_amd_test.dart b/dwds/test/integration/circular_evaluate_amd_test.dart index 45f6a7e157..0b5debe12a 100644 --- a/dwds/test/integration/circular_evaluate_amd_test.dart +++ b/dwds/test/integration/circular_evaluate_amd_test.dart @@ -26,10 +26,6 @@ void main() async { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - testAll(provider: provider, compilationMode: CompilationMode.buildDaemon); - }); - group('Frontend Server |', () { group('Context with circular dependencies |', () { for (final indexBaseMode in IndexBaseMode.values) { diff --git a/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart b/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart index b62337df92..e99ae395cf 100644 --- a/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart +++ b/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart @@ -27,17 +27,6 @@ void main() async { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - testAll(provider: provider, compilationMode: CompilationMode.buildDaemon); - }); - - group('Build Daemon and Frontend Server |', () { - testAll( - provider: provider, - compilationMode: CompilationMode.buildDaemonAndFrontendServer, - ); - }); - group('Frontend Server |', () { group('Context with circular dependencies |', () { for (final indexBaseMode in IndexBaseMode.values) { diff --git a/dwds/test/integration/dart_uri_file_uri_amd_test.dart b/dwds/test/integration/dart_uri_file_uri_amd_test.dart index 0a4350bec7..bcb9375c76 100644 --- a/dwds/test/integration/dart_uri_file_uri_amd_test.dart +++ b/dwds/test/integration/dart_uri_file_uri_amd_test.dart @@ -22,10 +22,6 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - runTests(provider: provider, compilationMode: CompilationMode.buildDaemon); - }); - group('Frontend Server |', () { runTests( provider: provider, diff --git a/dwds/test/integration/dart_uri_file_uri_ddc_library_bundle_test.dart b/dwds/test/integration/dart_uri_file_uri_ddc_library_bundle_test.dart index 022d5d2df9..12b3de1330 100644 --- a/dwds/test/integration/dart_uri_file_uri_ddc_library_bundle_test.dart +++ b/dwds/test/integration/dart_uri_file_uri_ddc_library_bundle_test.dart @@ -23,17 +23,6 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - runTests(provider: provider, compilationMode: CompilationMode.buildDaemon); - }); - - group('Build Daemon and Frontend Server |', () { - runTests( - provider: provider, - compilationMode: CompilationMode.buildDaemonAndFrontendServer, - ); - }); - group('Frontend Server |', () { runTests( provider: provider, diff --git a/dwds/test/integration/evaluate_amd_test.dart b/dwds/test/integration/evaluate_amd_test.dart index e00194a536..24ecaffdc5 100644 --- a/dwds/test/integration/evaluate_amd_test.dart +++ b/dwds/test/integration/evaluate_amd_test.dart @@ -26,10 +26,6 @@ void main() async { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - testAll(provider: provider, compilationMode: CompilationMode.buildDaemon); - }); - group('Frontend Server |', () { for (final useDebuggerModuleNames in [false, true]) { group('Debugger module names: $useDebuggerModuleNames |', () { diff --git a/dwds/test/integration/evaluate_ddc_library_bundle_test.dart b/dwds/test/integration/evaluate_ddc_library_bundle_test.dart index 50dc307a4d..51027fe94b 100644 --- a/dwds/test/integration/evaluate_ddc_library_bundle_test.dart +++ b/dwds/test/integration/evaluate_ddc_library_bundle_test.dart @@ -28,17 +28,6 @@ void main() async { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - testAll(provider: provider, compilationMode: CompilationMode.buildDaemon); - }); - - group('Build Daemon and Frontend Server |', () { - testAll( - provider: provider, - compilationMode: CompilationMode.buildDaemonAndFrontendServer, - ); - }); - group('Frontend Server |', () { for (final useDebuggerModuleNames in [false, true]) { group('Debugger module names: $useDebuggerModuleNames |', () { diff --git a/dwds/test/integration/events_amd_test.dart b/dwds/test/integration/events_amd_test.dart index cd347f81d7..7d5981bce5 100644 --- a/dwds/test/integration/events_amd_test.dart +++ b/dwds/test/integration/events_amd_test.dart @@ -76,11 +76,4 @@ void main() { await events; }); }); - - group('Build Daemon', () { - testWithDwds( - provider: provider, - compilationMode: CompilationMode.buildDaemon, - ); - }); } diff --git a/dwds/test/integration/events_ddc_library_bundle_test.dart b/dwds/test/integration/events_ddc_library_bundle_test.dart index 6f71f57a07..2cbd04bbb8 100644 --- a/dwds/test/integration/events_ddc_library_bundle_test.dart +++ b/dwds/test/integration/events_ddc_library_bundle_test.dart @@ -28,11 +28,4 @@ void main() { compilationMode: CompilationMode.frontendServer, ); }); - - group('Build Daemon', () { - testWithDwds( - provider: provider, - compilationMode: CompilationMode.buildDaemon, - ); - }); } diff --git a/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart b/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart index 894c14ea2d..986d8f3409 100644 --- a/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart +++ b/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart @@ -30,11 +30,4 @@ void main() { compilationMode: CompilationMode.frontendServer, ); }); - - group('Build Daemon and Frontend Server', () { - runTests( - provider: provider, - compilationMode: CompilationMode.buildDaemonAndFrontendServer, - ); - }); } diff --git a/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart b/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart index b86a5a03d1..452dad1a27 100644 --- a/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart +++ b/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart @@ -30,11 +30,4 @@ void main() { compilationMode: CompilationMode.frontendServer, ); }); - - group('Build Daemon and Frontend Server', () { - runTests( - provider: provider, - compilationMode: CompilationMode.buildDaemonAndFrontendServer, - ); - }); } 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 5f1b3dc9a3..00887656ed 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 @@ -30,15 +30,4 @@ void main() { compilationMode: CompilationMode.frontendServer, ); }); - - group('Build Daemon', () { - runTests(provider: provider, compilationMode: CompilationMode.buildDaemon); - }); - - group('Build Daemon and Frontend Server', () { - runTests( - provider: provider, - compilationMode: CompilationMode.buildDaemonAndFrontendServer, - ); - }); } 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 3a996b6f7a..e7fdc8f4f0 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 @@ -33,34 +33,4 @@ void main() { 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, - ); - }); - - group('canary: $canaryFeatures | Build Daemon and Frontend Server |', () { - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: moduleFormat, - ); - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; - runTests( - provider: provider, - moduleFormat: moduleFormat, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); } 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 06324aad57..6c7b285ca6 100644 --- a/dwds/test/integration/hot_restart_ddc_library_bundle_test.dart +++ b/dwds/test/integration/hot_restart_ddc_library_bundle_test.dart @@ -34,35 +34,4 @@ void main() { 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, - ); - }); - - group('canary: $canaryFeatures | Build Daemon and Frontend Server |', () { - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: moduleFormat, - ); - runTests( - provider: provider, - moduleFormat: moduleFormat, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); } diff --git a/dwds/test/integration/instances/class_inspection_amd_test.dart b/dwds/test/integration/instances/class_inspection_amd_test.dart index de30126a49..3201df5425 100644 --- a/dwds/test/integration/instances/class_inspection_amd_test.dart +++ b/dwds/test/integration/instances/class_inspection_amd_test.dart @@ -17,40 +17,6 @@ void main() { // Enable verbose logging for debugging. const debug = false; - group('canary: false | Build Daemon |', () { - final canaryFeatures = false; - final compilationMode = CompilationMode.buildDaemon; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - final compilationMode = CompilationMode.buildDaemon; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); - group('canary: false | Frontend Server |', () { final canaryFeatures = false; final compilationMode = CompilationMode.frontendServer; diff --git a/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart index fb60d7d92b..a8ded068fb 100644 --- a/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart @@ -33,38 +33,4 @@ void main() { canaryFeatures: canaryFeatures, ); }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - final compilationMode = CompilationMode.buildDaemon; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon and Frontend Server |', () { - final canaryFeatures = true; - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); } diff --git a/dwds/test/integration/instances/dot_shorthands_amd_test.dart b/dwds/test/integration/instances/dot_shorthands_amd_test.dart index b2b13003ec..614717165b 100644 --- a/dwds/test/integration/instances/dot_shorthands_amd_test.dart +++ b/dwds/test/integration/instances/dot_shorthands_amd_test.dart @@ -17,40 +17,6 @@ void main() { // Enable verbose logging for debugging. const debug = false; - group('canary: false | Build Daemon |', () { - final canaryFeatures = false; - final compilationMode = CompilationMode.buildDaemon; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - final compilationMode = CompilationMode.buildDaemon; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); - group('canary: false | Frontend Server |', () { final canaryFeatures = false; final compilationMode = CompilationMode.frontendServer; diff --git a/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart b/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart index 8b50cda34d..160a29eb50 100644 --- a/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart @@ -33,38 +33,4 @@ void main() { canaryFeatures: canaryFeatures, ); }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - final compilationMode = CompilationMode.buildDaemon; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon and Frontend Server |', () { - final canaryFeatures = true; - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); } diff --git a/dwds/test/integration/instances/instance_amd_test.dart b/dwds/test/integration/instances/instance_amd_test.dart index 1e95cb4810..2184689e73 100644 --- a/dwds/test/integration/instances/instance_amd_test.dart +++ b/dwds/test/integration/instances/instance_amd_test.dart @@ -17,52 +17,6 @@ void main() { const debug = false; final moduleFormat = ModuleFormat.amd; - group('canary: false | Build Daemon |', () { - final canaryFeatures = false; - final compilationMode = CompilationMode.buildDaemon; - final provider = TestSdkConfigurationProvider( - canaryFeatures: canaryFeatures, - verbose: debug, - ddcModuleFormat: moduleFormat, - ); - tearDownAll(provider.dispose); - - runTypeSystemVerificationTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - final compilationMode = CompilationMode.buildDaemon; - final provider = TestSdkConfigurationProvider( - canaryFeatures: canaryFeatures, - verbose: debug, - ddcModuleFormat: moduleFormat, - ); - tearDownAll(provider.dispose); - - runTypeSystemVerificationTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); - group('canary: false | Frontend Server |', () { final canaryFeatures = false; final compilationMode = CompilationMode.frontendServer; diff --git a/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart b/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart index cf7b25f619..5f02506b42 100644 --- a/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart @@ -33,36 +33,4 @@ void main() { canaryFeatures: canaryFeatures, ); }); - - group('canary: true | Build Daemon |', () { - final compilationMode = CompilationMode.buildDaemon; - final provider = TestSdkConfigurationProvider( - canaryFeatures: canaryFeatures, - verbose: debug, - ddcModuleFormat: moduleFormat, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon and Frontend Server |', () { - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; - final provider = TestSdkConfigurationProvider( - canaryFeatures: canaryFeatures, - verbose: debug, - ddcModuleFormat: moduleFormat, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); } diff --git a/dwds/test/integration/instances/instance_inspection_amd_test.dart b/dwds/test/integration/instances/instance_inspection_amd_test.dart index 5368d8574c..5ab8a0d7b3 100644 --- a/dwds/test/integration/instances/instance_inspection_amd_test.dart +++ b/dwds/test/integration/instances/instance_inspection_amd_test.dart @@ -17,40 +17,6 @@ void main() { // Enable verbose logging for debugging. const debug = false; - group('canary: false | Build Daemon |', () { - final canaryFeatures = false; - final compilationMode = CompilationMode.buildDaemon; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - final compilationMode = CompilationMode.buildDaemon; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); - group('canary: false | Frontend Server |', () { final canaryFeatures = false; final compilationMode = CompilationMode.frontendServer; diff --git a/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart index 7093744fb6..5d127ea3c4 100644 --- a/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart @@ -33,38 +33,4 @@ void main() { canaryFeatures: canaryFeatures, ); }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - final compilationMode = CompilationMode.buildDaemon; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon and Frontend Server |', () { - final canaryFeatures = true; - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); } diff --git a/dwds/test/integration/instances/patterns_inspection_amd_test.dart b/dwds/test/integration/instances/patterns_inspection_amd_test.dart index af35b0fece..09c47b39e2 100644 --- a/dwds/test/integration/instances/patterns_inspection_amd_test.dart +++ b/dwds/test/integration/instances/patterns_inspection_amd_test.dart @@ -17,40 +17,6 @@ void main() { // Enable verbose logging for debugging. const debug = false; - group('canary: false | Build Daemon |', () { - final canaryFeatures = false; - final compilationMode = CompilationMode.buildDaemon; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - final compilationMode = CompilationMode.buildDaemon; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); - group('canary: false | Frontend Server |', () { final canaryFeatures = false; final compilationMode = CompilationMode.frontendServer; diff --git a/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart index 2fe82c5d50..ce9c6215e9 100644 --- a/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart @@ -33,38 +33,4 @@ void main() { canaryFeatures: canaryFeatures, ); }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - final compilationMode = CompilationMode.buildDaemon; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon and Frontend Server |', () { - final canaryFeatures = true; - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); } diff --git a/dwds/test/integration/instances/record_inspection_amd_test.dart b/dwds/test/integration/instances/record_inspection_amd_test.dart index dc229ad6e0..b91b36b14e 100644 --- a/dwds/test/integration/instances/record_inspection_amd_test.dart +++ b/dwds/test/integration/instances/record_inspection_amd_test.dart @@ -17,40 +17,6 @@ void main() { // Enable verbose logging for debugging. const debug = false; - group('canary: false | Build Daemon |', () { - final canaryFeatures = false; - final compilationMode = CompilationMode.buildDaemon; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - final compilationMode = CompilationMode.buildDaemon; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); - group('canary: false | Frontend Server |', () { final canaryFeatures = false; final compilationMode = CompilationMode.frontendServer; diff --git a/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart index 6c00ffa722..0982b80be5 100644 --- a/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart @@ -32,34 +32,4 @@ void main() { canaryFeatures: canaryFeatures, ); }); - - group('canary: true | Build Daemon |', () { - final compilationMode = CompilationMode.buildDaemon; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon and Frontend Server |', () { - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); } diff --git a/dwds/test/integration/instances/record_type_inspection_amd_test.dart b/dwds/test/integration/instances/record_type_inspection_amd_test.dart index dd78fa7231..e3bcd32c0c 100644 --- a/dwds/test/integration/instances/record_type_inspection_amd_test.dart +++ b/dwds/test/integration/instances/record_type_inspection_amd_test.dart @@ -17,40 +17,6 @@ void main() { // Enable verbose logging for debugging. const debug = false; - group('canary: false | Build Daemon |', () { - final canaryFeatures = false; - final compilationMode = CompilationMode.buildDaemon; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - final compilationMode = CompilationMode.buildDaemon; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); - group('canary: false | Frontend Server |', () { final canaryFeatures = false; final compilationMode = CompilationMode.frontendServer; diff --git a/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart index 8f3faf9af8..816def44b7 100644 --- a/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart @@ -32,34 +32,4 @@ void main() { canaryFeatures: canaryFeatures, ); }); - - group('canary: true | Build Daemon |', () { - final compilationMode = CompilationMode.buildDaemon; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon and Frontend Server |', () { - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); } diff --git a/dwds/test/integration/instances/type_inspection_amd_test.dart b/dwds/test/integration/instances/type_inspection_amd_test.dart index 218773cd0f..1d9100ae3d 100644 --- a/dwds/test/integration/instances/type_inspection_amd_test.dart +++ b/dwds/test/integration/instances/type_inspection_amd_test.dart @@ -17,40 +17,6 @@ void main() { // Enable verbose logging for debugging. const debug = false; - group('canary: false | Build Daemon |', () { - final canaryFeatures = false; - final compilationMode = CompilationMode.buildDaemon; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - final compilationMode = CompilationMode.buildDaemon; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); - group('canary: false | Frontend Server |', () { final canaryFeatures = false; final compilationMode = CompilationMode.frontendServer; diff --git a/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart index ac1a761da2..859982671d 100644 --- a/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart @@ -33,38 +33,4 @@ void main() { canaryFeatures: canaryFeatures, ); }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - final compilationMode = CompilationMode.buildDaemon; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon and Frontend Server |', () { - final canaryFeatures = true; - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); } diff --git a/dwds/test/integration/listviews_amd_test.dart b/dwds/test/integration/listviews_amd_test.dart index 09e39fe139..60c6a73617 100644 --- a/dwds/test/integration/listviews_amd_test.dart +++ b/dwds/test/integration/listviews_amd_test.dart @@ -22,10 +22,6 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - runTests(provider: provider, compilationMode: CompilationMode.buildDaemon); - }); - group('Frontend Server |', () { runTests( provider: provider, diff --git a/dwds/test/integration/listviews_ddc_library_bundle_test.dart b/dwds/test/integration/listviews_ddc_library_bundle_test.dart index a586e66488..5a337c1303 100644 --- a/dwds/test/integration/listviews_ddc_library_bundle_test.dart +++ b/dwds/test/integration/listviews_ddc_library_bundle_test.dart @@ -23,17 +23,6 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - runTests(provider: provider, compilationMode: CompilationMode.buildDaemon); - }); - - group('Build Daemon and Frontend Server |', () { - runTests( - provider: provider, - compilationMode: CompilationMode.buildDaemonAndFrontendServer, - ); - }); - group('Frontend Server |', () { runTests( provider: provider, diff --git a/dwds/test/integration/load_strategy_amd_test.dart b/dwds/test/integration/load_strategy_amd_test.dart index c242321817..187f4b280d 100644 --- a/dwds/test/integration/load_strategy_amd_test.dart +++ b/dwds/test/integration/load_strategy_amd_test.dart @@ -25,13 +25,6 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - runDependentTests( - provider: provider, - compilationMode: CompilationMode.buildDaemon, - ); - }); - group('Frontend Server |', () { runDependentTests( provider: provider, diff --git a/dwds/test/integration/load_strategy_ddc_library_bundle_test.dart b/dwds/test/integration/load_strategy_ddc_library_bundle_test.dart index 9028e9d017..7af6346b42 100644 --- a/dwds/test/integration/load_strategy_ddc_library_bundle_test.dart +++ b/dwds/test/integration/load_strategy_ddc_library_bundle_test.dart @@ -26,20 +26,6 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - runDependentTests( - provider: provider, - compilationMode: CompilationMode.buildDaemon, - ); - }); - - group('Build Daemon and Frontend Server |', () { - runDependentTests( - provider: provider, - compilationMode: CompilationMode.buildDaemonAndFrontendServer, - ); - }); - group('Frontend Server |', () { runDependentTests( provider: provider, diff --git a/dwds/test/integration/parts_evaluate_amd_test.dart b/dwds/test/integration/parts_evaluate_amd_test.dart index 0be74cd323..5771ed8bb8 100644 --- a/dwds/test/integration/parts_evaluate_amd_test.dart +++ b/dwds/test/integration/parts_evaluate_amd_test.dart @@ -26,10 +26,6 @@ void main() async { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - testAll(provider: provider, compilationMode: CompilationMode.buildDaemon); - }); - group('Frontend Server |', () { group('Context with parts |', () { for (final indexBaseMode in IndexBaseMode.values) { diff --git a/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart b/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart index cab8d87fdf..f96af981c9 100644 --- a/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart +++ b/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart @@ -27,17 +27,6 @@ void main() async { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - testAll(provider: provider, compilationMode: CompilationMode.buildDaemon); - }); - - group('Build Daemon and Frontend Server |', () { - testAll( - provider: provider, - compilationMode: CompilationMode.buildDaemonAndFrontendServer, - ); - }); - group('Frontend Server |', () { group('Context with parts |', () { for (final indexBaseMode in IndexBaseMode.values) { @@ -58,12 +47,4 @@ void main() async { } }); }); - - group('Build Daemon and Frontend Server |', () { - tearDownAll(provider.dispose); - testAll( - provider: provider, - compilationMode: CompilationMode.buildDaemonAndFrontendServer, - ); - }); } diff --git a/webdev/test/breakpoint_amd_test.dart b/webdev/test/breakpoint_amd_test.dart new file mode 100644 index 0000000000..cf248d1936 --- /dev/null +++ b/webdev/test/breakpoint_amd_test.dart @@ -0,0 +1,31 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/breakpoint.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + testBreakpoint( + provider: provider, + compilationMode: CompilationMode.buildDaemon, + ); + }); +} diff --git a/webdev/test/breakpoint_ddc_library_bundle_test.dart b/webdev/test/breakpoint_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..e61074405a --- /dev/null +++ b/webdev/test/breakpoint_ddc_library_bundle_test.dart @@ -0,0 +1,39 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/breakpoint.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + testBreakpoint( + provider: provider, + compilationMode: CompilationMode.buildDaemon, + ); + }); + + group('Build Daemon and Frontend Server |', () { + testBreakpoint( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); +} diff --git a/webdev/test/callstack_amd_test.dart b/webdev/test/callstack_amd_test.dart new file mode 100644 index 0000000000..803da8251f --- /dev/null +++ b/webdev/test/callstack_amd_test.dart @@ -0,0 +1,31 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/callstack.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + testCallStack( + provider: provider, + compilationMode: CompilationMode.buildDaemon, + ); + }); +} diff --git a/webdev/test/callstack_ddc_library_bundle_test.dart b/webdev/test/callstack_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..01baaaab48 --- /dev/null +++ b/webdev/test/callstack_ddc_library_bundle_test.dart @@ -0,0 +1,39 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/callstack.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + testCallStack( + provider: provider, + compilationMode: CompilationMode.buildDaemon, + ); + }); + + group('Build Daemon and Frontend Server |', () { + testCallStack( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); +} diff --git a/dwds/test/integration/chrome_proxy_service_amd_test.dart b/webdev/test/chrome_proxy_service_amd_test.dart similarity index 100% rename from dwds/test/integration/chrome_proxy_service_amd_test.dart rename to webdev/test/chrome_proxy_service_amd_test.dart diff --git a/webdev/test/chrome_proxy_service_ddc_library_bundle_test.dart b/webdev/test/chrome_proxy_service_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..243a644be1 --- /dev/null +++ b/webdev/test/chrome_proxy_service_ddc_library_bundle_test.dart @@ -0,0 +1,55 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Tags(['daily']) +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/chrome_proxy_service.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final canaryFeatures = true; + final moduleFormat = ModuleFormat.ddc; + + group('canary: $canaryFeatures | Build Daemon |', () { + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: moduleFormat, + ); + final compilationMode = CompilationMode.buildDaemon; + tearDownAll(provider.dispose); + + runTests( + provider: provider, + moduleFormat: moduleFormat, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: $canaryFeatures | Build Daemon and Frontend Server |', () { + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: moduleFormat, + ); + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + tearDownAll(provider.dispose); + + runTests( + provider: provider, + moduleFormat: moduleFormat, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/circular_evaluate_amd_test.dart b/webdev/test/circular_evaluate_amd_test.dart new file mode 100644 index 0000000000..06902e67fe --- /dev/null +++ b/webdev/test/circular_evaluate_amd_test.dart @@ -0,0 +1,32 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 5)) +library; + +import 'dart:io'; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/fixtures/project.dart'; +import 'package:dwds_test_common/integration/evaluate_circular.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() async { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + testAll(provider: provider, compilationMode: CompilationMode.buildDaemon); + }); +} diff --git a/webdev/test/circular_evaluate_ddc_library_bundle_test.dart b/webdev/test/circular_evaluate_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..d23ca911a4 --- /dev/null +++ b/webdev/test/circular_evaluate_ddc_library_bundle_test.dart @@ -0,0 +1,40 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 5)) +library; + +import 'dart:io'; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/fixtures/project.dart'; +import 'package:dwds_test_common/integration/evaluate_circular.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() async { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + testAll(provider: provider, compilationMode: CompilationMode.buildDaemon); + }); + + group('Build Daemon and Frontend Server |', () { + testAll( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); +} diff --git a/webdev/test/class_inspection_amd_test.dart b/webdev/test/class_inspection_amd_test.dart new file mode 100644 index 0000000000..a528aa79b7 --- /dev/null +++ b/webdev/test/class_inspection_amd_test.dart @@ -0,0 +1,53 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/class_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: false | Build Daemon |', () { + final canaryFeatures = false; + final compilationMode = CompilationMode.buildDaemon; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemon; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/class_inspection_ddc_library_bundle_test.dart b/webdev/test/class_inspection_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..49cb196885 --- /dev/null +++ b/webdev/test/class_inspection_ddc_library_bundle_test.dart @@ -0,0 +1,53 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/class_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemon; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/dart_uri_file_uri_amd_test.dart b/webdev/test/dart_uri_file_uri_amd_test.dart new file mode 100644 index 0000000000..41af3c6abc --- /dev/null +++ b/webdev/test/dart_uri_file_uri_amd_test.dart @@ -0,0 +1,28 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/dart_uri_file_uri.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + runTests(provider: provider, compilationMode: CompilationMode.buildDaemon); + }); +} diff --git a/webdev/test/dart_uri_file_uri_ddc_library_bundle_test.dart b/webdev/test/dart_uri_file_uri_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..7667374648 --- /dev/null +++ b/webdev/test/dart_uri_file_uri_ddc_library_bundle_test.dart @@ -0,0 +1,36 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/dart_uri_file_uri.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + runTests(provider: provider, compilationMode: CompilationMode.buildDaemon); + }); + + group('Build Daemon and Frontend Server |', () { + runTests( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); +} diff --git a/dwds/test/integration/debug_service_amd_test.dart b/webdev/test/debug_service_amd_test.dart similarity index 100% rename from dwds/test/integration/debug_service_amd_test.dart rename to webdev/test/debug_service_amd_test.dart diff --git a/dwds/test/integration/debug_service_ddc_library_bundle_test.dart b/webdev/test/debug_service_ddc_library_bundle_test.dart similarity index 100% rename from dwds/test/integration/debug_service_ddc_library_bundle_test.dart rename to webdev/test/debug_service_ddc_library_bundle_test.dart diff --git a/dwds/test/integration/devtools_amd_test.dart b/webdev/test/devtools_amd_test.dart similarity index 100% rename from dwds/test/integration/devtools_amd_test.dart rename to webdev/test/devtools_amd_test.dart diff --git a/dwds/test/integration/devtools_ddc_library_bundle_test.dart b/webdev/test/devtools_ddc_library_bundle_test.dart similarity index 100% rename from dwds/test/integration/devtools_ddc_library_bundle_test.dart rename to webdev/test/devtools_ddc_library_bundle_test.dart diff --git a/webdev/test/dot_shorthands_amd_test.dart b/webdev/test/dot_shorthands_amd_test.dart new file mode 100644 index 0000000000..74daa20917 --- /dev/null +++ b/webdev/test/dot_shorthands_amd_test.dart @@ -0,0 +1,53 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/dot_shorthands.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: false | Build Daemon |', () { + final canaryFeatures = false; + final compilationMode = CompilationMode.buildDaemon; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemon; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/dot_shorthands_ddc_library_bundle_test.dart b/webdev/test/dot_shorthands_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..0cd06f4401 --- /dev/null +++ b/webdev/test/dot_shorthands_ddc_library_bundle_test.dart @@ -0,0 +1,53 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/dot_shorthands.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemon; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/evaluate_amd_test.dart b/webdev/test/evaluate_amd_test.dart new file mode 100644 index 0000000000..628a90dd98 --- /dev/null +++ b/webdev/test/evaluate_amd_test.dart @@ -0,0 +1,32 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 5)) +library; + +import 'dart:io'; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/fixtures/project.dart'; +import 'package:dwds_test_common/integration/evaluate.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() async { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + testAll(provider: provider, compilationMode: CompilationMode.buildDaemon); + }); +} diff --git a/webdev/test/evaluate_ddc_library_bundle_test.dart b/webdev/test/evaluate_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..2dff70e15c --- /dev/null +++ b/webdev/test/evaluate_ddc_library_bundle_test.dart @@ -0,0 +1,42 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 5)) +library; + +import 'dart:io'; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/fixtures/project.dart'; +import 'package:dwds_test_common/integration/evaluate.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() async { + // Enable verbose logging for debugging. + const debug = false; + + group('Canary: true |', () { + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + testAll(provider: provider, compilationMode: CompilationMode.buildDaemon); + }); + + group('Build Daemon and Frontend Server |', () { + testAll( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); + }); +} diff --git a/webdev/test/events_amd_test.dart b/webdev/test/events_amd_test.dart new file mode 100644 index 0000000000..e316ddad7d --- /dev/null +++ b/webdev/test/events_amd_test.dart @@ -0,0 +1,29 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Timeout(Duration(minutes: 2)) +library; + +import 'dart:async'; +import 'dart:io'; + +import 'package:dwds/src/events.dart'; +import 'package:dwds/src/utilities/server.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/events.dart'; +import 'package:dwds_test_common/logging.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + final provider = TestSdkConfigurationProvider(); + tearDownAll(provider.dispose); + + group('Build Daemon', () { + testWithDwds( + provider: provider, + compilationMode: CompilationMode.buildDaemon, + ); + }); +} diff --git a/webdev/test/events_ddc_library_bundle_test.dart b/webdev/test/events_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..6193c466bf --- /dev/null +++ b/webdev/test/events_ddc_library_bundle_test.dart @@ -0,0 +1,31 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/events.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final canary = true; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canary, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + group('Build Daemon', () { + testWithDwds( + provider: provider, + compilationMode: CompilationMode.buildDaemon, + ); + }); +} diff --git a/webdev/test/hot_reload_breakpoints_ddc_library_bundle_test.dart b/webdev/test/hot_reload_breakpoints_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..757cdbfe04 --- /dev/null +++ b/webdev/test/hot_reload_breakpoints_ddc_library_bundle_test.dart @@ -0,0 +1,33 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 5)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/hot_reload_breakpoints.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: true, + ddcModuleFormat: ModuleFormat.ddc, + ); + + tearDownAll(provider.dispose); + + group('Build Daemon and Frontend Server', () { + runTests( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); +} diff --git a/webdev/test/hot_reload_ddc_library_bundle_test.dart b/webdev/test/hot_reload_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..56db9ab6be --- /dev/null +++ b/webdev/test/hot_reload_ddc_library_bundle_test.dart @@ -0,0 +1,33 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 5)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/hot_reload.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: true, + ddcModuleFormat: ModuleFormat.ddc, + ); + + tearDownAll(provider.dispose); + + group('Build Daemon and Frontend Server', () { + runTests( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); +} diff --git a/dwds/test/integration/hot_restart_amd_test.dart b/webdev/test/hot_restart_amd_test.dart similarity index 100% rename from dwds/test/integration/hot_restart_amd_test.dart rename to webdev/test/hot_restart_amd_test.dart diff --git a/webdev/test/hot_restart_breakpoints_ddc_library_bundle_test.dart b/webdev/test/hot_restart_breakpoints_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..047eb6e8d2 --- /dev/null +++ b/webdev/test/hot_restart_breakpoints_ddc_library_bundle_test.dart @@ -0,0 +1,37 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 5)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/hot_restart_breakpoints.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: true, + ddcModuleFormat: ModuleFormat.ddc, + ); + + tearDownAll(provider.dispose); + + group('Build Daemon', () { + runTests(provider: provider, compilationMode: CompilationMode.buildDaemon); + }); + + group('Build Daemon and Frontend Server', () { + runTests( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); +} diff --git a/dwds/test/integration/hot_restart_correctness_amd_test.dart b/webdev/test/hot_restart_correctness_amd_test.dart similarity index 100% rename from dwds/test/integration/hot_restart_correctness_amd_test.dart rename to webdev/test/hot_restart_correctness_amd_test.dart diff --git a/webdev/test/hot_restart_correctness_ddc_library_bundle_test.dart b/webdev/test/hot_restart_correctness_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..fd3709a95c --- /dev/null +++ b/webdev/test/hot_restart_correctness_ddc_library_bundle_test.dart @@ -0,0 +1,51 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Tags(['daily']) +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/hot_restart_correctness.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final canaryFeatures = true; + final moduleFormat = ModuleFormat.ddc; + + 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 and Frontend Server |', () { + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: moduleFormat, + ); + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + runTests( + provider: provider, + moduleFormat: moduleFormat, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/hot_restart_ddc_library_bundle_test.dart b/webdev/test/hot_restart_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..e5ed7b26a9 --- /dev/null +++ b/webdev/test/hot_restart_ddc_library_bundle_test.dart @@ -0,0 +1,52 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Tags(['daily']) +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/hot_restart.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final canaryFeatures = true; + final moduleFormat = ModuleFormat.ddc; + + 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 and Frontend Server |', () { + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: moduleFormat, + ); + runTests( + provider: provider, + moduleFormat: moduleFormat, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/instance_amd_test.dart b/webdev/test/instance_amd_test.dart new file mode 100644 index 0000000000..4406d60e03 --- /dev/null +++ b/webdev/test/instance_amd_test.dart @@ -0,0 +1,65 @@ +// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/instance.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final moduleFormat = ModuleFormat.amd; + + group('canary: false | Build Daemon |', () { + final canaryFeatures = false; + final compilationMode = CompilationMode.buildDaemon; + final provider = TestSdkConfigurationProvider( + canaryFeatures: canaryFeatures, + verbose: debug, + ddcModuleFormat: moduleFormat, + ); + tearDownAll(provider.dispose); + + runTypeSystemVerificationTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemon; + final provider = TestSdkConfigurationProvider( + canaryFeatures: canaryFeatures, + verbose: debug, + ddcModuleFormat: moduleFormat, + ); + tearDownAll(provider.dispose); + + runTypeSystemVerificationTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/instance_ddc_library_bundle_test.dart b/webdev/test/instance_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..6bdef5ae23 --- /dev/null +++ b/webdev/test/instance_ddc_library_bundle_test.dart @@ -0,0 +1,52 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/instance.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final canaryFeatures = true; + final moduleFormat = ModuleFormat.ddc; + + group('canary: true | Build Daemon |', () { + final compilationMode = CompilationMode.buildDaemon; + final provider = TestSdkConfigurationProvider( + canaryFeatures: canaryFeatures, + verbose: debug, + ddcModuleFormat: moduleFormat, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + canaryFeatures: canaryFeatures, + verbose: debug, + ddcModuleFormat: moduleFormat, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/instance_inspection_amd_test.dart b/webdev/test/instance_inspection_amd_test.dart new file mode 100644 index 0000000000..e14a5f0650 --- /dev/null +++ b/webdev/test/instance_inspection_amd_test.dart @@ -0,0 +1,53 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/instance_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: false | Build Daemon |', () { + final canaryFeatures = false; + final compilationMode = CompilationMode.buildDaemon; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemon; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/instance_inspection_ddc_library_bundle_test.dart b/webdev/test/instance_inspection_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..dfb6754d62 --- /dev/null +++ b/webdev/test/instance_inspection_ddc_library_bundle_test.dart @@ -0,0 +1,53 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/instance_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemon; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/listviews_amd_test.dart b/webdev/test/listviews_amd_test.dart new file mode 100644 index 0000000000..91972d1a70 --- /dev/null +++ b/webdev/test/listviews_amd_test.dart @@ -0,0 +1,28 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/listviews.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + runTests(provider: provider, compilationMode: CompilationMode.buildDaemon); + }); +} diff --git a/webdev/test/listviews_ddc_library_bundle_test.dart b/webdev/test/listviews_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..4091172d49 --- /dev/null +++ b/webdev/test/listviews_ddc_library_bundle_test.dart @@ -0,0 +1,36 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/listviews.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + runTests(provider: provider, compilationMode: CompilationMode.buildDaemon); + }); + + group('Build Daemon and Frontend Server |', () { + runTests( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); +} diff --git a/webdev/test/load_strategy_amd_test.dart b/webdev/test/load_strategy_amd_test.dart new file mode 100644 index 0000000000..bff6b204df --- /dev/null +++ b/webdev/test/load_strategy_amd_test.dart @@ -0,0 +1,34 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/load_strategy.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Run independent tests once. + runIndependentTests(); + + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + runDependentTests( + provider: provider, + compilationMode: CompilationMode.buildDaemon, + ); + }); +} diff --git a/webdev/test/load_strategy_ddc_library_bundle_test.dart b/webdev/test/load_strategy_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..16f8ba2358 --- /dev/null +++ b/webdev/test/load_strategy_ddc_library_bundle_test.dart @@ -0,0 +1,42 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/load_strategy.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Run independent tests once. + runIndependentTests(); + + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + runDependentTests( + provider: provider, + compilationMode: CompilationMode.buildDaemon, + ); + }); + + group('Build Daemon and Frontend Server |', () { + runDependentTests( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); +} diff --git a/webdev/test/parts_evaluate_amd_test.dart b/webdev/test/parts_evaluate_amd_test.dart new file mode 100644 index 0000000000..c972899c08 --- /dev/null +++ b/webdev/test/parts_evaluate_amd_test.dart @@ -0,0 +1,32 @@ +// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 5)) +library; + +import 'dart:io'; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/fixtures/project.dart'; +import 'package:dwds_test_common/integration/evaluate_parts.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() async { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + testAll(provider: provider, compilationMode: CompilationMode.buildDaemon); + }); +} diff --git a/webdev/test/parts_evaluate_ddc_library_bundle_test.dart b/webdev/test/parts_evaluate_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..284e5474ac --- /dev/null +++ b/webdev/test/parts_evaluate_ddc_library_bundle_test.dart @@ -0,0 +1,48 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 5)) +library; + +import 'dart:io'; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/fixtures/project.dart'; +import 'package:dwds_test_common/integration/evaluate_parts.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() async { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + testAll(provider: provider, compilationMode: CompilationMode.buildDaemon); + }); + + group('Build Daemon and Frontend Server |', () { + testAll( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); + + group('Build Daemon and Frontend Server |', () { + tearDownAll(provider.dispose); + testAll( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); +} diff --git a/webdev/test/patterns_inspection_amd_test.dart b/webdev/test/patterns_inspection_amd_test.dart new file mode 100644 index 0000000000..2467f118a4 --- /dev/null +++ b/webdev/test/patterns_inspection_amd_test.dart @@ -0,0 +1,53 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/patterns_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: false | Build Daemon |', () { + final canaryFeatures = false; + final compilationMode = CompilationMode.buildDaemon; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemon; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/patterns_inspection_ddc_library_bundle_test.dart b/webdev/test/patterns_inspection_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..b196e7f9a5 --- /dev/null +++ b/webdev/test/patterns_inspection_ddc_library_bundle_test.dart @@ -0,0 +1,53 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/patterns_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemon; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/record_inspection_amd_test.dart b/webdev/test/record_inspection_amd_test.dart new file mode 100644 index 0000000000..97cfca10be --- /dev/null +++ b/webdev/test/record_inspection_amd_test.dart @@ -0,0 +1,53 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/record_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: false | Build Daemon |', () { + final canaryFeatures = false; + final compilationMode = CompilationMode.buildDaemon; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemon; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/record_inspection_ddc_library_bundle_test.dart b/webdev/test/record_inspection_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..a69b6da930 --- /dev/null +++ b/webdev/test/record_inspection_ddc_library_bundle_test.dart @@ -0,0 +1,50 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/record_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final canaryFeatures = true; + + group('canary: true | Build Daemon |', () { + final compilationMode = CompilationMode.buildDaemon; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/record_type_inspection_amd_test.dart b/webdev/test/record_type_inspection_amd_test.dart new file mode 100644 index 0000000000..13f4dfec48 --- /dev/null +++ b/webdev/test/record_type_inspection_amd_test.dart @@ -0,0 +1,53 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/record_type_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: false | Build Daemon |', () { + final canaryFeatures = false; + final compilationMode = CompilationMode.buildDaemon; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemon; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/record_type_inspection_ddc_library_bundle_test.dart b/webdev/test/record_type_inspection_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..f32d1f216c --- /dev/null +++ b/webdev/test/record_type_inspection_ddc_library_bundle_test.dart @@ -0,0 +1,50 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/record_type_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final canaryFeatures = true; + + group('canary: true | Build Daemon |', () { + final compilationMode = CompilationMode.buildDaemon; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/dwds/test/integration/refresh_amd_test.dart b/webdev/test/refresh_amd_test.dart similarity index 100% rename from dwds/test/integration/refresh_amd_test.dart rename to webdev/test/refresh_amd_test.dart diff --git a/dwds/test/integration/refresh_ddc_library_bundle_test.dart b/webdev/test/refresh_ddc_library_bundle_test.dart similarity index 100% rename from dwds/test/integration/refresh_ddc_library_bundle_test.dart rename to webdev/test/refresh_ddc_library_bundle_test.dart diff --git a/dwds/test/integration/run_request_amd_test.dart b/webdev/test/run_request_amd_test.dart similarity index 100% rename from dwds/test/integration/run_request_amd_test.dart rename to webdev/test/run_request_amd_test.dart diff --git a/dwds/test/integration/run_request_ddc_library_bundle_test.dart b/webdev/test/run_request_ddc_library_bundle_test.dart similarity index 100% rename from dwds/test/integration/run_request_ddc_library_bundle_test.dart rename to webdev/test/run_request_ddc_library_bundle_test.dart diff --git a/dwds/test/integration/screenshot_amd_test.dart b/webdev/test/screenshot_amd_test.dart similarity index 100% rename from dwds/test/integration/screenshot_amd_test.dart rename to webdev/test/screenshot_amd_test.dart diff --git a/dwds/test/integration/screenshot_ddc_library_bundle_test.dart b/webdev/test/screenshot_ddc_library_bundle_test.dart similarity index 100% rename from dwds/test/integration/screenshot_ddc_library_bundle_test.dart rename to webdev/test/screenshot_ddc_library_bundle_test.dart diff --git a/webdev/test/type_inspection_amd_test.dart b/webdev/test/type_inspection_amd_test.dart new file mode 100644 index 0000000000..080cb2ff28 --- /dev/null +++ b/webdev/test/type_inspection_amd_test.dart @@ -0,0 +1,53 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/type_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: false | Build Daemon |', () { + final canaryFeatures = false; + final compilationMode = CompilationMode.buildDaemon; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemon; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/type_inspection_ddc_library_bundle_test.dart b/webdev/test/type_inspection_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..9bcfe149ef --- /dev/null +++ b/webdev/test/type_inspection_ddc_library_bundle_test.dart @@ -0,0 +1,53 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'package:dwds_test_common/integration/type_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemon; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/dwds/test/integration/variable_scope_amd_test.dart b/webdev/test/variable_scope_amd_test.dart similarity index 100% rename from dwds/test/integration/variable_scope_amd_test.dart rename to webdev/test/variable_scope_amd_test.dart diff --git a/dwds/test/integration/variable_scope_ddc_library_bundle_test.dart b/webdev/test/variable_scope_ddc_library_bundle_test.dart similarity index 100% rename from dwds/test/integration/variable_scope_ddc_library_bundle_test.dart rename to webdev/test/variable_scope_ddc_library_bundle_test.dart From 83ec4940a2a0d51fe4543973de89bb273b6b2380 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Wed, 12 Aug 2026 14:59:46 -0700 Subject: [PATCH 091/134] fix unused imports in moved tests --- webdev/test/evaluate_amd_test.dart | 3 --- webdev/test/evaluate_ddc_library_bundle_test.dart | 3 --- 2 files changed, 6 deletions(-) diff --git a/webdev/test/evaluate_amd_test.dart b/webdev/test/evaluate_amd_test.dart index 628a90dd98..896d0d5cb7 100644 --- a/webdev/test/evaluate_amd_test.dart +++ b/webdev/test/evaluate_amd_test.dart @@ -7,11 +7,8 @@ @Timeout(Duration(minutes: 5)) library; -import 'dart:io'; - import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/fixtures/context.dart'; -import 'package:dwds_test_common/fixtures/project.dart'; import 'package:dwds_test_common/integration/evaluate.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; diff --git a/webdev/test/evaluate_ddc_library_bundle_test.dart b/webdev/test/evaluate_ddc_library_bundle_test.dart index 2dff70e15c..6a8a44d21a 100644 --- a/webdev/test/evaluate_ddc_library_bundle_test.dart +++ b/webdev/test/evaluate_ddc_library_bundle_test.dart @@ -7,11 +7,8 @@ @Timeout(Duration(minutes: 5)) library; -import 'dart:io'; - import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/fixtures/context.dart'; -import 'package:dwds_test_common/fixtures/project.dart'; import 'package:dwds_test_common/integration/evaluate.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; From 4dee23c71c11119bd4bb816b93ed9ca317834bff Mon Sep 17 00:00:00 2001 From: MarkZ Date: Wed, 12 Aug 2026 15:05:53 -0700 Subject: [PATCH 092/134] fix unused imports in moved tests on expression_eval_dwds --- dwds/test/integration/events_amd_test.dart | 1 - webdev/test/circular_evaluate_amd_test.dart | 3 --- webdev/test/circular_evaluate_ddc_library_bundle_test.dart | 3 --- webdev/test/events_amd_test.dart | 6 ------ webdev/test/parts_evaluate_amd_test.dart | 3 --- webdev/test/parts_evaluate_ddc_library_bundle_test.dart | 3 --- 6 files changed, 19 deletions(-) diff --git a/dwds/test/integration/events_amd_test.dart b/dwds/test/integration/events_amd_test.dart index 7d5981bce5..cc6a8fa79f 100644 --- a/dwds/test/integration/events_amd_test.dart +++ b/dwds/test/integration/events_amd_test.dart @@ -10,7 +10,6 @@ import 'dart:io'; import 'package:dwds/src/events.dart'; import 'package:dwds/src/utilities/server.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/events.dart'; import 'package:dwds_test_common/logging.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; diff --git a/webdev/test/circular_evaluate_amd_test.dart b/webdev/test/circular_evaluate_amd_test.dart index 06902e67fe..67415ba99c 100644 --- a/webdev/test/circular_evaluate_amd_test.dart +++ b/webdev/test/circular_evaluate_amd_test.dart @@ -7,11 +7,8 @@ @Timeout(Duration(minutes: 5)) library; -import 'dart:io'; - import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/fixtures/context.dart'; -import 'package:dwds_test_common/fixtures/project.dart'; import 'package:dwds_test_common/integration/evaluate_circular.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; diff --git a/webdev/test/circular_evaluate_ddc_library_bundle_test.dart b/webdev/test/circular_evaluate_ddc_library_bundle_test.dart index d23ca911a4..0270f97210 100644 --- a/webdev/test/circular_evaluate_ddc_library_bundle_test.dart +++ b/webdev/test/circular_evaluate_ddc_library_bundle_test.dart @@ -7,11 +7,8 @@ @Timeout(Duration(minutes: 5)) library; -import 'dart:io'; - import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/fixtures/context.dart'; -import 'package:dwds_test_common/fixtures/project.dart'; import 'package:dwds_test_common/integration/evaluate_circular.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; diff --git a/webdev/test/events_amd_test.dart b/webdev/test/events_amd_test.dart index e316ddad7d..24cf64625e 100644 --- a/webdev/test/events_amd_test.dart +++ b/webdev/test/events_amd_test.dart @@ -5,14 +5,8 @@ @Timeout(Duration(minutes: 2)) library; -import 'dart:async'; -import 'dart:io'; - -import 'package:dwds/src/events.dart'; -import 'package:dwds/src/utilities/server.dart'; import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/events.dart'; -import 'package:dwds_test_common/logging.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; diff --git a/webdev/test/parts_evaluate_amd_test.dart b/webdev/test/parts_evaluate_amd_test.dart index c972899c08..e21566f52a 100644 --- a/webdev/test/parts_evaluate_amd_test.dart +++ b/webdev/test/parts_evaluate_amd_test.dart @@ -7,11 +7,8 @@ @Timeout(Duration(minutes: 5)) library; -import 'dart:io'; - import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/fixtures/context.dart'; -import 'package:dwds_test_common/fixtures/project.dart'; import 'package:dwds_test_common/integration/evaluate_parts.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; diff --git a/webdev/test/parts_evaluate_ddc_library_bundle_test.dart b/webdev/test/parts_evaluate_ddc_library_bundle_test.dart index 284e5474ac..2cea9746cf 100644 --- a/webdev/test/parts_evaluate_ddc_library_bundle_test.dart +++ b/webdev/test/parts_evaluate_ddc_library_bundle_test.dart @@ -7,11 +7,8 @@ @Timeout(Duration(minutes: 5)) library; -import 'dart:io'; - import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/fixtures/context.dart'; -import 'package:dwds_test_common/fixtures/project.dart'; import 'package:dwds_test_common/integration/evaluate_parts.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; From 9f8079593b1cede8b37f8d35d80c5178f2986dc4 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Wed, 12 Aug 2026 16:01:35 -0700 Subject: [PATCH 093/134] Update extension tests to run from debug_extension package --- .github/workflows/dart.yml | 329 ++++++++++++++++++---------------- debug_extension/mono_pkg.yaml | 17 ++ dwds/mono_pkg.yaml | 21 +-- tool/ci.sh | 26 ++- 4 files changed, 202 insertions(+), 191 deletions(-) create mode 100644 debug_extension/mono_pkg.yaml diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 0f43dd4a15..5c7a73f44e 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -41,16 +41,16 @@ jobs: - name: mono_repo self validate run: dart pub global run mono_repo generate --validate job_002: - name: "analyzer_and_format; linux; Dart dev; PKG: dwds; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`, `dart test test/build/ensure_version_test.dart`" + name: "analyzer_and_format; linux; Dart dev; PKGS: debug_extension, dwds_test_common, dwds_test_common/fixtures/_webdev_smoke, example, frontend_server_client; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds;commands:format-analyze_0-test_0" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:debug_extension-dwds_test_common-dwds_test_common/fixtures/_webdev_smoke-example-frontend_server_client;commands:format-analyze_0" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:debug_extension-dwds_test_common-dwds_test_common/fixtures/_webdev_smoke-example-frontend_server_client os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -61,44 +61,19 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - - id: dwds_pub_upgrade - name: dwds; dart pub upgrade + - id: debug_extension_pub_upgrade + name: debug_extension; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: dwds - - name: "dwds; dart format --output=none --set-exit-if-changed ." + working-directory: debug_extension + - name: "debug_extension; dart format --output=none --set-exit-if-changed ." run: "dart format --output=none --set-exit-if-changed ." - if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" - working-directory: dwds - - name: "dwds; dart analyze --fatal-infos ." + if: "always() && steps.debug_extension_pub_upgrade.conclusion == 'success'" + working-directory: debug_extension + - name: "debug_extension; dart analyze --fatal-infos ." run: dart analyze --fatal-infos . - if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" - working-directory: dwds - - name: dwds; dart test test/build/ensure_version_test.dart - run: dart test test/build/ensure_version_test.dart - if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" - working-directory: dwds - job_003: - name: "analyzer_and_format; linux; Dart dev; PKGS: dwds_test_common, dwds_test_common/fixtures/_webdev_smoke, example, frontend_server_client; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds_test_common-dwds_test_common/fixtures/_webdev_smoke-example-frontend_server_client;commands:format-analyze_0" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds_test_common-dwds_test_common/fixtures/_webdev_smoke-example-frontend_server_client - os:ubuntu-latest;pub-cache-hosted;sdk:dev - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: dev - - id: checkout - name: Checkout repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + if: "always() && steps.debug_extension_pub_upgrade.conclusion == 'success'" + working-directory: debug_extension - id: dwds_test_common_pub_upgrade name: dwds_test_common; dart pub upgrade run: dart pub upgrade @@ -151,6 +126,44 @@ jobs: run: dart analyze --fatal-infos . if: "always() && steps.frontend_server_client_pub_upgrade.conclusion == 'success'" working-directory: frontend_server_client + job_003: + name: "analyzer_and_format; linux; Dart dev; PKG: dwds; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`, `dart test test/build/ensure_version_test.dart`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds;commands:format-analyze_0-test_1" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds + os:ubuntu-latest;pub-cache-hosted;sdk:dev + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - name: Setup Dart SDK + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c + with: + sdk: dev + - id: checkout + name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + - id: dwds_pub_upgrade + name: dwds; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: dwds + - name: "dwds; dart format --output=none --set-exit-if-changed ." + run: "dart format --output=none --set-exit-if-changed ." + if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" + working-directory: dwds + - name: "dwds; dart analyze --fatal-infos ." + run: dart analyze --fatal-infos . + if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" + working-directory: dwds + - name: dwds; dart test test/build/ensure_version_test.dart + run: dart test test/build/ensure_version_test.dart + if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" + working-directory: dwds job_004: name: "analyzer_and_format; linux; Dart dev; PKG: webdev; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`, `dart test test/build/ensure_build_test.dart`" runs-on: ubuntu-latest @@ -159,7 +172,7 @@ jobs: uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:webdev;commands:format-analyze_0-test_7" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:webdev;commands:format-analyze_0-test_6" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:webdev os:ubuntu-latest;pub-cache-hosted;sdk:dev @@ -190,16 +203,16 @@ jobs: if: "always() && steps.webdev_pub_upgrade.conclusion == 'success'" working-directory: webdev job_005: - name: "unit_test; linux; Dart dev; PKG: dwds; `Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &`, `dart test --tags=extension`" + name: "unit_test; linux; Dart dev; PKG: debug_extension; `Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &`, `dart test -j 1`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds;commands:command-test_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:debug_extension;commands:command-test_0" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:debug_extension os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -210,26 +223,65 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - - id: dwds_pub_upgrade - name: dwds; dart pub upgrade + - id: debug_extension_pub_upgrade + name: debug_extension; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: dwds - - name: "dwds; Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &" + working-directory: debug_extension + - name: "debug_extension; Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &" run: "Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &" - if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" - working-directory: dwds - - name: "dwds; dart test --tags=extension" - run: "dart test --tags=extension" - if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" - working-directory: dwds + if: "always() && steps.debug_extension_pub_upgrade.conclusion == 'success'" + working-directory: debug_extension + - name: "debug_extension; dart test -j 1" + run: dart test -j 1 + if: "always() && steps.debug_extension_pub_upgrade.conclusion == 'success'" + working-directory: debug_extension needs: - job_001 - job_002 - job_003 - job_004 job_006: - name: "unit_test; linux; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 0 --exclude-tags=extension`" + name: "unit_test; linux; Dart dev; PKG: webdev; `Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &`, `dart test -j 1`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:webdev;commands:command-test_0" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:webdev + os:ubuntu-latest;pub-cache-hosted;sdk:dev + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - name: Setup Dart SDK + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c + with: + sdk: dev + - id: checkout + name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + - id: webdev_pub_upgrade + name: webdev; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: webdev + - name: "webdev; Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &" + run: "Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &" + if: "always() && steps.webdev_pub_upgrade.conclusion == 'success'" + working-directory: webdev + - name: "webdev; dart test -j 1" + run: dart test -j 1 + if: "always() && steps.webdev_pub_upgrade.conclusion == 'success'" + working-directory: webdev + needs: + - job_001 + - job_002 + - job_003 + - job_004 + job_007: + name: "unit_test; linux; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 0`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies @@ -254,8 +306,8 @@ jobs: run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: dwds - - name: "dwds; dart test --total-shards 3 --shard-index 0 --exclude-tags=extension" - run: "dart test --total-shards 3 --shard-index 0 --exclude-tags=extension" + - name: "dwds; dart test --total-shards 3 --shard-index 0" + run: dart test --total-shards 3 --shard-index 0 if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" working-directory: dwds needs: @@ -263,8 +315,8 @@ jobs: - job_002 - job_003 - job_004 - job_007: - name: "unit_test; linux; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 1 --exclude-tags=extension`" + job_008: + name: "unit_test; linux; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 1`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies @@ -289,8 +341,8 @@ jobs: run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: dwds - - name: "dwds; dart test --total-shards 3 --shard-index 1 --exclude-tags=extension" - run: "dart test --total-shards 3 --shard-index 1 --exclude-tags=extension" + - name: "dwds; dart test --total-shards 3 --shard-index 1" + run: dart test --total-shards 3 --shard-index 1 if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" working-directory: dwds needs: @@ -298,8 +350,8 @@ jobs: - job_002 - job_003 - job_004 - job_008: - name: "unit_test; linux; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 2 --exclude-tags=extension`" + job_009: + name: "unit_test; linux; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 2`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies @@ -324,8 +376,8 @@ jobs: run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: dwds - - name: "dwds; dart test --total-shards 3 --shard-index 2 --exclude-tags=extension" - run: "dart test --total-shards 3 --shard-index 2 --exclude-tags=extension" + - name: "dwds; dart test --total-shards 3 --shard-index 2" + run: dart test --total-shards 3 --shard-index 2 if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" working-directory: dwds needs: @@ -333,7 +385,7 @@ jobs: - job_002 - job_003 - job_004 - job_009: + job_010: name: "unit_test; linux; Dart dev; PKG: dwds_test_common; `Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &`, `dart test --exclude-tags=release`" runs-on: ubuntu-latest steps: @@ -341,7 +393,7 @@ jobs: uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds_test_common;commands:command-test_6" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds_test_common;commands:command-test_5" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds_test_common os:ubuntu-latest;pub-cache-hosted;sdk:dev @@ -372,7 +424,7 @@ jobs: - job_002 - job_003 - job_004 - job_010: + job_011: name: "unit_test; linux; Dart dev; PKG: frontend_server_client; `dart test -j 1`" runs-on: ubuntu-latest steps: @@ -380,7 +432,7 @@ jobs: uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:frontend_server_client;commands:test_5" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:frontend_server_client;commands:test_0" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:frontend_server_client os:ubuntu-latest;pub-cache-hosted;sdk:dev @@ -407,47 +459,8 @@ jobs: - job_002 - job_003 - job_004 - job_011: - name: "unit_test; linux; Dart dev; PKG: webdev; `Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &`, `dart test -j 1`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:webdev;commands:command-test_5" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:webdev - os:ubuntu-latest;pub-cache-hosted;sdk:dev - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: dev - - id: checkout - name: Checkout repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - - id: webdev_pub_upgrade - name: webdev; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: webdev - - name: "webdev; Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &" - run: "Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &" - if: "always() && steps.webdev_pub_upgrade.conclusion == 'success'" - working-directory: webdev - - name: "webdev; dart test -j 1" - run: dart test -j 1 - if: "always() && steps.webdev_pub_upgrade.conclusion == 'success'" - working-directory: webdev - needs: - - job_001 - - job_002 - - job_003 - - job_004 job_012: - name: "unit_test; windows; Dart dev; PKG: dwds; `dart test --tags=extension`" + name: "unit_test; windows; Dart dev; PKG: debug_extension; `dart test -j 1`" runs-on: windows-latest steps: - name: Setup Dart SDK @@ -457,22 +470,22 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - - id: dwds_pub_upgrade - name: dwds; dart pub upgrade + - id: debug_extension_pub_upgrade + name: debug_extension; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: dwds - - name: "dwds; dart test --tags=extension" - run: "dart test --tags=extension" - if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" - working-directory: dwds + working-directory: debug_extension + - name: "debug_extension; dart test -j 1" + run: dart test -j 1 + if: "always() && steps.debug_extension_pub_upgrade.conclusion == 'success'" + working-directory: debug_extension needs: - job_001 - job_002 - job_003 - job_004 job_013: - name: "unit_test; windows; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 0 --exclude-tags=extension`" + name: "unit_test; windows; Dart dev; PKG: frontend_server_client; `dart test -j 1`" runs-on: windows-latest steps: - name: Setup Dart SDK @@ -482,22 +495,22 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - - id: dwds_pub_upgrade - name: dwds; dart pub upgrade + - id: frontend_server_client_pub_upgrade + name: frontend_server_client; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: dwds - - name: "dwds; dart test --total-shards 3 --shard-index 0 --exclude-tags=extension" - run: "dart test --total-shards 3 --shard-index 0 --exclude-tags=extension" - if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" - working-directory: dwds + working-directory: frontend_server_client + - name: "frontend_server_client; dart test -j 1" + run: dart test -j 1 + if: "always() && steps.frontend_server_client_pub_upgrade.conclusion == 'success'" + working-directory: frontend_server_client needs: - job_001 - job_002 - job_003 - job_004 job_014: - name: "unit_test; windows; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 1 --exclude-tags=extension`" + name: "unit_test; windows; Dart dev; PKG: webdev; `dart test -j 1`" runs-on: windows-latest steps: - name: Setup Dart SDK @@ -507,22 +520,22 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - - id: dwds_pub_upgrade - name: dwds; dart pub upgrade + - id: webdev_pub_upgrade + name: webdev; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: dwds - - name: "dwds; dart test --total-shards 3 --shard-index 1 --exclude-tags=extension" - run: "dart test --total-shards 3 --shard-index 1 --exclude-tags=extension" - if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" - working-directory: dwds + working-directory: webdev + - name: "webdev; dart test -j 1" + run: dart test -j 1 + if: "always() && steps.webdev_pub_upgrade.conclusion == 'success'" + working-directory: webdev needs: - job_001 - job_002 - job_003 - job_004 job_015: - name: "unit_test; windows; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 2 --exclude-tags=extension`" + name: "unit_test; windows; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 0`" runs-on: windows-latest steps: - name: Setup Dart SDK @@ -537,8 +550,8 @@ jobs: run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: dwds - - name: "dwds; dart test --total-shards 3 --shard-index 2 --exclude-tags=extension" - run: "dart test --total-shards 3 --shard-index 2 --exclude-tags=extension" + - name: "dwds; dart test --total-shards 3 --shard-index 0" + run: dart test --total-shards 3 --shard-index 0 if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" working-directory: dwds needs: @@ -547,7 +560,7 @@ jobs: - job_003 - job_004 job_016: - name: "unit_test; windows; Dart dev; PKG: dwds_test_common; `dart test --exclude-tags=release`" + name: "unit_test; windows; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 1`" runs-on: windows-latest steps: - name: Setup Dart SDK @@ -557,22 +570,22 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - - id: dwds_test_common_pub_upgrade - name: dwds_test_common; dart pub upgrade + - id: dwds_pub_upgrade + name: dwds; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: dwds_test_common - - name: "dwds_test_common; dart test --exclude-tags=release" - run: "dart test --exclude-tags=release" - if: "always() && steps.dwds_test_common_pub_upgrade.conclusion == 'success'" - working-directory: dwds_test_common + working-directory: dwds + - name: "dwds; dart test --total-shards 3 --shard-index 1" + run: dart test --total-shards 3 --shard-index 1 + if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" + working-directory: dwds needs: - job_001 - job_002 - job_003 - job_004 job_017: - name: "unit_test; windows; Dart dev; PKG: frontend_server_client; `dart test -j 1`" + name: "unit_test; windows; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 2`" runs-on: windows-latest steps: - name: Setup Dart SDK @@ -582,22 +595,22 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - - id: frontend_server_client_pub_upgrade - name: frontend_server_client; dart pub upgrade + - id: dwds_pub_upgrade + name: dwds; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: frontend_server_client - - name: "frontend_server_client; dart test -j 1" - run: dart test -j 1 - if: "always() && steps.frontend_server_client_pub_upgrade.conclusion == 'success'" - working-directory: frontend_server_client + working-directory: dwds + - name: "dwds; dart test --total-shards 3 --shard-index 2" + run: dart test --total-shards 3 --shard-index 2 + if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" + working-directory: dwds needs: - job_001 - job_002 - job_003 - job_004 job_018: - name: "unit_test; windows; Dart dev; PKG: webdev; `dart test -j 1`" + name: "unit_test; windows; Dart dev; PKG: dwds_test_common; `dart test --exclude-tags=release`" runs-on: windows-latest steps: - name: Setup Dart SDK @@ -607,15 +620,15 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - - id: webdev_pub_upgrade - name: webdev; dart pub upgrade + - id: dwds_test_common_pub_upgrade + name: dwds_test_common; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: webdev - - name: "webdev; dart test -j 1" - run: dart test -j 1 - if: "always() && steps.webdev_pub_upgrade.conclusion == 'success'" - working-directory: webdev + working-directory: dwds_test_common + - name: "dwds_test_common; dart test --exclude-tags=release" + run: "dart test --exclude-tags=release" + if: "always() && steps.dwds_test_common_pub_upgrade.conclusion == 'success'" + working-directory: dwds_test_common needs: - job_001 - job_002 @@ -630,7 +643,7 @@ jobs: uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:beta;packages:dwds;commands:command-test_5" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:beta;packages:dwds;commands:command-test_0" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:beta;packages:dwds os:ubuntu-latest;pub-cache-hosted;sdk:beta @@ -684,7 +697,7 @@ jobs: uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:beta;packages:webdev;commands:command-test_5" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:beta;packages:webdev;commands:command-test_0" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:beta;packages:webdev os:ubuntu-latest;pub-cache-hosted;sdk:beta diff --git a/debug_extension/mono_pkg.yaml b/debug_extension/mono_pkg.yaml new file mode 100644 index 0000000000..42b321e034 --- /dev/null +++ b/debug_extension/mono_pkg.yaml @@ -0,0 +1,17 @@ +# See https://pub.dev/packages/mono_repo for details +stages: + - analyzer_and_format: + - group: + - format + - analyze: --fatal-infos . + sdk: dev + - unit_test: + - group: + - command: Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & + - test: -j 1 + sdk: dev + os: + - linux + - test: -j 1 + os: windows + sdk: dev diff --git a/dwds/mono_pkg.yaml b/dwds/mono_pkg.yaml index cf4a65ad7e..334e0c0530 100644 --- a/dwds/mono_pkg.yaml +++ b/dwds/mono_pkg.yaml @@ -7,38 +7,23 @@ stages: - test: test/build/ensure_version_test.dart sdk: dev - unit_test: - # Linux extension tests: - # Note: `Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &` must be - # run first for Linux. - - group: - - command: Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & - - test: --tags=extension - sdk: dev - os: - - linux - # Windows extension tests: - - group: - - test: --tags=extension - sdk: dev - os: - - windows # First test shard: - group: - - test: --total-shards 3 --shard-index 0 --exclude-tags=extension + - test: --total-shards 3 --shard-index 0 sdk: dev os: - linux - windows # Second test shard: - group: - - test: --total-shards 3 --shard-index 1 --exclude-tags=extension + - test: --total-shards 3 --shard-index 1 sdk: dev os: - linux - windows # Third test shard: - group: - - test: --total-shards 3 --shard-index 2 --exclude-tags=extension + - test: --total-shards 3 --shard-index 2 sdk: dev os: - linux diff --git a/tool/ci.sh b/tool/ci.sh index 67171c3f9f..1827ff9ab9 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -80,34 +80,30 @@ for PKG in ${PKGS}; do dart format --output=none --set-exit-if-changed . || EXIT_CODE=$? ;; test_0) - echo 'dart test test/build/ensure_version_test.dart' - dart test test/build/ensure_version_test.dart || EXIT_CODE=$? + echo 'dart test -j 1' + dart test -j 1 || EXIT_CODE=$? ;; test_1) - echo 'dart test --tags=extension' - dart test --tags=extension || EXIT_CODE=$? + echo 'dart test test/build/ensure_version_test.dart' + dart test test/build/ensure_version_test.dart || EXIT_CODE=$? ;; test_2) - echo 'dart test --total-shards 3 --shard-index 0 --exclude-tags=extension' - dart test --total-shards 3 --shard-index 0 --exclude-tags=extension || EXIT_CODE=$? + echo 'dart test --total-shards 3 --shard-index 0' + dart test --total-shards 3 --shard-index 0 || EXIT_CODE=$? ;; test_3) - echo 'dart test --total-shards 3 --shard-index 1 --exclude-tags=extension' - dart test --total-shards 3 --shard-index 1 --exclude-tags=extension || EXIT_CODE=$? + echo 'dart test --total-shards 3 --shard-index 1' + dart test --total-shards 3 --shard-index 1 || EXIT_CODE=$? ;; test_4) - echo 'dart test --total-shards 3 --shard-index 2 --exclude-tags=extension' - dart test --total-shards 3 --shard-index 2 --exclude-tags=extension || EXIT_CODE=$? + echo 'dart test --total-shards 3 --shard-index 2' + dart test --total-shards 3 --shard-index 2 || EXIT_CODE=$? ;; test_5) - echo 'dart test -j 1' - dart test -j 1 || EXIT_CODE=$? - ;; - test_6) echo 'dart test --exclude-tags=release' dart test --exclude-tags=release || EXIT_CODE=$? ;; - test_7) + test_6) echo 'dart test test/build/ensure_build_test.dart' dart test test/build/ensure_build_test.dart || EXIT_CODE=$? ;; From 9f41007b258b3733934c2107015a457eaefe808c Mon Sep 17 00:00:00 2001 From: MarkZ Date: Mon, 10 Aug 2026 17:49:42 -0700 Subject: [PATCH 094/134] DWDS Feature: Daemon Expression Compiler & FES Support --- dwds/CHANGELOG.md | 6 + dwds/lib/asset_reader.dart | 7 +- dwds/lib/dwds.dart | 13 +- dwds/lib/src/debugging/location.dart | 45 +- dwds/lib/src/debugging/metadata/provider.dart | 38 +- dwds/lib/src/handlers/injected_client_js.dart | 2331 +++++++++++------ dwds/lib/src/loaders/asset_scheme.dart | 86 + .../build_runner_strategy_provider.dart | 15 +- dwds/lib/src/loaders/ddc.dart | 7 +- dwds/lib/src/loaders/ddc_library_bundle.dart | 7 +- .../frontend_server_strategy_provider.dart | 245 +- dwds/lib/src/loaders/require.dart | 7 +- dwds/lib/src/loaders/strategy.dart | 26 +- dwds/lib/src/readers/asset_reader.dart | 275 +- .../readers/frontend_server_asset_reader.dart | 65 +- .../readers/proxy_server_asset_reader.dart | 36 +- .../services/chrome/chrome_proxy_service.dart | 2 +- .../services/daemon_expression_compiler.dart | 60 + dwds/lib/src/utilities/dart_uri.dart | 111 +- dwds/lib/src/utilities/shared.dart | 7 + .../src/utilities/web_path_translator.dart | 194 ++ dwds/lib/src/version.dart | 2 +- dwds/pubspec.yaml | 2 +- .../fixtures/frontend_server_context.dart | 42 +- .../integration/package_uri_mapper_test.dart | 11 +- dwds/web/client.dart | 13 +- .../ddc_library_bundle_restarter.dart | 29 +- dwds/web/reloader/ddc_restarter.dart | 18 +- dwds/web/reloader/manager.dart | 4 +- dwds/web/reloader/require_restarter.dart | 18 +- dwds/web/reloader/restarter.dart | 4 +- dwds_test_common/lib/fixtures/context.dart | 10 +- dwds_test_common/lib/fixtures/fakes.dart | 33 +- dwds_test_common/lib/fixtures/utilities.dart | 132 +- .../frontend_server_common/asset_server.dart | 97 +- .../lib/frontend_server_common/devfs.dart | 8 +- .../frontend_server_client.dart | 14 +- .../resident_runner.dart | 4 +- .../lib/integration/hot_reload.dart | 56 +- .../lib/integration/hot_restart.dart | 15 +- .../integration/hot_restart_breakpoints.dart | 2 +- .../integration/hot_restart_correctness.dart | 12 +- .../readers/proxy_server_asset_reader.dart | 4 +- .../lib/integration/sdk_configuration.dart | 3 +- webdev/pubspec.yaml | 2 + webdev/test/helpers/context.dart | 537 +++- 46 files changed, 3391 insertions(+), 1264 deletions(-) create mode 100644 dwds/lib/src/loaders/asset_scheme.dart create mode 100644 dwds/lib/src/services/daemon_expression_compiler.dart create mode 100644 dwds/lib/src/utilities/web_path_translator.dart diff --git a/dwds/CHANGELOG.md b/dwds/CHANGELOG.md index 703409e3bd..a68e5fe574 100644 --- a/dwds/CHANGELOG.md +++ b/dwds/CHANGELOG.md @@ -1,3 +1,9 @@ +## 28.0.0 + +- Support expression evaluation in Frontend Server + Build Daemon mode via `DaemonExpressionCompiler`. +- Add `WebPathTranslator` to support path translation between Frontend Server and Build Daemon. +- Replace `PackageUriMapper` with `PathResolver` strategy. + ## 27.1.3-wip - Internal test infrastructure refactoring: Move common test files to `dwds_test_common`. diff --git a/dwds/lib/asset_reader.dart b/dwds/lib/asset_reader.dart index 578849f302..d9c471903a 100644 --- a/dwds/lib/asset_reader.dart +++ b/dwds/lib/asset_reader.dart @@ -3,4 +3,9 @@ // BSD-style license that can be found in the LICENSE file. export 'src/readers/asset_reader.dart' - show AssetReader, PackageUriMapper, stripLeadingSlashes; + show + AssetReader, + BuildRunnerPathResolver, + FrontendServerPathResolver, + PathResolver, + stripLeadingSlashes; diff --git a/dwds/lib/dwds.dart b/dwds/lib/dwds.dart index 97c735fd8a..295de36207 100644 --- a/dwds/lib/dwds.dart +++ b/dwds/lib/dwds.dart @@ -18,6 +18,8 @@ export 'src/debugging/metadata/provider.dart' export 'src/events.dart' show DwdsEvent; export 'src/handlers/dev_handler.dart' show AppConnectionException; export 'src/handlers/socket_connections.dart'; +export 'src/loaders/asset_scheme.dart' + show AssetScheme, BuildRunnerAssetScheme, FrontendServerAssetScheme; export 'src/loaders/build_runner_strategy_provider.dart' show BuildRunnerDdcLibraryBundleStrategyProvider, @@ -25,6 +27,7 @@ export 'src/loaders/build_runner_strategy_provider.dart' export 'src/loaders/ddc.dart' show DdcStrategy; export 'src/loaders/frontend_server_strategy_provider.dart' show + FrontendServerBuildDaemonStrategyProvider, FrontendServerDdcLibraryBundleStrategyProvider, FrontendServerDdcStrategyProvider, FrontendServerRequireStrategyProvider; @@ -35,13 +38,21 @@ export 'src/loaders/strategy.dart' LoadStrategy, ReloadConfiguration, ReloadableLoadStrategy; -export 'src/readers/asset_reader.dart' show AssetReader, PackageUriMapper; +export 'src/readers/asset_reader.dart' + show + AssetReader, + BuildRunnerPathResolver, + FlutterPathResolver, + FrontendServerPathResolver, + PathResolver; export 'src/readers/frontend_server_asset_reader.dart' show FrontendServerAssetReader; export 'src/readers/proxy_server_asset_reader.dart' show ProxyServerAssetReader; export 'src/servers/devtools.dart'; export 'src/services/chrome/chrome_debug_exception.dart' show ChromeDebugException; +export 'src/services/daemon_expression_compiler.dart' + show DaemonExpressionCompiler; export 'src/services/expression_compiler.dart' show CompilerOptions, diff --git a/dwds/lib/src/debugging/location.dart b/dwds/lib/src/debugging/location.dart index b2c07dc547..7b450f3114 100644 --- a/dwds/lib/src/debugging/location.dart +++ b/dwds/lib/src/debugging/location.dart @@ -8,6 +8,7 @@ import 'package:dwds/src/debugging/metadata/provider.dart'; import 'package:dwds/src/debugging/modules.dart'; import 'package:dwds/src/readers/asset_reader.dart'; import 'package:dwds/src/utilities/dart_uri.dart'; +import 'package:dwds/src/utilities/web_path_translator.dart'; import 'package:logging/logging.dart'; import 'package:path/path.dart' as p; import 'package:source_maps/parser.dart'; @@ -194,6 +195,8 @@ class Locations { return _sourceToLocation[serverPath] ?? {}; } + Iterable keys() => _sourceToLocation.keys; + /// Returns all [Location] data for a provided JS server path. Future> locationsForUrl(String url) async { if (url.isEmpty) return {}; @@ -345,7 +348,13 @@ class Locations { '/${stripLeadingSlashes(modulePath)}', ); - if (sourceMapContents == null) return result; + if (sourceMapContents == null) { + _logger.warning( + 'Failed to load source map for module $module at path ' + '$sourceMapPath', + ); + return result; + } final runtimeScriptId = await _modules.getRuntimeScriptIdForModule( _entrypoint, @@ -373,11 +382,9 @@ class Locations { } } for (final location in result) { + final serverPath = location.dartLocation.uri.serverPath; _sourceToLocation - .putIfAbsent( - location.dartLocation.uri.serverPath, - () => {}, - ) + .putIfAbsent(serverPath, () => {}) .add(location); } return _moduleToLocations[module] = result; @@ -395,15 +402,25 @@ class Locations { }) { final index = entry.sourceUrlId; if (index == null) return null; - // Source map URLS are relative to the script. They may have platform - // separators or they may use URL semantics. To be sure, we split and - // re-join them. - // This works on Windows because path treats both / and \ as separators. - // It will fail if the path has both separators in it. - final relativeSegments = p.split(sourceUrls[index]); - final path = p.url.normalize( - p.url.joinAll([scriptLocation, ...relativeSegments]), - ); + final sourceUrl = sourceUrls[index]; + String path; + if (Uri.tryParse(sourceUrl)?.isAbsolute == true) { + path = sourceUrl; + } else { + // TODO(markzipan): Check if platform-specific separators can be handled + // upstream in the SDK. + // Source map URLS are relative to the script. They may have platform + // separators or they may use URL semantics. To be sure, we split and + // re-join them. + // This works on Windows because path treats both / and \ as separators. + // It will fail if the path has both separators in it. + final relativeSegments = p.split(sourceUrl); + path = p.url.normalize( + p.url.joinAll([scriptLocation, ...relativeSegments]), + ); + + path = WebPathTranslator.reconstructAppScheme(path, scriptLocation); + } try { final dartUri = DartUri(path, _root); diff --git a/dwds/lib/src/debugging/metadata/provider.dart b/dwds/lib/src/debugging/metadata/provider.dart index 0f639406fd..e721351a28 100644 --- a/dwds/lib/src/debugging/metadata/provider.dart +++ b/dwds/lib/src/debugging/metadata/provider.dart @@ -1,7 +1,6 @@ // Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. - import 'dart:convert'; import 'package:async/async.dart'; @@ -13,7 +12,6 @@ import 'package:path/path.dart' as p; /// A provider of metadata in which data is collected through DDC outputs. class MetadataProvider { final AssetReader _assetReader; - final _logger = Logger('MetadataProvider'); final String entrypoint; final Set _libraries = {}; final Map _scriptToModule = {}; @@ -165,13 +163,15 @@ class MetadataProvider { /// return a map from module names to their [ModuleMetadata]. Future> _processMetadata() async { final modules = {}; - // The merged metadata resides next to the entrypoint. - // Assume that .bootstrap.js has .ddc_merged_metadata - if (entrypoint.endsWith('.bootstrap.js')) { - _logger.info('Loading debug metadata...'); + final logger = Logger('MetadataProvider'); + final assetScheme = _assetReader.assetScheme; + final bootstrapSuffix = assetScheme.bootstrapSuffix; + + if (entrypoint.endsWith(bootstrapSuffix)) { + logger.info('Loading debug metadata...'); final serverPath = entrypoint.replaceAll( - '.bootstrap.js', - '.ddc_merged_metadata', + bootstrapSuffix, + assetScheme.mergedMetadataSuffix, ); final merged = await _assetReader.metadataContents(serverPath); if (merged != null) { @@ -187,10 +187,9 @@ class MetadataProvider { ); final moduleName = metadata.name; modules[moduleName] = metadata; - _logger.fine('Loaded debug metadata for module: $moduleName'); + logger.fine('Loaded debug metadata for module: $moduleName'); } catch (e) { - _logger.warning('Failed to read metadata: $e'); - rethrow; + logger.warning('Failed to parse metadata: $e'); } } } @@ -274,18 +273,19 @@ class MetadataProvider { final moduleLibraries = {}; for (final library in metadata.libraries.values) { - if (library.importUri.startsWith('file:/')) { - throw AbsoluteImportUriException(library.importUri); + final importUri = library.importUri; + if (importUri.startsWith('file:/')) { + throw AbsoluteImportUriException(importUri); } - moduleLibraries.add(library.importUri); - _libraries.add(library.importUri); - _scripts[library.importUri] = []; + moduleLibraries.add(importUri); + _libraries.add(importUri); + _scripts[importUri] = []; - _scriptToModule[library.importUri] = moduleName; + _scriptToModule[importUri] = moduleName; for (final path in library.partUris) { // Parts in metadata are relative to the library Uri directory. - final partPath = p.url.join(p.dirname(library.importUri), path); - _scripts[library.importUri]!.add(partPath); + final partPath = p.url.join(p.url.dirname(importUri), path); + _scripts[importUri]!.add(partPath); _scriptToModule[partPath] = moduleName; } } diff --git a/dwds/lib/src/handlers/injected_client_js.dart b/dwds/lib/src/handlers/injected_client_js.dart index 7c5ef69609..93c9b319b6 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.14.0-edge.49708da8bbb61fcaf57229ecfad88ee2db967f44.\n" +const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-values), the Dart to JavaScript compiler version: 3.14.0-edge.30b941a500c61ffb45fe23e49ae0576eada8d371.\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" @@ -1512,7 +1512,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " case 4:\n" " return closure.call\$4(arg1, arg2, arg3, arg4);\n" " }\n" -" throw A.wrapException(new A._Exception(\"Unsupported number of arguments for wrapped closure\"));\n" +" throw A.wrapException(A.Exception_Exception(\"Unsupported number of arguments for wrapped closure\"));\n" " },\n" " convertDartClosureToJS(closure, arity) {\n" " var \$function = closure.\$identity;\n" @@ -3830,10 +3830,15 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return A._TimerImpl\$(milliseconds < 0 ? 0 : milliseconds, callback);\n" " },\n" " _TimerImpl\$(milliseconds, callback) {\n" -" var t1 = new A._TimerImpl();\n" +" var t1 = new A._TimerImpl(true);\n" " t1._TimerImpl\$2(milliseconds, callback);\n" " return t1;\n" " },\n" +" _TimerImpl\$periodic(milliseconds, callback) {\n" +" var t1 = new A._TimerImpl(false);\n" +" t1._TimerImpl\$periodic\$2(milliseconds, callback);\n" +" return t1;\n" +" },\n" " _makeAsyncAwaitCompleter(\$T) {\n" " return new A._AsyncAwaitCompleter(new A._Future(\$.Zone__current, \$T._eval\$1(\"_Future<0>\")), \$T._eval\$1(\"_AsyncAwaitCompleter<0>\"));\n" " },\n" @@ -3871,20 +3876,91 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " _wrapJsFunctionForAsync(\$function) {\n" " var \$protected = function(fn, ERROR) {\n" -" return function(errorCode, result) {\n" -" while (true) {\n" -" try {\n" -" fn(errorCode, result);\n" -" break;\n" -" } catch (error) {\n" -" result = error;\n" -" errorCode = ERROR;\n" -" }\n" +" return function(errorCode, result) {\n" +" while (true) {\n" +" try {\n" +" fn(errorCode, result);\n" +" break;\n" +" } catch (error) {\n" +" result = error;\n" +" errorCode = ERROR;\n" " }\n" -" };\n" -" }(\$function, 1),\n" -" t1 = \$.Zone__current;\n" -" return t1._registerBinaryCallbackZoned\$3\$2(t1, type\$.void_Function_int_dynamic._as(new A._wrapJsFunctionForAsync_closure(\$protected)), type\$.void, type\$.int, type\$.dynamic);\n" +" }\n" +" };\n" +" }(\$function, 1);\n" +" return \$.Zone__current.registerBinaryCallback\$3\$1(new A._wrapJsFunctionForAsync_closure(\$protected), type\$.void, type\$.int, type\$.dynamic);\n" +" },\n" +" _asyncStarHelper(object, bodyFunctionOrErrorCode, controller) {\n" +" var t1, t2, t3,\n" +" _s10_ = \"controller\";\n" +" if (bodyFunctionOrErrorCode === 0) {\n" +" t1 = controller.cancelationFuture;\n" +" if (t1 != null)\n" +" t1._completeWithValue\$1(null);\n" +" else {\n" +" t1 = controller.___AsyncStarStreamController_controller_A;\n" +" t1 === \$ && A.throwLateFieldNI(_s10_);\n" +" t1.close\$0();\n" +" }\n" +" return;\n" +" } else if (bodyFunctionOrErrorCode === 1) {\n" +" t1 = controller.cancelationFuture;\n" +" if (t1 != null) {\n" +" t2 = A.unwrapException(object);\n" +" t3 = A.getTraceFromException(object);\n" +" t1._completeErrorObject\$1(new A.AsyncError(t2, t3));\n" +" } else {\n" +" t1 = A.unwrapException(object);\n" +" t2 = A.getTraceFromException(object);\n" +" t3 = controller.___AsyncStarStreamController_controller_A;\n" +" t3 === \$ && A.throwLateFieldNI(_s10_);\n" +" t3.addError\$2(t1, t2);\n" +" controller.___AsyncStarStreamController_controller_A.close\$0();\n" +" }\n" +" return;\n" +" }\n" +" type\$.void_Function_int_dynamic._as(bodyFunctionOrErrorCode);\n" +" if (object instanceof A._IterationMarker) {\n" +" if (controller.cancelationFuture != null) {\n" +" bodyFunctionOrErrorCode.call\$2(2, null);\n" +" return;\n" +" }\n" +" t1 = object.state;\n" +" if (t1 === 0) {\n" +" t1 = object.value;\n" +" t2 = controller.___AsyncStarStreamController_controller_A;\n" +" t2 === \$ && A.throwLateFieldNI(_s10_);\n" +" t2.add\$1(0, controller.\$ti._precomputed1._as(t1));\n" +" A.scheduleMicrotask(new A._asyncStarHelper_closure(controller, bodyFunctionOrErrorCode));\n" +" return;\n" +" } else if (t1 === 1) {\n" +" t1 = controller.\$ti._eval\$1(\"Stream<1>\")._as(type\$.Stream_dynamic._as(object.value));\n" +" t2 = controller.___AsyncStarStreamController_controller_A;\n" +" t2 === \$ && A.throwLateFieldNI(_s10_);\n" +" t2.addStream\$2\$cancelOnError(t1, false).then\$1\$1(new A._asyncStarHelper_closure0(controller, bodyFunctionOrErrorCode), type\$.Null);\n" +" return;\n" +" }\n" +" }\n" +" A._awaitOnObject(object, bodyFunctionOrErrorCode);\n" +" },\n" +" _streamOfController(controller) {\n" +" var t1 = controller.___AsyncStarStreamController_controller_A;\n" +" t1 === \$ && A.throwLateFieldNI(\"controller\");\n" +" return new A._ControllerStream(t1, A._instanceType(t1)._eval\$1(\"_ControllerStream<1>\"));\n" +" },\n" +" _AsyncStarStreamController\$(body, \$T) {\n" +" var t1 = new A._AsyncStarStreamController(\$T._eval\$1(\"_AsyncStarStreamController<0>\"));\n" +" t1._AsyncStarStreamController\$1(body, \$T);\n" +" return t1;\n" +" },\n" +" _makeAsyncStarStreamController(body, \$T) {\n" +" return A._AsyncStarStreamController\$(body, \$T);\n" +" },\n" +" _IterationMarker_yieldStar(values) {\n" +" return new A._IterationMarker(values, 1);\n" +" },\n" +" _IterationMarker_yieldSingle(value) {\n" +" return new A._IterationMarker(value, 0);\n" " },\n" " AsyncError_defaultStackTrace(error) {\n" " var stackTrace;\n" @@ -3940,9 +4016,9 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _interceptError(error, stackTrace) {\n" " var replacement, t1, t2,\n" " zone = \$.Zone__current;\n" -" if (zone === B.Zone_jYP)\n" +" if (zone === B.C__RootZone)\n" " return null;\n" -" replacement = zone._errorCallbackZoned\$3(zone, error, stackTrace);\n" +" replacement = zone.errorCallback\$2(error, stackTrace);\n" " if (replacement == null)\n" " return null;\n" " t1 = replacement.error;\n" @@ -3953,7 +4029,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " _interceptUserError(error, stackTrace) {\n" " var replacement;\n" -" if (\$.Zone__current !== B.Zone_jYP) {\n" +" if (\$.Zone__current !== B.C__RootZone) {\n" " replacement = A._interceptError(error, stackTrace);\n" " if (replacement != null)\n" " return replacement;\n" @@ -3979,7 +4055,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return t1;\n" " },\n" " _Future__chainCoreFuture(source, target, sync) {\n" -" var t2, t3, ignoreError, listeners, targetZone, _box_0 = {},\n" +" var t2, t3, ignoreError, listeners, _box_0 = {},\n" " t1 = _box_0.source = source;\n" " for (t2 = type\$._Future_dynamic; t3 = t1._state, (t3 & 4) !== 0; t1 = source) {\n" " source = t2._as(t1._resultOrListeners);\n" @@ -4013,8 +4089,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return;\n" " }\n" " target._state ^= 2;\n" -" targetZone = target._zone;\n" -" targetZone._scheduleMicrotaskZoned\$2(targetZone, new A._Future__chainCoreFuture_closure(_box_0, target));\n" +" target._zone.scheduleMicrotask\$1(new A._Future__chainCoreFuture_closure(_box_0, target));\n" " },\n" " _Future__propagateToListeners(source, listeners) {\n" " var t2, t3, _box_0, t4, t5, hasError, asyncError, nextListener, nextListener0, sourceResult, t6, zone, oldZone, result, current, _box_1 = {},\n" @@ -4027,8 +4102,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " if (listeners == null) {\n" " if (hasError && (t4 & 1) === 0) {\n" " asyncError = t2._as(t1._resultOrListeners);\n" -" t1 = t1._zone;\n" -" t1._handleUncaughtErrorZoned\$3(t1, asyncError.error, asyncError.stackTrace);\n" +" t1._zone.handleUncaughtError\$2(asyncError.error, asyncError.stackTrace);\n" " }\n" " return;\n" " }\n" @@ -4051,10 +4125,15 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t6 = true;\n" " if (t6) {\n" " zone = t1.result._zone;\n" -" if (hasError && t4._zone._handleUncaughtErrorFunction != zone._handleUncaughtErrorFunction) {\n" -" t2._as(sourceResult);\n" +" if (hasError) {\n" " t1 = t4._zone;\n" -" t1._handleUncaughtErrorZoned\$3(t1, sourceResult.error, sourceResult.stackTrace);\n" +" t1 = !(t1 === zone || t1.get\$errorZone() === zone.get\$errorZone());\n" +" } else\n" +" t1 = false;\n" +" if (t1) {\n" +" t1 = _box_1.source;\n" +" asyncError = t2._as(t1._resultOrListeners);\n" +" t1._zone.handleUncaughtError\$2(asyncError.error, asyncError.stackTrace);\n" " return;\n" " }\n" " oldZone = \$.Zone__current;\n" @@ -4062,7 +4141,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " \$.Zone__current = zone;\n" " else\n" " oldZone = null;\n" -" t1 = t1.state;\n" +" t1 = _box_0.listener.state;\n" " if ((t1 & 15) === 8)\n" " new A._Future__propagateToListeners_handleWhenCompleteCallback(_box_0, _box_1, hasError).call\$0();\n" " else if (t5) {\n" @@ -4113,12 +4192,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " },\n" " _registerErrorHandler(errorHandler, zone) {\n" -" var t1 = type\$.dynamic_Function_Object_StackTrace;\n" -" if (t1._is(errorHandler))\n" -" return zone._registerBinaryCallbackZoned\$3\$2(zone, t1._as(errorHandler), type\$.dynamic, type\$.Object, type\$.StackTrace);\n" -" t1 = type\$.dynamic_Function_Object;\n" -" if (t1._is(errorHandler))\n" -" return zone._registerUnaryCallbackZoned\$2\$2(zone, t1._as(errorHandler), type\$.dynamic, type\$.Object);\n" +" if (type\$.dynamic_Function_Object_StackTrace._is(errorHandler))\n" +" return zone.registerBinaryCallback\$3\$1(errorHandler, type\$.dynamic, type\$.Object, type\$.StackTrace);\n" +" if (type\$.dynamic_Function_Object._is(errorHandler))\n" +" return zone.registerUnaryCallback\$2\$1(errorHandler, type\$.dynamic, type\$.Object);\n" " throw A.wrapException(A.ArgumentError\$value(errorHandler, \"onError\", string\$.Error_));\n" " },\n" " _microtaskLoop() {\n" @@ -4175,27 +4252,32 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " },\n" " scheduleMicrotask(callback) {\n" -" var currentZone = \$.Zone__current;\n" -" if (B.Zone_jYP === currentZone) {\n" -" A._rootScheduleMicrotask(B.Zone_jYP, callback);\n" +" var t1, _null = null,\n" +" currentZone = \$.Zone__current;\n" +" if (B.C__RootZone === currentZone) {\n" +" A._rootScheduleMicrotask(_null, _null, B.C__RootZone, callback);\n" " return;\n" " }\n" -" if (currentZone._scheduleMicrotaskFunction == null && currentZone._handleUncaughtErrorFunction == null) {\n" -" A._rootScheduleMicrotask(currentZone, currentZone._registerCallbackZoned\$1\$2(currentZone, callback, type\$.void));\n" +" if (B.C__RootZone === currentZone.get\$_scheduleMicrotask().zone)\n" +" t1 = B.C__RootZone.get\$errorZone() === currentZone.get\$errorZone();\n" +" else\n" +" t1 = false;\n" +" if (t1) {\n" +" A._rootScheduleMicrotask(_null, _null, currentZone, currentZone.registerCallback\$1\$1(callback, type\$.void));\n" " return;\n" " }\n" -" currentZone._scheduleMicrotaskZoned\$2(currentZone, currentZone.bindCallbackGuarded\$1(callback));\n" +" t1 = \$.Zone__current;\n" +" t1.scheduleMicrotask\$1(t1.bindCallbackGuarded\$1(callback));\n" " },\n" " StreamIterator_StreamIterator(stream, \$T) {\n" " A.checkNotNullable(stream, \"stream\", type\$.Object);\n" " return new A._StreamIterator(\$T._eval\$1(\"_StreamIterator<0>\"));\n" " },\n" -" StreamController_StreamController(\$T) {\n" -" var _null = null;\n" -" return new A._AsyncStreamController(_null, _null, _null, _null, \$T._eval\$1(\"_AsyncStreamController<0>\"));\n" +" StreamController_StreamController(onCancel, onListen, onResume, \$T) {\n" +" return new A._AsyncStreamController(onListen, null, onResume, onCancel, \$T._eval\$1(\"_AsyncStreamController<0>\"));\n" " },\n" " _runGuarded(notificationHandler) {\n" -" var e, s, exception, t1;\n" +" var e, s, exception;\n" " if (notificationHandler == null)\n" " return;\n" " try {\n" @@ -4203,31 +4285,31 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" -" t1 = \$.Zone__current;\n" -" t1._handleUncaughtErrorZoned\$3(t1, A._asObject(e), type\$.StackTrace._as(s));\n" +" \$.Zone__current.handleUncaughtError\$2(e, s);\n" " }\n" " },\n" +" _AddStreamState_makeErrorHandler(controller) {\n" +" return new A._AddStreamState_makeErrorHandler_closure(controller);\n" +" },\n" " _BufferingStreamSubscription__registerDataHandler(zone, handleData, \$T) {\n" " var t1 = handleData == null ? A.async___nullDataHandler\$closure() : handleData;\n" -" return zone._registerUnaryCallbackZoned\$2\$2(zone, type\$.\$env_1_1_void._bind\$1(\$T)._eval\$1(\"1(2)\")._as(t1), type\$.void, \$T);\n" +" return zone.registerUnaryCallback\$2\$1(t1, type\$.void, \$T);\n" " },\n" " _BufferingStreamSubscription__registerErrorHandler(zone, handleError) {\n" " if (handleError == null)\n" " handleError = A.async___nullErrorHandler\$closure();\n" " if (type\$.void_Function_Object_StackTrace._is(handleError))\n" -" return zone._registerBinaryCallbackZoned\$3\$2(zone, type\$.dynamic_Function_Object_StackTrace._as(handleError), type\$.dynamic, type\$.Object, type\$.StackTrace);\n" +" return zone.registerBinaryCallback\$3\$1(handleError, type\$.dynamic, type\$.Object, type\$.StackTrace);\n" " if (type\$.void_Function_Object._is(handleError))\n" -" return zone._registerUnaryCallbackZoned\$2\$2(zone, type\$.dynamic_Function_Object._as(handleError), type\$.dynamic, type\$.Object);\n" +" return zone.registerUnaryCallback\$2\$1(handleError, type\$.dynamic, type\$.Object);\n" " throw A.wrapException(A.ArgumentError\$(string\$.handle, null));\n" " },\n" " _nullDataHandler(value) {\n" " },\n" " _nullErrorHandler(error, stackTrace) {\n" -" var t1;\n" " A._asObject(error);\n" " type\$.StackTrace._as(stackTrace);\n" -" t1 = \$.Zone__current;\n" -" t1._handleUncaughtErrorZoned\$3(t1, error, stackTrace);\n" +" \$.Zone__current.handleUncaughtError\$2(error, stackTrace);\n" " },\n" " _nullDoneHandler() {\n" " },\n" @@ -4240,35 +4322,34 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " Timer_Timer(duration, callback) {\n" " var t1 = \$.Zone__current;\n" -" if (t1 === B.Zone_jYP)\n" -" return t1._createTimerZoned\$3(t1, duration, type\$.void_Function._as(callback));\n" -" return t1._createTimerZoned\$3(t1, duration, type\$.void_Function._as(t1.bindCallbackGuarded\$1(callback)));\n" +" if (t1 === B.C__RootZone)\n" +" return t1.createTimer\$2(duration, callback);\n" +" return t1.createTimer\$2(duration, t1.bindCallbackGuarded\$1(callback));\n" " },\n" " runZonedGuarded(body, onError, \$R) {\n" -" var error, stackTrace, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, newZone, exception, _null = null, zoneSpecification = null, zoneValues = null,\n" +" var error, stackTrace, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, exception, _null = null, zoneSpecification = null, zoneValues = null,\n" " parentZone = \$.Zone__current,\n" -" t1 = new A.runZonedGuarded_errorHandler(parentZone, onError);\n" +" errorHandler = new A.runZonedGuarded_closure(parentZone, onError);\n" " if (zoneSpecification == null)\n" -" zoneSpecification = new A.ZoneSpecification(t1, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null);\n" +" zoneSpecification = new A.ZoneSpecification(errorHandler, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null);\n" " else {\n" -" t2 = zoneSpecification;\n" -" t3 = t2.run;\n" -" t4 = t2.runUnary;\n" -" t5 = t2.runBinary;\n" -" t6 = t2.registerCallback;\n" -" t7 = t2.registerUnaryCallback;\n" -" t8 = t2.registerBinaryCallback;\n" -" t9 = t2.errorCallback;\n" -" t10 = t2.scheduleMicrotask;\n" -" t11 = t2.createTimer;\n" -" t12 = t2.createPeriodicTimer;\n" -" t13 = t2.print;\n" -" t2 = t2.fork;\n" -" zoneSpecification = new A.ZoneSpecification(t1, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t2);\n" +" t1 = zoneSpecification;\n" +" t2 = t1.run;\n" +" t3 = t1.runUnary;\n" +" t4 = t1.runBinary;\n" +" t5 = t1.registerCallback;\n" +" t6 = t1.registerUnaryCallback;\n" +" t7 = t1.registerBinaryCallback;\n" +" t8 = t1.errorCallback;\n" +" t9 = t1.scheduleMicrotask;\n" +" t10 = t1.createTimer;\n" +" t11 = t1.createPeriodicTimer;\n" +" t12 = t1.print;\n" +" t1 = t1.fork;\n" +" zoneSpecification = new A.ZoneSpecification(errorHandler, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t1);\n" " }\n" " try {\n" -" newZone = parentZone._forkZoned\$3(parentZone, zoneSpecification, zoneValues);\n" -" t1 = newZone._runZoned\$1\$2(newZone, body, \$R);\n" +" t1 = parentZone.fork\$2\$specification\$zoneValues(zoneSpecification, zoneValues).run\$1\$1(body, \$R);\n" " return t1;\n" " } catch (exception) {\n" " error = A.unwrapException(exception);\n" @@ -4277,22 +4358,125 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " return _null;\n" " },\n" -" ZoneDelegate\$_() {\n" -" return new A.ZoneDelegate(B.Zone_jYP);\n" +" _rootHandleUncaughtError(\$self, \$parent, zone, error, stackTrace) {\n" +" A._rootHandleError(error, stackTrace);\n" +" },\n" +" _rootHandleError(error, stackTrace) {\n" +" A._schedulePriorityAsyncCallback(new A._rootHandleError_closure(error, stackTrace));\n" +" },\n" +" _rootRun(\$self, \$parent, zone, f, \$R) {\n" +" var old, t1;\n" +" type\$.nullable_Zone._as(\$self);\n" +" type\$.nullable_ZoneDelegate._as(\$parent);\n" +" type\$.Zone._as(zone);\n" +" \$R._eval\$1(\"0()\")._as(f);\n" +" t1 = \$.Zone__current;\n" +" if (t1 === zone)\n" +" return f.call\$0();\n" +" \$.Zone__current = zone;\n" +" old = t1;\n" +" try {\n" +" t1 = f.call\$0();\n" +" return t1;\n" +" } finally {\n" +" \$.Zone__current = old;\n" +" }\n" " },\n" -" _rootHandleUncaughtError(error, stackTrace) {\n" -" A._schedulePriorityAsyncCallback(new A._rootHandleUncaughtError_closure(error, stackTrace));\n" +" _rootRunUnary(\$self, \$parent, zone, f, arg, \$R, \$T) {\n" +" var old, t1;\n" +" type\$.nullable_Zone._as(\$self);\n" +" type\$.nullable_ZoneDelegate._as(\$parent);\n" +" type\$.Zone._as(zone);\n" +" \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(f);\n" +" \$T._as(arg);\n" +" t1 = \$.Zone__current;\n" +" if (t1 === zone)\n" +" return f.call\$1(arg);\n" +" \$.Zone__current = zone;\n" +" old = t1;\n" +" try {\n" +" t1 = f.call\$1(arg);\n" +" return t1;\n" +" } finally {\n" +" \$.Zone__current = old;\n" +" }\n" " },\n" -" _rootScheduleMicrotask(zone, callback) {\n" -" if (B.Zone_jYP !== zone)\n" -" callback = zone._handleUncaughtErrorFunction != null ? zone.bindCallbackGuarded\$1(callback) : zone.bindCallback\$1\$1(callback, type\$.void);\n" -" A._scheduleAsyncCallback(callback);\n" +" _rootRunBinary(\$self, \$parent, zone, f, arg1, arg2, \$R, \$T1, \$T2) {\n" +" var old, t1;\n" +" type\$.nullable_Zone._as(\$self);\n" +" type\$.nullable_ZoneDelegate._as(\$parent);\n" +" type\$.Zone._as(zone);\n" +" \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(f);\n" +" \$T1._as(arg1);\n" +" \$T2._as(arg2);\n" +" t1 = \$.Zone__current;\n" +" if (t1 === zone)\n" +" return f.call\$2(arg1, arg2);\n" +" \$.Zone__current = zone;\n" +" old = t1;\n" +" try {\n" +" t1 = f.call\$2(arg1, arg2);\n" +" return t1;\n" +" } finally {\n" +" \$.Zone__current = old;\n" +" }\n" +" },\n" +" _rootRegisterCallback(\$self, \$parent, zone, f, \$R) {\n" +" var t1 = type\$.Zone;\n" +" t1._as(\$self);\n" +" type\$.ZoneDelegate._as(\$parent);\n" +" t1._as(zone);\n" +" return \$R._eval\$1(\"0()\")._as(f);\n" +" },\n" +" _rootRegisterUnaryCallback(\$self, \$parent, zone, f, \$R, \$T) {\n" +" var t1 = type\$.Zone;\n" +" t1._as(\$self);\n" +" type\$.ZoneDelegate._as(\$parent);\n" +" t1._as(zone);\n" +" return \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(f);\n" +" },\n" +" _rootRegisterBinaryCallback(\$self, \$parent, zone, f, \$R, \$T1, \$T2) {\n" +" var t1 = type\$.Zone;\n" +" t1._as(\$self);\n" +" type\$.ZoneDelegate._as(\$parent);\n" +" t1._as(zone);\n" +" return \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(f);\n" +" },\n" +" _rootErrorCallback(\$self, \$parent, zone, error, stackTrace) {\n" +" var t1 = type\$.Zone;\n" +" t1._as(\$self);\n" +" type\$.ZoneDelegate._as(\$parent);\n" +" t1._as(zone);\n" +" A._asObject(error);\n" +" type\$.nullable_StackTrace._as(stackTrace);\n" +" return null;\n" " },\n" -" _rootFork(zone, specification, zoneValues) {\n" -" var t1 = new A.ZoneDelegate(B.Zone_jYP),\n" -" t2 = new A._ZoneHandleUncaughtError(B.Zone_jYP, specification.handleUncaughtError);\n" -" t1 = t1._zone = new A.Zone(zone, t1, zone._runFunction, zone._runUnaryFunction, zone._runBinaryFunction, zone._registerCallbackFunction, zone._registerUnaryCallbackFunction, zone._registerBinaryCallbackFunction, zone._errorCallbackFunction, zone._scheduleMicrotaskFunction, zone._createTimerFunction, zone._createPeriodicTimerFunction, zone._printFunction, zone._forkFunction, t2, zone._zoneValues);\n" -" t2.zone = t1;\n" +" _rootScheduleMicrotask(\$self, \$parent, zone, f) {\n" +" var t1, t2;\n" +" type\$.void_Function._as(f);\n" +" if (B.C__RootZone !== zone) {\n" +" t1 = B.C__RootZone.get\$errorZone();\n" +" t2 = zone.get\$errorZone();\n" +" f = t1 !== t2 ? zone.bindCallbackGuarded\$1(f) : zone.bindCallback\$1\$1(f, type\$.void);\n" +" }\n" +" A._scheduleAsyncCallback(f);\n" +" },\n" +" _rootCreateTimer(\$self, \$parent, zone, duration, callback) {\n" +" callback = zone.bindCallback\$1\$1(type\$.void_Function._as(callback), type\$.void);\n" +" return A.Timer__createTimer(duration, callback);\n" +" },\n" +" _rootCreatePeriodicTimer(\$self, \$parent, zone, duration, callback) {\n" +" var milliseconds;\n" +" callback = zone.bindUnaryCallback\$2\$1(type\$.void_Function_Timer._as(callback), type\$.void, type\$.Timer);\n" +" milliseconds = duration.get\$inMilliseconds();\n" +" return A._TimerImpl\$periodic(milliseconds.\$lt(0, 0) ? 0 : milliseconds, callback);\n" +" },\n" +" _rootPrint(\$self, \$parent, zone, line) {\n" +" A.printString(line);\n" +" },\n" +" _rootFork(\$self, \$parent, zone, specification, zoneValues) {\n" +" var t1 = new A._CustomZone(zone.get\$_run(), zone.get\$_runUnary(), zone.get\$_runBinary(), zone.get\$_registerCallback(), zone.get\$_registerUnaryCallback(), zone.get\$_registerBinaryCallback(), zone.get\$_errorCallback(), zone.get\$_scheduleMicrotask(), zone.get\$_createTimer(), zone.get\$_createPeriodicTimer(), zone.get\$_print(), zone.get\$_fork(), zone.get\$_handleUncaughtError(), zone.get\$_zoneValues(), zone);\n" +" t1._handleUncaughtError = new A._ZoneHandleUncaughtError(t1, specification.handleUncaughtError);\n" " return t1;\n" " },\n" " _AsyncRun__initializeScheduleImmediate_internalCallback: function _AsyncRun__initializeScheduleImmediate_internalCallback(t0) {\n" @@ -4309,13 +4493,22 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _AsyncRun__scheduleImmediateWithSetImmediate_internalCallback: function _AsyncRun__scheduleImmediateWithSetImmediate_internalCallback(t0) {\n" " this.callback = t0;\n" " },\n" -" _TimerImpl: function _TimerImpl() {\n" +" _TimerImpl: function _TimerImpl(t0) {\n" +" this._once = t0;\n" " this._handle = null;\n" +" this._tick = 0;\n" " },\n" " _TimerImpl_internalCallback: function _TimerImpl_internalCallback(t0, t1) {\n" " this.\$this = t0;\n" " this.callback = t1;\n" " },\n" +" _TimerImpl\$periodic_closure: function _TimerImpl\$periodic_closure(t0, t1, t2, t3) {\n" +" var _ = this;\n" +" _.\$this = t0;\n" +" _.milliseconds = t1;\n" +" _.start = t2;\n" +" _.callback = t3;\n" +" },\n" " _AsyncAwaitCompleter: function _AsyncAwaitCompleter(t0, t1) {\n" " this._future = t0;\n" " this.isSync = false;\n" @@ -4330,6 +4523,45 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _wrapJsFunctionForAsync_closure: function _wrapJsFunctionForAsync_closure(t0) {\n" " this.\$protected = t0;\n" " },\n" +" _asyncStarHelper_closure: function _asyncStarHelper_closure(t0, t1) {\n" +" this.controller = t0;\n" +" this.bodyFunction = t1;\n" +" },\n" +" _asyncStarHelper_closure0: function _asyncStarHelper_closure0(t0, t1) {\n" +" this.controller = t0;\n" +" this.bodyFunction = t1;\n" +" },\n" +" _AsyncStarStreamController: function _AsyncStarStreamController(t0) {\n" +" var _ = this;\n" +" _.___AsyncStarStreamController_controller_A = \$;\n" +" _.isSuspended = false;\n" +" _.cancelationFuture = null;\n" +" _.\$ti = t0;\n" +" },\n" +" _AsyncStarStreamController__resumeBody: function _AsyncStarStreamController__resumeBody(t0) {\n" +" this.body = t0;\n" +" },\n" +" _AsyncStarStreamController__resumeBody_closure: function _AsyncStarStreamController__resumeBody_closure(t0) {\n" +" this.body = t0;\n" +" },\n" +" _AsyncStarStreamController_closure0: function _AsyncStarStreamController_closure0(t0) {\n" +" this._resumeBody = t0;\n" +" },\n" +" _AsyncStarStreamController_closure1: function _AsyncStarStreamController_closure1(t0, t1) {\n" +" this.\$this = t0;\n" +" this._resumeBody = t1;\n" +" },\n" +" _AsyncStarStreamController_closure: function _AsyncStarStreamController_closure(t0, t1) {\n" +" this.\$this = t0;\n" +" this.body = t1;\n" +" },\n" +" _AsyncStarStreamController__closure: function _AsyncStarStreamController__closure(t0) {\n" +" this.body = t0;\n" +" },\n" +" _IterationMarker: function _IterationMarker(t0, t1) {\n" +" this.value = t0;\n" +" this.state = t1;\n" +" },\n" " AsyncError: function AsyncError(t0, t1) {\n" " this.error = t0;\n" " this.stackTrace = t1;\n" @@ -4489,6 +4721,21 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this._async\$_target = t0;\n" " this.\$ti = t1;\n" " },\n" +" _AddStreamState: function _AddStreamState() {\n" +" },\n" +" _AddStreamState_makeErrorHandler_closure: function _AddStreamState_makeErrorHandler_closure(t0) {\n" +" this.controller = t0;\n" +" },\n" +" _AddStreamState_cancel_closure: function _AddStreamState_cancel_closure(t0) {\n" +" this.\$this = t0;\n" +" },\n" +" _StreamControllerAddStreamState: function _StreamControllerAddStreamState(t0, t1, t2, t3) {\n" +" var _ = this;\n" +" _._varData = t0;\n" +" _.addStreamFuture = t1;\n" +" _.addSubscription = t2;\n" +" _.\$ti = t3;\n" +" },\n" " _BufferingStreamSubscription: function _BufferingStreamSubscription() {\n" " },\n" " _BufferingStreamSubscription_asFuture_closure: function _BufferingStreamSubscription_asFuture_closure(t0, t1) {\n" @@ -4551,26 +4798,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _EmptyStream: function _EmptyStream(t0) {\n" " this.\$ti = t0;\n" " },\n" -" _MultiStream: function _MultiStream(t0, t1, t2) {\n" -" this.isBroadcast = t0;\n" -" this._onListen = t1;\n" -" this.\$ti = t2;\n" -" },\n" -" _MultiStream_listen_closure: function _MultiStream_listen_closure(t0, t1) {\n" -" this.\$this = t0;\n" -" this.controller = t1;\n" -" },\n" -" _MultiStreamController: function _MultiStreamController(t0, t1, t2, t3, t4) {\n" -" var _ = this;\n" -" _._varData = null;\n" -" _._state = 0;\n" -" _._doneFuture = null;\n" -" _.onListen = t0;\n" -" _.onPause = t1;\n" -" _.onResume = t2;\n" -" _.onCancel = t3;\n" -" _.\$ti = t4;\n" -" },\n" " _cancelAndValue_closure: function _cancelAndValue_closure(t0, t1) {\n" " this.future = t0;\n" " this.value = t1;\n" @@ -4594,51 +4821,119 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this._source = t1;\n" " this.\$ti = t2;\n" " },\n" +" _ZoneRun: function _ZoneRun(t0, t1) {\n" +" this.zone = t0;\n" +" this.\$function = t1;\n" +" },\n" +" _ZoneRunUnary: function _ZoneRunUnary(t0, t1) {\n" +" this.zone = t0;\n" +" this.\$function = t1;\n" +" },\n" +" _ZoneRunBinary: function _ZoneRunBinary(t0, t1) {\n" +" this.zone = t0;\n" +" this.\$function = t1;\n" +" },\n" +" _ZoneRegisterCallback: function _ZoneRegisterCallback(t0, t1) {\n" +" this.zone = t0;\n" +" this.\$function = t1;\n" +" },\n" +" _ZoneRegisterUnaryCallback: function _ZoneRegisterUnaryCallback(t0, t1) {\n" +" this.zone = t0;\n" +" this.\$function = t1;\n" +" },\n" +" _ZoneRegisterBinaryCallback: function _ZoneRegisterBinaryCallback(t0, t1) {\n" +" this.zone = t0;\n" +" this.\$function = t1;\n" +" },\n" +" _ZoneErrorCallback: function _ZoneErrorCallback(t0, t1) {\n" +" this.zone = t0;\n" +" this.\$function = t1;\n" +" },\n" +" _ZoneScheduleMicrotask: function _ZoneScheduleMicrotask(t0, t1) {\n" +" this.zone = t0;\n" +" this.\$function = t1;\n" +" },\n" +" _ZoneCreateTimer: function _ZoneCreateTimer(t0, t1) {\n" +" this.zone = t0;\n" +" this.\$function = t1;\n" +" },\n" +" _ZoneCreatePeriodicTimer: function _ZoneCreatePeriodicTimer() {\n" +" },\n" +" _ZonePrint: function _ZonePrint(t0, t1) {\n" +" this.zone = t0;\n" +" this.\$function = t1;\n" +" },\n" +" _ZoneFork: function _ZoneFork(t0, t1) {\n" +" this.zone = t0;\n" +" this.\$function = t1;\n" +" },\n" " _ZoneHandleUncaughtError: function _ZoneHandleUncaughtError(t0, t1) {\n" " this.zone = t0;\n" " this.\$function = t1;\n" " },\n" -" Zone: function Zone(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) {\n" +" _ZoneValues: function _ZoneValues(t0, t1) {\n" +" this.zone = t0;\n" +" this.map = t1;\n" +" },\n" +" _Zone: function _Zone() {\n" +" },\n" +" _CustomZone: function _CustomZone(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) {\n" " var _ = this;\n" -" _._parent = t0;\n" -" _._delegate = t1;\n" -" _._runFunction = t2;\n" -" _._runUnaryFunction = t3;\n" -" _._runBinaryFunction = t4;\n" -" _._registerCallbackFunction = t5;\n" -" _._registerUnaryCallbackFunction = t6;\n" -" _._registerBinaryCallbackFunction = t7;\n" -" _._errorCallbackFunction = t8;\n" -" _._scheduleMicrotaskFunction = t9;\n" -" _._createTimerFunction = t10;\n" -" _._createPeriodicTimerFunction = t11;\n" -" _._printFunction = t12;\n" -" _._forkFunction = t13;\n" -" _._handleUncaughtErrorFunction = t14;\n" -" _._zoneValues = t15;\n" -" },\n" -" Zone_bindCallback_closure: function Zone_bindCallback_closure(t0, t1, t2) {\n" +" _._run = t0;\n" +" _._runUnary = t1;\n" +" _._runBinary = t2;\n" +" _._registerCallback = t3;\n" +" _._registerUnaryCallback = t4;\n" +" _._registerBinaryCallback = t5;\n" +" _._errorCallback = t6;\n" +" _._scheduleMicrotask = t7;\n" +" _._createTimer = t8;\n" +" _._createPeriodicTimer = t9;\n" +" _._print = t10;\n" +" _._fork = t11;\n" +" _._handleUncaughtError = t12;\n" +" _._zoneValues = t13;\n" +" _._delegateCache = null;\n" +" _.parent = t14;\n" +" },\n" +" _CustomZone_bindCallback_closure: function _CustomZone_bindCallback_closure(t0, t1, t2) {\n" " this.\$this = t0;\n" " this.registered = t1;\n" " this.R = t2;\n" " },\n" -" Zone_bindCallbackGuarded_closure: function Zone_bindCallbackGuarded_closure(t0, t1) {\n" +" _CustomZone_bindCallbackGuarded_closure: function _CustomZone_bindCallbackGuarded_closure(t0, t1) {\n" " this.\$this = t0;\n" " this.registered = t1;\n" " },\n" -" Zone_bindUnaryCallbackGuarded_closure: function Zone_bindUnaryCallbackGuarded_closure(t0, t1, t2) {\n" +" _CustomZone_bindUnaryCallbackGuarded_closure: function _CustomZone_bindUnaryCallbackGuarded_closure(t0, t1, t2) {\n" " this.\$this = t0;\n" " this.registered = t1;\n" " this.T = t2;\n" " },\n" -" runZonedGuarded_errorHandler: function runZonedGuarded_errorHandler(t0, t1) {\n" +" _RootZone: function _RootZone() {\n" +" },\n" +" _RootZone_bindCallback_closure: function _RootZone_bindCallback_closure(t0, t1, t2) {\n" +" this.\$this = t0;\n" +" this.f = t1;\n" +" this.R = t2;\n" +" },\n" +" _RootZone_bindCallbackGuarded_closure: function _RootZone_bindCallbackGuarded_closure(t0, t1) {\n" +" this.\$this = t0;\n" +" this.f = t1;\n" +" },\n" +" _RootZone_bindUnaryCallbackGuarded_closure: function _RootZone_bindUnaryCallbackGuarded_closure(t0, t1, t2) {\n" +" this.\$this = t0;\n" +" this.f = t1;\n" +" this.T = t2;\n" +" },\n" +" runZonedGuarded_closure: function runZonedGuarded_closure(t0, t1) {\n" " this.parentZone = t0;\n" " this.onError = t1;\n" " },\n" -" ZoneDelegate: function ZoneDelegate(t0) {\n" -" this._zone = t0;\n" +" _ZoneDelegate: function _ZoneDelegate(t0) {\n" +" this._delegationTarget = t0;\n" " },\n" -" _rootHandleUncaughtError_closure: function _rootHandleUncaughtError_closure(t0, t1) {\n" +" _rootHandleError_closure: function _rootHandleError_closure(t0, t1) {\n" " this.error = t0;\n" " this.stackTrace = t1;\n" " },\n" @@ -4973,7 +5268,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this._data = null;\n" " },\n" " _JsonMapKeyIterable: function _JsonMapKeyIterable(t0) {\n" -" this._convert\$_parent = t0;\n" +" this._parent = t0;\n" " },\n" " _Utf8Decoder__decoder_closure: function _Utf8Decoder__decoder_closure() {\n" " },\n" @@ -5296,6 +5591,9 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " ConcurrentModificationError\$(modifiedObject) {\n" " return new A.ConcurrentModificationError(modifiedObject);\n" " },\n" +" Exception_Exception(message) {\n" +" return new A._Exception(message);\n" +" },\n" " FormatException\$(message, source, offset) {\n" " return new A.FormatException(message, source, offset);\n" " },\n" @@ -7350,35 +7648,35 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " BaseResponse: function BaseResponse() {\n" " },\n" -" _toClientException(e, request) {\n" -" var message;\n" -" if (type\$.JSObject._is(e) && \"AbortError\" === A._asString(e.name))\n" -" return new A.RequestAbortedException(\"Request aborted by `abortTrigger`\", request.url);\n" +" _rethrowAsClientException(e, st, request) {\n" +" var t1, message;\n" +" if (type\$.JSObject._is(e))\n" +" t1 = A._asString(e.name) === \"AbortError\";\n" +" else\n" +" t1 = false;\n" +" if (t1)\n" +" A.Error_throwWithStackTrace(new A.RequestAbortedException(\"Request aborted by `abortTrigger`\", request.url), st);\n" " if (!(e instanceof A.ClientException)) {\n" " message = J.toString\$0\$(e);\n" " if (B.JSString_methods.startsWith\$1(message, \"TypeError: \"))\n" " message = B.JSString_methods.substring\$1(message, 11);\n" " e = new A.ClientException(message, request.url);\n" " }\n" -" return e;\n" -" },\n" -" _rethrowAsClientException(e, st, request) {\n" -" A.Error_throwWithStackTrace(A._toClientException(e, request), st);\n" +" A.Error_throwWithStackTrace(e, st);\n" " },\n" -" _bodyToStream(request, response) {\n" -" return new A._MultiStream(false, new A._bodyToStream_closure(request, response), type\$._MultiStream_List_int);\n" +" _readBody(request, response) {\n" +" return A._readBody\$body(request, response);\n" " },\n" -" _readStreamBody(request, response, controller) {\n" -" return A._readStreamBody\$body(request, response, controller);\n" -" },\n" -" _readStreamBody\$body(request, response, controller) {\n" -" var \$async\$goto = 0,\n" -" \$async\$completer = A._makeAsyncAwaitCompleter(type\$.void),\n" -" \$async\$returnValue, \$async\$handler = 2, \$async\$errorStack = [], chunk, e, s, t2, t3, t4, t5, exception, t6, t7, _box_0, t1, reader, \$async\$exception;\n" -" var \$async\$_readStreamBody = A._wrapJsFunctionForAsync(function(\$async\$errorCode, \$async\$result) {\n" -" if (\$async\$errorCode === 1) {\n" -" \$async\$errorStack.push(\$async\$result);\n" -" \$async\$goto = \$async\$handler;\n" +" _readBody\$body(request, response) {\n" +" var \$async\$_readBody = A._wrapJsFunctionForAsync(function(\$async\$errorCode, \$async\$result) {\n" +" switch (\$async\$errorCode) {\n" +" case 2:\n" +" \$async\$next = \$async\$nextWhenCanceled;\n" +" \$async\$goto = \$async\$next.pop();\n" +" break;\n" +" case 1:\n" +" \$async\$errorStack.push(\$async\$result);\n" +" \$async\$goto = \$async\$handler;\n" " }\n" " for (;;)\n" " switch (\$async\$goto) {\n" @@ -7386,124 +7684,114 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " // Function start\n" " _box_0 = {};\n" " t1 = A._asJSObjectQ(response.body);\n" -" reader = t1 == null ? null : A._asJSObject(t1.getReader());\n" -" \$async\$goto = reader == null ? 3 : 4;\n" -" break;\n" -" case 3:\n" -" // then\n" -" \$async\$goto = 5;\n" -" return A._asyncAwait(controller.close\$0(), \$async\$_readStreamBody);\n" -" case 5:\n" -" // returning from await.\n" -" // goto return\n" -" \$async\$goto = 1;\n" -" break;\n" -" case 4:\n" -" // join\n" -" _box_0.resumeSignal = null;\n" -" _box_0.hadError = _box_0.cancelled = false;\n" -" controller.set\$onResume(new A._readStreamBody_closure(_box_0));\n" -" controller.set\$onCancel(new A._readStreamBody_closure0(_box_0, reader, request));\n" -" t1 = type\$.NativeUint8List, t2 = controller.\$ti._precomputed1, t3 = type\$.JSObject, t4 = type\$._Future_void, t5 = type\$._AsyncCompleter_void;\n" -" case 6:\n" +" bodyStreamReader = t1 == null ? null : A._asJSObject(t1.getReader());\n" +" if (bodyStreamReader == null) {\n" +" // goto return\n" +" \$async\$goto = 1;\n" +" break;\n" +" }\n" +" isDone = false;\n" +" _box_0.isError = false;\n" +" \$async\$handler = 4;\n" +" t1 = type\$.NativeUint8List, t2 = type\$.JSObject;\n" +" case 7:\n" " // for condition\n" " // trivial condition\n" -" chunk = null;\n" -" \$async\$handler = 9;\n" -" \$async\$goto = 12;\n" -" return A._asyncAwait(A.promiseToFuture(A._asJSObject(reader.read()), t3), \$async\$_readStreamBody);\n" -" case 12:\n" +" \$async\$goto = 9;\n" +" return A._asyncStarHelper(A.promiseToFuture(A._asJSObject(bodyStreamReader.read()), t2), \$async\$_readBody, \$async\$controller);\n" +" case 9:\n" " // returning from await.\n" " chunk = \$async\$result;\n" -" \$async\$handler = 2;\n" -" // goto after finally\n" -" \$async\$goto = 11;\n" +" if (A._asBool(chunk.done)) {\n" +" isDone = true;\n" +" // goto after for\n" +" \$async\$goto = 8;\n" +" break;\n" +" }\n" +" t3 = chunk.value;\n" +" t3.toString;\n" +" \$async\$goto = 10;\n" +" \$async\$nextWhenCanceled = [1, 5];\n" +" return A._asyncStarHelper(A._IterationMarker_yieldSingle(t1._as(t3)), \$async\$_readBody, \$async\$controller);\n" +" case 10:\n" +" // after yield\n" +" // goto for condition\n" +" \$async\$goto = 7;\n" " break;\n" -" case 9:\n" +" case 8:\n" +" // after for\n" +" \$async\$next.push(6);\n" +" // goto finally\n" +" \$async\$goto = 5;\n" +" break;\n" +" case 4:\n" " // catch\n" -" \$async\$handler = 8;\n" +" \$async\$handler = 3;\n" " \$async\$exception = \$async\$errorStack.pop();\n" " e = A.unwrapException(\$async\$exception);\n" -" s = A.getTraceFromException(\$async\$exception);\n" -" \$async\$goto = !_box_0.cancelled ? 13 : 14;\n" +" st = A.getTraceFromException(\$async\$exception);\n" +" _box_0.isError = true;\n" +" A._rethrowAsClientException(e, st, request);\n" +" \$async\$next.push(6);\n" +" // goto finally\n" +" \$async\$goto = 5;\n" " break;\n" -" case 13:\n" +" case 3:\n" +" // uncaught\n" +" \$async\$next = [2];\n" +" case 5:\n" +" // finally\n" +" \$async\$handler = 2;\n" +" \$async\$goto = !isDone ? 11 : 12;\n" +" break;\n" +" case 11:\n" " // then\n" -" _box_0.hadError = true;\n" -" t1 = A._toClientException(e, request);\n" -" t2 = type\$.nullable_StackTrace._as(s);\n" -" t3 = controller._state;\n" -" if (t3 >= 4)\n" -" A.throwExpression(controller._badEventState\$0());\n" -" if ((t3 & 1) !== 0) {\n" -" t3 = controller.get\$_subscription();\n" -" t3._addError\$2(t1, t2 == null ? B._StringStackTrace_OdL : t2);\n" -" }\n" -" \$async\$goto = 15;\n" -" return A._asyncAwait(controller.close\$0(), \$async\$_readStreamBody);\n" -" case 15:\n" +" \$async\$handler = 14;\n" +" \$async\$goto = 17;\n" +" return A._asyncStarHelper(A.promiseToFuture(A._asJSObject(bodyStreamReader.cancel()), type\$.nullable_Object).catchError\$2\$test(new A._readBody_closure(), new A._readBody_closure0(_box_0)), \$async\$_readBody, \$async\$controller);\n" +" case 17:\n" " // returning from await.\n" -" case 14:\n" -" // join\n" -" // goto after for\n" -" \$async\$goto = 7;\n" +" \$async\$handler = 2;\n" +" // goto after finally\n" +" \$async\$goto = 16;\n" " break;\n" +" case 14:\n" +" // catch\n" +" \$async\$handler = 13;\n" +" \$async\$exception1 = \$async\$errorStack.pop();\n" +" e0 = A.unwrapException(\$async\$exception1);\n" +" st0 = A.getTraceFromException(\$async\$exception1);\n" +" if (!_box_0.isError)\n" +" A._rethrowAsClientException(e0, st0, request);\n" " // goto after finally\n" -" \$async\$goto = 11;\n" +" \$async\$goto = 16;\n" " break;\n" -" case 8:\n" +" case 13:\n" " // uncaught\n" " // goto rethrow\n" " \$async\$goto = 2;\n" " break;\n" -" case 11:\n" -" // after finally\n" -" if (A._asBool(chunk.done)) {\n" -" controller.closeSync\$0();\n" -" // goto after for\n" -" \$async\$goto = 7;\n" -" break;\n" -" } else {\n" -" t6 = chunk.value;\n" -" t6.toString;\n" -" t6 = t2._as(t1._as(t6));\n" -" t7 = controller._state;\n" -" if (t7 >= 4)\n" -" A.throwExpression(controller._badEventState\$0());\n" -" if ((t7 & 1) !== 0)\n" -" controller.get\$_subscription()._add\$1(t6);\n" -" }\n" -" t6 = controller._state;\n" -" \$async\$goto = ((t6 & 1) !== 0 ? (controller.get\$_subscription()._state & 4) !== 0 : (t6 & 2) === 0) ? 16 : 17;\n" -" break;\n" " case 16:\n" -" // then\n" -" t6 = _box_0.resumeSignal;\n" -" \$async\$goto = 18;\n" -" return A._asyncAwait((t6 == null ? _box_0.resumeSignal = new A._AsyncCompleter(new A._Future(\$.Zone__current, t4), t5) : t6).future, \$async\$_readStreamBody);\n" -" case 18:\n" -" // returning from await.\n" -" case 17:\n" +" // after finally\n" +" case 12:\n" " // join\n" -" if ((controller._state & 1) === 0) {\n" -" // goto after for\n" -" \$async\$goto = 7;\n" -" break;\n" -" }\n" -" // goto for condition\n" -" \$async\$goto = 6;\n" +" // goto the next finally handler\n" +" \$async\$goto = \$async\$next.pop();\n" " break;\n" -" case 7:\n" -" // after for\n" +" case 6:\n" +" // after finally\n" " case 1:\n" " // return\n" -" return A._asyncReturn(\$async\$returnValue, \$async\$completer);\n" +" return A._asyncStarHelper(null, 0, \$async\$controller);\n" " case 2:\n" " // rethrow\n" -" return A._asyncRethrow(\$async\$errorStack.at(-1), \$async\$completer);\n" +" return A._asyncStarHelper(\$async\$errorStack.at(-1), 1, \$async\$controller);\n" " }\n" " });\n" -" return A._asyncStartSync(\$async\$_readStreamBody, \$async\$completer);\n" +" var \$async\$goto = 0,\n" +" \$async\$controller = A._makeAsyncStarStreamController(\$async\$_readBody, type\$.List_int),\n" +" \$async\$nextWhenCanceled, \$async\$handler = 2, \$async\$errorStack = [], \$async\$next = [], isDone, chunk, e, st, e0, st0, t2, t3, exception, _box_0, t1, bodyStreamReader, \$async\$exception, \$async\$exception1;\n" +" return A._streamOfController(\$async\$controller);\n" " },\n" " BrowserClient: function BrowserClient(t0) {\n" " this.withCredentials = false;\n" @@ -7512,17 +7800,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " BrowserClient_send_closure: function BrowserClient_send_closure(t0) {\n" " this.headers = t0;\n" " },\n" -" _bodyToStream_closure: function _bodyToStream_closure(t0, t1) {\n" -" this.request = t0;\n" -" this.response = t1;\n" -" },\n" -" _readStreamBody_closure: function _readStreamBody_closure(t0) {\n" -" this._box_0 = t0;\n" +" _readBody_closure: function _readBody_closure() {\n" " },\n" -" _readStreamBody_closure0: function _readStreamBody_closure0(t0, t1, t2) {\n" +" _readBody_closure0: function _readBody_closure0(t0) {\n" " this._box_0 = t0;\n" -" this.reader = t1;\n" -" this.request = t2;\n" " },\n" " ByteStream: function ByteStream(t0) {\n" " this._stream = t0;\n" @@ -8109,10 +8390,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _.text = t3;\n" " },\n" " SseClient\$(serverUrl, debugKey) {\n" -" var t3, t4, t5,\n" +" var t3, t4, t5, _null = null,\n" " t1 = type\$.String,\n" -" t2 = A.StreamController_StreamController(t1);\n" -" t1 = A.StreamController_StreamController(t1);\n" +" t2 = A.StreamController_StreamController(_null, _null, _null, t1);\n" +" t1 = A.StreamController_StreamController(_null, _null, _null, t1);\n" " t3 = A.Logger_Logger(\"SseClient\");\n" " t4 = \$.Zone__current;\n" " t5 = A.generateId();\n" @@ -8177,7 +8458,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " _wrapZone(callback, \$T) {\n" " var t1 = \$.Zone__current;\n" -" if (t1 === B.Zone_jYP)\n" +" if (t1 === B.C__RootZone)\n" " return callback;\n" " return t1.bindUnaryCallbackGuarded\$1\$1(callback, \$T);\n" " },\n" @@ -8227,7 +8508,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t1 = type\$.JSArray_nullable_Object._as(new t1());\n" " webSocket = A._asJSObject(new t2(t3, t1));\n" " webSocket.binaryType = \"arraybuffer\";\n" -" browserSocket = new A.BrowserWebSocket(webSocket, A.StreamController_StreamController(type\$.WebSocketEvent));\n" +" browserSocket = new A.BrowserWebSocket(webSocket, A.StreamController_StreamController(null, null, null, type\$.WebSocketEvent));\n" " t1 = new A._Future(\$.Zone__current, type\$._Future_BrowserWebSocket);\n" " webSocketConnected = new A._AsyncCompleter(t1, type\$._AsyncCompleter_BrowserWebSocket);\n" " if (A._asInt(webSocket.readyState) === 1)\n" @@ -8490,7 +8771,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " handleWebSocketHotReloadRequest\$body(\$event, manager, clientSink) {\n" " var \$async\$goto = 0,\n" " \$async\$completer = A._makeAsyncAwaitCompleter(type\$.void),\n" -" \$async\$handler = 1, \$async\$errorStack = [], e, path, exception, requestId, \$async\$exception;\n" +" \$async\$handler = 1, \$async\$errorStack = [], e, exception, requestId, \$async\$exception;\n" " var \$async\$handleWebSocketHotReloadRequest = A._wrapJsFunctionForAsync(function(\$async\$errorCode, \$async\$result) {\n" " if (\$async\$errorCode === 1) {\n" " \$async\$errorStack.push(\$async\$result);\n" @@ -8502,10 +8783,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " // Function start\n" " requestId = \$event.id;\n" " \$async\$handler = 3;\n" -" path = A._asStringQ(init.G.\$reloadedSourcesPath);\n" -" path.toString;\n" " \$async\$goto = 6;\n" -" return A._asyncAwait(manager._restarter.hotReloadStart\$1(path), \$async\$handleWebSocketHotReloadRequest);\n" +" return A._asyncAwait(manager._restarter.hotReloadStart\$1(A._asStringQ(init.G.\$reloadedSourcesPath)), \$async\$handleWebSocketHotReloadRequest);\n" " case 6:\n" " // returning from await.\n" " \$async\$goto = 7;\n" @@ -8548,7 +8827,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, t1, t2, exception, requestId, \$async\$exception;\n" +" \$async\$handler = 1, \$async\$errorStack = [], runId, e, t1, 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" @@ -8566,10 +8845,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " 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" +" return A._asyncAwait(manager.hotRestartBegin\$1(A._asStringQ(t1.\$reloadedSourcesPath)), \$async\$handleWebSocketHotRestartRequest);\n" " case 9:\n" " // returning from await.\n" " A._asJSObject(t1.dartDevEmbedder).hotRestartEnd();\n" @@ -9687,6 +9964,12 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return result;\n" " return result + other;\n" " },\n" +" \$tdiv(receiver, other) {\n" +" if ((receiver | 0) === receiver)\n" +" if (other >= 1)\n" +" return receiver / other | 0;\n" +" return this._tdivSlow\$1(receiver, other);\n" +" },\n" " _tdivFast\$1(receiver, other) {\n" " return (receiver | 0) === receiver ? receiver / other | 0 : this._tdivSlow\$1(receiver, other);\n" " },\n" @@ -9921,30 +10204,20 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return this.__internal\$_source.cancel\$0();\n" " },\n" " onData\$1(handleData) {\n" -" var t2,\n" -" t1 = this.\$ti;\n" +" var t1 = this.\$ti;\n" " t1._eval\$1(\"~(2)?\")._as(handleData);\n" -" if (handleData == null)\n" -" t1 = null;\n" -" else {\n" -" t2 = this.__internal\$_zone;\n" -" t1 = t1._rest[1];\n" -" t1 = t2._registerUnaryCallbackZoned\$2\$2(t2, type\$.\$env_1_1_dynamic._bind\$1(t1)._eval\$1(\"1(2)\")._as(handleData), type\$.dynamic, t1);\n" -" }\n" -" this.__internal\$_handleData = t1;\n" +" this.__internal\$_handleData = handleData == null ? null : this.__internal\$_zone.registerUnaryCallback\$2\$1(handleData, type\$.dynamic, t1._rest[1]);\n" " },\n" " onError\$1(handleError) {\n" -" var t1, _this = this;\n" +" var _this = this;\n" " _this.__internal\$_source.onError\$1(handleError);\n" " if (handleError == null)\n" " _this.__internal\$_handleError = null;\n" -" else if (type\$.void_Function_Object_StackTrace._is(handleError)) {\n" -" t1 = _this.__internal\$_zone;\n" -" _this.__internal\$_handleError = t1._registerBinaryCallbackZoned\$3\$2(t1, type\$.dynamic_Function_Object_StackTrace._as(handleError), type\$.dynamic, type\$.Object, type\$.StackTrace);\n" -" } else if (type\$.void_Function_Object._is(handleError)) {\n" -" t1 = _this.__internal\$_zone;\n" -" _this.__internal\$_handleError = t1._registerUnaryCallbackZoned\$2\$2(t1, type\$.dynamic_Function_Object._as(handleError), type\$.dynamic, type\$.Object);\n" -" } else\n" +" else if (type\$.void_Function_Object_StackTrace._is(handleError))\n" +" _this.__internal\$_handleError = _this.__internal\$_zone.registerBinaryCallback\$3\$1(handleError, type\$.dynamic, type\$.Object, type\$.StackTrace);\n" +" else if (type\$.void_Function_Object._is(handleError))\n" +" _this.__internal\$_handleError = _this.__internal\$_zone.registerUnaryCallback\$2\$1(handleError, type\$.dynamic, type\$.Object);\n" +" else\n" " throw A.wrapException(A.ArgumentError\$(string\$.handle, null));\n" " },\n" " __internal\$_onData\$1(data) {\n" @@ -9961,10 +10234,9 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " error = A.unwrapException(exception);\n" " stack = A.getTraceFromException(exception);\n" " handleError = _this.__internal\$_handleError;\n" -" if (handleError == null) {\n" -" t1 = _this.__internal\$_zone;\n" -" t1._handleUncaughtErrorZoned\$3(t1, A._asObject(error), type\$.StackTrace._as(stack));\n" -" } else {\n" +" if (handleError == null)\n" +" _this.__internal\$_zone.handleUncaughtError\$2(error, stack);\n" +" else {\n" " t1 = type\$.Object;\n" " t2 = _this.__internal\$_zone;\n" " if (type\$.void_Function_Object_StackTrace._is(handleError))\n" @@ -10151,7 +10423,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$0() {\n" " return A.Future_Future\$value(null, type\$.void);\n" " },\n" -" \$signature: 6\n" +" \$signature: 9\n" " };\n" " A.SentinelValue.prototype = {};\n" " A.EfficientLengthIterable.prototype = {};\n" @@ -10717,6 +10989,9 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$2(a0, a1) {\n" " return this._genericClosure.call\$1\$2(a0, a1, this.\$ti._rest[0]);\n" " },\n" +" call\$4(a0, a1, a2, a3) {\n" +" return this._genericClosure.call\$1\$4(a0, a1, a2, a3, this.\$ti._rest[0]);\n" +" },\n" " \$signature() {\n" " return A.instantiatedGenericFunctionType(A.closureFunctionType(this._genericClosure), this.\$ti);\n" " }\n" @@ -11153,13 +11428,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$2(o, tag) {\n" " return this.getUnknownTag(o, tag);\n" " },\n" -" \$signature: 73\n" +" \$signature: 31\n" " };\n" " A.initHooks_closure1.prototype = {\n" " call\$1(tag) {\n" " return this.prototypeForTag(A._asString(tag));\n" " },\n" -" \$signature: 59\n" +" \$signature: 30\n" " };\n" " A._Record.prototype = {\n" " get\$runtimeType(_) {\n" @@ -11667,7 +11942,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t1.storedCallback = null;\n" " f.call\$0();\n" " },\n" -" \$signature: 8\n" +" \$signature: 4\n" " };\n" " A._AsyncRun__initializeScheduleImmediate_closure.prototype = {\n" " call\$1(callback) {\n" @@ -11677,7 +11952,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t2 = this.span;\n" " t1.firstChild ? t1.removeChild(t2) : t1.appendChild(t2);\n" " },\n" -" \$signature: 43\n" +" \$signature: 49\n" " };\n" " A._AsyncRun__scheduleImmediateJsOverride_internalCallback.prototype = {\n" " call\$0() {\n" @@ -11698,6 +11973,12 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " else\n" " throw A.wrapException(A.UnsupportedError\$(\"`setTimeout()` not found.\"));\n" " },\n" +" _TimerImpl\$periodic\$2(milliseconds, callback) {\n" +" if (self.setTimeout != null)\n" +" this._handle = self.setInterval(A.convertDartClosureToJS(new A._TimerImpl\$periodic_closure(this, milliseconds, Date.now(), callback), 0), milliseconds);\n" +" else\n" +" throw A.wrapException(A.UnsupportedError\$(\"Periodic timer.\"));\n" +" },\n" " get\$isActive() {\n" " return this._handle != null;\n" " },\n" @@ -11706,7 +11987,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " var t1 = this._handle;\n" " if (t1 == null)\n" " return;\n" -" self.clearTimeout(t1);\n" +" if (this._once)\n" +" self.clearTimeout(t1);\n" +" else\n" +" self.clearInterval(t1);\n" " this._handle = null;\n" " } else\n" " throw A.wrapException(A.UnsupportedError\$(\"Canceling a timer.\"));\n" @@ -11715,11 +11999,29 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._TimerImpl_internalCallback.prototype = {\n" " call\$0() {\n" -" this.\$this._handle = null;\n" +" var t1 = this.\$this;\n" +" t1._handle = null;\n" +" t1._tick = 1;\n" " this.callback.call\$0();\n" " },\n" " \$signature: 0\n" " };\n" +" A._TimerImpl\$periodic_closure.prototype = {\n" +" call\$0() {\n" +" var duration, _this = this,\n" +" t1 = _this.\$this,\n" +" tick = t1._tick + 1,\n" +" t2 = _this.milliseconds;\n" +" if (t2 > 0) {\n" +" duration = Date.now() - _this.start;\n" +" if (duration > (tick + 1) * t2)\n" +" tick = B.JSInt_methods.\$tdiv(duration, t2);\n" +" }\n" +" t1._tick = tick;\n" +" _this.callback.call\$1(t1);\n" +" },\n" +" \$signature: 1\n" +" };\n" " A._AsyncAwaitCompleter.prototype = {\n" " complete\$1(value) {\n" " var t2, _this = this,\n" @@ -11750,19 +12052,104 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(result) {\n" " return this.bodyFunction.call\$2(0, result);\n" " },\n" -" \$signature: 4\n" +" \$signature: 5\n" " };\n" " A._awaitOnObject_closure0.prototype = {\n" " call\$2(error, stackTrace) {\n" " this.bodyFunction.call\$2(1, new A.ExceptionAndStackTrace(error, type\$.StackTrace._as(stackTrace)));\n" " },\n" -" \$signature: 48\n" +" \$signature: 54\n" " };\n" " A._wrapJsFunctionForAsync_closure.prototype = {\n" " call\$2(errorCode, result) {\n" " this.\$protected(A._asInt(errorCode), result);\n" " },\n" -" \$signature: 55\n" +" \$signature: 59\n" +" };\n" +" A._asyncStarHelper_closure.prototype = {\n" +" call\$0() {\n" +" var t3,\n" +" t1 = this.controller,\n" +" t2 = t1.___AsyncStarStreamController_controller_A;\n" +" t2 === \$ && A.throwLateFieldNI(\"controller\");\n" +" t3 = t2._state;\n" +" if ((t3 & 1) !== 0 ? (t2.get\$_subscription()._state & 4) !== 0 : (t3 & 2) === 0) {\n" +" t1.isSuspended = true;\n" +" return;\n" +" }\n" +" t1 = t1.cancelationFuture != null ? 2 : 0;\n" +" this.bodyFunction.call\$2(t1, null);\n" +" },\n" +" \$signature: 0\n" +" };\n" +" A._asyncStarHelper_closure0.prototype = {\n" +" call\$1(__wc0_formal) {\n" +" var errorCode = this.controller.cancelationFuture != null ? 2 : 0;\n" +" this.bodyFunction.call\$2(errorCode, null);\n" +" },\n" +" \$signature: 4\n" +" };\n" +" A._AsyncStarStreamController.prototype = {\n" +" _AsyncStarStreamController\$1(body, \$T) {\n" +" var _this = this,\n" +" t1 = new A._AsyncStarStreamController__resumeBody(body);\n" +" _this.___AsyncStarStreamController_controller_A = _this.\$ti._eval\$1(\"StreamController<1>\")._as(A.StreamController_StreamController(new A._AsyncStarStreamController_closure(_this, body), new A._AsyncStarStreamController_closure0(t1), new A._AsyncStarStreamController_closure1(_this, t1), \$T));\n" +" }\n" +" };\n" +" A._AsyncStarStreamController__resumeBody.prototype = {\n" +" call\$0() {\n" +" A.scheduleMicrotask(new A._AsyncStarStreamController__resumeBody_closure(this.body));\n" +" },\n" +" \$signature: 1\n" +" };\n" +" A._AsyncStarStreamController__resumeBody_closure.prototype = {\n" +" call\$0() {\n" +" this.body.call\$2(0, null);\n" +" },\n" +" \$signature: 0\n" +" };\n" +" A._AsyncStarStreamController_closure0.prototype = {\n" +" call\$0() {\n" +" this._resumeBody.call\$0();\n" +" },\n" +" \$signature: 0\n" +" };\n" +" A._AsyncStarStreamController_closure1.prototype = {\n" +" call\$0() {\n" +" var t1 = this.\$this;\n" +" if (t1.isSuspended) {\n" +" t1.isSuspended = false;\n" +" this._resumeBody.call\$0();\n" +" }\n" +" },\n" +" \$signature: 0\n" +" };\n" +" A._AsyncStarStreamController_closure.prototype = {\n" +" call\$0() {\n" +" var t1 = this.\$this,\n" +" t2 = t1.___AsyncStarStreamController_controller_A;\n" +" t2 === \$ && A.throwLateFieldNI(\"controller\");\n" +" if ((t2._state & 4) === 0) {\n" +" t1.cancelationFuture = new A._Future(\$.Zone__current, type\$._Future_dynamic);\n" +" if (t1.isSuspended) {\n" +" t1.isSuspended = false;\n" +" A.scheduleMicrotask(new A._AsyncStarStreamController__closure(this.body));\n" +" }\n" +" return t1.cancelationFuture;\n" +" }\n" +" },\n" +" \$signature: 60\n" +" };\n" +" A._AsyncStarStreamController__closure.prototype = {\n" +" call\$0() {\n" +" this.body.call\$2(2, null);\n" +" },\n" +" \$signature: 0\n" +" };\n" +" A._IterationMarker.prototype = {\n" +" toString\$0(_) {\n" +" return \"IterationMarker(\" + this.state + \", \" + A.S(this.value) + \")\";\n" +" }\n" " };\n" " A.AsyncError.prototype = {\n" " toString\$0(_) {\n" @@ -11848,11 +12235,9 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._FutureListener.prototype = {\n" " matchesErrorTest\$1(asyncError) {\n" -" var t1;\n" " if ((this.state & 15) !== 6)\n" " return true;\n" -" t1 = this.result._zone;\n" -" return t1._runUnaryZoned\$2\$3(t1, type\$.bool_Function_Object._as(this.callback), asyncError.error, type\$.bool, type\$.Object);\n" +" return this.result._zone.runUnary\$2\$2(type\$.bool_Function_Object._as(this.callback), asyncError.error, type\$.bool, type\$.Object);\n" " },\n" " handleError\$1(asyncError) {\n" " var exception, _this = this,\n" @@ -11863,9 +12248,9 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t3 = asyncError.error,\n" " t4 = _this.result._zone;\n" " if (type\$.dynamic_Function_Object_StackTrace._is(errorCallback))\n" -" result = t4._runBinaryZoned\$3\$4(t4, errorCallback, t3, asyncError.stackTrace, t1, t2, type\$.StackTrace);\n" +" result = t4.runBinary\$3\$3(errorCallback, t3, asyncError.stackTrace, t1, t2, type\$.StackTrace);\n" " else\n" -" result = t4._runUnaryZoned\$2\$3(t4, type\$.dynamic_Function_Object._as(errorCallback), t3, t1, t2);\n" +" result = t4.runUnary\$2\$2(type\$.dynamic_Function_Object._as(errorCallback), t3, t1, t2);\n" " try {\n" " t1 = _this.\$ti._eval\$1(\"2/\")._as(result);\n" " return t1;\n" @@ -11881,16 +12266,15 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._Future.prototype = {\n" " then\$1\$2\$onError(f, onError, \$R) {\n" -" var currentZone, t2, result,\n" +" var currentZone, result, t2,\n" " t1 = this.\$ti;\n" " t1._bind\$1(\$R)._eval\$1(\"1/(2)\")._as(f);\n" " currentZone = \$.Zone__current;\n" -" if (currentZone === B.Zone_jYP) {\n" +" if (currentZone === B.C__RootZone) {\n" " if (onError != null && !type\$.dynamic_Function_Object_StackTrace._is(onError) && !type\$.dynamic_Function_Object._is(onError))\n" " throw A.wrapException(A.ArgumentError\$value(onError, \"onError\", string\$.Error_));\n" " } else {\n" -" t2 = t1._precomputed1;\n" -" f = currentZone._registerUnaryCallbackZoned\$2\$2(currentZone, \$R._eval\$1(\"@<0/>\")._bind\$1(t2)._eval\$1(\"1(2)\")._as(f), \$R._eval\$1(\"0/\"), t2);\n" +" f = currentZone.registerUnaryCallback\$2\$1(f, \$R._eval\$1(\"0/\"), t1._precomputed1);\n" " if (onError != null)\n" " onError = A._registerErrorHandler(onError, currentZone);\n" " }\n" @@ -11910,23 +12294,32 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this._addListener\$1(new A._FutureListener(result, 19, f, onError, t1._eval\$1(\"@<1>\")._bind\$1(\$E)._eval\$1(\"_FutureListener<1,2>\")));\n" " return result;\n" " },\n" -" catchError\$1(onError) {\n" -" var t1 = this.\$ti,\n" -" resultZone = \$.Zone__current,\n" -" result = new A._Future(resultZone, t1);\n" -" if (resultZone !== B.Zone_jYP)\n" -" onError = A._registerErrorHandler(onError, resultZone);\n" -" this._addListener\$1(new A._FutureListener(result, 2, null, onError, t1._eval\$1(\"_FutureListener<1,1>\")));\n" +" catchError\$2\$test(onError, test) {\n" +" var t1, t2, result;\n" +" type\$.nullable_bool_Function_Object._as(test);\n" +" t1 = this.\$ti;\n" +" t2 = \$.Zone__current;\n" +" result = new A._Future(t2, t1);\n" +" if (t2 !== B.C__RootZone) {\n" +" onError = A._registerErrorHandler(onError, t2);\n" +" if (test != null)\n" +" test = t2.registerUnaryCallback\$2\$1(test, type\$.bool, type\$.Object);\n" +" }\n" +" t2 = test == null ? 2 : 6;\n" +" this._addListener\$1(new A._FutureListener(result, t2, test, onError, t1._eval\$1(\"_FutureListener<1,1>\")));\n" " return result;\n" " },\n" +" catchError\$1(onError) {\n" +" return this.catchError\$2\$test(onError, null);\n" +" },\n" " whenComplete\$1(action) {\n" -" var t1, resultZone, result;\n" +" var t1, t2, result;\n" " type\$.dynamic_Function._as(action);\n" " t1 = this.\$ti;\n" -" resultZone = \$.Zone__current;\n" -" result = new A._Future(resultZone, t1);\n" -" if (resultZone !== B.Zone_jYP)\n" -" action = resultZone._registerCallbackZoned\$1\$2(resultZone, action, type\$.dynamic);\n" +" t2 = \$.Zone__current;\n" +" result = new A._Future(t2, t1);\n" +" if (t2 !== B.C__RootZone)\n" +" action = t2.registerCallback\$1\$1(action, type\$.dynamic);\n" " this._addListener\$1(new A._FutureListener(result, 8, action, null, t1._eval\$1(\"_FutureListener<1,1>\")));\n" " return result;\n" " },\n" @@ -11953,8 +12346,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " _this._cloneResult\$1(source);\n" " }\n" -" t1 = _this._zone;\n" -" t1._scheduleMicrotaskZoned\$2(t1, new A._Future__addListener_closure(_this, listener));\n" +" _this._zone.scheduleMicrotask\$1(new A._Future__addListener_closure(_this, listener));\n" " }\n" " },\n" " _prependListeners\$1(listeners) {\n" @@ -11982,8 +12374,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _this._cloneResult\$1(source);\n" " }\n" " _box_0.listeners = _this._reverseListeners\$1(listeners);\n" -" t1 = _this._zone;\n" -" t1._scheduleMicrotaskZoned\$2(t1, new A._Future__prependListeners_closure(_box_0, _this));\n" +" _this._zone.scheduleMicrotask\$1(new A._Future__prependListeners_closure(_box_0, _this));\n" " }\n" " },\n" " _removeListeners\$0() {\n" @@ -12022,8 +12413,14 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " A._Future__propagateToListeners(_this, listeners);\n" " },\n" " _completeWithResultOf\$1(source) {\n" -" var listeners, _this = this;\n" -" if ((source._state & 16) !== 0 && _this._zone._handleUncaughtErrorFunction != source._zone._handleUncaughtErrorFunction)\n" +" var t1, t2, listeners, _this = this;\n" +" if ((source._state & 16) !== 0) {\n" +" t1 = _this._zone;\n" +" t2 = source._zone;\n" +" t1 = !(t1 === t2 || t1.get\$errorZone() === t2.get\$errorZone());\n" +" } else\n" +" t1 = false;\n" +" if (t1)\n" " return;\n" " listeners = _this._removeListeners\$0();\n" " _this._cloneResult\$1(source);\n" @@ -12049,21 +12446,18 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this._asyncCompleteWithValue\$1(value);\n" " },\n" " _asyncCompleteWithValue\$1(value) {\n" -" var t1, _this = this;\n" +" var _this = this;\n" " _this.\$ti._precomputed1._as(value);\n" " _this._state ^= 2;\n" -" t1 = _this._zone;\n" -" t1._scheduleMicrotaskZoned\$2(t1, new A._Future__asyncCompleteWithValue_closure(_this, value));\n" +" _this._zone.scheduleMicrotask\$1(new A._Future__asyncCompleteWithValue_closure(_this, value));\n" " },\n" " _chainFuture\$1(value) {\n" " A._Future__chainCoreFuture(this.\$ti._eval\$1(\"Future<1>\")._as(value), this, false);\n" " return;\n" " },\n" " _asyncCompleteErrorObject\$1(error) {\n" -" var t1;\n" " this._state ^= 2;\n" -" t1 = this._zone;\n" -" t1._scheduleMicrotaskZoned\$2(t1, new A._Future__asyncCompleteErrorObject_closure(this, error));\n" +" this._zone.scheduleMicrotask\$1(new A._Future__asyncCompleteErrorObject_closure(this, error));\n" " },\n" " timeout\$2\$onTimeout(timeLimit, onTimeout) {\n" " var t3, _future, _this = this, t1 = {},\n" @@ -12077,7 +12471,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t3 = \$.Zone__current;\n" " _future = new A._Future(t3, t2);\n" " t1.timer = null;\n" -" t1.timer = A.Timer_Timer(timeLimit, new A._Future_timeout_closure(_this, _future, t3, t3._registerCallbackZoned\$1\$2(t3, t2._eval\$1(\"1/()\")._as(onTimeout), t2._eval\$1(\"1/\"))));\n" +" t1.timer = A.Timer_Timer(timeLimit, new A._Future_timeout_closure(_this, _future, t3, t3.registerCallback\$1\$1(onTimeout, t2._eval\$1(\"1/\"))));\n" " _this.then\$1\$2\$onError(new A._Future_timeout_closure0(t1, _this, _future), new A._Future_timeout_closure1(t1, _future), type\$.Null);\n" " return _future;\n" " },\n" @@ -12115,11 +12509,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._Future__propagateToListeners_handleWhenCompleteCallback.prototype = {\n" " call\$0() {\n" -" var e, s, t1, t2, exception, t3, originalSource, joinedResult, _this = this, completeResult = null;\n" +" var e, s, t1, exception, t2, t3, originalSource, joinedResult, _this = this, completeResult = null;\n" " try {\n" " t1 = _this._box_0.listener;\n" -" t2 = t1.result._zone;\n" -" completeResult = t2._runZoned\$1\$2(t2, type\$.dynamic_Function._as(t1.callback), type\$.dynamic);\n" +" completeResult = t1.result._zone.run\$1\$1(type\$.dynamic_Function._as(t1.callback), type\$.dynamic);\n" " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" @@ -12161,7 +12554,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(__wc0_formal) {\n" " this.joinedResult._completeWithResultOf\$1(this.originalSource);\n" " },\n" -" \$signature: 8\n" +" \$signature: 4\n" " };\n" " A._Future__propagateToListeners_handleWhenCompleteCallback_closure0.prototype = {\n" " call\$2(e, s) {\n" @@ -12173,15 +12566,14 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._Future__propagateToListeners_handleValueCallback.prototype = {\n" " call\$0() {\n" -" var e, s, t1, t2, t3, t4, t5, t6, exception;\n" +" var e, s, t1, t2, t3, t4, t5, exception;\n" " try {\n" " t1 = this._box_0;\n" " t2 = t1.listener;\n" " t3 = t2.\$ti;\n" " t4 = t3._precomputed1;\n" " t5 = t4._as(this.sourceResult);\n" -" t6 = t2.result._zone;\n" -" t1.listenerValueOrError = t6._runUnaryZoned\$2\$3(t6, t3._eval\$1(\"2/(1)\")._as(t2.callback), t5, t3._eval\$1(\"2/\"), t4);\n" +" t1.listenerValueOrError = t2.result._zone.runUnary\$2\$2(t3._eval\$1(\"2/(1)\")._as(t2.callback), t5, t3._eval\$1(\"2/\"), t4);\n" " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" @@ -12230,11 +12622,9 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._Future_timeout_closure.prototype = {\n" " call\$0() {\n" -" var e, s, t1, t2, exception, _this = this;\n" +" var e, s, exception, t1, t2, _this = this;\n" " try {\n" -" t1 = _this.zone;\n" -" t2 = _this.\$this.\$ti;\n" -" _this._future._complete\$1(t1._runZoned\$1\$2(t1, t2._eval\$1(\"1/()\")._as(_this.onTimeoutHandler), t2._eval\$1(\"1/\")));\n" +" _this._future._complete\$1(_this.zone.run\$1\$1(_this.onTimeoutHandler, _this.\$this.\$ti._eval\$1(\"1/\")));\n" " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" @@ -12343,10 +12733,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " if ((_this._state & 8) === 0)\n" " return A._instanceType(_this)._eval\$1(\"_PendingEvents<1>?\")._as(_this._varData);\n" " t1 = A._instanceType(_this);\n" -" return t1._eval\$1(\"_PendingEvents<1>?\")._as(t1._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(_this._varData).get\$_varData());\n" +" return t1._eval\$1(\"_PendingEvents<1>?\")._as(t1._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(_this._varData)._varData);\n" " },\n" " _ensurePendingEvents\$0() {\n" -" var events, t1, _this = this;\n" +" var events, t1, state, _this = this;\n" " if ((_this._state & 8) === 0) {\n" " events = _this._varData;\n" " if (events == null)\n" @@ -12354,13 +12744,16 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return A._instanceType(_this)._eval\$1(\"_PendingEvents<1>\")._as(events);\n" " }\n" " t1 = A._instanceType(_this);\n" -" events = t1._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(_this._varData).get\$_varData();\n" +" state = t1._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(_this._varData);\n" +" events = state._varData;\n" +" if (events == null)\n" +" events = state._varData = new A._PendingEvents(t1._eval\$1(\"_PendingEvents<1>\"));\n" " return t1._eval\$1(\"_PendingEvents<1>\")._as(events);\n" " },\n" " get\$_subscription() {\n" " var varData = this._varData;\n" " if ((this._state & 8) !== 0)\n" -" varData = type\$._StreamControllerAddStreamState_nullable_Object._as(varData).get\$_varData();\n" +" varData = type\$._StreamControllerAddStreamState_nullable_Object._as(varData)._varData;\n" " return A._instanceType(this)._eval\$1(\"_ControllerSubscription<1>\")._as(varData);\n" " },\n" " _badEventState\$0() {\n" @@ -12368,6 +12761,31 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return new A.StateError(\"Cannot add event after closing\");\n" " return new A.StateError(\"Cannot add event while adding a stream\");\n" " },\n" +" addStream\$2\$cancelOnError(source, cancelOnError) {\n" +" var t2, t3, t4, t5, t6, _this = this,\n" +" t1 = A._instanceType(_this);\n" +" t1._eval\$1(\"Stream<1>\")._as(source);\n" +" t2 = _this._state;\n" +" if (t2 >= 4)\n" +" throw A.wrapException(_this._badEventState\$0());\n" +" if ((t2 & 2) !== 0) {\n" +" t1 = new A._Future(\$.Zone__current, type\$._Future_dynamic);\n" +" t1._asyncComplete\$1(null);\n" +" return t1;\n" +" }\n" +" t2 = _this._varData;\n" +" t3 = cancelOnError === true;\n" +" t4 = new A._Future(\$.Zone__current, type\$._Future_dynamic);\n" +" t5 = t1._eval\$1(\"~(1)\")._as(_this.get\$_add());\n" +" t6 = t3 ? A._AddStreamState_makeErrorHandler(_this) : _this.get\$_addError();\n" +" t6 = source.listen\$4\$cancelOnError\$onDone\$onError(t5, t3, _this.get\$_close(), t6);\n" +" t3 = _this._state;\n" +" if ((t3 & 1) !== 0 ? (_this.get\$_subscription()._state & 4) !== 0 : (t3 & 2) === 0)\n" +" t6.pause\$0();\n" +" _this._varData = new A._StreamControllerAddStreamState(t2, t4, t6, t1._eval\$1(\"_StreamControllerAddStreamState<1>\"));\n" +" _this._state |= 8;\n" +" return t4;\n" +" },\n" " _ensureDoneFuture\$0() {\n" " var t1 = this._doneFuture;\n" " if (t1 == null)\n" @@ -12381,6 +12799,16 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " throw A.wrapException(_this._badEventState\$0());\n" " _this._add\$1(value);\n" " },\n" +" addError\$2(error, stackTrace) {\n" +" var _0_0;\n" +" if (this._state >= 4)\n" +" throw A.wrapException(this._badEventState\$0());\n" +" _0_0 = A._interceptUserError(error, stackTrace);\n" +" this._addError\$2(_0_0.error, _0_0.stackTrace);\n" +" },\n" +" addError\$1(error) {\n" +" return this.addError\$2(error, null);\n" +" },\n" " close\$0() {\n" " var _this = this,\n" " t1 = _this._state;\n" @@ -12408,6 +12836,23 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " else if ((t2 & 3) === 0)\n" " _this._ensurePendingEvents\$0().add\$1(0, new A._DelayedData(value, t1._eval\$1(\"_DelayedData<1>\")));\n" " },\n" +" _addError\$2(error, stackTrace) {\n" +" var t1;\n" +" A._asObject(error);\n" +" type\$.StackTrace._as(stackTrace);\n" +" t1 = this._state;\n" +" if ((t1 & 1) !== 0)\n" +" this._sendError\$2(error, stackTrace);\n" +" else if ((t1 & 3) === 0)\n" +" this._ensurePendingEvents\$0().add\$1(0, new A._DelayedError(error, stackTrace));\n" +" },\n" +" _close\$0() {\n" +" var _this = this,\n" +" addState = A._instanceType(_this)._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(_this._varData);\n" +" _this._varData = addState._varData;\n" +" _this._state &= 4294967287;\n" +" addState.addStreamFuture._asyncComplete\$1(null);\n" +" },\n" " _subscribe\$4(onData, onError, onDone, cancelOnError) {\n" " var t2, t3, t4, t5, t6, t7, subscription, pendingEvents, addState, _this = this,\n" " t1 = A._instanceType(_this);\n" @@ -12421,12 +12866,12 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t5 = A._BufferingStreamSubscription__registerDataHandler(t2, onData, t1._precomputed1);\n" " t6 = A._BufferingStreamSubscription__registerErrorHandler(t2, onError);\n" " t7 = onDone == null ? A.async___nullDoneHandler\$closure() : onDone;\n" -" subscription = new A._ControllerSubscription(_this, t5, t6, t2._registerCallbackZoned\$1\$2(t2, type\$.void_Function._as(t7), type\$.void), t2, t3 | t4, t1._eval\$1(\"_ControllerSubscription<1>\"));\n" +" subscription = new A._ControllerSubscription(_this, t5, t6, t2.registerCallback\$1\$1(t7, type\$.void), t2, t3 | t4, t1._eval\$1(\"_ControllerSubscription<1>\"));\n" " pendingEvents = _this.get\$_pendingEvents();\n" " if (((_this._state |= 1) & 8) !== 0) {\n" " addState = t1._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(_this._varData);\n" -" addState.set\$_varData(subscription);\n" -" addState.resume\$0();\n" +" addState._varData = subscription;\n" +" addState.addSubscription.resume\$0();\n" " } else\n" " _this._varData = subscription;\n" " subscription._setPendingEvents\$1(pendingEvents);\n" @@ -12470,12 +12915,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " set\$onListen(onListen) {\n" " this.onListen = type\$.nullable_void_Function._as(onListen);\n" " },\n" -" set\$onResume(onResume) {\n" -" this.onResume = type\$.nullable_void_Function._as(onResume);\n" -" },\n" -" set\$onCancel(onCancel) {\n" -" this.onCancel = type\$.nullable_void_Function._as(onCancel);\n" -" },\n" " \$isStreamSink: 1,\n" " \$isStreamController: 1,\n" " \$is_StreamControllerLifecycle: 1,\n" @@ -12498,7 +12937,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._AsyncStreamControllerDispatch.prototype = {\n" " _sendData\$1(data) {\n" -" var t1 = A._instanceType(this);\n" +" var t1 = this.\$ti;\n" " t1._precomputed1._as(data);\n" " this.get\$_subscription()._addPending\$1(new A._DelayedData(data, t1._eval\$1(\"_DelayedData<1>\")));\n" " },\n" @@ -12531,7 +12970,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t2 = A._instanceType(t1);\n" " t2._eval\$1(\"StreamSubscription<1>\")._as(this);\n" " if ((t1._state & 8) !== 0)\n" -" t2._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(t1._varData).pause\$0();\n" +" t2._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(t1._varData).addSubscription.pause\$0();\n" " A._runGuarded(t1.onPause);\n" " },\n" " _onResume\$0() {\n" @@ -12539,11 +12978,32 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t2 = A._instanceType(t1);\n" " t2._eval\$1(\"StreamSubscription<1>\")._as(this);\n" " if ((t1._state & 8) !== 0)\n" -" t2._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(t1._varData).resume\$0();\n" +" t2._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(t1._varData).addSubscription.resume\$0();\n" " A._runGuarded(t1.onResume);\n" " }\n" " };\n" " A._StreamSinkWrapper.prototype = {\$isStreamSink: 1};\n" +" A._AddStreamState.prototype = {\n" +" cancel\$0() {\n" +" var cancel = this.addSubscription.cancel\$0();\n" +" return cancel.whenComplete\$1(new A._AddStreamState_cancel_closure(this));\n" +" }\n" +" };\n" +" A._AddStreamState_makeErrorHandler_closure.prototype = {\n" +" call\$2(e, s) {\n" +" var t1 = this.controller;\n" +" t1._addError\$2(A._asObject(e), type\$.StackTrace._as(s));\n" +" t1._close\$0();\n" +" },\n" +" \$signature: 3\n" +" };\n" +" A._AddStreamState_cancel_closure.prototype = {\n" +" call\$0() {\n" +" this.\$this.addStreamFuture._asyncComplete\$1(null);\n" +" },\n" +" \$signature: 1\n" +" };\n" +" A._StreamControllerAddStreamState.prototype = {};\n" " A._BufferingStreamSubscription.prototype = {\n" " _setPendingEvents\$1(pendingEvents) {\n" " var _this = this;\n" @@ -12997,7 +13457,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t1 = new A._DoneStreamSubscription(t2, t1._eval\$1(\"_DoneStreamSubscription<1>\"));\n" " A.scheduleMicrotask(t1.get\$_onMicrotask());\n" " if (onDone != null)\n" -" t1._onDone = t2._registerCallbackZoned\$1\$2(t2, type\$.void_Function._as(onDone), type\$.void);\n" +" t1._onDone = t2.registerCallback\$1\$1(onDone, type\$.void);\n" " return t1;\n" " },\n" " listen\$3\$onDone\$onError(onData, onDone, onError) {\n" @@ -13007,44 +13467,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return this.listen\$4\$cancelOnError\$onDone\$onError(onData, cancelOnError, onDone, null);\n" " }\n" " };\n" -" A._MultiStream.prototype = {\n" -" listen\$4\$cancelOnError\$onDone\$onError(onData, cancelOnError, onDone, onError) {\n" -" var controller, _null = null,\n" -" t1 = this.\$ti;\n" -" t1._eval\$1(\"~(1)?\")._as(onData);\n" -" type\$.nullable_void_Function._as(onDone);\n" -" controller = new A._MultiStreamController(_null, _null, _null, _null, t1._eval\$1(\"_MultiStreamController<1>\"));\n" -" controller.set\$onListen(new A._MultiStream_listen_closure(this, controller));\n" -" return controller._subscribe\$4(onData, onError, onDone, cancelOnError === true);\n" -" },\n" -" listen\$3\$onDone\$onError(onData, onDone, onError) {\n" -" return this.listen\$4\$cancelOnError\$onDone\$onError(onData, null, onDone, onError);\n" -" },\n" -" listen\$3\$cancelOnError\$onDone(onData, cancelOnError, onDone) {\n" -" return this.listen\$4\$cancelOnError\$onDone\$onError(onData, cancelOnError, onDone, null);\n" -" }\n" -" };\n" -" A._MultiStream_listen_closure.prototype = {\n" -" call\$0() {\n" -" this.\$this._onListen.call\$1(this.controller);\n" -" },\n" -" \$signature: 0\n" -" };\n" -" A._MultiStreamController.prototype = {\n" -" closeSync\$0() {\n" -" var _this = this,\n" -" t1 = _this._state;\n" -" if ((t1 & 4) !== 0)\n" -" return;\n" -" if (t1 >= 4)\n" -" throw A.wrapException(_this._badEventState\$0());\n" -" t1 |= 4;\n" -" _this._state = t1;\n" -" if ((t1 & 1) !== 0)\n" -" _this.get\$_subscription()._close\$0();\n" -" },\n" -" \$isMultiStreamController: 1\n" -" };\n" " A._cancelAndValue_closure.prototype = {\n" " call\$0() {\n" " return this.future._complete\$1(this.value);\n" @@ -13063,7 +13485,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t5 = A._BufferingStreamSubscription__registerDataHandler(t2, onData, t1._rest[1]);\n" " t6 = A._BufferingStreamSubscription__registerErrorHandler(t2, onError);\n" " t7 = onDone == null ? A.async___nullDoneHandler\$closure() : onDone;\n" -" t1 = new A._ForwardingStreamSubscription(this, t5, t6, t2._registerCallbackZoned\$1\$2(t2, type\$.void_Function._as(t7), type\$.void), t2, t3 | t4, t1._eval\$1(\"_ForwardingStreamSubscription<1,2>\"));\n" +" t1 = new A._ForwardingStreamSubscription(this, t5, t6, t2.registerCallback\$1\$1(t7, type\$.void), t2, t3 | t4, t1._eval\$1(\"_ForwardingStreamSubscription<1,2>\"));\n" " t1._subscription = this._source.listen\$3\$onDone\$onError(t1.get\$_handleData(), t1.get\$_handleDone(), t1.get\$_handleError());\n" " return t1;\n" " },\n" @@ -13145,270 +13567,453 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " sink._add\$1(outputEvent);\n" " }\n" " };\n" -" A._ZoneHandleUncaughtError.prototype = {};\n" -" A.Zone.prototype = {\n" -" run\$1\$1(action, \$R) {\n" -" return this._runZoned\$1\$2(this, \$R._eval\$1(\"0()\")._as(action), \$R);\n" -" },\n" -" runGuarded\$1(action) {\n" -" var e, s, t1, exception, _this = this;\n" -" type\$.void_Function._as(action);\n" +" A._ZoneRun.prototype = {};\n" +" A._ZoneRunUnary.prototype = {};\n" +" A._ZoneRunBinary.prototype = {};\n" +" A._ZoneRegisterCallback.prototype = {};\n" +" A._ZoneRegisterUnaryCallback.prototype = {};\n" +" A._ZoneRegisterBinaryCallback.prototype = {};\n" +" A._ZoneErrorCallback.prototype = {};\n" +" A._ZoneScheduleMicrotask.prototype = {};\n" +" A._ZoneCreateTimer.prototype = {};\n" +" A._ZoneCreatePeriodicTimer.prototype = {};\n" +" A._ZonePrint.prototype = {};\n" +" A._ZoneFork.prototype = {};\n" +" A._ZoneHandleUncaughtError.prototype = {\n" +" function\$5(arg0, arg1, arg2, arg3, arg4) {\n" +" return this.\$function.call\$5(arg0, arg1, arg2, arg3, arg4);\n" +" }\n" +" };\n" +" A._ZoneValues.prototype = {};\n" +" A._Zone.prototype = {\n" +" _processUncaughtError\$3(zone, error, stackTrace) {\n" +" var implementation, implZone, parentZone, currentZone, e, s, t1, exception;\n" +" type\$.StackTrace._as(stackTrace);\n" +" implementation = this.get\$_handleUncaughtError();\n" +" implZone = implementation.zone;\n" +" if (implZone === B.C__RootZone) {\n" +" A._rootHandleError(error, stackTrace);\n" +" return;\n" +" }\n" +" t1 = implZone.get\$parent();\n" +" t1.toString;\n" +" parentZone = t1;\n" +" currentZone = \$.Zone__current;\n" " try {\n" -" t1 = _this._runZoned\$1\$2(_this, action, type\$.void);\n" -" return t1;\n" +" \$.Zone__current = parentZone;\n" +" implementation.function\$5(implZone, implZone.get\$_parentDelegate(), zone, error, stackTrace);\n" +" \$.Zone__current = currentZone;\n" " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" -" _this._handleUncaughtErrorZoned\$3(_this, e, s);\n" +" \$.Zone__current = currentZone;\n" +" t1 = error === e ? stackTrace : s;\n" +" parentZone._processUncaughtError\$3(implZone, e, t1);\n" " }\n" " },\n" -" runUnaryGuarded\$1\$2(action, argument, \$T) {\n" -" var e, s, t1, exception, _this = this;\n" -" \$T._eval\$1(\"~(0)\")._as(action);\n" -" \$T._as(argument);\n" +" \$isZone: 1\n" +" };\n" +" A._CustomZone.prototype = {\n" +" get\$_delegate() {\n" +" var t1 = this._delegateCache;\n" +" return t1 == null ? this._delegateCache = new A._ZoneDelegate(this) : t1;\n" +" },\n" +" get\$_parentDelegate() {\n" +" return this.parent.get\$_delegate();\n" +" },\n" +" get\$errorZone() {\n" +" return this._handleUncaughtError.zone;\n" +" },\n" +" runGuarded\$1(f) {\n" +" var e, s, exception;\n" +" type\$.void_Function._as(f);\n" " try {\n" -" t1 = _this._runUnaryZoned\$2\$3(_this, action, argument, type\$.void, \$T);\n" -" return t1;\n" +" this.run\$1\$1(f, type\$.void);\n" " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" -" _this._handleUncaughtErrorZoned\$3(_this, e, s);\n" +" this._processUncaughtError\$3(this, A._asObject(e), type\$.StackTrace._as(s));\n" " }\n" " },\n" -" runBinaryGuarded\$2\$3(action, argument1, argument2, \$T1, \$T2) {\n" -" var e, s, t1, exception, _this = this;\n" -" \$T1._eval\$1(\"@<0>\")._bind\$1(\$T2)._eval\$1(\"~(1,2)\")._as(action);\n" -" \$T1._as(argument1);\n" -" \$T2._as(argument2);\n" +" runUnaryGuarded\$1\$2(f, arg, \$T) {\n" +" var e, s, exception;\n" +" \$T._eval\$1(\"~(0)\")._as(f);\n" +" \$T._as(arg);\n" " try {\n" -" t1 = _this._runBinaryZoned\$3\$4(_this, action, argument1, argument2, type\$.void, \$T1, \$T2);\n" -" return t1;\n" +" this.runUnary\$2\$2(f, arg, type\$.void, \$T);\n" " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" -" _this._handleUncaughtErrorZoned\$3(_this, e, s);\n" +" this._processUncaughtError\$3(this, A._asObject(e), type\$.StackTrace._as(s));\n" " }\n" " },\n" -" bindCallback\$1\$1(callback, \$R) {\n" -" return new A.Zone_bindCallback_closure(this, this._registerCallbackZoned\$1\$2(this, \$R._eval\$1(\"0()\")._as(callback), \$R), \$R);\n" +" runBinaryGuarded\$2\$3(f, arg1, arg2, \$T1, \$T2) {\n" +" var e, s, exception;\n" +" \$T1._eval\$1(\"@<0>\")._bind\$1(\$T2)._eval\$1(\"~(1,2)\")._as(f);\n" +" \$T1._as(arg1);\n" +" \$T2._as(arg2);\n" +" try {\n" +" this.runBinary\$3\$3(f, arg1, arg2, type\$.void, \$T1, \$T2);\n" +" } catch (exception) {\n" +" e = A.unwrapException(exception);\n" +" s = A.getTraceFromException(exception);\n" +" this._processUncaughtError\$3(this, A._asObject(e), type\$.StackTrace._as(s));\n" +" }\n" +" },\n" +" bindCallback\$1\$1(f, \$R) {\n" +" return new A._CustomZone_bindCallback_closure(this, this.registerCallback\$1\$1(\$R._eval\$1(\"0()\")._as(f), \$R), \$R);\n" +" },\n" +" bindCallbackGuarded\$1(f) {\n" +" return new A._CustomZone_bindCallbackGuarded_closure(this, this.registerCallback\$1\$1(type\$.void_Function._as(f), type\$.void));\n" +" },\n" +" bindUnaryCallbackGuarded\$1\$1(f, \$T) {\n" +" return new A._CustomZone_bindUnaryCallbackGuarded_closure(this, this.registerUnaryCallback\$2\$1(\$T._eval\$1(\"~(0)\")._as(f), type\$.void, \$T), \$T);\n" +" },\n" +" handleUncaughtError\$2(error, stackTrace) {\n" +" this._processUncaughtError\$3(this, error, type\$.StackTrace._as(stackTrace));\n" +" },\n" +" fork\$2\$specification\$zoneValues(specification, zoneValues) {\n" +" var implementation = this._fork,\n" +" zone = implementation.zone;\n" +" return implementation.\$function.call\$5(zone, zone.get\$_parentDelegate(), this, specification, zoneValues);\n" +" },\n" +" run\$1\$1(f, \$R) {\n" +" var implementation, zone;\n" +" \$R._eval\$1(\"0()\")._as(f);\n" +" implementation = this._run;\n" +" zone = implementation.zone;\n" +" return implementation.\$function.call\$1\$4(zone, zone.get\$_parentDelegate(), this, f, \$R);\n" +" },\n" +" runUnary\$2\$2(f, arg, \$R, \$T) {\n" +" var implementation, zone;\n" +" \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(f);\n" +" \$T._as(arg);\n" +" implementation = this._runUnary;\n" +" zone = implementation.zone;\n" +" return implementation.\$function.call\$2\$5(zone, zone.get\$_parentDelegate(), this, f, arg, \$R, \$T);\n" +" },\n" +" runBinary\$3\$3(f, arg1, arg2, \$R, \$T1, \$T2) {\n" +" var implementation, zone;\n" +" \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(f);\n" +" \$T1._as(arg1);\n" +" \$T2._as(arg2);\n" +" implementation = this._runBinary;\n" +" zone = implementation.zone;\n" +" return implementation.\$function.call\$3\$6(zone, zone.get\$_parentDelegate(), this, f, arg1, arg2, \$R, \$T1, \$T2);\n" +" },\n" +" registerCallback\$1\$1(callback, \$R) {\n" +" var implementation, zone;\n" +" \$R._eval\$1(\"0()\")._as(callback);\n" +" implementation = this._registerCallback;\n" +" zone = implementation.zone;\n" +" return implementation.\$function.call\$1\$4(zone, zone.get\$_parentDelegate(), this, callback, \$R);\n" +" },\n" +" registerUnaryCallback\$2\$1(callback, \$R, \$T) {\n" +" var implementation, zone;\n" +" \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(callback);\n" +" implementation = this._registerUnaryCallback;\n" +" zone = implementation.zone;\n" +" return implementation.\$function.call\$2\$4(zone, zone.get\$_parentDelegate(), this, callback, \$R, \$T);\n" +" },\n" +" registerBinaryCallback\$3\$1(callback, \$R, \$T1, \$T2) {\n" +" var implementation, zone;\n" +" \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(callback);\n" +" implementation = this._registerBinaryCallback;\n" +" zone = implementation.zone;\n" +" return implementation.\$function.call\$3\$4(zone, zone.get\$_parentDelegate(), this, callback, \$R, \$T1, \$T2);\n" +" },\n" +" errorCallback\$2(error, stackTrace) {\n" +" var implementation = this._errorCallback,\n" +" zone = implementation.zone;\n" +" if (zone === B.C__RootZone)\n" +" return null;\n" +" return implementation.\$function.call\$5(zone, zone.get\$_parentDelegate(), this, error, stackTrace);\n" +" },\n" +" scheduleMicrotask\$1(f) {\n" +" var implementation, zone;\n" +" type\$.void_Function._as(f);\n" +" implementation = this._scheduleMicrotask;\n" +" zone = implementation.zone;\n" +" return implementation.\$function.call\$4(zone, zone.get\$_parentDelegate(), this, f);\n" +" },\n" +" createTimer\$2(duration, f) {\n" +" var implementation, zone;\n" +" type\$.void_Function._as(f);\n" +" implementation = this._createTimer;\n" +" zone = implementation.zone;\n" +" return implementation.\$function.call\$5(zone, zone.get\$_parentDelegate(), this, duration, f);\n" +" },\n" +" get\$_run() {\n" +" return this._run;\n" +" },\n" +" get\$_runUnary() {\n" +" return this._runUnary;\n" +" },\n" +" get\$_runBinary() {\n" +" return this._runBinary;\n" +" },\n" +" get\$_registerCallback() {\n" +" return this._registerCallback;\n" +" },\n" +" get\$_registerUnaryCallback() {\n" +" return this._registerUnaryCallback;\n" +" },\n" +" get\$_registerBinaryCallback() {\n" +" return this._registerBinaryCallback;\n" +" },\n" +" get\$_errorCallback() {\n" +" return this._errorCallback;\n" +" },\n" +" get\$_scheduleMicrotask() {\n" +" return this._scheduleMicrotask;\n" +" },\n" +" get\$_createTimer() {\n" +" return this._createTimer;\n" +" },\n" +" get\$_createPeriodicTimer() {\n" +" return this._createPeriodicTimer;\n" +" },\n" +" get\$_print() {\n" +" return this._print;\n" +" },\n" +" get\$_fork() {\n" +" return this._fork;\n" +" },\n" +" get\$_handleUncaughtError() {\n" +" return this._handleUncaughtError;\n" +" },\n" +" get\$_zoneValues() {\n" +" return this._zoneValues;\n" +" },\n" +" get\$parent() {\n" +" return this.parent;\n" +" }\n" +" };\n" +" A._CustomZone_bindCallback_closure.prototype = {\n" +" call\$0() {\n" +" return this.\$this.run\$1\$1(this.registered, this.R);\n" +" },\n" +" \$signature() {\n" +" return this.R._eval\$1(\"0()\");\n" +" }\n" +" };\n" +" A._CustomZone_bindCallbackGuarded_closure.prototype = {\n" +" call\$0() {\n" +" return this.\$this.runGuarded\$1(this.registered);\n" +" },\n" +" \$signature: 0\n" +" };\n" +" A._CustomZone_bindUnaryCallbackGuarded_closure.prototype = {\n" +" call\$1(arg) {\n" +" var t1 = this.T;\n" +" return this.\$this.runUnaryGuarded\$1\$2(this.registered, t1._as(arg), t1);\n" +" },\n" +" \$signature() {\n" +" return this.T._eval\$1(\"~(0)\");\n" +" }\n" +" };\n" +" A._RootZone.prototype = {\n" +" get\$_run() {\n" +" return B._ZoneRun__RootZone__rootRun;\n" +" },\n" +" get\$_runUnary() {\n" +" return B._ZoneRunUnary__RootZone__rootRunUnary;\n" +" },\n" +" get\$_runBinary() {\n" +" return B._ZoneRunBinary__RootZone__rootRunBinary;\n" +" },\n" +" get\$_registerCallback() {\n" +" return B._ZoneRegisterCallback__RootZone__rootRegisterCallback;\n" " },\n" -" bindCallbackGuarded\$1(callback) {\n" -" return new A.Zone_bindCallbackGuarded_closure(this, this._registerCallbackZoned\$1\$2(this, type\$.void_Function._as(callback), type\$.void));\n" +" get\$_registerUnaryCallback() {\n" +" return B._ZoneRegisterUnaryCallback_a9v;\n" " },\n" -" bindUnaryCallbackGuarded\$1\$1(callback, \$T) {\n" -" return new A.Zone_bindUnaryCallbackGuarded_closure(this, this._registerUnaryCallbackZoned\$2\$2(this, \$T._eval\$1(\"~(0)\")._as(callback), type\$.void, \$T), \$T);\n" +" get\$_registerBinaryCallback() {\n" +" return B._ZoneRegisterBinaryCallback_sk0;\n" +" },\n" +" get\$_errorCallback() {\n" +" return B._ZoneErrorCallback__RootZone__rootErrorCallback;\n" +" },\n" +" get\$_scheduleMicrotask() {\n" +" return B._ZoneScheduleMicrotask__RootZone__rootScheduleMicrotask;\n" +" },\n" +" get\$_createTimer() {\n" +" return B._ZoneCreateTimer__RootZone__rootCreateTimer;\n" +" },\n" +" get\$_createPeriodicTimer() {\n" +" return B.C__ZoneCreatePeriodicTimer;\n" +" },\n" +" get\$_print() {\n" +" return B._ZonePrint__RootZone__rootPrint;\n" +" },\n" +" get\$_fork() {\n" +" return B._ZoneFork__RootZone__rootFork;\n" +" },\n" +" get\$_handleUncaughtError() {\n" +" return B._ZoneHandleUncaughtError_wQ6;\n" +" },\n" +" get\$_zoneValues() {\n" +" return B._ZoneValues__RootZone_Map_empty;\n" +" },\n" +" get\$parent() {\n" +" return null;\n" +" },\n" +" get\$_delegate() {\n" +" var t1 = \$._RootZone__rootDelegate;\n" +" return t1 == null ? \$._RootZone__rootDelegate = new A._ZoneDelegate(this) : t1;\n" " },\n" " get\$_parentDelegate() {\n" -" var t1 = this._parent;\n" -" t1 = t1 == null ? null : t1._delegate;\n" -" return t1 == null ? \$.\$get\$_rootDelegate() : t1;\n" +" var t1 = \$._RootZone__rootDelegate;\n" +" return t1 == null ? \$._RootZone__rootDelegate = new A._ZoneDelegate(this) : t1;\n" " },\n" -" _handleUncaughtErrorZoned\$3(zone, error, stackTrace) {\n" -" var implementation, implZone, parentZone, currentZone, e, s, t1, exception;\n" -" type\$.StackTrace._as(stackTrace);\n" -" implementation = this._handleUncaughtErrorFunction;\n" -" if (implementation == null) {\n" -" A._rootHandleUncaughtError(error, stackTrace);\n" -" return;\n" -" }\n" -" implZone = implementation.zone;\n" -" t1 = implZone._parent;\n" -" t1.toString;\n" -" parentZone = t1;\n" -" currentZone = \$.Zone__current;\n" +" get\$errorZone() {\n" +" return this;\n" +" },\n" +" runGuarded\$1(f) {\n" +" var e, s, exception;\n" +" type\$.void_Function._as(f);\n" " try {\n" -" \$.Zone__current = parentZone;\n" -" t1 = implZone.get\$_parentDelegate();\n" -" implementation.\$function.call\$5(implZone, t1, zone, error, stackTrace);\n" -" \$.Zone__current = currentZone;\n" +" if (B.C__RootZone === \$.Zone__current) {\n" +" f.call\$0();\n" +" return;\n" +" }\n" +" A._rootRun(null, null, this, f, type\$.void);\n" " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" -" \$.Zone__current = currentZone;\n" -" t1 = error === e ? stackTrace : s;\n" -" parentZone._handleUncaughtErrorZoned\$3(implZone, e, t1);\n" +" A._rootHandleError(A._asObject(e), type\$.StackTrace._as(s));\n" " }\n" " },\n" -" _forkZoned\$3(zone, specification, zoneValues) {\n" -" var implZone, t1,\n" -" implementation = this._forkFunction;\n" -" if (implementation == null)\n" -" return A._rootFork(zone, specification, zoneValues);\n" -" implZone = implementation.zone;\n" -" t1 = implZone.get\$_parentDelegate();\n" -" return implementation.\$function.call\$5(implZone, t1, zone, specification, zoneValues);\n" -" },\n" -" _runZoned\$1\$2(zone, callback, \$R) {\n" -" var oldZone, implementation, t1, implZone;\n" -" \$R._eval\$1(\"0()\")._as(callback);\n" -" implementation = this._runFunction;\n" -" if (implementation == null) {\n" -" t1 = \$.Zone__current;\n" -" if (t1 === zone)\n" -" return callback.call\$0();\n" -" oldZone = t1;\n" -" \$.Zone__current = zone;\n" -" try {\n" -" t1 = callback.call\$0();\n" -" return t1;\n" -" } finally {\n" -" \$.Zone__current = oldZone;\n" +" runUnaryGuarded\$1\$2(f, arg, \$T) {\n" +" var e, s, exception;\n" +" \$T._eval\$1(\"~(0)\")._as(f);\n" +" \$T._as(arg);\n" +" try {\n" +" if (B.C__RootZone === \$.Zone__current) {\n" +" f.call\$1(arg);\n" +" return;\n" " }\n" +" A._rootRunUnary(null, null, this, f, arg, type\$.void, \$T);\n" +" } catch (exception) {\n" +" e = A.unwrapException(exception);\n" +" s = A.getTraceFromException(exception);\n" +" A._rootHandleError(A._asObject(e), type\$.StackTrace._as(s));\n" " }\n" -" implZone = implementation.zone;\n" -" t1 = implZone.get\$_parentDelegate();\n" -" return implementation.\$function.call\$1\$4(implZone, t1, zone, callback, \$R);\n" " },\n" -" _runUnaryZoned\$2\$3(zone, callback, argument, \$R, \$T) {\n" -" var oldZone, implementation, t1, implZone;\n" -" \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(callback);\n" -" \$T._as(argument);\n" -" implementation = this._runUnaryFunction;\n" -" if (implementation == null) {\n" -" t1 = \$.Zone__current;\n" -" if (t1 === zone)\n" -" return callback.call\$1(argument);\n" -" oldZone = t1;\n" -" \$.Zone__current = zone;\n" -" try {\n" -" t1 = callback.call\$1(argument);\n" -" return t1;\n" -" } finally {\n" -" \$.Zone__current = oldZone;\n" +" runBinaryGuarded\$2\$3(f, arg1, arg2, \$T1, \$T2) {\n" +" var e, s, exception;\n" +" \$T1._eval\$1(\"@<0>\")._bind\$1(\$T2)._eval\$1(\"~(1,2)\")._as(f);\n" +" \$T1._as(arg1);\n" +" \$T2._as(arg2);\n" +" try {\n" +" if (B.C__RootZone === \$.Zone__current) {\n" +" f.call\$2(arg1, arg2);\n" +" return;\n" " }\n" +" A._rootRunBinary(null, null, this, f, arg1, arg2, type\$.void, \$T1, \$T2);\n" +" } catch (exception) {\n" +" e = A.unwrapException(exception);\n" +" s = A.getTraceFromException(exception);\n" +" A._rootHandleError(A._asObject(e), type\$.StackTrace._as(s));\n" " }\n" -" implZone = implementation.zone;\n" -" t1 = implZone.get\$_parentDelegate();\n" -" return implementation.\$function.call\$2\$5(implZone, t1, zone, callback, argument, \$R, \$T);\n" " },\n" -" _runBinaryZoned\$3\$4(zone, callback, argument1, argument2, \$R, \$T1, \$T2) {\n" -" var oldZone, implementation, t1, implZone;\n" -" \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(callback);\n" -" \$T1._as(argument1);\n" -" \$T2._as(argument2);\n" -" implementation = this._runBinaryFunction;\n" -" if (implementation == null) {\n" -" t1 = \$.Zone__current;\n" -" if (t1 === zone)\n" -" return callback.call\$2(argument1, argument2);\n" -" oldZone = t1;\n" -" \$.Zone__current = zone;\n" -" try {\n" -" t1 = callback.call\$2(argument1, argument2);\n" -" return t1;\n" -" } finally {\n" -" \$.Zone__current = oldZone;\n" -" }\n" -" }\n" -" implZone = implementation.zone;\n" -" t1 = implZone.get\$_parentDelegate();\n" -" return implementation.\$function.call\$3\$6(implZone, t1, zone, callback, argument1, argument2, \$R, \$T1, \$T2);\n" +" bindCallback\$1\$1(f, \$R) {\n" +" return new A._RootZone_bindCallback_closure(this, \$R._eval\$1(\"0()\")._as(f), \$R);\n" " },\n" -" _registerCallbackZoned\$1\$2(zone, callback, \$R) {\n" -" var implementation, implZone, t1;\n" -" \$R._eval\$1(\"0()\")._as(callback);\n" -" implementation = this._registerCallbackFunction;\n" -" if (implementation == null)\n" -" return callback;\n" -" implZone = implementation.zone;\n" -" t1 = implZone.get\$_parentDelegate();\n" -" return implementation.\$function.call\$1\$4(implZone, t1, zone, callback, \$R);\n" +" bindCallbackGuarded\$1(f) {\n" +" return new A._RootZone_bindCallbackGuarded_closure(this, type\$.void_Function._as(f));\n" " },\n" -" _registerUnaryCallbackZoned\$2\$2(zone, callback, \$R, \$T) {\n" -" var implementation, implZone, t1;\n" -" \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(callback);\n" -" implementation = this._registerUnaryCallbackFunction;\n" -" if (implementation == null)\n" -" return callback;\n" -" implZone = implementation.zone;\n" -" t1 = implZone.get\$_parentDelegate();\n" -" return implementation.\$function.call\$2\$4(implZone, t1, zone, callback, \$R, \$T);\n" +" bindUnaryCallbackGuarded\$1\$1(f, \$T) {\n" +" return new A._RootZone_bindUnaryCallbackGuarded_closure(this, \$T._eval\$1(\"~(0)\")._as(f), \$T);\n" " },\n" -" _registerBinaryCallbackZoned\$3\$2(zone, callback, \$R, \$T1, \$T2) {\n" -" var implementation, implZone, t1;\n" -" \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(callback);\n" -" implementation = this._registerBinaryCallbackFunction;\n" -" if (implementation == null)\n" -" return callback;\n" -" implZone = implementation.zone;\n" -" t1 = implZone.get\$_parentDelegate();\n" -" return implementation.\$function.call\$3\$4(implZone, t1, zone, callback, \$R, \$T1, \$T2);\n" +" handleUncaughtError\$2(error, stackTrace) {\n" +" A._rootHandleError(error, type\$.StackTrace._as(stackTrace));\n" " },\n" -" _errorCallbackZoned\$3(zone, error, stackTrace) {\n" -" var implZone, t1,\n" -" implementation = this._errorCallbackFunction;\n" -" if (implementation == null)\n" -" return null;\n" -" implZone = implementation.zone;\n" -" t1 = implZone.get\$_parentDelegate();\n" -" return implementation.\$function.call\$5(implZone, t1, zone, error, stackTrace);\n" +" fork\$2\$specification\$zoneValues(specification, zoneValues) {\n" +" return A._rootFork(null, null, this, specification, zoneValues);\n" " },\n" -" _scheduleMicrotaskZoned\$2(zone, callback) {\n" -" var implementation, implZone, t1;\n" -" type\$.void_Function._as(callback);\n" -" implementation = this._scheduleMicrotaskFunction;\n" -" if (implementation == null) {\n" -" A._rootScheduleMicrotask(zone, callback);\n" -" return;\n" -" }\n" -" implZone = implementation.zone;\n" -" t1 = implZone.get\$_parentDelegate();\n" -" implementation.\$function.call\$4(implZone, t1, zone, callback);\n" +" run\$1\$1(f, \$R) {\n" +" \$R._eval\$1(\"0()\")._as(f);\n" +" if (\$.Zone__current === B.C__RootZone)\n" +" return f.call\$0();\n" +" return A._rootRun(null, null, this, f, \$R);\n" " },\n" -" _createTimerZoned\$3(zone, duration, callback) {\n" -" var implementation, implZone, t1;\n" -" type\$.void_Function._as(callback);\n" -" implementation = this._createTimerFunction;\n" -" if (implementation == null)\n" -" return A.Timer__createTimer(duration, B.Zone_jYP !== zone ? zone.bindCallback\$1\$1(callback, type\$.void) : callback);\n" -" implZone = implementation.zone;\n" -" t1 = implZone.get\$_parentDelegate();\n" -" return implementation.\$function.call\$5(implZone, t1, zone, duration, callback);\n" +" runUnary\$2\$2(f, arg, \$R, \$T) {\n" +" \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(f);\n" +" \$T._as(arg);\n" +" if (\$.Zone__current === B.C__RootZone)\n" +" return f.call\$1(arg);\n" +" return A._rootRunUnary(null, null, this, f, arg, \$R, \$T);\n" +" },\n" +" runBinary\$3\$3(f, arg1, arg2, \$R, \$T1, \$T2) {\n" +" \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(f);\n" +" \$T1._as(arg1);\n" +" \$T2._as(arg2);\n" +" if (\$.Zone__current === B.C__RootZone)\n" +" return f.call\$2(arg1, arg2);\n" +" return A._rootRunBinary(null, null, this, f, arg1, arg2, \$R, \$T1, \$T2);\n" +" },\n" +" registerCallback\$1\$1(f, \$R) {\n" +" return \$R._eval\$1(\"0()\")._as(f);\n" +" },\n" +" registerUnaryCallback\$2\$1(f, \$R, \$T) {\n" +" return \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(f);\n" +" },\n" +" registerBinaryCallback\$3\$1(f, \$R, \$T1, \$T2) {\n" +" return \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(f);\n" +" },\n" +" errorCallback\$2(error, stackTrace) {\n" +" return null;\n" +" },\n" +" scheduleMicrotask\$1(f) {\n" +" A._rootScheduleMicrotask(null, null, this, type\$.void_Function._as(f));\n" +" },\n" +" createTimer\$2(duration, f) {\n" +" return A.Timer__createTimer(duration, type\$.void_Function._as(f));\n" " }\n" " };\n" -" A.Zone_bindCallback_closure.prototype = {\n" +" A._RootZone_bindCallback_closure.prototype = {\n" " call\$0() {\n" -" var t1 = this.\$this;\n" -" return t1._runZoned\$1\$2(t1, this.registered, this.R);\n" +" return this.\$this.run\$1\$1(this.f, this.R);\n" " },\n" " \$signature() {\n" " return this.R._eval\$1(\"0()\");\n" " }\n" " };\n" -" A.Zone_bindCallbackGuarded_closure.prototype = {\n" +" A._RootZone_bindCallbackGuarded_closure.prototype = {\n" " call\$0() {\n" -" return this.\$this.runGuarded\$1(this.registered);\n" +" return this.\$this.runGuarded\$1(this.f);\n" " },\n" " \$signature: 0\n" " };\n" -" A.Zone_bindUnaryCallbackGuarded_closure.prototype = {\n" -" call\$1(argument) {\n" +" A._RootZone_bindUnaryCallbackGuarded_closure.prototype = {\n" +" call\$1(arg) {\n" " var t1 = this.T;\n" -" return this.\$this.runUnaryGuarded\$1\$2(this.registered, t1._as(argument), t1);\n" +" return this.\$this.runUnaryGuarded\$1\$2(this.f, t1._as(arg), t1);\n" " },\n" " \$signature() {\n" " return this.T._eval\$1(\"~(0)\");\n" " }\n" " };\n" -" A.runZonedGuarded_errorHandler.prototype = {\n" +" A.runZonedGuarded_closure.prototype = {\n" " call\$5(\$self, \$parent, zone, error, stackTrace) {\n" -" var e, s, t1, exception, t2;\n" +" var e, s, exception, t1;\n" " try {\n" -" t1 = this.parentZone;\n" -" t1._runBinaryZoned\$3\$4(t1, type\$.void_Function_Object_StackTrace._as(this.onError), error, stackTrace, type\$.void, type\$.Object, type\$.StackTrace);\n" +" this.parentZone.runBinary\$3\$3(this.onError, error, stackTrace, type\$.void, type\$.Object, type\$.StackTrace);\n" " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" -" t1 = e === error ? stackTrace : s;\n" -" t2 = A._asObject(e);\n" -" type\$.StackTrace._as(t1);\n" -" \$parent._zone._handleUncaughtErrorZoned\$3(zone, t2, t1);\n" +" t1 = \$parent._delegationTarget;\n" +" if (e === error)\n" +" t1._processUncaughtError\$3(zone, error, stackTrace);\n" +" else\n" +" t1._processUncaughtError\$3(zone, A._asObject(e), type\$.StackTrace._as(s));\n" " }\n" " },\n" -" \$signature: 32\n" +" \$signature: 42\n" " };\n" -" A.ZoneDelegate.prototype = {};\n" -" A._rootHandleUncaughtError_closure.prototype = {\n" +" A._ZoneDelegate.prototype = {\$isZoneDelegate: 1};\n" +" A._rootHandleError_closure.prototype = {\n" " call\$0() {\n" " A.Error_throwWithStackTrace(this.error, this.stackTrace);\n" " },\n" @@ -13679,7 +14284,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(v) {\n" " return this.K._is(v);\n" " },\n" -" \$signature: 41\n" +" \$signature: 44\n" " };\n" " A._HashSet.prototype = {\n" " get\$iterator(_) {\n" @@ -13902,6 +14507,21 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " take\$1(receiver, count) {\n" " return A.SubListIterable\$(receiver, 0, A.checkNotNullable(count, \"count\", type\$.int), A.instanceType(receiver)._eval\$1(\"ListBase.E\"));\n" " },\n" +" toList\$1\$growable(receiver, growable) {\n" +" var t1, first, result, i, _this = this;\n" +" if (_this.get\$isEmpty(receiver)) {\n" +" t1 = J.JSArray_JSArray\$growable(0, A.instanceType(receiver)._eval\$1(\"ListBase.E\"));\n" +" return t1;\n" +" }\n" +" first = _this.\$index(receiver, 0);\n" +" result = A.List_List\$filled(_this.get\$length(receiver), first, true, A.instanceType(receiver)._eval\$1(\"ListBase.E\"));\n" +" for (i = 1; i < _this.get\$length(receiver); ++i)\n" +" B.JSArray_methods.\$indexSet(result, i, _this.\$index(receiver, i));\n" +" return result;\n" +" },\n" +" toList\$0(receiver) {\n" +" return this.toList\$1\$growable(receiver, true);\n" +" },\n" " add\$1(receiver, element) {\n" " var t1;\n" " A.instanceType(receiver)._eval\$1(\"ListBase.E\")._as(element);\n" @@ -14524,6 +15144,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " containsKey\$1(key) {\n" " if (this._processed == null)\n" " return this._data.containsKey\$1(key);\n" +" if (typeof key != \"string\")\n" +" return false;\n" " return Object.prototype.hasOwnProperty.call(this._original, key);\n" " },\n" " forEach\$1(_, f) {\n" @@ -14577,10 +15199,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._JsonMapKeyIterable.prototype = {\n" " get\$length(_) {\n" -" return this._convert\$_parent.get\$length(0);\n" +" return this._parent.get\$length(0);\n" " },\n" " elementAt\$1(_, index) {\n" -" var t1 = this._convert\$_parent;\n" +" var t1 = this._parent;\n" " if (t1._processed == null)\n" " t1 = t1.get\$keys().elementAt\$1(0, index);\n" " else {\n" @@ -14592,7 +15214,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return t1;\n" " },\n" " get\$iterator(_) {\n" -" var t1 = this._convert\$_parent;\n" +" var t1 = this._parent;\n" " if (t1._processed == null) {\n" " t1 = t1.get\$keys();\n" " t1 = t1.get\$iterator(t1);\n" @@ -14603,7 +15225,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return t1;\n" " },\n" " contains\$1(_, key) {\n" -" return this._convert\$_parent.containsKey\$1(key);\n" +" return this._parent.containsKey\$1(key);\n" " }\n" " };\n" " A._Utf8Decoder__decoder_closure.prototype = {\n" @@ -15811,7 +16433,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$2(msg, position) {\n" " throw A.wrapException(A.FormatException\$(\"Illegal IPv6 address, \" + msg, this.host, position));\n" " },\n" -" \$signature: 53\n" +" \$signature: 56\n" " };\n" " A._Uri.prototype = {\n" " get\$_text() {\n" @@ -16111,7 +16733,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(s) {\n" " return A._Uri__uriEncode(64, A._asString(s), B.C_Utf8Codec, false);\n" " },\n" -" \$signature: 9\n" +" \$signature: 10\n" " };\n" " A.UriData.prototype = {\n" " get\$uri() {\n" @@ -16451,7 +17073,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t1.call(t1, value);\n" " return value;\n" " },\n" -" \$signature: 10\n" +" \$signature: 11\n" " };\n" " A.FutureOfJSAnyToJSPromise_get_toJS__closure0.prototype = {\n" " call\$2(error, stackTrace) {\n" @@ -16469,7 +17091,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t1.call(t1, wrapper);\n" " return wrapper;\n" " },\n" -" \$signature: 61\n" +" \$signature: 68\n" " };\n" " A.FutureOfVoidToJSPromise_get_toJS_closure.prototype = {\n" " call\$2(resolve, reject) {\n" @@ -16483,7 +17105,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " var t1 = this.resolve;\n" " return t1.call(t1);\n" " },\n" -" \$signature: 67\n" +" \$signature: 74\n" " };\n" " A.FutureOfVoidToJSPromise_get_toJS__closure0.prototype = {\n" " call\$2(error, stackTrace) {\n" @@ -16526,13 +17148,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " } else\n" " return o;\n" " },\n" -" \$signature: 10\n" +" \$signature: 11\n" " };\n" " A.promiseToFuture_closure.prototype = {\n" " call\$1(r) {\n" " return this.completer.complete\$1(this.T._eval\$1(\"0/?\")._as(r));\n" " },\n" -" \$signature: 4\n" +" \$signature: 5\n" " };\n" " A.promiseToFuture_closure0.prototype = {\n" " call\$1(e) {\n" @@ -16540,7 +17162,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return this.completer.completeError\$1(new A.NullRejectionException(e === undefined));\n" " return this.completer.completeError\$1(e);\n" " },\n" -" \$signature: 4\n" +" \$signature: 5\n" " };\n" " A.dartify_convert.prototype = {\n" " call\$1(o) {\n" @@ -16592,7 +17214,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " return o;\n" " },\n" -" \$signature: 10\n" +" \$signature: 11\n" " };\n" " A._JSRandom.prototype = {\n" " nextInt\$1(max) {\n" @@ -17008,13 +17630,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(e) {\n" " return type\$.BuildStatus._as(e)._name === this.json;\n" " },\n" -" \$signature: 29\n" +" \$signature: 75\n" " };\n" " A.BuildStatus_BuildStatus\$fromJson_closure0.prototype = {\n" " call\$0() {\n" " throw A.wrapException(A.ArgumentError\$(\"Unknown BuildStatus: \" + this.json, null));\n" " },\n" -" \$signature: 74\n" +" \$signature: 89\n" " };\n" " A.BuildResult.prototype = {\n" " toJson\$0() {\n" @@ -17090,7 +17712,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(e) {\n" " return type\$.DebugEvent._as(e).toJson\$0();\n" " },\n" -" \$signature: 75\n" +" \$signature: 90\n" " };\n" " A.DebugInfo.prototype = {\n" " toJson\$0() {\n" @@ -17503,14 +18125,14 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(o) {\n" " return J.toString\$0\$(o);\n" " },\n" -" \$signature: 30\n" +" \$signature: 29\n" " };\n" " A.PersistentWebSocket.prototype = {\n" " get\$_incomingStreamController() {\n" " var result, _this = this,\n" " value = _this.__PersistentWebSocket__incomingStreamController_FI;\n" " if (value === \$) {\n" -" result = A.StreamController_StreamController(type\$.dynamic);\n" +" result = A.StreamController_StreamController(null, null, null, type\$.dynamic);\n" " result.set\$onListen(_this.get\$_listenWithRetry());\n" " _this.__PersistentWebSocket__incomingStreamController_FI !== \$ && A.throwLateFieldADI(\"_incomingStreamController\");\n" " _this.__PersistentWebSocket__incomingStreamController_FI = result;\n" @@ -17680,9 +18302,9 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(socket) {\n" " var _this = this;\n" " type\$.WebSocket._as(socket);\n" -" return new A.PersistentWebSocket(_this.logger, _this.debugName, _this.maxRetryAttempts, new A._AsyncCompleter(new A._Future(\$.Zone__current, type\$._Future_void), type\$._AsyncCompleter_void), _this.uri, _this.onReconnect, socket, A.StreamController_StreamController(type\$.dynamic));\n" +" return new A.PersistentWebSocket(_this.logger, _this.debugName, _this.maxRetryAttempts, new A._AsyncCompleter(new A._Future(\$.Zone__current, type\$._Future_void), type\$._AsyncCompleter_void), _this.uri, _this.onReconnect, socket, A.StreamController_StreamController(null, null, null, type\$.dynamic));\n" " },\n" -" \$signature: 31\n" +" \$signature: 32\n" " };\n" " A.PersistentWebSocket__listenWithRetry_attemptRetry.prototype = {\n" " call\$1(message) {\n" @@ -17776,7 +18398,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " });\n" " return A._asyncStartSync(\$async\$call\$1, \$async\$completer);\n" " },\n" -" \$signature: 33\n" +" \$signature: 34\n" " };\n" " A._PersistentWebSocket_Object_StreamChannelMixin.prototype = {};\n" " A.safeUnawaited_closure.prototype = {\n" @@ -17785,7 +18407,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: 7\n" +" \$signature: 6\n" " };\n" " A.Uuid.prototype = {\n" " v4\$0() {\n" @@ -17854,13 +18476,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$2(key1, key2) {\n" " return A._asString(key1).toLowerCase() === A._asString(key2).toLowerCase();\n" " },\n" -" \$signature: 34\n" +" \$signature: 35\n" " };\n" " A.BaseRequest_closure0.prototype = {\n" " call\$1(key) {\n" " return B.JSString_methods.get\$hashCode(A._asString(key).toLowerCase());\n" " },\n" -" \$signature: 35\n" +" \$signature: 36\n" " };\n" " A.BaseResponse.prototype = {\n" " BaseResponse\$7\$contentLength\$headers\$isRedirect\$persistentConnection\$reasonPhrase\$request(statusCode, contentLength, headers, isRedirect, persistentConnection, reasonPhrase, request) {\n" @@ -17955,7 +18577,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }(A._callDartFunctionFast3, t2);\n" " result[\$.\$get\$DART_CLOSURE_DART_JSINTEROP_PROPERTY_NAME()] = t2;\n" " t1.forEach(result);\n" -" t1 = A._bodyToStream(request, response);\n" +" t1 = A._readBody(request, response);\n" " t2 = A._asInt(response.status);\n" " t4 = headers;\n" " t5 = contentLength0;\n" @@ -18014,77 +18636,20 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$2(value, header) {\n" " return this.call\$3(value, header, null);\n" " },\n" -" \$signature: 36\n" -" };\n" -" A._bodyToStream_closure.prototype = {\n" -" call\$1(listener) {\n" -" return A._readStreamBody(this.request, this.response, type\$.MultiStreamController_List_int._as(listener));\n" -" },\n" " \$signature: 37\n" " };\n" -" A._readStreamBody_closure.prototype = {\n" -" call\$0() {\n" -" var t1 = this._box_0,\n" -" _0_0 = t1.resumeSignal;\n" -" if (_0_0 != null) {\n" -" t1.resumeSignal = null;\n" -" _0_0.complete\$0();\n" -" }\n" +" A._readBody_closure.prototype = {\n" +" call\$1(_) {\n" +" return null;\n" " },\n" -" \$signature: 0\n" +" \$signature: 4\n" " };\n" -" A._readStreamBody_closure0.prototype = {\n" -" call\$0() {\n" -" var \$async\$goto = 0,\n" -" \$async\$completer = A._makeAsyncAwaitCompleter(type\$.void),\n" -" \$async\$handler = 1, \$async\$errorStack = [], \$async\$self = this, e, s, exception, \$async\$exception;\n" -" var \$async\$call\$0 = A._wrapJsFunctionForAsync(function(\$async\$errorCode, \$async\$result) {\n" -" if (\$async\$errorCode === 1) {\n" -" \$async\$errorStack.push(\$async\$result);\n" -" \$async\$goto = \$async\$handler;\n" -" }\n" -" for (;;)\n" -" switch (\$async\$goto) {\n" -" case 0:\n" -" // Function start\n" -" \$async\$handler = 3;\n" -" \$async\$self._box_0.cancelled = true;\n" -" \$async\$goto = 6;\n" -" return A._asyncAwait(A.promiseToFuture(A._asJSObject(\$async\$self.reader.cancel()), type\$.nullable_Object), \$async\$call\$0);\n" -" case 6:\n" -" // returning from await.\n" -" \$async\$handler = 1;\n" -" // goto after finally\n" -" \$async\$goto = 5;\n" -" break;\n" -" case 3:\n" -" // catch\n" -" \$async\$handler = 2;\n" -" \$async\$exception = \$async\$errorStack.pop();\n" -" e = A.unwrapException(\$async\$exception);\n" -" s = A.getTraceFromException(\$async\$exception);\n" -" if (!\$async\$self._box_0.hadError)\n" -" A._rethrowAsClientException(e, s, \$async\$self.request);\n" -" // goto after finally\n" -" \$async\$goto = 5;\n" -" break;\n" -" case 2:\n" -" // uncaught\n" -" // goto rethrow\n" -" \$async\$goto = 1;\n" -" break;\n" -" case 5:\n" -" // after finally\n" -" // implicit return\n" -" return A._asyncReturn(null, \$async\$completer);\n" -" case 1:\n" -" // rethrow\n" -" return A._asyncRethrow(\$async\$errorStack.at(-1), \$async\$completer);\n" -" }\n" -" });\n" -" return A._asyncStartSync(\$async\$call\$0, \$async\$completer);\n" +" A._readBody_closure0.prototype = {\n" +" call\$1(_) {\n" +" A._asObject(_);\n" +" return this._box_0.isError;\n" " },\n" -" \$signature: 6\n" +" \$signature: 38\n" " };\n" " A.ByteStream.prototype = {\n" " toBytes\$0() {\n" @@ -18099,7 +18664,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(bytes) {\n" " return this.completer.complete\$1(new Uint8Array(A._ensureNativeList(type\$.List_int._as(bytes))));\n" " },\n" -" \$signature: 38\n" +" \$signature: 39\n" " };\n" " A.ClientException.prototype = {\n" " toString\$0(_) {\n" @@ -18187,7 +18752,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " scanner.expectDone\$0();\n" " return A.MediaType\$(t4, t5, parameters);\n" " },\n" -" \$signature: 39\n" +" \$signature: 40\n" " };\n" " A.MediaType_toString_closure.prototype = {\n" " call\$2(attribute, value) {\n" @@ -18206,7 +18771,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " } else\n" " t1._contents = t3 + value;\n" " },\n" -" \$signature: 40\n" +" \$signature: 41\n" " };\n" " A.MediaType_toString__closure.prototype = {\n" " call\$1(match) {\n" @@ -18309,7 +18874,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " \$parent._children.\$indexSet(0, thisName, t1);\n" " return t1;\n" " },\n" -" \$signature: 42\n" +" \$signature: 43\n" " };\n" " A.Context.prototype = {\n" " absolute\$15(part1, part2, part3, part4, part5, part6, part7, part8, part9, part10, part11, part12, part13, part14, part15) {\n" @@ -18556,7 +19121,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " A._asStringQ(arg);\n" " return arg == null ? \"null\" : '\"' + arg + '\"';\n" " },\n" -" \$signature: 44\n" +" \$signature: 45\n" " };\n" " A.InternalStyle.prototype = {\n" " getRoot\$1(path) {\n" @@ -19010,7 +19575,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " var t1 = this.\$this;\n" " t1._onReleaseCompleters.removeFirst\$0().complete\$1(new A.PoolResource(t1));\n" " },\n" -" \$signature: 45\n" +" \$signature: 46\n" " };\n" " A.Pool__runOnRelease_closure0.prototype = {\n" " call\$2(error, stackTrace) {\n" @@ -19028,27 +19593,23 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " get\$lines() {\n" " return this._lineStarts.length;\n" " },\n" -" SourceFile\$_fromList\$2\$url(decodedChars, url) {\n" -" var t1, t2, t3, t4, t5, t6, i, c, j, t7;\n" -" for (t1 = this._decodedChars, t2 = t1.length, t3 = decodedChars.__internal\$_string, t4 = t3.length, t5 = t1.\$flags | 0, t6 = this._lineStarts, i = 0; i < t2; ++i) {\n" -" if (!(i < t4))\n" -" return A.ioore(t3, i);\n" -" c = t3.charCodeAt(i);\n" -" t5 & 2 && A.throwUnsupportedOperation(t1);\n" -" t1[i] = c;\n" +" SourceFile\$decoded\$2\$url(decodedChars, url) {\n" +" var t1, t2, t3, i, c, j, t4;\n" +" for (t1 = this._decodedChars, t2 = t1.length, t3 = this._lineStarts, i = 0; i < t2; ++i) {\n" +" c = t1[i];\n" " if (c === 13) {\n" " j = i + 1;\n" -" if (j < t4) {\n" -" if (!(j < t4))\n" -" return A.ioore(t3, j);\n" -" t7 = t3.charCodeAt(j) !== 10;\n" +" if (j < t2) {\n" +" if (!(j < t2))\n" +" return A.ioore(t1, j);\n" +" t4 = t1[j] !== 10;\n" " } else\n" -" t7 = true;\n" -" if (t7)\n" +" t4 = true;\n" +" if (t4)\n" " c = 10;\n" " }\n" " if (c === 10)\n" -" B.JSArray_methods.add\$1(t6, i + 1);\n" +" B.JSArray_methods.add\$1(t3, i + 1);\n" " }\n" " },\n" " getLine\$1(offset) {\n" @@ -19454,7 +20015,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$0() {\n" " return this.color;\n" " },\n" -" \$signature: 46\n" +" \$signature: 47\n" " };\n" " A.Highlighter\$__closure.prototype = {\n" " call\$1(line) {\n" @@ -19462,7 +20023,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t2 = A._arrayInstanceType(t1);\n" " return new A.WhereIterable(t1, t2._eval\$1(\"bool(1)\")._as(new A.Highlighter\$___closure()), t2._eval\$1(\"WhereIterable<1>\")).get\$length(0);\n" " },\n" -" \$signature: 47\n" +" \$signature: 48\n" " };\n" " A.Highlighter\$___closure.prototype = {\n" " call\$1(highlight) {\n" @@ -19475,21 +20036,21 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(line) {\n" " return type\$._Line._as(line).url;\n" " },\n" -" \$signature: 49\n" +" \$signature: 50\n" " };\n" " A.Highlighter__collateLines_closure.prototype = {\n" " call\$1(highlight) {\n" " var t1 = type\$._Highlight._as(highlight).span.get\$sourceUrl();\n" " return t1 == null ? new A.Object() : t1;\n" " },\n" -" \$signature: 50\n" +" \$signature: 51\n" " };\n" " A.Highlighter__collateLines_closure0.prototype = {\n" " call\$2(highlight1, highlight2) {\n" " var t1 = type\$._Highlight;\n" " return t1._as(highlight1).span.compareTo\$1(0, t1._as(highlight2).span);\n" " },\n" -" \$signature: 51\n" +" \$signature: 52\n" " };\n" " A.Highlighter__collateLines_closure1.prototype = {\n" " call\$1(entry) {\n" @@ -19532,7 +20093,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " return lines;\n" " },\n" -" \$signature: 78\n" +" \$signature: 53\n" " };\n" " A.Highlighter__collateLines__closure.prototype = {\n" " call\$1(highlight) {\n" @@ -19699,7 +20260,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " return A._Highlight__normalizeEndOfLine(A._Highlight__normalizeTrailingNewline(A._Highlight__normalizeNewlines(newSpan)));\n" " },\n" -" \$signature: 54\n" +" \$signature: 55\n" " };\n" " A._Line.prototype = {\n" " toString\$0(_) {\n" @@ -19912,18 +20473,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _this._outgoingController.close\$0();\n" " },\n" " _closeWithError\$1(error) {\n" -" var _0_0, error0, stackTrace, t2,\n" -" t1 = this._incomingController;\n" -" if (t1._state >= 4)\n" -" A.throwExpression(t1._badEventState\$0());\n" -" _0_0 = A._interceptUserError(error, null);\n" -" error0 = _0_0.error;\n" -" stackTrace = _0_0.stackTrace;\n" -" t2 = t1._state;\n" -" if ((t2 & 1) !== 0)\n" -" t1._sendError\$2(error0, stackTrace);\n" -" else if ((t2 & 3) === 0)\n" -" t1._ensurePendingEvents\$0().add\$1(0, new A._DelayedError(error0, stackTrace));\n" +" var t1;\n" +" this._incomingController.addError\$1(error);\n" " this.close\$0();\n" " t1 = this._onConnected;\n" " if ((t1.future._state & 30) === 0)\n" @@ -20077,7 +20628,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " });\n" " return A._asyncStartSync(\$async\$call\$0, \$async\$completer);\n" " },\n" -" \$signature: 57\n" +" \$signature: 58\n" " };\n" " A.StreamChannelMixin.prototype = {};\n" " A.StringScannerException.prototype = {\n" @@ -20124,7 +20675,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this._fail\$1(\"no more input\");\n" " },\n" " error\$3\$length\$position(message, \$length, position) {\n" -" var t2, t3, end, sourceFile, end0,\n" +" var t2, t3, t4, t5, sourceFile, end,\n" " t1 = this.string;\n" " if (position < 0)\n" " A.throwExpression(A.RangeError\$(\"position must be greater than or equal to 0.\"));\n" @@ -20134,16 +20685,17 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " if (t2)\n" " A.throwExpression(A.RangeError\$(\"position plus length must not go beyond the end of the string.\"));\n" " t2 = this.sourceUrl;\n" -" t3 = A._setArrayType([0], type\$.JSArray_int);\n" -" end = t1.length;\n" -" sourceFile = new A.SourceFile(t2, t3, new Uint32Array(end));\n" -" sourceFile.SourceFile\$_fromList\$2\$url(new A.CodeUnits(t1), t2);\n" -" end0 = position + \$length;\n" -" if (end0 > end)\n" -" A.throwExpression(A.RangeError\$(\"End \" + end0 + string\$.x20must_ + sourceFile.get\$length(0) + \".\"));\n" +" t3 = new A.CodeUnits(t1);\n" +" t4 = A._setArrayType([0], type\$.JSArray_int);\n" +" t5 = new Uint32Array(A._ensureNativeList(t3.toList\$0(t3)));\n" +" sourceFile = new A.SourceFile(t2, t4, t5);\n" +" sourceFile.SourceFile\$decoded\$2\$url(t3, t2);\n" +" end = position + \$length;\n" +" if (end > t5.length)\n" +" A.throwExpression(A.RangeError\$(\"End \" + end + string\$.x20must_ + sourceFile.get\$length(0) + \".\"));\n" " else if (position < 0)\n" " A.throwExpression(A.RangeError\$(\"Start may not be negative, was \" + position + \".\"));\n" -" throw A.wrapException(new A.StringScannerException(t1, message, new A._FileSpan(sourceFile, position, end0)));\n" +" throw A.wrapException(new A.StringScannerException(t1, message, new A._FileSpan(sourceFile, position, end)));\n" " },\n" " _fail\$1(\$name) {\n" " this.error\$3\$length\$position(\"expected \" + \$name + \".\", 0, this._string_scanner\$_position);\n" @@ -20449,8 +21001,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " 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" -" t5 = A.StreamController_StreamController(type\$.List_DebugEvent);\n" +" t4 = A.StreamController_StreamController(null, null, null, type\$.DebugEvent);\n" +" t5 = A.StreamController_StreamController(null, null, null, type\$.List_DebugEvent);\n" " debugEventController = new A.BatchedStreamController(t3, 1000, t4, t5, new A._AsyncCompleter(new A._Future(t2, type\$._Future_bool), type\$._AsyncCompleter_bool), type\$.BatchedStreamController_DebugEvent);\n" " t2 = A.List_List\$filled(A.QueueList__computeInitialCapacity(null), null, false, type\$.nullable_Result_DebugEvent);\n" " t3 = A.ListQueue\$(type\$._EventRequest_dynamic);\n" @@ -20472,29 +21024,25 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " });\n" " return A._asyncStartSync(\$async\$call\$0, \$async\$completer);\n" " },\n" -" \$signature: 6\n" +" \$signature: 9\n" " };\n" " A.main__closure.prototype = {\n" " call\$0() {\n" -" var path = A._asStringQ(init.G.\$reloadedSourcesPath);\n" -" path.toString;\n" -" return A.FutureOfJSAnyToJSPromise_get_toJS(this.manager._restarter.hotReloadStart\$1(path), type\$.JSArray_nullable_Object);\n" +" return A.FutureOfJSAnyToJSPromise_get_toJS(this.manager._restarter.hotReloadStart\$1(A._asStringQ(init.G.\$reloadedSourcesPath)), type\$.JSArray_nullable_Object);\n" " },\n" -" \$signature: 5\n" +" \$signature: 7\n" " };\n" " A.main__closure0.prototype = {\n" " call\$0() {\n" " return A.FutureOfVoidToJSPromise_get_toJS(this.manager.hotReloadEnd\$0());\n" " },\n" -" \$signature: 5\n" +" \$signature: 7\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" +" return A.FutureOfJSAnyToJSPromise_get_toJS(this.manager.hotRestartBegin\$1(A._asStringQ(init.G.\$reloadedSourcesPath)), type\$.JSArray_nullable_Object);\n" " },\n" -" \$signature: 5\n" +" \$signature: 7\n" " };\n" " A.main__closure2.prototype = {\n" " call\$2(runId, pauseIsolatesOnStart) {\n" @@ -20514,7 +21062,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(runId) {\n" " return this.call\$2(runId, null);\n" " },\n" -" \$signature: 60\n" +" \$signature: 92\n" " };\n" " A.main__closure3.prototype = {\n" " call\$1(runId) {\n" @@ -20544,7 +21092,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " if (A._asBool(init.G.\$dartEmitDebugEvents))\n" " A._trySendEvent(this.client.get\$sink(), B.C_JsonCodec.encode\$2\$toEncodable(A._setArrayType([\"BatchedDebugEvents\", new A.BatchedDebugEvents(events).toJson\$0()], type\$.JSArray_Object), null), type\$.dynamic);\n" " },\n" -" \$signature: 62\n" +" \$signature: 63\n" " };\n" " A.main__closure6.prototype = {\n" " call\$2(kind, eventData) {\n" @@ -20556,7 +21104,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " A._trySendEvent(new A._StreamSinkWrapper(t1, A._instanceType(t1)._eval\$1(\"_StreamSinkWrapper<1>\")), new A.DebugEvent(kind, eventData, Date.now()), type\$.DebugEvent);\n" " }\n" " },\n" -" \$signature: 63\n" +" \$signature: 64\n" " };\n" " A.main__closure7.prototype = {\n" " call\$1(eventData) {\n" @@ -20588,7 +21136,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, t3, path, \$alert, \$event;\n" +" \$async\$self = this, t1, t2, \$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" @@ -20621,10 +21169,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " 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" +" return A._asyncAwait(t2.hotRestartBegin\$1(A._asStringQ(t1.\$reloadedSourcesPath)), \$async\$call\$1);\n" " case 14:\n" " // returning from await.\n" " type\$.TwoPhaseRestarter._as(t2._restarter);\n" @@ -20650,10 +21196,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " case 16:\n" " // then\n" " t2 = \$async\$self.manager;\n" -" path = A._asStringQ(t1.\$reloadedSourcesPath);\n" -" path.toString;\n" " \$async\$goto = 18;\n" -" return A._asyncAwait(t2._restarter.hotReloadStart\$1(path), \$async\$call\$1);\n" +" return A._asyncAwait(t2._restarter.hotReloadStart\$1(A._asStringQ(t1.\$reloadedSourcesPath)), \$async\$call\$1);\n" " case 18:\n" " // returning from await.\n" " \$async\$goto = 19;\n" @@ -20772,7 +21316,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " A.main__closure10.prototype = {\n" " call\$1(error) {\n" " },\n" -" \$signature: 8\n" +" \$signature: 4\n" " };\n" " A.main__closure11.prototype = {\n" " call\$1(e) {\n" @@ -20791,25 +21335,25 @@ 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: 7\n" +" \$signature: 6\n" " };\n" " A._handleAuthRequest_closure.prototype = {\n" " call\$1(isAuthenticated) {\n" " return A._dispatchEvent(\"dart-auth-response\", \"\" + A._asBool(isAuthenticated));\n" " },\n" -" \$signature: 64\n" +" \$signature: 65\n" " };\n" " A._sendHotReloadResponse_closure.prototype = {\n" " call\$3(id, success, errorMessage) {\n" " return new A.HotReloadResponse(id, success, errorMessage);\n" " },\n" -" \$signature: 65\n" +" \$signature: 66\n" " };\n" " A._sendHotRestartResponse_closure.prototype = {\n" " call\$3(id, success, errorMessage) {\n" " return new A.HotRestartResponse(id, success, errorMessage);\n" " },\n" -" \$signature: 66\n" +" \$signature: 67\n" " };\n" " A.DdcLibraryBundleRestarter.prototype = {\n" " _runMainWhenReady\$2(readyToRunMain, runMain) {\n" @@ -20928,6 +21472,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return A._asyncAwait(A._Debugger_maybeInvokeFlutterDisassemble(A._asJSObject(A._asJSObject(t1.dartDevEmbedder).debugger)), \$async\$hotRestartBegin\$1);\n" " case 3:\n" " // returning from await.\n" +" reloadedSourcesPath.toString;\n" " t2 = type\$.JSArray_nullable_Object;\n" " \$async\$temp1 = t2;\n" " \$async\$temp2 = A;\n" @@ -20954,7 +21499,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " hotReloadStart\$1(reloadedSourcesPath) {\n" " var \$async\$goto = 0,\n" " \$async\$completer = A._makeAsyncAwaitCompleter(type\$.JSArray_nullable_Object),\n" -" \$async\$returnValue, \$async\$self = this, t3, t4, t5, t6, srcModuleLibraryCast, src, libraries, t7, t8, t9, t1, t2, filesToLoad, librariesToReload, srcModuleLibraries;\n" +" \$async\$returnValue, \$async\$self = this, srcModuleLibraries, t3, t4, t5, t6, srcModuleLibraryCast, src, libraries, t7, t8, t9, result, t1, t2, filesToLoad, librariesToReload;\n" " var \$async\$hotReloadStart\$1 = A._wrapJsFunctionForAsync(function(\$async\$errorCode, \$async\$result) {\n" " if (\$async\$errorCode === 1)\n" " return A._asyncRethrow(\$async\$result, \$async\$completer);\n" @@ -20966,6 +21511,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t2 = type\$.JSArray_nullable_Object;\n" " filesToLoad = t2._as(new t1.Array());\n" " librariesToReload = t2._as(new t1.Array());\n" +" reloadedSourcesPath.toString;\n" " \$async\$goto = 3;\n" " return A._asyncAwait(\$async\$self._getSrcModuleLibraries\$1(reloadedSourcesPath), \$async\$hotReloadStart\$1);\n" " case 3:\n" @@ -20988,6 +21534,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return A._asyncAwait(A.promiseToFuture(A._asJSObject(A._asJSObject(t1.dartDevEmbedder).hotReload(filesToLoad, librariesToReload)), type\$.nullable_Object), \$async\$hotReloadStart\$1);\n" " case 4:\n" " // returning from await.\n" +" result = \$async\$result;\n" +" A._asJSObject(A._asJSObject(A._asJSObject(t1.dartDevEmbedder).debugger).invokeExtension(\"ext.dwds.sendEvent\", '{\"type\": \"hotReloadResult\", \"result\": \"' + A.S(result) + '\"}'));\n" +" if (result != null && typeof result === \"boolean\" && !A._asBool(result))\n" +" throw A.wrapException(A.Exception_Exception(\"Hot reload rejected by DDC\"));\n" " \$async\$returnValue = t2._as(A.jsify(srcModuleLibraries));\n" " // goto return\n" " \$async\$goto = 1;\n" @@ -21154,10 +21704,45 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return A._asyncStartSync(\$async\$restart\$3\$readyToRunMain\$reloadedSourcesPath\$runId, \$async\$completer);\n" " },\n" " hotReloadEnd\$0() {\n" -" return A.throwExpression(A.UnimplementedError\$(string\$.Hot_reD));\n" +" var \$async\$goto = 0,\n" +" \$async\$completer = A._makeAsyncAwaitCompleter(type\$.void);\n" +" var \$async\$hotReloadEnd\$0 = 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" +" // implicit return\n" +" return A._asyncReturn(null, \$async\$completer);\n" +" }\n" +" });\n" +" return A._asyncStartSync(\$async\$hotReloadEnd\$0, \$async\$completer);\n" " },\n" " hotReloadStart\$1(reloadedSourcesPath) {\n" -" return A.throwExpression(A.UnimplementedError\$(string\$.Hot_reD));\n" +" var \$async\$goto = 0,\n" +" \$async\$completer = A._makeAsyncAwaitCompleter(type\$.JSArray_nullable_Object),\n" +" \$async\$returnValue;\n" +" var \$async\$hotReloadStart\$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" +" if (reloadedSourcesPath == null || reloadedSourcesPath.length === 0) {\n" +" \$async\$returnValue = type\$.JSArray_nullable_Object._as(new init.G.Array());\n" +" // goto return\n" +" \$async\$goto = 1;\n" +" break;\n" +" }\n" +" throw A.wrapException(A.UnimplementedError\$(\"Hot reload is not supported for the DDC module format.\"));\n" +" case 1:\n" +" // return\n" +" return A._asyncReturn(\$async\$returnValue, \$async\$completer);\n" +" }\n" +" });\n" +" return A._asyncStartSync(\$async\$hotReloadStart\$1, \$async\$completer);\n" " },\n" " \$isRestarter: 1\n" " };\n" @@ -21176,7 +21761,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this.sub.cancel\$0();\n" " return value;\n" " },\n" -" \$signature: 68\n" +" \$signature: 69\n" " };\n" " A.ReloadingManager.prototype = {\n" " hotRestart\$3\$readyToRunMain\$reloadedSourcesPath\$runId(readyToRunMain, reloadedSourcesPath, runId) {\n" @@ -21410,10 +21995,45 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return A._asyncStartSync(\$async\$restart\$3\$readyToRunMain\$reloadedSourcesPath\$runId, \$async\$completer);\n" " },\n" " hotReloadEnd\$0() {\n" -" return A.throwExpression(A.UnimplementedError\$(string\$.Hot_reA));\n" +" var \$async\$goto = 0,\n" +" \$async\$completer = A._makeAsyncAwaitCompleter(type\$.void);\n" +" var \$async\$hotReloadEnd\$0 = 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" +" // implicit return\n" +" return A._asyncReturn(null, \$async\$completer);\n" +" }\n" +" });\n" +" return A._asyncStartSync(\$async\$hotReloadEnd\$0, \$async\$completer);\n" " },\n" " hotReloadStart\$1(reloadedSourcesPath) {\n" -" return A.throwExpression(A.UnimplementedError\$(string\$.Hot_reA));\n" +" var \$async\$goto = 0,\n" +" \$async\$completer = A._makeAsyncAwaitCompleter(type\$.JSArray_nullable_Object),\n" +" \$async\$returnValue;\n" +" var \$async\$hotReloadStart\$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" +" if (reloadedSourcesPath == null || reloadedSourcesPath.length === 0) {\n" +" \$async\$returnValue = type\$.JSArray_nullable_Object._as(new init.G.Array());\n" +" // goto return\n" +" \$async\$goto = 1;\n" +" break;\n" +" }\n" +" throw A.wrapException(A.UnimplementedError\$(\"Hot reload is not supported for the AMD module format.\"));\n" +" case 1:\n" +" // return\n" +" return A._asyncReturn(\$async\$returnValue, \$async\$completer);\n" +" }\n" +" });\n" +" return A._asyncStartSync(\$async\$hotReloadStart\$1, \$async\$completer);\n" " },\n" " _require_restarter\$_runMainWhenReady\$1(readyToRunMain) {\n" " var \$async\$goto = 0,\n" @@ -21707,7 +22327,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(e) {\n" " this.completer.completeError\$2(new A.HotReloadFailedException(A._asString(type\$.JavaScriptObject._as(e).message)), this.stackTrace);\n" " },\n" -" \$signature: 71\n" +" \$signature: 72\n" " };\n" " A._createScript_closure.prototype = {\n" " call\$0() {\n" @@ -21716,13 +22336,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return new A._createScript__closure();\n" " return new A._createScript__closure0(nonce);\n" " },\n" -" \$signature: 72\n" +" \$signature: 73\n" " };\n" " A._createScript__closure.prototype = {\n" " call\$0() {\n" " return A._asJSObject(A._asJSObject(init.G.document).createElement(\"script\"));\n" " },\n" -" \$signature: 5\n" +" \$signature: 7\n" " };\n" " A._createScript__closure0.prototype = {\n" " call\$0() {\n" @@ -21730,7 +22350,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " scriptElement.setAttribute(\"nonce\", this.nonce);\n" " return scriptElement;\n" " },\n" -" \$signature: 5\n" +" \$signature: 7\n" " };\n" " A.runMain_closure.prototype = {\n" " call\$0() {\n" @@ -21769,23 +22389,52 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _instance_1_u = hunkHelpers._instance_1u,\n" " _static_1 = hunkHelpers._static_1,\n" " _static_0 = hunkHelpers._static_0,\n" +" _static = hunkHelpers.installStaticTearOff,\n" " _instance = hunkHelpers.installInstanceTearOff,\n" " _instance_2_u = hunkHelpers._instance_2u,\n" " _instance_0_u = hunkHelpers._instance_0u,\n" -" _instance_1_i = hunkHelpers._instance_1i,\n" -" _static = hunkHelpers.installStaticTearOff;\n" +" _instance_1_i = hunkHelpers._instance_1i;\n" " _static_2(J, \"_interceptors_JSArray__compareAny\$closure\", \"JSArray__compareAny\", 27);\n" -" _instance_1_u(A.CastStreamSubscription.prototype, \"get\$__internal\$_onData\", \"__internal\$_onData\$1\", 11);\n" +" _instance_1_u(A.CastStreamSubscription.prototype, \"get\$__internal\$_onData\", \"__internal\$_onData\$1\", 8);\n" " _static_1(A, \"async__AsyncRun__scheduleImmediateJsOverride\$closure\", \"_AsyncRun__scheduleImmediateJsOverride\", 14);\n" " _static_1(A, \"async__AsyncRun__scheduleImmediateWithSetImmediate\$closure\", \"_AsyncRun__scheduleImmediateWithSetImmediate\", 14);\n" " _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\", 7);\n" +" _static_1(A, \"async___nullDataHandler\$closure\", \"_nullDataHandler\", 5);\n" +" _static_2(A, \"async___nullErrorHandler\$closure\", \"_nullErrorHandler\", 6);\n" " _static_0(A, \"async___nullDoneHandler\$closure\", \"_nullDoneHandler\", 0);\n" -" _instance(A._Completer.prototype, \"get\$completeError\", 0, 1, null, [\"call\$2\", \"call\$1\"], [\"completeError\$2\", \"completeError\$1\"], 58, 0, 0);\n" -" _instance_2_u(A._Future.prototype, \"get\$_completeError\", \"_completeError\$2\", 7);\n" +" _static(A, \"async___rootHandleUncaughtError\$closure\", 5, null, [\"call\$5\"], [\"_rootHandleUncaughtError\"], 76, 0);\n" +" _static(A, \"async___rootRun\$closure\", 4, null, [\"call\$1\$4\", \"call\$4\"], [\"_rootRun\", function(\$self, \$parent, zone, f) {\n" +" return A._rootRun(\$self, \$parent, zone, f, type\$.dynamic);\n" +" }], 77, 0);\n" +" _static(A, \"async___rootRunUnary\$closure\", 5, null, [\"call\$2\$5\", \"call\$5\"], [\"_rootRunUnary\", function(\$self, \$parent, zone, f, arg) {\n" +" var t1 = type\$.dynamic;\n" +" return A._rootRunUnary(\$self, \$parent, zone, f, arg, t1, t1);\n" +" }], 78, 0);\n" +" _static(A, \"async___rootRunBinary\$closure\", 6, null, [\"call\$3\$6\"], [\"_rootRunBinary\"], 79, 0);\n" +" _static(A, \"async___rootRegisterCallback\$closure\", 4, null, [\"call\$1\$4\", \"call\$4\"], [\"_rootRegisterCallback\", function(\$self, \$parent, zone, f) {\n" +" return A._rootRegisterCallback(\$self, \$parent, zone, f, type\$.dynamic);\n" +" }], 80, 0);\n" +" _static(A, \"async___rootRegisterUnaryCallback\$closure\", 4, null, [\"call\$2\$4\", \"call\$4\"], [\"_rootRegisterUnaryCallback\", function(\$self, \$parent, zone, f) {\n" +" var t1 = type\$.dynamic;\n" +" return A._rootRegisterUnaryCallback(\$self, \$parent, zone, f, t1, t1);\n" +" }], 81, 0);\n" +" _static(A, \"async___rootRegisterBinaryCallback\$closure\", 4, null, [\"call\$3\$4\", \"call\$4\"], [\"_rootRegisterBinaryCallback\", function(\$self, \$parent, zone, f) {\n" +" var t1 = type\$.dynamic;\n" +" return A._rootRegisterBinaryCallback(\$self, \$parent, zone, f, t1, t1, t1);\n" +" }], 82, 0);\n" +" _static(A, \"async___rootErrorCallback\$closure\", 5, null, [\"call\$5\"], [\"_rootErrorCallback\"], 83, 0);\n" +" _static(A, \"async___rootScheduleMicrotask\$closure\", 4, null, [\"call\$4\"], [\"_rootScheduleMicrotask\"], 84, 0);\n" +" _static(A, \"async___rootCreateTimer\$closure\", 5, null, [\"call\$5\"], [\"_rootCreateTimer\"], 85, 0);\n" +" _static(A, \"async___rootCreatePeriodicTimer\$closure\", 5, null, [\"call\$5\"], [\"_rootCreatePeriodicTimer\"], 86, 0);\n" +" _static(A, \"async___rootPrint\$closure\", 4, null, [\"call\$4\"], [\"_rootPrint\"], 87, 0);\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\"], 62, 0, 0);\n" +" _instance_2_u(A._Future.prototype, \"get\$_completeError\", \"_completeError\$2\", 6);\n" " var _;\n" +" _instance_1_u(_ = A._StreamController.prototype, \"get\$_add\", \"_add\$1\", 8);\n" +" _instance_2_u(_, \"get\$_addError\", \"_addError\$2\", 6);\n" +" _instance_0_u(_, \"get\$_close\", \"_close\$0\", 0);\n" " _instance_0_u(_ = A._ControllerSubscription.prototype, \"get\$_onPause\", \"_onPause\$0\", 0);\n" " _instance_0_u(_, \"get\$_onResume\", \"_onResume\$0\", 0);\n" " _instance_0_u(_ = A._BufferingStreamSubscription.prototype, \"get\$_onPause\", \"_onPause\$0\", 0);\n" @@ -21793,59 +22442,59 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _instance_0_u(A._DoneStreamSubscription.prototype, \"get\$_onMicrotask\", \"_onMicrotask\$0\", 0);\n" " _instance_0_u(_ = A._ForwardingStreamSubscription.prototype, \"get\$_onPause\", \"_onPause\$0\", 0);\n" " _instance_0_u(_, \"get\$_onResume\", \"_onResume\$0\", 0);\n" -" _instance_1_u(_, \"get\$_handleData\", \"_handleData\$1\", 11);\n" -" _instance_2_u(_, \"get\$_handleError\", \"_handleError\$2\", 76);\n" +" _instance_1_u(_, \"get\$_handleData\", \"_handleData\$1\", 8);\n" +" _instance_2_u(_, \"get\$_handleError\", \"_handleError\$2\", 33);\n" " _instance_0_u(_, \"get\$_handleDone\", \"_handleDone\$0\", 0);\n" " _static_2(A, \"collection___defaultEquals\$closure\", \"_defaultEquals0\", 28);\n" " _static_1(A, \"collection___defaultHashCode\$closure\", \"_defaultHashCode\", 15);\n" " _static_2(A, \"collection_ListBase__compareAny\$closure\", \"ListBase__compareAny\", 27);\n" " _static_1(A, \"convert___defaultToEncodable\$closure\", \"_defaultToEncodable\", 16);\n" -" _instance_1_i(_ = A._ByteCallbackSink.prototype, \"get\$add\", \"add\$1\", 11);\n" +" _instance_1_i(_ = A._ByteCallbackSink.prototype, \"get\$add\", \"add\$1\", 8);\n" " _instance_0_u(_, \"get\$close\", \"close\$0\", 0);\n" " _static_1(A, \"core__identityHashCode\$closure\", \"identityHashCode\", 15);\n" " _static_2(A, \"core__identical\$closure\", \"identical\", 28);\n" -" _static_1(A, \"core_Uri_decodeComponent\$closure\", \"Uri_decodeComponent\", 9);\n" +" _static_1(A, \"core_Uri_decodeComponent\$closure\", \"Uri_decodeComponent\", 10);\n" " _static(A, \"math__max\$closure\", 2, null, [\"call\$1\$2\", \"call\$2\"], [\"max\", function(a, b) {\n" " return A.max(a, b, type\$.num);\n" -" }], 77, 0);\n" -" _instance_1_u(_ = A.PersistentWebSocket.prototype, \"get\$_writeToWebSocket\", \"_writeToWebSocket\$1\", 4);\n" -" _instance_0_u(_, \"get\$_listenWithRetry\", \"_listenWithRetry\$0\", 6);\n" -" _static_1(A, \"case_insensitive_map_CaseInsensitiveMap__canonicalizer\$closure\", \"CaseInsensitiveMap__canonicalizer\", 9);\n" +" }], 91, 0);\n" +" _instance_1_u(_ = A.PersistentWebSocket.prototype, \"get\$_writeToWebSocket\", \"_writeToWebSocket\$1\", 5);\n" +" _instance_0_u(_, \"get\$_listenWithRetry\", \"_listenWithRetry\$0\", 9);\n" +" _static_1(A, \"case_insensitive_map_CaseInsensitiveMap__canonicalizer\$closure\", \"CaseInsensitiveMap__canonicalizer\", 10);\n" " _instance_1_u(_ = A.SseClient.prototype, \"get\$_onIncomingControlMessage\", \"_onIncomingControlMessage\$1\", 2);\n" " _instance_1_u(_, \"get\$_onIncomingMessage\", \"_onIncomingMessage\$1\", 2);\n" " _instance_0_u(_, \"get\$_onOutgoingDone\", \"_onOutgoingDone\$0\", 0);\n" -" _instance_1_u(_, \"get\$_onOutgoingMessage\", \"_onOutgoingMessage\$1\", 56);\n" -" _static_1(A, \"client__initializeConnection\$closure\", \"initializeConnection\", 52);\n" +" _instance_1_u(_, \"get\$_onOutgoingMessage\", \"_onOutgoingMessage\$1\", 57);\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" +" _instance_1_u(_ = A.RequireRestarter.prototype, \"get\$_moduleParents\", \"_moduleParents\$1\", 70);\n" +" _instance_2_u(_, \"get\$_moduleTopologicalCompare\", \"_moduleTopologicalCompare\$2\", 71);\n" " })();\n" " (function inheritance() {\n" " var _mixin = hunkHelpers.mixin,\n" " _inherit = hunkHelpers.inherit,\n" " _inheritMany = hunkHelpers.inheritMany;\n" " _inherit(A.Object, null);\n" -" _inheritMany(A.Object, [A.JS_CONST, J.Interceptor, A.SafeToStringHook, J.ArrayIterator, A.Stream, A.CastStreamSubscription, A.Iterable, A.CastIterator, A.Closure, A.MapBase, A.Error, A.ListBase, A.SentinelValue, A.ListIterator, A.MappedIterator, A.WhereIterator, A.ExpandIterator, A.TakeIterator, A.SkipIterator, A.EmptyIterator, A.WhereTypeIterator, A.FixedLengthListMixin, A.UnmodifiableListMixin, A._Record, A.ConstantMap, A._KeysOrValuesOrElementsIterator, A.TypeErrorDecoder, A.NullThrownFromJavaScriptException, A.ExceptionAndStackTrace, A._StackTrace, A.LinkedHashMapCell, A.LinkedHashMapKeyIterator, A.LinkedHashMapValueIterator, A.LinkedHashMapEntryIterator, A.JSSyntaxRegExp, A._MatchImplementation, A._AllMatchesIterator, A.StringMatch, A._StringAllMatchesIterator, A._Cell, A._UnmodifiableNativeByteBufferView, A.Rti, A._FunctionParameters, A._Type, A._TimerImpl, A._AsyncAwaitCompleter, A.AsyncError, A._Completer, A._FutureListener, A._Future, A._AsyncCallbackEntry, A._StreamController, A._AsyncStreamControllerDispatch, A._BufferingStreamSubscription, A._StreamSinkWrapper, A._DelayedEvent, A._DelayedDone, A._PendingEvents, A._DoneStreamSubscription, A._StreamIterator, A._ZoneHandleUncaughtError, A.Zone, A.ZoneDelegate, A.ZoneSpecification, A._HashMapKeyIterator, A.SetBase, A._HashSetIterator, A._UnmodifiableMapMixin, A.MapView, A._ListQueueIterator, A._SplayTreeNode, A._SplayTree, A._SplayTreeIterator, A.Codec, A.Converter, A.ByteConversionSink, A._JsonStringifier, A._Utf8Encoder, A._Utf8Decoder, A.DateTime, A.Duration, A._Enum, A.OutOfMemoryError, A.StackOverflowError, A._Exception, A.FormatException, A.MapEntry, A.Null, A._StringStackTrace, A.StringBuffer, A._Uri, A.UriData, A._SimpleUri, A.NullRejectionException, A._JSRandom, A._JSSecureRandom, A.AsyncMemoizer, A.ErrorResult, A.ValueResult, A.StreamQueue, A._NextRequest, A._HasNextRequest, A.CanonicalizedMap, A._QueueList_Object_ListMixin, A.BuildResult, A.ConnectRequest, A.DebugEvent, A.BatchedDebugEvents, A.DebugInfo, A.DevToolsRequest, A.DevToolsResponse, A.ErrorResponse, A.HotReloadRequest, A.HotReloadResponse, A.HotRestartRequest, A.HotRestartResponse, A.PingRequest, A.RegisterEvent, A.RunRequest, A.ServiceExtensionRequest, A.ServiceExtensionResponse, A.BatchedStreamController, A.SocketClient, A._PersistentWebSocket_Object_StreamChannelMixin, A.Uuid, A._StackState, A.ClientException, A.BaseClient, A.BaseRequest, A.BaseResponse, A.MediaType, A.Level, A.LogRecord, A.Logger, A.Context, A.Style, A.ParsedPath, A.PathException, A.Pool, A.PoolResource, A.SourceFile, A.SourceLocationMixin, A.SourceSpanMixin, A.Highlighter, A._Highlight, A._Line, A.SourceLocation, A.SourceSpanException, A.StreamChannelMixin, A.StringScanner, A.EventStreamProvider, A._EventStreamSubscription, A.BrowserWebSocket, A.WebSocketEvent, A.WebSocketException, A.DdcLibraryBundleRestarter, A.DdcRestarter, A.ReloadingManager, A.HotReloadFailedException, A.RequireRestarter]);\n" +" _inheritMany(A.Object, [A.JS_CONST, J.Interceptor, A.SafeToStringHook, J.ArrayIterator, A.Stream, A.CastStreamSubscription, A.Iterable, A.CastIterator, A.Closure, A.MapBase, A.Error, A.ListBase, A.SentinelValue, A.ListIterator, A.MappedIterator, A.WhereIterator, A.ExpandIterator, A.TakeIterator, A.SkipIterator, A.EmptyIterator, A.WhereTypeIterator, A.FixedLengthListMixin, A.UnmodifiableListMixin, A._Record, A.ConstantMap, A._KeysOrValuesOrElementsIterator, A.TypeErrorDecoder, A.NullThrownFromJavaScriptException, A.ExceptionAndStackTrace, A._StackTrace, A.LinkedHashMapCell, A.LinkedHashMapKeyIterator, A.LinkedHashMapValueIterator, A.LinkedHashMapEntryIterator, A.JSSyntaxRegExp, A._MatchImplementation, A._AllMatchesIterator, A.StringMatch, A._StringAllMatchesIterator, A._Cell, A._UnmodifiableNativeByteBufferView, A.Rti, A._FunctionParameters, A._Type, A._TimerImpl, A._AsyncAwaitCompleter, A._AsyncStarStreamController, A._IterationMarker, A.AsyncError, A._Completer, A._FutureListener, A._Future, A._AsyncCallbackEntry, A._StreamController, A._AsyncStreamControllerDispatch, A._BufferingStreamSubscription, A._StreamSinkWrapper, A._AddStreamState, A._DelayedEvent, A._DelayedDone, A._PendingEvents, A._DoneStreamSubscription, A._StreamIterator, A._ZoneRun, A._ZoneRunUnary, A._ZoneRunBinary, A._ZoneRegisterCallback, A._ZoneRegisterUnaryCallback, A._ZoneRegisterBinaryCallback, A._ZoneErrorCallback, A._ZoneScheduleMicrotask, A._ZoneCreateTimer, A._ZoneCreatePeriodicTimer, A._ZonePrint, A._ZoneFork, A._ZoneHandleUncaughtError, A._ZoneValues, A._Zone, A._ZoneDelegate, A.ZoneSpecification, A._HashMapKeyIterator, A.SetBase, A._HashSetIterator, A._UnmodifiableMapMixin, A.MapView, A._ListQueueIterator, A._SplayTreeNode, A._SplayTree, A._SplayTreeIterator, A.Codec, A.Converter, A.ByteConversionSink, A._JsonStringifier, A._Utf8Encoder, A._Utf8Decoder, A.DateTime, A.Duration, A._Enum, A.OutOfMemoryError, A.StackOverflowError, A._Exception, A.FormatException, A.MapEntry, A.Null, A._StringStackTrace, A.StringBuffer, A._Uri, A.UriData, A._SimpleUri, A.NullRejectionException, A._JSRandom, A._JSSecureRandom, A.AsyncMemoizer, A.ErrorResult, A.ValueResult, A.StreamQueue, A._NextRequest, A._HasNextRequest, A.CanonicalizedMap, A._QueueList_Object_ListMixin, A.BuildResult, A.ConnectRequest, A.DebugEvent, A.BatchedDebugEvents, A.DebugInfo, A.DevToolsRequest, A.DevToolsResponse, A.ErrorResponse, A.HotReloadRequest, A.HotReloadResponse, A.HotRestartRequest, A.HotRestartResponse, A.PingRequest, A.RegisterEvent, A.RunRequest, A.ServiceExtensionRequest, A.ServiceExtensionResponse, A.BatchedStreamController, A.SocketClient, A._PersistentWebSocket_Object_StreamChannelMixin, A.Uuid, A._StackState, A.ClientException, A.BaseClient, A.BaseRequest, A.BaseResponse, A.MediaType, A.Level, A.LogRecord, A.Logger, A.Context, A.Style, A.ParsedPath, A.PathException, A.Pool, A.PoolResource, A.SourceFile, A.SourceLocationMixin, A.SourceSpanMixin, A.Highlighter, A._Highlight, A._Line, A.SourceLocation, A.SourceSpanException, A.StreamChannelMixin, A.StringScanner, A.EventStreamProvider, A._EventStreamSubscription, A.BrowserWebSocket, A.WebSocketEvent, A.WebSocketException, A.DdcLibraryBundleRestarter, A.DdcRestarter, A.ReloadingManager, A.HotReloadFailedException, A.RequireRestarter]);\n" " _inheritMany(J.Interceptor, [J.JSBool, J.JSNull, J.JavaScriptObject, J.JavaScriptBigInt, J.JavaScriptSymbol, J.JSNumber, J.JSString]);\n" " _inheritMany(J.JavaScriptObject, [J.LegacyJavaScriptObject, J.JSArray, A.NativeByteBuffer, A.NativeTypedData]);\n" " _inheritMany(J.LegacyJavaScriptObject, [J.PlainJavaScriptObject, J.UnknownJavaScriptObject, J.JavaScriptFunction]);\n" " _inherit(J.JSArraySafeToStringHook, A.SafeToStringHook);\n" " _inherit(J.JSUnmodifiableArray, J.JSArray);\n" " _inheritMany(J.JSNumber, [J.JSInt, J.JSNumNotInt]);\n" -" _inheritMany(A.Stream, [A.CastStream, A.StreamView, A._StreamImpl, A._EmptyStream, A._MultiStream, A._ForwardingStream, A._EventStream]);\n" +" _inheritMany(A.Stream, [A.CastStream, A.StreamView, A._StreamImpl, A._EmptyStream, A._ForwardingStream, A._EventStream]);\n" " _inheritMany(A.Iterable, [A._CastIterableBase, A.EfficientLengthIterable, A.MappedIterable, A.WhereIterable, A.ExpandIterable, A.TakeIterable, A.SkipIterable, A.WhereTypeIterable, A._KeysOrValues, A._AllMatchesIterable, A._StringAllMatchesIterable]);\n" " _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.Zone_bindUnaryCallbackGuarded_closure, A.runZonedGuarded_errorHandler, 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" +" _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._asyncStarHelper_closure0, A._Future__propagateToListeners_handleWhenCompleteCallback_closure, A._Future_timeout_closure0, A.Stream_length_closure, A.Stream_first_closure0, A._CustomZone_bindUnaryCallbackGuarded_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._readBody_closure, A._readBody_closure0, 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._AddStreamState_makeErrorHandler_closure, 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.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.Zone_bindCallback_closure, A.Zone_bindCallbackGuarded_closure, A._rootHandleUncaughtError_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.Closure0Args, [A.nullFuture_closure, A._AsyncRun__scheduleImmediateJsOverride_internalCallback, A._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, A._TimerImpl_internalCallback, A._TimerImpl\$periodic_closure, A._asyncStarHelper_closure, A._AsyncStarStreamController__resumeBody, A._AsyncStarStreamController__resumeBody_closure, A._AsyncStarStreamController_closure0, A._AsyncStarStreamController_closure1, A._AsyncStarStreamController_closure, A._AsyncStarStreamController__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._AddStreamState_cancel_closure, A._BufferingStreamSubscription_asFuture_closure, A._BufferingStreamSubscription_asFuture__closure, A._BufferingStreamSubscription__sendError_sendError, A._BufferingStreamSubscription__sendDone_sendDone, A._PendingEvents_schedule_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.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" @@ -21872,9 +22521,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _inherit(A._AsyncStreamController, A._StreamController);\n" " _inherit(A._ControllerStream, A._StreamImpl);\n" " _inheritMany(A._BufferingStreamSubscription, [A._ControllerSubscription, A._ForwardingStreamSubscription]);\n" +" _inherit(A._StreamControllerAddStreamState, A._AddStreamState);\n" " _inheritMany(A._DelayedEvent, [A._DelayedData, A._DelayedError]);\n" -" _inherit(A._MultiStreamController, A._AsyncStreamController);\n" " _inherit(A._MapStream, A._ForwardingStream);\n" +" _inheritMany(A._Zone, [A._CustomZone, A._RootZone]);\n" " _inherit(A._IdentityHashMap, A._HashMap);\n" " _inherit(A._SetBase, A.SetBase);\n" " _inherit(A._HashSet, A._SetBase);\n" @@ -21935,7 +22585,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)\", \"~(@)\", \"JSObject()\", \"Future<~>()\", \"~(Object,StackTrace)\", \"Null(@)\", \"String(String)\", \"Object?(Object?)\", \"~(Object?)\", \"bool(_Highlight)\", \"Null(JSObject)\", \"~(~())\", \"int(Object?)\", \"@(@)\", \"~(Object?,Object?)\", \"@()\", \"Null(JavaScriptFunction,JavaScriptFunction)\", \"bool()\", \"Future<~>(String)\", \"String(Match)\", \"bool(String)\", \"int()\", \"Null(String)\", \"Null(JavaScriptFunction)\", \"int(@,@)\", \"bool(Object?,Object?)\", \"bool(BuildStatus)\", \"String(@)\", \"PersistentWebSocket(WebSocket)\", \"~(Zone,ZoneDelegate,Zone,Object,StackTrace)\", \"Future<~>(WebSocketEvent)\", \"bool(String,String)\", \"int(String)\", \"Null(String,String[Object?])\", \"~(MultiStreamController>)\", \"~(List)\", \"MediaType()\", \"~(String,String)\", \"bool(Object?)\", \"Logger()\", \"Null(~())\", \"String(String?)\", \"Null(~)\", \"String?()\", \"int(_Line)\", \"Null(@,StackTrace)\", \"Object(_Line)\", \"Object(_Highlight)\", \"int(_Highlight,_Highlight)\", \"~(StreamSink<@>)\", \"0&(String,int?)\", \"SourceSpanWithContext()\", \"~(int,@)\", \"~(String?)\", \"Future()\", \"~(Object[StackTrace?])\", \"@(String)\", \"JSObject(String[bool?])\", \"JSObject(Object,StackTrace)\", \"~(List)\", \"Null(String,String)\", \"~(bool)\", \"HotReloadResponse(String,bool,String?)\", \"HotRestartResponse(String,bool,String?)\", \"Object?(~)\", \"bool(bool)\", \"List(String)\", \"int(String,String)\", \"Null(JavaScriptObject)\", \"JSObject()()\", \"@(@,String)\", \"0&()\", \"Map(DebugEvent)\", \"~(@,StackTrace)\", \"0^(0^,0^)\", \"List<_Line>(MapEntry>)\"],\n" +" types: [\"~()\", \"Null()\", \"~(JSObject)\", \"Null(Object,StackTrace)\", \"Null(@)\", \"~(@)\", \"~(Object,StackTrace)\", \"JSObject()\", \"~(Object?)\", \"Future<~>()\", \"String(String)\", \"Object?(Object?)\", \"bool(_Highlight)\", \"Null(JSObject)\", \"~(~())\", \"int(Object?)\", \"@(@)\", \"~(Object?,Object?)\", \"@()\", \"Null(JavaScriptFunction,JavaScriptFunction)\", \"bool()\", \"Future<~>(String)\", \"String(Match)\", \"bool(String)\", \"int()\", \"Null(String)\", \"Null(JavaScriptFunction)\", \"int(@,@)\", \"bool(Object?,Object?)\", \"String(@)\", \"@(String)\", \"@(@,String)\", \"PersistentWebSocket(WebSocket)\", \"~(@,StackTrace)\", \"Future<~>(WebSocketEvent)\", \"bool(String,String)\", \"int(String)\", \"Null(String,String[Object?])\", \"bool(Object)\", \"~(List)\", \"MediaType()\", \"~(String,String)\", \"~(Zone,ZoneDelegate,Zone,Object,StackTrace)\", \"Logger()\", \"bool(Object?)\", \"String(String?)\", \"Null(~)\", \"String?()\", \"int(_Line)\", \"Null(~())\", \"Object(_Line)\", \"Object(_Highlight)\", \"int(_Highlight,_Highlight)\", \"List<_Line>(MapEntry>)\", \"Null(@,StackTrace)\", \"SourceSpanWithContext()\", \"0&(String,int?)\", \"~(String?)\", \"Future()\", \"~(int,@)\", \"_Future<@>?()\", \"~(StreamSink<@>)\", \"~(Object[StackTrace?])\", \"~(List)\", \"Null(String,String)\", \"~(bool)\", \"HotReloadResponse(String,bool,String?)\", \"HotRestartResponse(String,bool,String?)\", \"JSObject(Object,StackTrace)\", \"bool(bool)\", \"List(String)\", \"int(String,String)\", \"Null(JavaScriptObject)\", \"JSObject()()\", \"Object?(~)\", \"bool(BuildStatus)\", \"~(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)\", \"Zone(Zone?,ZoneDelegate?,Zone,ZoneSpecification?,Map?)\", \"0&()\", \"Map(DebugEvent)\", \"0^(0^,0^)\", \"JSObject(String[bool?])\"],\n" " interceptorsByTag: null,\n" " leafTags: null,\n" " arrayRti: Symbol(\"\$ti\"),\n" @@ -21943,7 +22593,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\"},\"_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_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\":[]},\"_Future\":{\"Future\":[\"1\"]},\"_TimerImpl\":{\"Timer\":[]},\"_AsyncAwaitCompleter\":{\"Completer\":[\"1\"]},\"_Completer\":{\"Completer\":[\"1\"]},\"_AsyncCompleter\":{\"_Completer\":[\"1\"],\"Completer\":[\"1\"]},\"_SyncCompleter\":{\"_Completer\":[\"1\"],\"Completer\":[\"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\"]},\"_StreamControllerAddStreamState\":{\"_AddStreamState\":[\"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\"},\"_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\":[]},\"_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" @@ -21954,16 +22604,12 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " Cannotn: \"Cannot extract a non-Windows file path from a file URI with an authority\",\n" " Dart_e: \"Dart exception thrown from converted Future. Use the properties 'error' to fetch the boxed error and 'stack' to recover the stack trace.\",\n" " Error_: \"Error handler must accept one Object or one Object and a StackTrace as arguments, and return a value of the returned future's type\",\n" -" Hot_reA: \"Hot reload is not supported for the AMD module format.\",\n" -" Hot_reD: \"Hot reload is not supported for the DDC module format.\",\n" " handle: \"handleError callback must take either an Object (the error), or both an Object (the error) and a StackTrace.\",\n" " max_mu: \"max must be in range 0 < max \\u2264 2^32, was \"\n" " };\n" " var type\$ = (function rtii() {\n" " var findType = A.findType;\n" " return {\n" -" \$env_1_1_dynamic: findType(\"@<@>\"),\n" -" \$env_1_1_void: findType(\"@<~>\"),\n" " AsyncError: findType(\"AsyncError\"),\n" " BatchedStreamController_DebugEvent: findType(\"BatchedStreamController\"),\n" " BrowserWebSocket: findType(\"BrowserWebSocket\"),\n" @@ -22021,7 +22667,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " Map_dynamic_dynamic: findType(\"Map<@,@>\"),\n" " MappedListIterable_String_dynamic: findType(\"MappedListIterable\"),\n" " MediaType: findType(\"MediaType\"),\n" -" MultiStreamController_List_int: findType(\"MultiStreamController>\"),\n" " NativeArrayBuffer: findType(\"NativeArrayBuffer\"),\n" " NativeTypedArrayOfInt: findType(\"NativeTypedArrayOfInt\"),\n" " NativeUint8List: findType(\"NativeUint8List\"),\n" @@ -22043,9 +22688,11 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " SplayTreeSet_String: findType(\"SplayTreeSet\"),\n" " StackTrace: findType(\"StackTrace\"),\n" " StreamQueue_DebugEvent: findType(\"StreamQueue\"),\n" +" Stream_dynamic: findType(\"Stream<@>\"),\n" " StreamedResponse: findType(\"StreamedResponse\"),\n" " String: findType(\"String\"),\n" " String_Function_Match: findType(\"String(Match)\"),\n" +" Timer: findType(\"Timer\"),\n" " TrustedGetRuntimeType: findType(\"TrustedGetRuntimeType\"),\n" " TwoPhaseRestarter: findType(\"TwoPhaseRestarter\"),\n" " TypeError: findType(\"TypeError\"),\n" @@ -22059,6 +22706,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " WebSocket: findType(\"WebSocket\"),\n" " WebSocketEvent: findType(\"WebSocketEvent\"),\n" " WhereTypeIterable_String: findType(\"WhereTypeIterable\"),\n" +" Zone: findType(\"Zone\"),\n" +" ZoneDelegate: findType(\"ZoneDelegate\"),\n" " _AsyncCompleter_BrowserWebSocket: findType(\"_AsyncCompleter\"),\n" " _AsyncCompleter_PoolResource: findType(\"_AsyncCompleter\"),\n" " _AsyncCompleter_String: findType(\"_AsyncCompleter\"),\n" @@ -22080,7 +22729,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _Highlight: findType(\"_Highlight\"),\n" " _IdentityHashMap_of_nullable_Object_and_nullable_Object: findType(\"_IdentityHashMap\"),\n" " _Line: findType(\"_Line\"),\n" -" _MultiStream_List_int: findType(\"_MultiStream>\"),\n" " _StreamControllerAddStreamState_nullable_Object: findType(\"_StreamControllerAddStreamState\"),\n" " _SyncCompleter_PoolResource: findType(\"_SyncCompleter\"),\n" " bool: findType(\"bool\"),\n" @@ -22104,10 +22752,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " nullable_StackTrace: findType(\"StackTrace?\"),\n" " nullable_String: findType(\"String?\"),\n" " nullable_String_Function_Match: findType(\"String(Match)?\"),\n" +" nullable_Zone: findType(\"Zone?\"),\n" +" nullable_ZoneDelegate: findType(\"ZoneDelegate?\"),\n" " nullable__DelayedEvent_dynamic: findType(\"_DelayedEvent<@>?\"),\n" " nullable__FutureListener_dynamic_dynamic: findType(\"_FutureListener<@,@>?\"),\n" " nullable__Highlight: findType(\"_Highlight?\"),\n" " nullable_bool: findType(\"bool?\"),\n" +" nullable_bool_Function_Object: findType(\"bool(Object)?\"),\n" " nullable_double: findType(\"double?\"),\n" " nullable_int: findType(\"int?\"),\n" " nullable_num: findType(\"num?\"),\n" @@ -22120,6 +22771,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " void_Function_Object: findType(\"~(Object)\"),\n" " void_Function_Object_StackTrace: findType(\"~(Object,StackTrace)\"),\n" " void_Function_String_dynamic: findType(\"~(String,@)\"),\n" +" void_Function_Timer: findType(\"~(Timer)\"),\n" " void_Function_int_dynamic: findType(\"~(int,@)\")\n" " };\n" " })();\n" @@ -22279,6 +22931,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " B.C_Uuid = new A.Uuid();\n" " B.C__DelayedDone = new A._DelayedDone();\n" " B.C__JSRandom = new A._JSRandom();\n" +" B.C__RootZone = new A._RootZone();\n" +" B.C__ZoneCreatePeriodicTimer = new A._ZoneCreatePeriodicTimer();\n" " B.Duration_0 = new A.Duration(0);\n" " B.Duration_5000000 = new A.Duration(5000000);\n" " B.JsonDecoder_null = new A.JsonDecoder(null);\n" @@ -22314,8 +22968,21 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " B.Type_Uint8ClampedList_04U = A.typeLiteral(\"Uint8ClampedList\");\n" " B.Type_Uint8List_8Eb = A.typeLiteral(\"Uint8List\");\n" " B.Utf8Decoder_false = new A.Utf8Decoder(false);\n" -" B.Zone_jYP = new A.Zone(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null);\n" " B._StringStackTrace_OdL = new A._StringStackTrace(\"\");\n" +" B._ZoneCreateTimer__RootZone__rootCreateTimer = new A._ZoneCreateTimer(B.C__RootZone, A.async___rootCreateTimer\$closure());\n" +" B._ZoneErrorCallback__RootZone__rootErrorCallback = new A._ZoneErrorCallback(B.C__RootZone, A.async___rootErrorCallback\$closure());\n" +" B._ZoneFork__RootZone__rootFork = new A._ZoneFork(B.C__RootZone, A.async___rootFork\$closure());\n" +" B._ZoneHandleUncaughtError_wQ6 = new A._ZoneHandleUncaughtError(B.C__RootZone, A.async___rootHandleUncaughtError\$closure());\n" +" B._ZonePrint__RootZone__rootPrint = new A._ZonePrint(B.C__RootZone, A.async___rootPrint\$closure());\n" +" B._ZoneRegisterBinaryCallback_sk0 = new A._ZoneRegisterBinaryCallback(B.C__RootZone, A.async___rootRegisterBinaryCallback\$closure());\n" +" B._ZoneRegisterCallback__RootZone__rootRegisterCallback = new A._ZoneRegisterCallback(B.C__RootZone, A.async___rootRegisterCallback\$closure());\n" +" B._ZoneRegisterUnaryCallback_a9v = new A._ZoneRegisterUnaryCallback(B.C__RootZone, A.async___rootRegisterUnaryCallback\$closure());\n" +" B._ZoneRunBinary__RootZone__rootRunBinary = new A._ZoneRunBinary(B.C__RootZone, A.async___rootRunBinary\$closure());\n" +" B._ZoneRunUnary__RootZone__rootRunUnary = new A._ZoneRunUnary(B.C__RootZone, A.async___rootRunUnary\$closure());\n" +" B._ZoneRun__RootZone__rootRun = new A._ZoneRun(B.C__RootZone, A.async___rootRun\$closure());\n" +" B._ZoneScheduleMicrotask__RootZone__rootScheduleMicrotask = new A._ZoneScheduleMicrotask(B.C__RootZone, A.async___rootScheduleMicrotask\$closure());\n" +" B.Map_empty1 = new A.ConstantStringMap(B.Object_empty, [], A.findType(\"ConstantStringMap\"));\n" +" B._ZoneValues__RootZone_Map_empty = new A._ZoneValues(B.C__RootZone, B.Map_empty1);\n" " })();\n" " (function staticFields() {\n" " \$._JS_INTEROP_INTERCEPTOR_TAG = null;\n" @@ -22335,7 +23002,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " \$._lastCallback = null;\n" " \$._lastPriorityCallback = null;\n" " \$._isInCallbackLoop = false;\n" -" \$.Zone__current = B.Zone_jYP;\n" +" \$.Zone__current = B.C__RootZone;\n" +" \$._RootZone__rootDelegate = null;\n" " \$.Uri__cachedBaseString = \"\";\n" " \$.Uri__cachedBaseUri = null;\n" " \$.LogRecord__nextNumber = 0;\n" @@ -22348,7 +23016,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " var _lazyFinal = hunkHelpers.lazyFinal;\n" " _lazyFinal(\$, \"DART_CLOSURE_PROPERTY_NAME\", \"\$get\$DART_CLOSURE_PROPERTY_NAME\", () => A.getIsolateAffinityTag(\"_\$dart_dartClosure\"));\n" " _lazyFinal(\$, \"DART_CLOSURE_DART_JSINTEROP_PROPERTY_NAME\", \"\$get\$DART_CLOSURE_DART_JSINTEROP_PROPERTY_NAME\", () => A.getIsolateAffinityTag(\"_\$dart_dartClosure_dartJSInterop\"));\n" -" _lazyFinal(\$, \"nullFuture\", \"\$get\$nullFuture\", () => B.Zone_jYP.run\$1\$1(new A.nullFuture_closure(), type\$.Future_void));\n" +" _lazyFinal(\$, \"nullFuture\", \"\$get\$nullFuture\", () => B.C__RootZone.run\$1\$1(new A.nullFuture_closure(), type\$.Future_void));\n" " _lazyFinal(\$, \"_safeToStringHooks\", \"\$get\$_safeToStringHooks\", () => A._setArrayType([new J.JSArraySafeToStringHook()], A.findType(\"JSArray\")));\n" " _lazyFinal(\$, \"TypeErrorDecoder_noSuchMethodPattern\", \"\$get\$TypeErrorDecoder_noSuchMethodPattern\", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokeCallErrorOn({\n" " toString: function() {\n" @@ -22396,7 +23064,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }()));\n" " _lazyFinal(\$, \"_AsyncRun__scheduleImmediateClosure\", \"\$get\$_AsyncRun__scheduleImmediateClosure\", () => A._AsyncRun__initializeScheduleImmediate());\n" " _lazyFinal(\$, \"Future__nullFuture\", \"\$get\$Future__nullFuture\", () => \$.\$get\$nullFuture());\n" -" _lazyFinal(\$, \"_rootDelegate\", \"\$get\$_rootDelegate\", () => A.ZoneDelegate\$_());\n" " _lazyFinal(\$, \"_Utf8Decoder__reusableBuffer\", \"\$get\$_Utf8Decoder__reusableBuffer\", () => A.NativeUint8List_NativeUint8List(4096));\n" " _lazyFinal(\$, \"_Utf8Decoder__decoder\", \"\$get\$_Utf8Decoder__decoder\", () => new A._Utf8Decoder__decoder_closure().call\$0());\n" " _lazyFinal(\$, \"_Utf8Decoder__decoderNonfatal\", \"\$get\$_Utf8Decoder__decoderNonfatal\", () => new A._Utf8Decoder__decoderNonfatal_closure().call\$0());\n" @@ -22486,8 +23153,11 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " Function.prototype.call\$0 = function() {\n" " return this();\n" " };\n" -" Function.prototype.call\$1\$4 = function(a, b, c, d) {\n" -" return this(a, b, c, d);\n" +" Function.prototype.call\$1\$1 = function(a) {\n" +" return this(a);\n" +" };\n" +" Function.prototype.call\$3\$3 = function(a, b, c) {\n" +" return this(a, b, c);\n" " };\n" " Function.prototype.call\$5 = function(a, b, c, d, e) {\n" " return this(a, b, c, d, e);\n" @@ -22495,23 +23165,38 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " Function.prototype.call\$3 = function(a, b, c) {\n" " return this(a, b, c);\n" " };\n" +" Function.prototype.call\$3\$6 = function(a, b, c, d, e, f) {\n" +" return this(a, b, c, d, e, f);\n" +" };\n" +" Function.prototype.call\$1\$4 = function(a, b, c, d) {\n" +" return this(a, b, c, d);\n" +" };\n" +" Function.prototype.call\$2\$1 = function(a) {\n" +" return this(a);\n" +" };\n" " Function.prototype.call\$4 = function(a, b, c, d) {\n" " return this(a, b, c, d);\n" " };\n" -" Function.prototype.call\$3\$6 = function(a, b, c, d, e, f) {\n" -" return this(a, b, c, d, e, f);\n" +" Function.prototype.call\$3\$1 = function(a) {\n" +" return this(a);\n" " };\n" " Function.prototype.call\$3\$4 = function(a, b, c, d) {\n" " return this(a, b, c, d);\n" " };\n" +" Function.prototype.call\$2\$4 = function(a, b, c, d) {\n" +" return this(a, b, c, d);\n" +" };\n" +" Function.prototype.call\$2\$2 = function(a, b) {\n" +" return this(a, b);\n" +" };\n" " Function.prototype.call\$2\$5 = function(a, b, c, d, e) {\n" " return this(a, b, c, d, e);\n" " };\n" -" Function.prototype.call\$2\$4 = function(a, b, c, d) {\n" -" return this(a, b, c, d);\n" +" Function.prototype.call\$2\$3 = function(a, b, c) {\n" +" return this(a, b, c);\n" " };\n" -" Function.prototype.call\$1\$1 = function(a) {\n" -" return this(a);\n" +" Function.prototype.call\$1\$2 = function(a, b) {\n" +" return this(a, b);\n" " };\n" " Function.prototype.call\$2\$0 = function() {\n" " return this();\n" @@ -22552,4 +23237,4 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value "})();\n" ""; -const clientDartHash = 'eb87fbfbfd5a1d956d883131177756f74503b621509846fb09367d3ab94173eb'; +const clientDartHash = '6c9aa3e56aa014bb92865822a76b4cfbb757957f40e8112884d684f4e86c82ea'; diff --git a/dwds/lib/src/loaders/asset_scheme.dart b/dwds/lib/src/loaders/asset_scheme.dart new file mode 100644 index 0000000000..1442b74acb --- /dev/null +++ b/dwds/lib/src/loaders/asset_scheme.dart @@ -0,0 +1,86 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// Encapsulates asset file naming conventions and schemes. +abstract class AssetScheme { + /// File extension for JS files. + /// (e.g., '.ddc.js' or '.dart.lib.js'). + String get jsSuffix; + + /// File extension for sourcemaps. + /// (e.g., '.ddc.js.map' or '.dart.lib.js.map'). + String get sourceMapSuffix; + + /// File extension for module names. + /// (e.g., '.ddc' or '.dart.lib'). + String get descriptorSuffix; + + /// File extension for full dill files. + /// (e.g., '.ddc.full.dill' or '.dart.lib.full.dill'). + String get fullDillSuffix; + + /// File extension for summary dill files. + /// (e.g., '.ddc.dill' or '.dart.lib.dill'). + String get summaryDillSuffix; + + /// File extension for bootstrap files. + /// (e.g., '.bootstrap.js' or '.dart.bootstrap.js'). + String get bootstrapSuffix; + + /// File extension for merged metadata. + /// (e.g., '.ddc_merged_metadata'). + String get mergedMetadataSuffix; +} + +/// Asset scheme for package:build assets. +final class BuildRunnerAssetScheme implements AssetScheme { + const BuildRunnerAssetScheme(); + + @override + String get jsSuffix => '.ddc.js'; + + @override + String get sourceMapSuffix => '.ddc.js.map'; + + @override + String get descriptorSuffix => '.ddc'; + + @override + String get fullDillSuffix => '.ddc.full.dill'; + + @override + String get summaryDillSuffix => '.ddc.dill'; + + @override + String get bootstrapSuffix => '.bootstrap.js'; + + @override + String get mergedMetadataSuffix => '.ddc_merged_metadata'; +} + +/// Asset scheme for Frontend Server assets. +final class FrontendServerAssetScheme implements AssetScheme { + const FrontendServerAssetScheme(); + + @override + String get jsSuffix => '.dart.lib.js'; + + @override + String get sourceMapSuffix => '.dart.lib.js.map'; + + @override + String get descriptorSuffix => '.dart.lib'; + + @override + String get fullDillSuffix => '.dart.lib.full.dill'; + + @override + String get summaryDillSuffix => '.dart.lib.dill'; + + @override + String get bootstrapSuffix => '.bootstrap.js'; + + @override + String get mergedMetadataSuffix => '.ddc_merged_metadata'; +} diff --git a/dwds/lib/src/loaders/build_runner_strategy_provider.dart b/dwds/lib/src/loaders/build_runner_strategy_provider.dart index ba776bda97..8706aa8414 100644 --- a/dwds/lib/src/loaders/build_runner_strategy_provider.dart +++ b/dwds/lib/src/loaders/build_runner_strategy_provider.dart @@ -5,6 +5,7 @@ import 'dart:convert'; import 'package:dwds/src/debugging/metadata/provider.dart'; +import 'package:dwds/src/loaders/asset_scheme.dart'; import 'package:dwds/src/loaders/ddc_library_bundle.dart'; import 'package:dwds/src/loaders/require.dart'; import 'package:dwds/src/loaders/strategy.dart'; @@ -38,6 +39,7 @@ class BuildRunnerRequireStrategyProvider with BuildRunnerStrategyProviderMixin { _moduleInfoForProvider, _assetReader, _buildSettings, + const BuildRunnerAssetScheme(), packageConfigPath: _packageConfigPath, ); @@ -79,6 +81,7 @@ class BuildRunnerDdcLibraryBundleStrategyProvider _assetReader, _buildSettings, (path) => null, // g3RelativePath + const BuildRunnerAssetScheme(), packageConfigPath: _packageConfigPath, injectScriptLoad: injectScriptLoad, reloadedSourcesUri: _reloadedSourcesUri, @@ -203,15 +206,9 @@ mixin BuildRunnerStrategyProviderMixin { } String? _serverPathForAppUri(String appUrl) { - final appUri = Uri.parse(appUrl); - if (appUri.isScheme('org-dartlang-app')) { - // We skip the root from which we are serving. - return appUri.pathSegments.skip(1).join('/'); - } - if (appUri.isScheme('package')) { - return '/packages/${appUri.path}'; - } - return null; + return BuildRunnerPathResolver( + useDebuggerModuleNames: _buildSettings.useDebuggerModuleNames, + ).appUriToServerPath(appUrl); } Future> _moduleInfoForProvider( diff --git a/dwds/lib/src/loaders/ddc.dart b/dwds/lib/src/loaders/ddc.dart index a1b18f6fd4..6fddc0dd32 100644 --- a/dwds/lib/src/loaders/ddc.dart +++ b/dwds/lib/src/loaders/ddc.dart @@ -6,6 +6,7 @@ import 'dart:convert'; import 'package:dwds/src/debugging/dart_runtime_debugger.dart'; import 'package:dwds/src/debugging/metadata/provider.dart'; +import 'package:dwds/src/loaders/asset_scheme.dart'; import 'package:dwds/src/loaders/strategy.dart'; import 'package:dwds/src/readers/asset_reader.dart'; import 'package:dwds/src/services/expression_compiler.dart'; @@ -145,7 +146,8 @@ class DdcStrategy extends LoadStrategy { this._moduleInfoForProvider, AssetReader assetReader, this._buildSettings, - this._g3RelativePath, { + this._g3RelativePath, + this.assetScheme, { super.packageConfigPath, }) : super(assetReader); @@ -162,6 +164,9 @@ class DdcStrategy extends LoadStrategy { @override String get moduleFormat => 'ddc'; + @override + final AssetScheme assetScheme; + @override String get loadLibrariesModule => 'ddc_module_loader.ddk.js'; diff --git a/dwds/lib/src/loaders/ddc_library_bundle.dart b/dwds/lib/src/loaders/ddc_library_bundle.dart index 2404fb9567..7f2bb61a11 100644 --- a/dwds/lib/src/loaders/ddc_library_bundle.dart +++ b/dwds/lib/src/loaders/ddc_library_bundle.dart @@ -6,6 +6,7 @@ import 'dart:convert'; import 'package:dwds/src/debugging/dart_runtime_debugger.dart'; import 'package:dwds/src/debugging/metadata/provider.dart'; +import 'package:dwds/src/loaders/asset_scheme.dart'; import 'package:dwds/src/loaders/ddc.dart'; import 'package:dwds/src/loaders/strategy.dart'; import 'package:dwds/src/readers/asset_reader.dart'; @@ -124,7 +125,8 @@ class DdcLibraryBundleStrategy extends LoadStrategy this._moduleInfoForProvider, AssetReader assetReader, this._buildSettings, - this._g3RelativePath, { + this._g3RelativePath, + this.assetScheme, { super.packageConfigPath, this.reloadedSourcesUri, this.injectScriptLoad = true, @@ -146,6 +148,9 @@ class DdcLibraryBundleStrategy extends LoadStrategy @override String get moduleFormat => 'ddc'; + @override + final AssetScheme assetScheme; + @override String get loadLibrariesModule => 'ddc_module_loader.ddk.js'; diff --git a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart index 3e68b6eaff..477dfde221 100644 --- a/dwds/lib/src/loaders/frontend_server_strategy_provider.dart +++ b/dwds/lib/src/loaders/frontend_server_strategy_provider.dart @@ -3,31 +3,36 @@ // found in the LICENSE file. import 'package:dwds/src/debugging/metadata/provider.dart'; +import 'package:dwds/src/loaders/asset_scheme.dart'; import 'package:dwds/src/loaders/ddc.dart'; import 'package:dwds/src/loaders/ddc_library_bundle.dart'; import 'package:dwds/src/loaders/require.dart'; import 'package:dwds/src/loaders/strategy.dart'; import 'package:dwds/src/readers/asset_reader.dart'; import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds/src/utilities/web_path_translator.dart'; import 'package:path/path.dart' as p; abstract class FrontendServerStrategyProvider { final ReloadConfiguration _configuration; final AssetReader _assetReader; - final PackageUriMapper _packageUriMapper; + final PathResolver _pathResolver; final Future> Function() _digestsProvider; final String _basePath; final BuildSettings _buildSettings; final String? _packageConfigPath; + AssetScheme get assetScheme; + FrontendServerStrategyProvider( this._configuration, this._assetReader, - this._packageUriMapper, + PathResolver? pathResolver, this._digestsProvider, this._buildSettings, { this._packageConfigPath, - }) : _basePath = _assetReader.basePath; + }) : _basePath = _assetReader.basePath, + _pathResolver = pathResolver ?? FrontendServerPathResolver(); T get strategy; @@ -73,17 +78,11 @@ abstract class FrontendServerStrategyProvider { _addBasePath((await metadataProvider.moduleToSourceMap)[module] ?? ''); String? _serverPathForAppUri(String appUrl) { - final appUri = Uri.parse(appUrl); - if (appUri.isScheme('org-dartlang-app')) { - return _addBasePath(appUri.path); - } - if (appUri.isScheme('package')) { - final resolved = _packageUriMapper.packageUriToServerPath(appUri); - if (resolved != null) { - return resolved; - } - } - return null; + final translated = _pathResolver.appUriToServerPath( + appUrl, + useDebuggerModuleNames: _buildSettings.useDebuggerModuleNames, + ); + return translated != null ? _addBasePath(translated) : null; } Future> _moduleInfoForProvider( @@ -119,39 +118,51 @@ class FrontendServerDdcStrategyProvider _assetReader, _buildSettings, (String _) => null, + assetScheme, packageConfigPath: _packageConfigPath, ); FrontendServerDdcStrategyProvider( super._configuration, super._assetReader, - super._packageUriMapper, + super._pathResolver, super._digestsProvider, super._buildSettings, { super.packageConfigPath, }); + @override + AssetScheme get assetScheme => const FrontendServerAssetScheme(); + @override DdcStrategy get strategy => _ddcStrategy; } -/// Provides a [DdcLibraryBundleStrategy] suitable for use with the Frontend -/// Server. -// ignore: prefer-correct-type-name +/// Provides a [DdcLibraryBundleStrategy] for the Frontend Server-only +/// configuration. class FrontendServerDdcLibraryBundleStrategyProvider extends FrontendServerStrategyProvider { late final DdcLibraryBundleStrategy _libraryBundleStrategy; FrontendServerDdcLibraryBundleStrategyProvider( - super._configuration, - super._assetReader, - super._packageUriMapper, - super._digestsProvider, - super._buildSettings, { + ReloadConfiguration configuration, + AssetReader assetReader, + PathResolver? pathResolver, + Future> Function() digestsProvider, + BuildSettings buildSettings, { super.packageConfigPath, Uri? reloadedSourcesUri, bool injectScriptLoad = true, - }) { + }) : super( + configuration, + assetReader, + pathResolver ?? + (buildSettings.isFlutterApp + ? FlutterPathResolver() + : FrontendServerPathResolver()), + digestsProvider, + buildSettings, + ) { _libraryBundleStrategy = DdcLibraryBundleStrategy( _configuration, _moduleProvider, @@ -164,16 +175,177 @@ class FrontendServerDdcLibraryBundleStrategyProvider _assetReader, _buildSettings, (String _) => null, + assetScheme, packageConfigPath: _packageConfigPath, reloadedSourcesUri: reloadedSourcesUri, injectScriptLoad: injectScriptLoad, ); } + @override + AssetScheme get assetScheme => const FrontendServerAssetScheme(); + @override DdcLibraryBundleStrategy get strategy => _libraryBundleStrategy; } +/// Provides a [DdcLibraryBundleStrategy] for the Frontend Server + Build +/// Daemon configuration, which supports hot reload. +class FrontendServerBuildDaemonStrategyProvider + extends FrontendServerStrategyProvider { + late final DdcLibraryBundleStrategy _libraryBundleStrategy; + + FrontendServerBuildDaemonStrategyProvider( + ReloadConfiguration configuration, + AssetReader assetReader, + PathResolver? pathResolver, + Future> Function() digestsProvider, + BuildSettings buildSettings, { + super.packageConfigPath, + Uri? reloadedSourcesUri, + bool injectScriptLoad = true, + }) : super( + configuration, + assetReader, + pathResolver ?? BuildRunnerPathResolver(), + digestsProvider, + buildSettings, + ) { + _libraryBundleStrategy = DdcLibraryBundleStrategy( + _configuration, + _moduleProvider, + (_) => _digestsProvider(), + _moduleForServerPath, + _serverPathForModule, + _sourceMapPathForModule, + _serverPathForAppUri, + _moduleInfoForProvider, + _assetReader, + _buildSettings, + (String _) => null, + assetScheme, + packageConfigPath: _packageConfigPath, + reloadedSourcesUri: reloadedSourcesUri, + injectScriptLoad: injectScriptLoad, + ); + } + + @override + AssetScheme get assetScheme => const BuildRunnerAssetScheme(); + + @override + DdcLibraryBundleStrategy get strategy => _libraryBundleStrategy; + + /// Strips the top-level web/entrypoint directory from a path. + /// + /// For example: + /// - `web/main.dart` -> `main.dart` + /// - `example/append_body/main.dart` -> `append_body/main.dart` + /// - `packages/path/path.dart` -> `packages/path/path.dart` (unchanged) + String _stripPrefix(String path) { + path = path.replaceAll('\\', '/'); + if (path.startsWith('packages')) return path; + final parts = path.split('/'); + + final appUri = _buildSettings.appEntrypoint; + final validPrefixes = [ + if (appUri != null && appUri.pathSegments.isNotEmpty) + appUri.pathSegments.first, + ...WebPathTranslator.defaultWebDirs, + ]; + + if (parts.length > 1 && validPrefixes.contains(parts[0])) { + return parts.skip(1).join('/'); + } + return path; + } + + /// Looks up the DDC module name for a served source file path while remapping + /// browser-requested DDC paths (containing '.ddc') to Frontend Server-served + /// paths (containing '.dart.lib'). + /// + /// Requested paths can originate from different contexts at runtime, so we + /// perform several runtime lookups: + /// 1) Frontend Server uses '.dart.lib.js' and is referenced by expression + /// evaluation requests, metadata files, stack traces, and sourcemaps. + /// 2) Build daemon serves with '.ddc.js' and is referenced by Chrome file + /// requests and Chrome DevTools protocol script URLs. + @override + Future _moduleForServerPath( + MetadataProvider metadataProvider, + String serverPath, + ) async { + // Try looking up with the build runner path. + var module = await super._moduleForServerPath(metadataProvider, serverPath); + if (module != null) return module; + final remappedPath = WebPathTranslator.translateBuildRunnerToFesPath( + serverPath, + ); + module = await super._moduleForServerPath(metadataProvider, remappedPath); + if (module != null) return module; + + // Look up root modules with directory prefixes (e.g. 'web/' or 'example/'). + // Package dependencies ('packages/') are matched above. + final modulePathToModule = await metadataProvider.modulePathToModule; + final appUri = _buildSettings.appEntrypoint; + final validPrefixes = [ + if (appUri != null && appUri.pathSegments.isNotEmpty) + appUri.pathSegments.first, + ...WebPathTranslator.defaultWebDirs, + ]; + for (final prefix in validPrefixes) { + final match = + modulePathToModule['$prefix/$remappedPath'] ?? + modulePathToModule['$prefix/$serverPath']; + if (match != null) return match; + } + return null; + } + + @override + Future _serverPathForModule( + MetadataProvider metadataProvider, + String module, + ) async { + final path = await super._serverPathForModule(metadataProvider, module); + final stripped = _stripPrefix(path); + return WebPathTranslator.translateFesToBuildRunnerPath(stripped); + } + + @override + Future _sourceMapPathForModule( + MetadataProvider metadataProvider, + String module, + ) async { + final path = await super._sourceMapPathForModule(metadataProvider, module); + final stripped = _stripPrefix(path); + return WebPathTranslator.translateFesToBuildRunnerPath(stripped); + } + + @override + String? _serverPathForAppUri(String appUrl) => + _pathResolver.appUriToServerPath( + appUrl, + useDebuggerModuleNames: _buildSettings.useDebuggerModuleNames, + ); + + @override + Future> _moduleInfoForProvider( + MetadataProvider metadataProvider, + ) async { + final moduleInfo = await super._moduleInfoForProvider(metadataProvider); + return moduleInfo.map((module, info) { + return MapEntry( + module, + ModuleInfo( + WebPathTranslator.translateFesToBuildRunnerPath(info.fullDillPath), + WebPathTranslator.translateFesToBuildRunnerPath(info.summaryPath), + ), + ); + }); + } +} + /// Provides a [RequireStrategy] suitable for use with Frontend Server. class FrontendServerRequireStrategyProvider extends FrontendServerStrategyProvider { @@ -188,17 +360,30 @@ class FrontendServerRequireStrategyProvider _moduleInfoForProvider, _assetReader, _buildSettings, + assetScheme, packageConfigPath: _packageConfigPath, ); FrontendServerRequireStrategyProvider( - super._configuration, - super._assetReader, - super._packageUriMapper, - super._digestsProvider, - super._buildSettings, { + ReloadConfiguration configuration, + AssetReader assetReader, + PathResolver? pathResolver, + Future> Function() digestsProvider, + BuildSettings buildSettings, { super.packageConfigPath, - }); + }) : super( + configuration, + assetReader, + pathResolver ?? + (buildSettings.isFlutterApp + ? FlutterPathResolver() + : FrontendServerPathResolver()), + digestsProvider, + buildSettings, + ); + + @override + AssetScheme get assetScheme => const FrontendServerAssetScheme(); @override RequireStrategy get strategy => _requireStrategy; diff --git a/dwds/lib/src/loaders/require.dart b/dwds/lib/src/loaders/require.dart index 535c39d66e..9ce760bcbf 100644 --- a/dwds/lib/src/loaders/require.dart +++ b/dwds/lib/src/loaders/require.dart @@ -6,6 +6,7 @@ import 'dart:convert'; import 'package:dwds/src/debugging/dart_runtime_debugger.dart'; import 'package:dwds/src/debugging/metadata/provider.dart'; +import 'package:dwds/src/loaders/asset_scheme.dart'; import 'package:dwds/src/loaders/strategy.dart'; import 'package:dwds/src/readers/asset_reader.dart'; import 'package:dwds/src/services/expression_compiler.dart'; @@ -138,7 +139,8 @@ class RequireStrategy extends LoadStrategy { this._serverPathForAppUri, this._moduleInfoForProvider, AssetReader assetReader, - this._buildSettings, { + this._buildSettings, + this.assetScheme, { super.packageConfigPath, }) : super(assetReader); @@ -162,6 +164,9 @@ class RequireStrategy extends LoadStrategy { @override String get moduleFormat => 'amd'; + @override + final AssetScheme assetScheme; + @override String get loadLibrariesModule => 'require.js'; diff --git a/dwds/lib/src/loaders/strategy.dart b/dwds/lib/src/loaders/strategy.dart index c4ccaa6aa9..60084990f5 100644 --- a/dwds/lib/src/loaders/strategy.dart +++ b/dwds/lib/src/loaders/strategy.dart @@ -7,6 +7,7 @@ import 'dart:typed_data'; import 'package:dwds/src/debugging/dart_runtime_debugger.dart'; import 'package:dwds/src/debugging/metadata/provider.dart'; +import 'package:dwds/src/loaders/asset_scheme.dart'; import 'package:dwds/src/readers/asset_reader.dart'; import 'package:dwds/src/services/expression_compiler.dart'; import 'package:dwds/src/utilities/dart_uri.dart'; @@ -47,8 +48,11 @@ abstract class LoadStrategy { final String? _packageConfigPath; final _providers = {}; - LoadStrategy(this._assetReader, {String? packageConfigPath}) - : _packageConfigPath = packageConfigPath ?? _findPackageConfigFilePath(); + LoadStrategy( + this._assetReader, { + String? packageConfigPath, + // ignore: prefer_initializing_formals + }) : _packageConfigPath = packageConfigPath ?? _findPackageConfigFilePath(); /// The ID for this strategy. /// @@ -66,6 +70,9 @@ abstract class LoadStrategy { /// Used for preventing stepping into the library loading code. String get loadLibrariesModule; + /// Asset scheme, which determines file extensions for this strategy. + AssetScheme get assetScheme; + /// Returns a snippet of JS code that can be used to load a JS module. /// /// The snippet should be a reference to a function that takes a single @@ -191,11 +198,12 @@ abstract class LoadStrategy { /// Returns the [MetadataProvider] for the application located at the provided /// [entrypoint]. MetadataProvider metadataProviderFor(String entrypoint) { - if (_providers.containsKey(entrypoint)) { - return _providers[entrypoint]!; - } else { - throw StateError('No metadata provider for $entrypoint'); - } + final provider = _providers[entrypoint]; + if (provider != null) return provider; + throw StateError( + 'No metadata provider for $entrypoint. ' + 'Available providers: ${_providers.keys.toList()}', + ); } /// Creates and returns a [MetadataProvider] with the given [entrypoint] and @@ -217,7 +225,7 @@ abstract class LoadStrategy { String entrypoint, Map reloadedModulesToLibraries, ) { - final provider = _providers[entrypoint]!; + final provider = metadataProviderFor(entrypoint); return provider.reinitializeAfterHotReload(reloadedModulesToLibraries); } } @@ -235,11 +243,13 @@ class BuildSettings { final bool canaryFeatures; final bool isFlutterApp; final List experiments; + final bool useDebuggerModuleNames; const BuildSettings({ this.appEntrypoint, this.canaryFeatures = false, this.isFlutterApp = true, this.experiments = const [], + this.useDebuggerModuleNames = true, }); } diff --git a/dwds/lib/src/readers/asset_reader.dart b/dwds/lib/src/readers/asset_reader.dart index 5bec51e490..b44c5f8995 100644 --- a/dwds/lib/src/readers/asset_reader.dart +++ b/dwds/lib/src/readers/asset_reader.dart @@ -2,10 +2,14 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'package:collection/collection.dart'; +import 'package:dwds/src/loaders/asset_scheme.dart'; +import 'package:dwds/src/utilities/shared.dart'; +import 'package:dwds/src/utilities/web_path_translator.dart'; import 'package:file/file.dart'; import 'package:logging/logging.dart'; import 'package:package_config/package_config.dart'; +import 'package:path/path.dart' as p; +export 'package:dwds/src/utilities/shared.dart' show stripLeadingSlashes; /// A reader for Dart sources and related source maps. abstract class AssetReader { @@ -21,14 +25,17 @@ abstract class AssetReader { /// ``` String get basePath; - /// Returns the contents for a source map at the provided server path, or - /// null if the resource does not exist. - Future sourceMapContents(String serverPath); + /// The asset scheme used by this reader. + AssetScheme get assetScheme; /// Returns the contents for a dart source at the provided server path, or /// null if the resource does not exist. Future dartSourceContents(String serverPath); + /// Returns the contents for a source map at the provided server path, or + /// null if the resource does not exist. + Future sourceMapContents(String serverPath); + /// Returns the contents for the merged metadata output at the provided path, /// or null if the resource does not exist. Future metadataContents(String serverPath); @@ -37,12 +44,56 @@ abstract class AssetReader { Future close(); } -class PackageUriMapper { - final _logger = Logger('PackageUriMapper'); - final PackageConfig packageConfig; +abstract class PathResolver { + final Logger _logger; + final PackageConfig? packageConfig; final bool useDebuggerModuleNames; + final String? packageRoot; + + PathResolver({ + this.packageConfig, + this.useDebuggerModuleNames = false, + this.packageRoot, + required String loggerName, + }) : _logger = Logger(loggerName); - static Future create( + /// Computes the server path for a given application URL. + /// + /// Returns `null` if [appUrl] is not supported by the resolver. + String? appUriToServerPath(String appUrl, {bool? useDebuggerModuleNames}); + + /// Computes the application URI (e.g., package: URI) for a given server path. + /// + /// Returns `null` if the path cannot be translated to a validapp URI. + String? serverPathToAppUri(String serverPath); + + /// Computes the resolved file URI for a given server path. + /// + /// Returns `null` if a URI cannot be resolved. + Uri? serverPathToResolvedUri(String serverPath) { + serverPath = stripLeadingSlashes(serverPath).replaceAll('\\', '/'); + final segments = serverPath.split('/'); + if (segments.first == 'packages') { + final config = packageConfig; + if (config == null) { + _logger.severe('Cannot resolve packages without packageConfig'); + return null; + } + final packagePath = serverPathToAppUri(serverPath); + if (packagePath == null) return null; + return config.resolve(Uri.parse(packagePath)); + } else if (packageRoot != null) { + return Uri.file(p.join(packageRoot!, serverPath)); + } + _logger.severe( + 'Cannot resolve path without packages/ prefix or packageRoot: $serverPath', + ); + return null; + } +} + +final class FrontendServerPathResolver extends PathResolver { + static Future create( FileSystem fileSystem, Uri packageConfigFile, { bool useDebuggerModuleNames = false, @@ -50,76 +101,176 @@ class PackageUriMapper { final packageConfig = await loadPackageConfig( fileSystem.file(packageConfigFile), ); - return PackageUriMapper( - packageConfig, + return FrontendServerPathResolver( + packageConfig: packageConfig, useDebuggerModuleNames: useDebuggerModuleNames, ); } - PackageUriMapper(this.packageConfig, {this.useDebuggerModuleNames = false}); + FrontendServerPathResolver({ + super.packageConfig, + super.useDebuggerModuleNames = false, + super.packageRoot, + }) : super(loggerName: 'FrontendServerPathResolver'); - /// Compute server path for package uri. - /// - /// Note: needs to match `urlForComponentUri` in javascript_bundle.dart - /// in SDK code. - String? packageUriToServerPath(Uri packageUri) { - final defaultServerPath = '/packages/${packageUri.path}'; - if (packageUri.isScheme('package')) { - if (!useDebuggerModuleNames) { - return defaultServerPath; + @override + String? appUriToServerPath(String appUrl, {bool? useDebuggerModuleNames}) { + final useDebugger = useDebuggerModuleNames ?? this.useDebuggerModuleNames; + final appUri = Uri.parse(appUrl); + // Note: must match `urlForComponentUri` in javascript_bundle.dart in SDK. + if (appUri.isScheme('package')) { + // package:foo/bar.dart -> packages/foo/lib/bar.dart (useDebugger) + // package:foo/bar.dart -> packages/foo/bar.dart (!useDebugger) + final pathSegments = appUri.pathSegments; + if (pathSegments.isEmpty) { + throw FormatException('Invalid package URI with empty path: $appUrl'); } - final resolvedUri = packageConfig.resolve(packageUri); - if (resolvedUri == null) { - _logger.severe('Cannot resolve package uri $packageUri'); - return defaultServerPath; - } - final package = packageConfig.packageOf(resolvedUri); - if (package == null) { - _logger.severe('Cannot find package for package uri $packageUri'); - return defaultServerPath; + final buildRunnerPath = 'packages/${appUri.path}'; + final path = useDebugger + ? WebPathTranslator.addLibSegment(buildRunnerPath) + : buildRunnerPath; + return path; + } + if (appUri.isScheme('org-dartlang-app')) { + // org-dartlang-app:///web/main.dart -> web/main.dart + // org-dartlang-app:///packages/foo/bar.dart -> packages/foo/lib/bar.dart (useDebugger) + // org-dartlang-app:///packages/foo/lib/bar.dart -> packages/foo/bar.dart (!useDebugger) + final segments = appUri.pathSegments; + if (segments.isEmpty) { + throw FormatException('Invalid org-dartlang-app URI: $appUrl'); } - final root = package.root; - final relativeUrl = resolvedUri.toString().replaceFirst('$root', ''); - final relativeRoot = _getRelativeRoot(root); - final ret = relativeRoot == null - ? 'packages/$relativeUrl' - : 'packages/$relativeRoot/$relativeUrl'; - return ret; + final path = useDebugger + ? WebPathTranslator.addLibSegment(appUri.path.substring(1)) + : WebPathTranslator.removeLibSegment(appUri.path.substring(1)); + return path; } - _logger.severe('Expected package uri, but found $packageUri'); return null; } - /// Compute resolved file uri for a server path. - Uri? serverPathToResolvedUri(String serverPath) { - serverPath = stripLeadingSlashes(serverPath); - final segments = serverPath.split('/'); - if (segments.first == 'packages') { - if (!useDebuggerModuleNames) { - return packageConfig.resolve( - Uri(scheme: 'package', pathSegments: segments.skip(1)), - ); + @override + String? serverPathToAppUri(String serverPath) { + // packages/foo/lib/bar.dart -> package:foo/bar.dart + // packages/foo/bar.dart -> package:foo/bar.dart + // web/main.dart -> web/main.dart + serverPath = stripLeadingSlashes(serverPath).replaceAll('\\', '/'); + if (!serverPath.startsWith('packages/')) return serverPath; + return WebPathTranslator.packagePathToPackageUri(serverPath); + } +} + +final class BuildRunnerPathResolver extends PathResolver { + static Future create( + FileSystem fileSystem, + Uri packageConfigFile, { + bool useDebuggerModuleNames = false, + }) async { + final packageConfig = await loadPackageConfig( + fileSystem.file(packageConfigFile), + ); + return BuildRunnerPathResolver( + packageConfig: packageConfig, + useDebuggerModuleNames: useDebuggerModuleNames, + ); + } + + BuildRunnerPathResolver({ + super.packageConfig, + super.useDebuggerModuleNames = false, + super.packageRoot, + }) : super(loggerName: 'BuildRunnerPathResolver'); + + @override + String? appUriToServerPath(String appUrl, {bool? useDebuggerModuleNames}) { + final useDebugger = useDebuggerModuleNames ?? this.useDebuggerModuleNames; + final appUri = Uri.parse(appUrl); + // Note: must match `urlForComponentUri` in javascript_bundle.dart in SDK. + if (appUri.isScheme('package')) { + // package:foo/bar.dart -> packages/foo/bar.dart (useDebugger) + // package:foo/bar.dart -> /packages/foo/bar.dart (!useDebugger) + final pathSegments = appUri.pathSegments; + if (pathSegments.isEmpty) { + throw FormatException('Invalid package URI with empty path: $appUrl'); + } + final path = 'packages/${appUri.path}'; + if (!useDebugger && path.startsWith('packages/')) { + return '/$path'; + } + return path; + } + + if (appUri.isScheme('org-dartlang-app')) { + // org-dartlang-app:///web/main.dart -> main.dart + // org-dartlang-app:///packages/foo/bar.dart -> packages/foo/bar.dart + final segments = appUri.pathSegments; + if (segments.isEmpty) { + throw FormatException('Invalid org-dartlang-app URI: $appUrl'); } - final relativeRoot = segments.skip(1).first; - final relativeUrl = segments.skip(2).join('/'); - final package = packageConfig.packages.firstWhere( - (Package p) => _getRelativeRoot(p.root) == relativeRoot, - ); - final resolvedUri = package.root.resolve(relativeUrl); - - return resolvedUri; + final first = segments.first; + if (first == 'packages') { + if (segments.length < 3) { + throw FormatException('Invalid package path in app URI: $appUrl'); + } + return segments.join('/'); + } + return segments.skip(1).join('/'); } - _logger.severe('Expected "packages/" path, but found $serverPath'); + return null; } -} -String stripLeadingSlashes(String path) { - while (path.startsWith('/') || path.startsWith('\\')) { - path = path.substring(1); + @override + String? serverPathToAppUri(String serverPath) { + // packages/foo/bar.dart -> package:foo/bar.dart + // web/main.dart -> web/main.dart + serverPath = stripLeadingSlashes(serverPath).replaceAll('\\', '/'); + if (!serverPath.startsWith('packages/')) return serverPath; + return serverPath.replaceFirst('packages/', 'package:'); } - return path; } -String? _getRelativeRoot(Uri root) => - root.pathSegments.lastWhereOrNull((segment) => segment.isNotEmpty); +final class FlutterPathResolver extends PathResolver { + FlutterPathResolver({ + super.packageConfig, + super.useDebuggerModuleNames = false, + super.packageRoot, + }) : super(loggerName: 'FlutterPathResolver'); + + @override + String? appUriToServerPath(String appUrl, {bool? useDebuggerModuleNames}) { + final useDebugger = useDebuggerModuleNames ?? this.useDebuggerModuleNames; + final isFlutterPackage = appUrl.startsWith('package:'); + + if (isFlutterPackage) { + // package:foo/bar.dart -> packages/foo/bar.dart + final appUri = Uri.parse(appUrl); + final pathSegments = appUri.pathSegments; + if (pathSegments.isEmpty) { + throw FormatException('Invalid package URI with empty path: $appUrl'); + } + final path = 'packages/${appUri.path}'; + return path; + } else { + final appUri = Uri.parse(appUrl); + if (appUri.isScheme('org-dartlang-app')) { + // org-dartlang-app:///web/main.dart -> web/main.dart + // org-dartlang-app:///packages/foo/bar.dart -> packages/foo/lib/bar.dart (useDebugger) + // org-dartlang-app:///packages/foo/lib/bar.dart -> packages/foo/bar.dart (!useDebugger) + final path = useDebugger + ? WebPathTranslator.addLibSegment(appUri.path.substring(1)) + : WebPathTranslator.removeLibSegment(appUri.path.substring(1)); + return path; + } + } + return null; + } + + @override + String? serverPathToAppUri(String serverPath) { + // packages/foo/lib/bar.dart -> package:foo/bar.dart + // packages/foo/bar.dart -> package:foo/bar.dart + // web/main.dart -> web/main.dart + serverPath = stripLeadingSlashes(serverPath).replaceAll('\\', '/'); + if (!serverPath.startsWith('packages/')) return serverPath; + return WebPathTranslator.packagePathToPackageUri(serverPath); + } +} diff --git a/dwds/lib/src/readers/frontend_server_asset_reader.dart b/dwds/lib/src/readers/frontend_server_asset_reader.dart index a87b459f3f..6dc36c3a10 100644 --- a/dwds/lib/src/readers/frontend_server_asset_reader.dart +++ b/dwds/lib/src/readers/frontend_server_asset_reader.dart @@ -5,6 +5,7 @@ import 'dart:convert'; import 'dart:io'; +import 'package:dwds/src/loaders/asset_scheme.dart'; import 'package:dwds/src/readers/asset_reader.dart'; import 'package:logging/logging.dart'; import 'package:package_config/package_config.dart'; @@ -21,6 +22,8 @@ class FrontendServerAssetReader implements AssetReader { final String _packageRoot; final Future _packageConfig; final String _basePath; + final AssetScheme _assetScheme; + final PathResolver _pathResolver; /// Map of Dart module server path to source map contents. final _mapContents = {}; @@ -42,8 +45,12 @@ class FrontendServerAssetReader implements AssetReader { required String outputPath, required String packageRoot, String? basePath, + AssetScheme? assetScheme, + PathResolver? pathResolver, }) : _packageRoot = packageRoot, _basePath = basePath ?? '', + _assetScheme = assetScheme ?? const FrontendServerAssetScheme(), + _pathResolver = pathResolver ?? FrontendServerPathResolver(), _mapOriginal = File('$outputPath.map'), _mapIncremental = File('$outputPath.incremental.map'), _jsonOriginal = File('$outputPath.json'), @@ -58,21 +65,25 @@ class FrontendServerAssetReader implements AssetReader { String get basePath => _basePath; @override - Future dartSourceContents(String serverPath) async { - if (serverPath.endsWith('.dart')) { - final packageConfig = await _packageConfig; + AssetScheme get assetScheme => _assetScheme; - Uri? fileUri; - if (serverPath.startsWith('packages/')) { - final packagePath = serverPath.replaceFirst('packages/', 'package:'); + @override + Future dartSourceContents(String serverPath) async { + serverPath = serverPath.replaceAll('\\', '/'); + final packageConfig = await _packageConfig; + var strippedPath = _stripBasePath(serverPath); + Uri? fileUri; + if (strippedPath.startsWith('packages/')) { + final packagePath = _pathResolver.serverPathToAppUri(strippedPath); + if (packagePath != null) { fileUri = packageConfig.resolve(Uri.parse(packagePath)); - } else { - fileUri = p.toUri(p.join(_packageRoot, serverPath)); - } - if (fileUri != null) { - final source = File(fileUri.toFilePath()); - if (source.existsSync()) return source.readAsString(); } + } else { + fileUri = p.toUri(p.join(_packageRoot, strippedPath)); + } + if (fileUri != null) { + final source = File(fileUri.toFilePath()); + if (source.existsSync()) return source.readAsString(); } _logger.severe('Cannot find source contents for $serverPath'); return null; @@ -80,13 +91,13 @@ class FrontendServerAssetReader implements AssetReader { @override Future sourceMapContents(String serverPath) async { - if (serverPath.endsWith('lib.js.map')) { - if (!serverPath.startsWith('/')) serverPath = '/$serverPath'; - // Strip the .map, sources are looked up by their js path. - serverPath = p.withoutExtension(serverPath); - if (_mapContents.containsKey(serverPath)) { - return _mapContents[serverPath]; - } + serverPath = serverPath.replaceAll('\\', '/'); + var strippedPath = _stripBasePath(serverPath); + if (!strippedPath.startsWith('/')) strippedPath = '/$strippedPath'; + // Strip the .map, sources are looked up by their js path. + strippedPath = p.withoutExtension(strippedPath); + if (_mapContents.containsKey(strippedPath)) { + return _mapContents[strippedPath]; } _logger.severe('Cannot find source map contents for $serverPath'); return null; @@ -128,6 +139,22 @@ class FrontendServerAssetReader implements AssetReader { throw UnimplementedError(); } + /// Strips the [_basePath] prefix from the [serverPath]. + /// + /// Example (if [_basePath] is 'foo/bar'): + /// - 'foo/bar/packages/path/src/utils.dart' -> 'packages/path/src/utils.dart' + String _stripBasePath(String serverPath) { + var strippedPath = stripLeadingSlashes(serverPath); + final strippedBasePath = stripLeadingSlashes(_basePath); + if (strippedBasePath.isNotEmpty && + strippedPath.startsWith(strippedBasePath)) { + strippedPath = stripLeadingSlashes( + strippedPath.substring(strippedBasePath.length), + ); + } + return strippedPath; + } + @override Future close() async {} } diff --git a/dwds/lib/src/readers/proxy_server_asset_reader.dart b/dwds/lib/src/readers/proxy_server_asset_reader.dart index 4225ba9bd9..285a239a83 100644 --- a/dwds/lib/src/readers/proxy_server_asset_reader.dart +++ b/dwds/lib/src/readers/proxy_server_asset_reader.dart @@ -5,6 +5,7 @@ import 'dart:convert'; import 'dart:io'; +import 'package:dwds/src/loaders/asset_scheme.dart'; import 'package:dwds/src/readers/asset_reader.dart'; import 'package:http/http.dart' as http; import 'package:http/io_client.dart'; @@ -18,14 +19,16 @@ class ProxyServerAssetReader implements AssetReader { final Handler _handler; final http.Client? _client; + final AssetScheme _assetScheme; - ProxyServerAssetReader._(this._handler, this._client); + ProxyServerAssetReader._(this._handler, this._client, this._assetScheme); factory ProxyServerAssetReader( int assetServerPort, { String root = '', String host = 'localhost', bool isHttps = false, + AssetScheme? assetScheme, }) { final scheme = isHttps ? 'https://' : 'http://'; final inner = HttpClient() @@ -38,34 +41,35 @@ class ProxyServerAssetReader implements AssetReader { var url = '$scheme$host:$assetServerPort/'; if (root.isNotEmpty) url += '$root/'; final handler = proxyHandler(url, client: client); - return ProxyServerAssetReader._(handler, client); + return ProxyServerAssetReader._( + handler, + client, + assetScheme ?? const BuildRunnerAssetScheme(), + ); } - ProxyServerAssetReader.fromHandler(this._handler) : _client = null; + ProxyServerAssetReader.fromHandler(this._handler, {AssetScheme? assetScheme}) + : _client = null, + _assetScheme = assetScheme ?? const BuildRunnerAssetScheme(); @override String get basePath => ''; @override - Future dartSourceContents(String serverPath) => - _readResource(serverPath); + AssetScheme get assetScheme => _assetScheme; - @override - Future sourceMapContents(String serverPath) => - _readResource(serverPath); - - Future _readResource(String path) async { + Future _readResource(String serverPath) async { // Handlers expect a fully formed HTML URI. The actual hostname and port // does not matter. final request = Request( 'GET', - Uri.parse('http://foo:0000/$path'), + Uri.parse('http://foo:0000/$serverPath'), ).change(headers: {'requested-by': 'DWDS'}); final response = await _handler(request); if (response.statusCode != HttpStatus.ok) { _logger.warning(''' - Failed to load asset at path: $path. + Failed to load asset at path: $serverPath. Status code: ${response.statusCode} @@ -78,6 +82,14 @@ class ProxyServerAssetReader implements AssetReader { } } + @override + Future dartSourceContents(String serverPath) => + _readResource(serverPath); + + @override + Future sourceMapContents(String serverPath) => + _readResource(serverPath); + @override Future metadataContents(String serverPath) => _readResource(serverPath); diff --git a/dwds/lib/src/services/chrome/chrome_proxy_service.dart b/dwds/lib/src/services/chrome/chrome_proxy_service.dart index 1add07eece..49c0fc951e 100644 --- a/dwds/lib/src/services/chrome/chrome_proxy_service.dart +++ b/dwds/lib/src/services/chrome/chrome_proxy_service.dart @@ -415,7 +415,7 @@ final class ChromeProxyService extends ProxyService { }) { return wrapInErrorHandlerAsync( 'addBreakpoint', - () => _addBreakpoint(isolateId, scriptId, line), + () => _addBreakpoint(isolateId, scriptId, line, column: column), ); } diff --git a/dwds/lib/src/services/daemon_expression_compiler.dart b/dwds/lib/src/services/daemon_expression_compiler.dart new file mode 100644 index 0000000000..5d020f5b9b --- /dev/null +++ b/dwds/lib/src/services/daemon_expression_compiler.dart @@ -0,0 +1,60 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; + +import 'package:dwds/src/services/expression_compiler.dart'; + +/// An expression compiler that forwards expression compilation requests to the +/// build daemon. +/// +/// We assume the build daemon already has a Frontend Server intialized. +final class DaemonExpressionCompiler implements ExpressionCompiler { + final Future> Function(Map request) + _sendRequest; + + DaemonExpressionCompiler(this._sendRequest); + + @override + Future compileExpressionToJs( + String isolateId, + String libraryUri, + String scriptUri, + int line, + int column, + Map jsModules, + Map jsFrameValues, + String moduleName, + String expression, + ) async { + final requestJson = { + 'instruction': 'COMPILE_EXPRESSION_JS', + 'isolateId': isolateId, + 'libraryUri': libraryUri, + 'scriptUri': scriptUri, + 'line': line, + 'column': column, + 'jsModules': jsModules, + 'jsFrameValues': jsFrameValues, + 'moduleName': moduleName, + 'expression': expression, + }; + final responseJson = await _sendRequest(requestJson); + final result = responseJson['result'] as String; + final isError = responseJson['isError'] as bool; + return ExpressionCompilationResult(result, isError); + } + + /// Not needed by [DaemonExpressionCompiler] since we assume that a shared + /// Frontend Server instance is already initialized. + @override + Future initialize(CompilerOptions options) async {} + + /// Not needed by [DaemonExpressionCompiler] since reloads are handled by + /// `reloaded_sources.json`, which are generated from build daemon's build + /// outputs. + @override + Future updateDependencies(Map modules) async => + true; +} diff --git a/dwds/lib/src/utilities/dart_uri.dart b/dwds/lib/src/utilities/dart_uri.dart index 3c0b6f9484..0f0fc3755f 100644 --- a/dwds/lib/src/utilities/dart_uri.dart +++ b/dwds/lib/src/utilities/dart_uri.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. import 'package:dwds/src/config/tool_configuration.dart'; +import 'package:dwds/src/utilities/shared.dart'; +import 'package:dwds/src/utilities/web_path_translator.dart'; import 'package:logging/logging.dart'; import 'package:package_config/package_config.dart'; import 'package:path/path.dart' as p; @@ -19,8 +21,8 @@ class DartUri { /// - package:packageName/pathUnderLib/file.dart /// - org-dartlang-app:///prefix/path/file.dart, where prefix is ignored. /// e.g. org-dartlang-app:example/hello_world/main.dart, - /// - /packages/packageName/foo.dart, the web server form of a package URI, - /// e.g. /packages/path/src/utils.dart + /// - /packages/packageName/foo.dart, the web server package path of a + /// package URI, e.g. /packages/path/src/utils.dart /// - /path/foo.dart or path/foo.dart, e.g. /hello_world/web/main.dart, where /// path is a web server path and so relative to the directory being /// served, not to the package. @@ -29,7 +31,11 @@ class DartUri { factory DartUri(String uri, [String? root]) { // TODO(annagrin): Support creating DartUris from `dart:` uris. // Issue: https://github.com/dart-lang/webdev/issues/1584 - if (uri.startsWith('org-dartlang-app:') || uri.startsWith('google3:')) { + if (uri.startsWith('org-dartlang-app:')) { + return DartUri._fromDartLangUri(uri, root: root); + } + if (uri.startsWith('google3:')) { + // TODO(markzipan): Determine if google3 needs [root] to be passed. return DartUri._fromDartLangUri(uri); } if (uri.startsWith('package:')) { @@ -42,20 +48,19 @@ class DartUri { return DartUri._fromRelativePath(uri, root: root); } if (uri.startsWith('/')) { - return DartUri._fromRelativePath(uri); + return DartUri._fromRelativePath(uri, root: root); } if (uri.startsWith('http:') || uri.startsWith('https:')) { - return DartUri(Uri.parse(uri).path); + return DartUri(Uri.parse(uri).path, root); } - - throw FormatException('Unsupported URI form: $uri'); + return DartUri._fromRelativePath(uri, root: root); } @override String toString() => 'DartUri: $serverPath'; - /// Construct from a package: URI - factory DartUri._fromDartLangUri(String uri) { + /// Construct from an app URI + factory DartUri._fromDartLangUri(String uri, {String? root}) { var serverPath = globalToolConfiguration.loadStrategy.serverPathForAppUri( uri, ); @@ -63,7 +68,7 @@ class DartUri { _logger.severe('Cannot find server path for $uri'); serverPath = uri; } - return DartUri._(serverPath); + return DartUri._fromRelativePath(serverPath, root: root); } /// Construct from a package: URI @@ -87,14 +92,90 @@ class DartUri { } /// Construct from a path, relative to the directory being served. + /// + /// [root] is the directory the app is served from (such as 'web') and is used + /// to translate served URI paths to their on-disk paths. factory DartUri._fromRelativePath(String uri, {String? root}) { - uri = uri[0] == '.' ? uri.substring(1) : uri; - uri = uri[0] == '/' ? uri.substring(1) : uri; + uri = _normalizeUri(uri); + // Strip the root from [uri]. + final basePath = _stripRoot(uri, root); + // Normalize package paths. + final normalizedPath = _normalizePackagePath(basePath); + // Re-attach root if needed. + final finalPath = _ensureRoot(normalizedPath, root); + return DartUri._(finalPath); + } + + /// Normalizes [uri] by converting backslashes and stripping leading + /// dots/slashes. + /// + /// Examples: + /// - `web\main.dart` -> `web/main.dart` + /// - `./web/main.dart` -> `web/main.dart` + /// - `/web/main.dart` -> `web/main.dart` + static String _normalizeUri(String uri) { + uri = uri.replaceAll('\\', '/'); + if (uri.startsWith('.')) uri = uri.substring(1); + if (uri.startsWith('/')) uri = uri.substring(1); + return uri; + } + + /// Strips the [root] prefix from the URI if it is present. + /// + /// Examples: + /// - `web/packages/foo.dart` (root: `web`) -> `packages/foo.dart` + /// - `packages/foo.dart` (root: `web`) -> `packages/foo.dart` + /// - `web/packages/foo.dart` (root: `/web`) -> `packages/foo.dart` + static String _stripRoot(String uri, String? root) { + if (root == null || root.isEmpty) return uri; + final cleanRoot = _getCleanRootPrefix(root); + if (cleanRoot.isEmpty) return uri; + return uri.startsWith(cleanRoot) ? uri.substring(cleanRoot.length) : uri; + } - if (root != null) { - return DartUri._fromRelativePath(p.url.join(root, uri)); + /// Ensures the URI starts with [root] if provided. + /// + /// Examples: + /// - `packages/foo.dart` (root: `web`) -> `web/packages/foo.dart` + /// - `web/packages/foo.dart` (root: `web`) -> `web/packages/foo.dart` + /// - `packages/foo.dart` (root: `/web`) -> `/web/packages/foo.dart` + static String _ensureRoot(String uri, String? root) { + if (root == null || root.isEmpty) return uri; + final cleanRoot = _getCleanRootPrefix(root); + if (cleanRoot.isEmpty || !uri.startsWith(cleanRoot)) { + return p.url.join(root, uri); } - return DartUri._(uri); + return uri; + } + + /// Cleans up and formats [root]. + /// + /// Examples: + /// - `web` -> `web/` + /// - `/web` -> `web/` + /// - `web/` -> `web/` + /// - `/` -> `` + static String _getCleanRootPrefix(String root) { + final cleanRoot = stripLeadingSlashes(root.replaceAll('\\', '/')); + if (cleanRoot.isEmpty) return ''; + return cleanRoot.endsWith('/') ? cleanRoot : '$cleanRoot/'; + } + + /// Normalizes package paths, considering project names and 'lib' segments. + /// + /// Examples: + /// - `lib/main.dart` -> `packages/my_app/main.dart` + /// - `packages/foo/bar.dart` -> `packages/foo/lib/bar.dart` (FrontendServer) + /// - `packages/foo/lib/bar.dart` -> `packages/foo/bar.dart` (BuildRunner) + static String _normalizePackagePath(String uri) { + uri = WebPathTranslator.translateLibPathToPackagePath( + uri, + globalToolConfiguration.appMetadata.workspaceName, + ); + return WebPathTranslator.canonicalizePackagePath( + uri, + globalToolConfiguration.loadStrategy, + ); } /// The canonical web server path part of the URI. diff --git a/dwds/lib/src/utilities/shared.dart b/dwds/lib/src/utilities/shared.dart index ba866644c8..206bd0098d 100644 --- a/dwds/lib/src/utilities/shared.dart +++ b/dwds/lib/src/utilities/shared.dart @@ -45,3 +45,10 @@ Future wrapInErrorHandlerAsync( ); }, test: (e) => e is! RPCError && e is! SentinelException); } + +String stripLeadingSlashes(String path) { + while (path.startsWith('/') || path.startsWith('\\')) { + path = path.substring(1); + } + return path; +} diff --git a/dwds/lib/src/utilities/web_path_translator.dart b/dwds/lib/src/utilities/web_path_translator.dart new file mode 100644 index 0000000000..fb1840b522 --- /dev/null +++ b/dwds/lib/src/utilities/web_path_translator.dart @@ -0,0 +1,194 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. +import 'package:dwds/src/loaders/asset_scheme.dart'; +import 'package:dwds/src/loaders/strategy.dart'; + +/// Translates paths across DDC, Frontend Server, DWDS, and package:build. +class WebPathTranslator { + static const _fesScheme = FrontendServerAssetScheme(); + static const _buildRunnerScheme = BuildRunnerAssetScheme(); + + static String _modifyLibSegment(String serverPath, {required bool add}) { + serverPath = serverPath.replaceAll('\\', '/'); + if (!serverPath.startsWith('packages/')) return serverPath; + final segments = serverPath.split('/'); + if (segments.length > 2) { + final isLib = segments[2] == 'lib'; + if (add && !isLib) { + return 'packages/${segments[1]}/lib/${segments.skip(2).join('/')}'; + } + if (!add && isLib) { + return 'packages/${segments[1]}/${segments.skip(3).join('/')}'; + } + } + return serverPath; + } + + /// Adds 'lib' to a package path. + /// + /// Example: `packages/foo/bar.dart` -> `packages/foo/lib/bar.dart` + static String addLibSegment(String serverPath) => + _modifyLibSegment(serverPath, add: true); + + /// Removes 'lib' from a package path. + /// + /// Example: `packages/foo/lib/bar.dart` -> `packages/foo/bar.dart` + static String removeLibSegment(String serverPath) => + _modifyLibSegment(serverPath, add: false); + + /// Translates a 'lib/' path to a package path. + /// + /// DDC generates source maps with relative paths from the generated output. + /// Files in the root package can resolve to 'lib/' references, so we prepend + /// `packages/[rootPackageName]/` to resolve them to a package path. Example: + /// `lib/foo.dart` -> `packages/root_package/foo.dart` + static String translateLibPathToPackagePath( + String uri, + String? rootPackageName, + ) { + if (uri.startsWith('lib/')) { + if (rootPackageName == null || rootPackageName.isEmpty) { + throw StateError( + 'Cannot translate lib/ path without a root package name. URI: $uri', + ); + } + return 'packages/$rootPackageName/${uri.substring('lib/'.length)}'; + } + return uri; + } + + /// Converts a `packages/` server path to a `package:` URI string. + /// + /// Examples: + /// `packages/foo/lib/bar.dart` -> `package:foo/bar.dart` + /// `packages/foo/bar.dart` -> `package:foo/bar.dart` + static String? packagePathToPackageUri(String path) { + if (!path.startsWith('packages/')) return null; + final pathWithoutLib = removeLibSegment(path); + return 'package:${pathWithoutLib.substring('packages/'.length)}'; + } + + /// Canonicalizes a `packages/` server path using the provided [LoadStrategy]. + /// + /// Converts `packages/foo/lib/bar.dart` or `packages/foo/bar.dart` to the + /// load strategy's canonical server path. Otherwise returns [path]. + static String canonicalizePackagePath( + String path, + LoadStrategy loadStrategy, + ) { + if (!path.startsWith('packages/')) return path; + final packageUri = packagePathToPackageUri(path); + if (packageUri != null) { + final canonicalPath = loadStrategy.serverPathForAppUri(packageUri); + if (canonicalPath != null) { + var result = canonicalPath; + while (result.startsWith('/')) { + result = result.substring(1); + } + return result; + } + } + return path; + } + + /// Translates package paths between layouts based on asset schemes. + /// + /// For example, from [FrontendServerAssetScheme] to [BuildRunnerAssetScheme]: + /// `packages/foo/lib/bar.dart` -> `packages/foo/bar.dart` + /// From [BuildRunnerAssetScheme] to [FrontendServerAssetScheme]: + /// `packages/foo/bar.dart` -> `packages/foo/lib/bar.dart` + static String translatePackagePath( + String path, { + required AssetScheme from, + required AssetScheme to, + }) { + if (from is FrontendServerAssetScheme && to is BuildRunnerAssetScheme) { + return removeLibSegment(path); + } + if (from is BuildRunnerAssetScheme && to is FrontendServerAssetScheme) { + return addLibSegment(path); + } + return path; + } + + /// Maps module extensions between layouts based on asset schemes. + /// + /// For example, from [FrontendServerAssetScheme] to [BuildRunnerAssetScheme]: + /// `main.dart.lib` -> `main.ddc` + /// `main.dart.lib.js` -> `main.ddc.js` + static String translateModuleExtension( + String path, { + required AssetScheme from, + required AssetScheme to, + }) { + if (from.descriptorSuffix == to.descriptorSuffix) return path; + return path.replaceAll(from.descriptorSuffix, to.descriptorSuffix); + } + + /// Maps a Frontend Server suffix ('.dart.lib') to a package:build ('.ddc') + /// suffix. + static String translateFesToBuildRunnerPath(String path) { + final withoutLib = translatePackagePath( + path, + from: _fesScheme, + to: _buildRunnerScheme, + ); + return translateModuleExtension( + withoutLib, + from: _fesScheme, + to: _buildRunnerScheme, + ); + } + + /// Maps a package:build (build_runner) path to a Frontend Server path. + /// + /// Adds 'lib/' to package paths and replaces Build Runner suffixes with + /// Frontend Server suffixes (e.g. '.ddc' -> '.dart.lib'). + static String translateBuildRunnerToFesPath(String path) { + final withLib = translatePackagePath( + path, + from: _buildRunnerScheme, + to: _fesScheme, + ); + return translateModuleExtension( + withLib, + from: _buildRunnerScheme, + to: _fesScheme, + ); + } + + static const defaultWebDirs = ['web', 'test', 'example', 'benchmark']; + + /// Reconstructs the `org-dartlang-app:///` scheme for paths. + /// + /// This is required for relative sourcemaps emitted by the Frontend Server, + /// which lack a scheme (such as `/web/main.dart`). + static String reconstructAppScheme(String path, String scriptLocation) { + if (path.startsWith('org-dartlang-app:')) return path; + final normalizedPath = path.startsWith('/') ? path : '/$path'; + final isWebDir = defaultWebDirs.any( + (dir) => normalizedPath.startsWith('/$dir/'), + ); + if (isWebDir) { + // Example: + // scriptLocation: `/` + // path: `/web/main.dart` + // after: `org-dartlang-app:///web/main.dart` + return 'org-dartlang-app://$normalizedPath'; + } + if (scriptLocation.startsWith('/packages/') && + !normalizedPath.startsWith('/packages/')) { + // Example: + // scriptLocation: `/packages/my_package/subdir/main.ddc.js` + // path: `/lib/src/library.dart` + // after: `org-dartlang-app:///packages/my_package/src/library.dart` + final packageDir = scriptLocation.split('/').take(3).join('/'); + final relativePath = normalizedPath.startsWith('/lib/') + ? normalizedPath.substring('/lib/'.length) + : normalizedPath.substring(1); + return 'org-dartlang-app://$packageDir/$relativePath'; + } + return path; + } +} diff --git a/dwds/lib/src/version.dart b/dwds/lib/src/version.dart index e5c03848be..d3dcccae6c 100644 --- a/dwds/lib/src/version.dart +++ b/dwds/lib/src/version.dart @@ -1,2 +1,2 @@ // Generated code. Do not modify. -const packageVersion = '27.1.3-wip'; +const packageVersion = '28.0.0'; diff --git a/dwds/pubspec.yaml b/dwds/pubspec.yaml index 2a52de9a71..3f620903bf 100644 --- a/dwds/pubspec.yaml +++ b/dwds/pubspec.yaml @@ -1,6 +1,6 @@ name: dwds # Every time this changes you need to run `dart run tool/build.dart`. -version: 27.1.3-wip +version: 28.0.0 description: >- A service that proxies between the Chrome debug protocol and the Dart VM diff --git a/dwds/test/integration/fixtures/frontend_server_context.dart b/dwds/test/integration/fixtures/frontend_server_context.dart index 7fb06c63cb..86b933d250 100644 --- a/dwds/test/integration/fixtures/frontend_server_context.dart +++ b/dwds/test/integration/fixtures/frontend_server_context.dart @@ -53,7 +53,7 @@ class FrontendServerTestContext extends TestContext { p.join(project.webAssetsPath, project.dartEntryFileName), ); frontendServerFileSystem = const LocalFileSystem(); - final packageUriMapper = await PackageUriMapper.create( + final packageUriMapper = await FrontendServerPathResolver.create( frontendServerFileSystem, project.packageConfigFile, useDebuggerModuleNames: testSettings.useDebuggerModuleNames, @@ -99,31 +99,33 @@ class FrontendServerTestContext extends TestContext { basePath = webRunner.devFS!.assetServer.basePath; assetReader = webRunner.devFS!.assetServer; assetHandler = webRunner.devFS!.assetServer.handleRequest; - loadStrategy = switch (testSettings.moduleFormat) { - ModuleFormat.amd => FrontendServerRequireStrategyProvider( + loadStrategy = switch (( + testSettings.moduleFormat, + buildSettings.canaryFeatures, + )) { + (ModuleFormat.amd, _) => FrontendServerRequireStrategyProvider( + testSettings.reloadConfiguration, + assetReader, + packageUriMapper, + () async => {}, + buildSettings, + ).strategy, + (ModuleFormat.ddc, true) => + FrontendServerDdcLibraryBundleStrategyProvider( + testSettings.reloadConfiguration, + assetReader, + packageUriMapper, + () async => {}, + buildSettings, + reloadedSourcesUri: reloadedSourcesUri, + ).strategy, + (ModuleFormat.ddc, false) => FrontendServerDdcStrategyProvider( testSettings.reloadConfiguration, assetReader, packageUriMapper, () async => {}, buildSettings, ).strategy, - ModuleFormat.ddc => - buildSettings.canaryFeatures - ? FrontendServerDdcLibraryBundleStrategyProvider( - testSettings.reloadConfiguration, - assetReader, - packageUriMapper, - () async => {}, - buildSettings, - reloadedSourcesUri: reloadedSourcesUri, - ).strategy - : FrontendServerDdcStrategyProvider( - testSettings.reloadConfiguration, - assetReader, - packageUriMapper, - () async => {}, - buildSettings, - ).strategy, _ => throw Exception( 'Unsupported DDC module format ' '${testSettings.moduleFormat.name}.', diff --git a/dwds/test/integration/package_uri_mapper_test.dart b/dwds/test/integration/package_uri_mapper_test.dart index c27ef513ee..f362797497 100644 --- a/dwds/test/integration/package_uri_mapper_test.dart +++ b/dwds/test/integration/package_uri_mapper_test.dart @@ -33,7 +33,7 @@ void main() { final resolvedPath = '${project.packageDirectory}/lib/test_library.dart'; - late final PackageUriMapper packageUriMapper; + late final BuildRunnerPathResolver pathResolver; setUpAll(() async { await project.setUp(); // Note: Run `dart pub upgrade` before the test cases to fix @@ -51,7 +51,7 @@ void main() { ), ); - packageUriMapper = await PackageUriMapper.create( + pathResolver = await BuildRunnerPathResolver.create( fileSystem, packageConfigFile, useDebuggerModuleNames: useDebuggerModuleNames, @@ -61,12 +61,15 @@ void main() { tearDownAll(project.tearDown); test('Can convert package urls to server paths', () { - expect(packageUriMapper.packageUriToServerPath(packageUri), serverPath); + expect( + pathResolver.appUriToServerPath(packageUri.toString()), + serverPath, + ); }); test('Can convert server paths to file paths', () { expect( - packageUriMapper.serverPathToResolvedUri(serverPath), + pathResolver.serverPathToResolvedUri(serverPath), isA() .having((uri) => uri.scheme, 'scheme', 'file') .having((uri) => uri.path, 'path', endsWith(resolvedPath)), diff --git a/dwds/web/client.dart b/dwds/web/client.dart index 89a91b8409..ee2cfb48bf 100644 --- a/dwds/web/client.dart +++ b/dwds/web/client.dart @@ -201,7 +201,7 @@ Future? main() { } else if (reloadConfiguration == 'ReloadConfiguration.hotRestart') { if (dartModuleStrategy == 'ddc-library-bundle') { - await manager.hotRestartBegin(hotRestartReloadedSourcesPath!); + await manager.hotRestartBegin(hotRestartReloadedSourcesPath); manager.hotRestartEnd(); } else { await manager.hotRestart( @@ -535,7 +535,7 @@ Future handleWebSocketHotRestartRequest( try { final runId = const Uuid().v4(); if (manager.supportsTwoPhaseHotRestart) { - await manager.hotRestartBegin(hotRestartReloadedSourcesPath!); + await manager.hotRestartBegin(hotRestartReloadedSourcesPath); manager.hotRestartEnd(); } else { // TODO(nshahan): Remove after migrating to hotRestartBegin/hotRestartEnd. @@ -626,14 +626,7 @@ external String? get _reloadedSourcesPath; String? get hotRestartReloadedSourcesPath => _reloadedSourcesPath; -String get hotReloadReloadedSourcesPath { - final path = _reloadedSourcesPath; - assert( - path != null, - "Expected 'reloadedSourcesPath' to not be null in a hot reload.", - ); - return path!; -} +String? get hotReloadReloadedSourcesPath => _reloadedSourcesPath; /// Debugger-initiated hot restart. // TODO(nshahan): Remove after migrating to hotRestartBegin/hotRestartEnd. diff --git a/dwds/web/reloader/ddc_library_bundle_restarter.dart b/dwds/web/reloader/ddc_library_bundle_restarter.dart index 630890bb0c..d63a6b6f10 100644 --- a/dwds/web/reloader/ddc_library_bundle_restarter.dart +++ b/dwds/web/reloader/ddc_library_bundle_restarter.dart @@ -133,10 +133,14 @@ class DdcLibraryBundleRestarter implements Restarter, TwoPhaseRestarter { } @override - Future> hotRestartBegin(String reloadedSourcesPath) async { + Future> hotRestartBegin(String? reloadedSourcesPath) async { + assert( + reloadedSourcesPath != null, + "Expected 'reloadedSourcesPath' to not be null in a hot restart.", + ); await _dartDevEmbedder.debugger.maybeInvokeFlutterDisassemble(); final srcModuleLibraries = await _getSrcModuleLibraries( - reloadedSourcesPath, + reloadedSourcesPath!, ); final jsFilesToRequest = srcModuleLibraries.jsify() as JSArray; final requestedJsFiles = await _dartDevEmbedder @@ -149,11 +153,15 @@ class DdcLibraryBundleRestarter implements Restarter, TwoPhaseRestarter { void hotRestartEnd() => _dartDevEmbedder.hotRestartEnd(); @override - Future> hotReloadStart(String reloadedSourcesPath) async { + Future> hotReloadStart(String? reloadedSourcesPath) async { + assert( + reloadedSourcesPath != null, + "Expected 'reloadedSourcesPath' to not be null in a hot reload.", + ); final filesToLoad = JSArray(); final librariesToReload = JSArray(); final srcModuleLibraries = await _getSrcModuleLibraries( - reloadedSourcesPath, + reloadedSourcesPath!, ); for (final srcModuleLibrary in srcModuleLibraries) { final srcModuleLibraryCast = srcModuleLibrary.cast(); @@ -169,7 +177,18 @@ class DdcLibraryBundleRestarter implements Restarter, TwoPhaseRestarter { (JSFunction hotReloadEndCallback) { _capturedHotReloadEndCallback = hotReloadEndCallback; }.toJS; - await _dartDevEmbedder.hotReload(filesToLoad, librariesToReload).toDart; + final result = await _dartDevEmbedder + .hotReload(filesToLoad, librariesToReload) + .toDart; + _dartDevEmbedder.debugger.invokeExtension( + 'ext.dwds.sendEvent', + '{"type": "hotReloadResult", "result": "$result"}', + ); + if (result != null && + result.typeofEquals('boolean') && + !(result as JSBoolean).toDart) { + throw Exception('Hot reload rejected by DDC'); + } return srcModuleLibraries.jsify() as JSArray; } diff --git a/dwds/web/reloader/ddc_restarter.dart b/dwds/web/reloader/ddc_restarter.dart index 696f4e4f81..d10d0e2f65 100644 --- a/dwds/web/reloader/ddc_restarter.dart +++ b/dwds/web/reloader/ddc_restarter.dart @@ -59,13 +59,17 @@ class DdcRestarter implements Restarter { } @override - Future hotReloadEnd() => throw UnimplementedError( - 'Hot reload is not supported for the DDC module format.', - ); + Future hotReloadEnd() async { + // No-op for DDC. + } @override - Future> hotReloadStart(String reloadedSourcesPath) => - throw UnimplementedError( - 'Hot reload is not supported for the DDC module format.', - ); + Future> hotReloadStart(String? reloadedSourcesPath) async { + if (reloadedSourcesPath == null || reloadedSourcesPath.isEmpty) { + return JSArray(); + } + throw UnimplementedError( + 'Hot reload is not supported for the DDC module format.', + ); + } } diff --git a/dwds/web/reloader/manager.dart b/dwds/web/reloader/manager.dart index f1f7ac1544..eb123d5e14 100644 --- a/dwds/web/reloader/manager.dart +++ b/dwds/web/reloader/manager.dart @@ -66,7 +66,7 @@ class ReloadingManager { bool get supportsTwoPhaseHotRestart => _restarter is TwoPhaseRestarter; - Future> hotRestartBegin(String reloadedSourcesPath) async { + 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 @@ -107,7 +107,7 @@ class ReloadingManager { /// `module`: The name of the library bundle in `src`. /// `libraries`: An array of strings containing the libraries that were /// compiled in `src`. - Future> hotReloadStart(String reloadedSourcesPath) => + Future> hotReloadStart(String? reloadedSourcesPath) => _restarter.hotReloadStart(reloadedSourcesPath); /// Does a hard reload of the application. diff --git a/dwds/web/reloader/require_restarter.dart b/dwds/web/reloader/require_restarter.dart index 61ba853035..af01bd2372 100644 --- a/dwds/web/reloader/require_restarter.dart +++ b/dwds/web/reloader/require_restarter.dart @@ -170,15 +170,19 @@ class RequireRestarter implements Restarter { } @override - Future hotReloadEnd() => throw UnimplementedError( - 'Hot reload is not supported for the AMD module format.', - ); + Future hotReloadEnd() async { + // No-op for AMD. + } @override - Future> hotReloadStart(String reloadedSourcesPath) => - throw UnimplementedError( - 'Hot reload is not supported for the AMD module format.', - ); + Future> hotReloadStart(String? reloadedSourcesPath) async { + if (reloadedSourcesPath == null || reloadedSourcesPath.isEmpty) { + return JSArray(); + } + throw UnimplementedError( + 'Hot reload is not supported for the AMD module format.', + ); + } Future _runMainWhenReady(Future? readyToRunMain) async { if (readyToRunMain != null) { diff --git a/dwds/web/reloader/restarter.dart b/dwds/web/reloader/restarter.dart index 1810cca2db..0b0460b3ff 100644 --- a/dwds/web/reloader/restarter.dart +++ b/dwds/web/reloader/restarter.dart @@ -17,7 +17,7 @@ abstract class TwoPhaseRestarter implements Restarter { /// /// Passes the [reloadedSourcesPath] through to the `DartDevEmbedder` and /// bubbles up the returned array of scripts that were actually requested. - Future> hotRestartBegin(String reloadedSourcesPath); + Future> hotRestartBegin(String? reloadedSourcesPath); /// Finishes the hot restart operation that must have been previously started /// by [hotRestartBegin]. @@ -83,5 +83,5 @@ abstract class Restarter { /// `module`: The name of the library bundle in `src`. /// `libraries`: An array of strings containing the libraries that were /// compiled in `src`. - Future> hotReloadStart(String reloadedSourcesPath); + Future> hotReloadStart(String? reloadedSourcesPath); } diff --git a/dwds_test_common/lib/fixtures/context.dart b/dwds_test_common/lib/fixtures/context.dart index 0c9a025155..85deb477bd 100644 --- a/dwds_test_common/lib/fixtures/context.dart +++ b/dwds_test_common/lib/fixtures/context.dart @@ -115,6 +115,8 @@ abstract class TestContext { Process get chromeDriver => _chromeDriver!; Process? _chromeDriver; + Process? fesProcess; + bool lastBuildFailed = false; WebkitDebugger get webkitDebugger => _webkitDebugger!; late WebkitDebugger? _webkitDebugger; @@ -464,7 +466,7 @@ abstract class TestContext { if (Platform.isWindows) { await Future.delayed(const Duration(seconds: 1)); } - _reloadedSources.clear(); + reloadedSources.clear(); for (var (:file, :originalString, :newString) in edits) { if (file == project.dartEntryFileName) { file = project.dartEntryFilePath; @@ -525,7 +527,7 @@ abstract class TestContext { ); } - _reloadedSources.add( + reloadedSources.add( WebDevFS.createReloadedSourceEntry( src: '/$srcPath.ddc.js', module: moduleName, @@ -538,7 +540,7 @@ abstract class TestContext { /// /// Used by the DDC Library Bundle module system to record changed files for /// hot restart/reload. - final _reloadedSources = >[]; + final reloadedSources = >[]; void addLibraryFile({required String libFileName, required String contents}) { final file = File(project.dartLibFilePath(libFileName)); @@ -561,7 +563,7 @@ abstract class TestContext { return (request) { final path = request.url.path; if (path.endsWith(WebDevFS.reloadedSourcesFileName)) { - return shelf.Response.ok(jsonEncode(_reloadedSources)); + return shelf.Response.ok(jsonEncode(reloadedSources)); } return proxy(request); }; diff --git a/dwds_test_common/lib/fixtures/fakes.dart b/dwds_test_common/lib/fixtures/fakes.dart index 0b90d0e163..6757b54096 100644 --- a/dwds_test_common/lib/fixtures/fakes.dart +++ b/dwds_test_common/lib/fixtures/fakes.dart @@ -15,6 +15,7 @@ import 'package:dwds/src/debugging/modules.dart'; import 'package:dwds/src/debugging/remote_debugger.dart'; import 'package:dwds/src/debugging/webkit_debugger.dart'; import 'package:dwds/src/handlers/socket_connections.dart'; +import 'package:dwds/src/loaders/asset_scheme.dart'; import 'package:dwds/src/loaders/require.dart'; import 'package:dwds/src/loaders/strategy.dart'; import 'package:dwds/src/services/expression_compiler.dart'; @@ -217,6 +218,7 @@ class FakeWebkitDebugger implements WebkitDebugger { (MetadataProvider _) async => {}, FakeAssetReader(), buildSettings, + const BuildRunnerAssetScheme(), ), ), ); @@ -355,6 +357,9 @@ class FakeStrategy extends LoadStrategy { appEntrypoint: Uri.parse('package:myapp/main.dart'), ); + @override + AssetScheme get assetScheme => const BuildRunnerAssetScheme(); + @override Future bootstrapFor(String entrypoint) async => 'dummy_bootstrap'; @@ -424,26 +429,36 @@ class FakeStrategy extends LoadStrategy { class FakeAssetReader implements AssetReader { String? metadata; - final String? _dartSource; - final String? _sourceMap; - FakeAssetReader({this.metadata, this._dartSource, this._sourceMap}); + final String? dartSource; + final String? sourceMap; + final AssetScheme _assetScheme; + + FakeAssetReader({ + this.metadata, + this.dartSource, + this.sourceMap, + AssetScheme? assetScheme, + }) : _assetScheme = assetScheme ?? const FrontendServerAssetScheme(); @override String get basePath => ''; @override - Future dartSourceContents(String serverPath) { - return _throwUnimplementedOrReturnContents(_dartSource); + AssetScheme get assetScheme => _assetScheme; + + @override + Future dartSourceContents(String serverPath) async { + return _throwUnimplementedOrReturnContents(dartSource); } @override - Future metadataContents(String serverPath) { - return _throwUnimplementedOrReturnContents(metadata); + Future sourceMapContents(String serverPath) async { + return _throwUnimplementedOrReturnContents(sourceMap); } @override - Future sourceMapContents(String serverPath) { - return _throwUnimplementedOrReturnContents(_sourceMap); + Future metadataContents(String serverPath) async { + return _throwUnimplementedOrReturnContents(metadata); } @override diff --git a/dwds_test_common/lib/fixtures/utilities.dart b/dwds_test_common/lib/fixtures/utilities.dart index b81e675690..428edffce0 100644 --- a/dwds_test_common/lib/fixtures/utilities.dart +++ b/dwds_test_common/lib/fixtures/utilities.dart @@ -4,6 +4,8 @@ // @skip_package_deps_validation +import 'dart:async'; +import 'dart:convert'; import 'dart:io'; import 'package:build_daemon/client.dart'; @@ -24,13 +26,67 @@ Future connectClient( String workingDirectory, List options, void Function(ServerLog) logHandler, -) => BuildDaemonClient.connect(workingDirectory, [ - dartPath, - 'run', - 'build_runner', - 'daemon', - ...options, -], logHandler: logHandler); +) async { + final process = await Process.start(dartPath, [ + 'run', + 'build_runner', + 'daemon', + ...options, + ], workingDirectory: workingDirectory); + + final stdoutBuffer = []; + final stderrBuffer = []; + final daemonStartup = Completer(); + + process.stdout.transform(utf8.decoder).transform(const LineSplitter()).listen( + (line) { + stdoutBuffer.add(line); + if (line == readyToConnectLog || + line == versionSkew || + line == optionsSkew) { + if (!daemonStartup.isCompleted) { + daemonStartup.complete(line); + } + } + }, + ); + + process.stderr + .transform(utf8.decoder) + .transform(const LineSplitter()) + .listen(stderrBuffer.add); + + final result = await Future.any([ + daemonStartup.future, + Future.delayed( + const Duration(seconds: 45), + () => 'Timed out waiting for daemon to start up.', + ), + ]); + + if (result == readyToConnectLog) { + return BuildDaemonClient.connectUnchecked( + workingDirectory, + logHandler: logHandler, + ); + } + + process.kill(); + final exitCode = await process.exitCode.timeout( + const Duration(seconds: 5), + onTimeout: () => -1, + ); + + final details = [ + 'Command: $dartPath run build_runner daemon ${options.join(' ')}', + 'Working Directory: $workingDirectory', + 'Exit Code: $exitCode', + if (stdoutBuffer.isNotEmpty) 'Stdout:\n${stdoutBuffer.join('\n')}', + if (stderrBuffer.isNotEmpty) 'Stderr:\n${stderrBuffer.join('\n')}', + ].join('\n'); + + throw StateError('Failed to start build daemon (result: $result).\n$details'); +} /// Returns the port of the daemon asset server. int daemonPort(String workingDirectory) { @@ -44,64 +100,6 @@ int daemonPort(String workingDirectory) { String _assetServerPortFilePath(String workingDirectory) => '${daemonWorkspace(workingDirectory)}/.asset_server_port'; -/// Retries a callback function with a delay until the result is the -/// [expectedResult] (if provided) or is not null. -Future retryFn( - T Function() callback, { - int retryCount = 3, - int delayInMs = 1000, - String failureMessage = 'Function did not succeed after retries.', - T? expectedResult, -}) async { - if (retryCount == 0) { - throw Exception(failureMessage); - } - - await Future.delayed(Duration(milliseconds: delayInMs)); - try { - final result = callback(); - if (expectedResult != null && result == expectedResult) return result; - if (expectedResult == null && result != null) return result; - } catch (_) { - // Ignore any exceptions. - } - - return retryFn( - callback, - retryCount: retryCount - 1, - delayInMs: delayInMs, - failureMessage: failureMessage, - ); -} - -/// Retries an asynchronous callback function with a delay until the result is -/// non-null. -Future retryFnAsync( - Future Function() callback, { - int retryCount = 3, - int delayInMs = 1000, - String failureMessage = 'Function did not succeed after retries.', -}) async { - if (retryCount == 0) { - throw Exception(failureMessage); - } - - await Future.delayed(Duration(milliseconds: delayInMs)); - try { - final result = await callback(); - if (result != null) return result; - } catch (_) { - // Ignore any exceptions. - } - - return retryFnAsync( - callback, - retryCount: retryCount - 1, - delayInMs: delayInMs, - failureMessage: failureMessage, - ); -} - class TestDebugSettings extends DebugSettings { TestDebugSettings.withDevToolsLaunch( TestContext context, { @@ -292,6 +290,7 @@ class TestBuildSettings extends BuildSettings { super.canaryFeatures, super.isFlutterApp, super.experiments, + super.useDebuggerModuleNames, }); const TestBuildSettings.dart({Uri? appEntrypoint}) @@ -305,11 +304,14 @@ class TestBuildSettings extends BuildSettings { bool? canaryFeatures, bool? isFlutterApp, List? experiments, + bool? useDebuggerModuleNames, }) => TestBuildSettings( appEntrypoint: appEntrypoint ?? this.appEntrypoint, canaryFeatures: canaryFeatures ?? this.canaryFeatures, isFlutterApp: isFlutterApp ?? this.isFlutterApp, experiments: experiments ?? this.experiments, + useDebuggerModuleNames: + useDebuggerModuleNames ?? this.useDebuggerModuleNames, ); } diff --git a/dwds_test_common/lib/frontend_server_common/asset_server.dart b/dwds_test_common/lib/frontend_server_common/asset_server.dart index ef39ff0b35..35e045d7ed 100644 --- a/dwds_test_common/lib/frontend_server_common/asset_server.dart +++ b/dwds_test_common/lib/frontend_server_common/asset_server.dart @@ -11,12 +11,14 @@ import 'dart:typed_data'; import 'package:dwds/asset_reader.dart'; import 'package:dwds/config.dart'; -import 'package:dwds_test_common/test_sdk_layout.dart'; +import 'package:dwds/src/loaders/asset_scheme.dart'; import 'package:file/file.dart'; import 'package:logging/logging.dart'; import 'package:mime/mime.dart' as mime; import 'package:shelf/shelf.dart' as shelf; +import '../test_sdk_layout.dart'; + class TestAssetServer implements AssetReader { late final String _basePath; final String index; @@ -33,9 +35,10 @@ class TestAssetServer implements AssetReader { final Map _sourceMaps = {}; final Map _metadata = {}; late String _mergedMetadata; - final PackageUriMapper _packageUriMapper; + final PathResolver _packageUriMapper; final InternetAddress internetAddress; final TestSdkLayout _sdkLayout; + final AssetScheme _assetScheme; TestAssetServer( this.index, @@ -44,14 +47,18 @@ class TestAssetServer implements AssetReader { this.internetAddress, this._projectDirectory, this._fileSystem, - this._sdkLayout, - ) { + this._sdkLayout, { + AssetScheme? assetScheme, + }) : _assetScheme = assetScheme ?? const FrontendServerAssetScheme() { _basePath = _parseBasePathFromIndexHtml(index); } @override String get basePath => _basePath; + @override + AssetScheme get assetScheme => _assetScheme; + bool hasFile(String path) => _files.containsKey(path); Uint8List getFile(String path) => _files[path]!; @@ -73,7 +80,7 @@ class TestAssetServer implements AssetReader { String hostname, int port, UrlEncoder? urlTunneler, - PackageUriMapper packageUriMapper, + PathResolver packageUriMapper, ) async { final address = (await InternetAddress.lookup(hostname)).first; final httpServer = await HttpServer.bind(address, port); @@ -103,6 +110,22 @@ class TestAssetServer implements AssetReader { final headers = {}; + var lookupPath = requestPath; + // Frontend Server tests may cache files under their 'lib/' path instead + // of their fully qualified served path. + // E.g., "packages/foo/bar.dart" and "lib/bar.dart". + if (lookupPath.startsWith('packages/')) { + final parts = lookupPath.split('/'); + if (parts.length > 2) { + final candidate = 'lib/${parts.sublist(2).join('/')}'; + if (_files.containsKey(candidate) || + _sourceMaps.containsKey('$candidate.map') || + _metadata.containsKey('$candidate.metadata')) { + lookupPath = candidate; + } + } + } + if (request.url.path.endsWith('.html')) { final indexFile = _fileSystem.file(_projectDirectory.resolve(index)); if (indexFile.existsSync()) { @@ -117,24 +140,24 @@ class TestAssetServer implements AssetReader { // If this is a JavaScript file, it must be in the in-memory cache. // Attempt to look up the file by URI. - if (hasFile(requestPath)) { - final List bytes = getFile(requestPath); + if (hasFile(lookupPath)) { + final List bytes = getFile(lookupPath); headers[HttpHeaders.contentLengthHeader] = bytes.length.toString(); headers[HttpHeaders.contentTypeHeader] = 'application/javascript'; return shelf.Response.ok(bytes, headers: headers); } // If this is a sourcemap file, then it might be in the in-memory cache. // Attempt to lookup the file by URI. - if (hasSourceMap(requestPath)) { - final List bytes = getSourceMap(requestPath); + if (hasSourceMap(lookupPath)) { + final List bytes = getSourceMap(lookupPath); headers[HttpHeaders.contentLengthHeader] = bytes.length.toString(); headers[HttpHeaders.contentTypeHeader] = 'application/json'; return shelf.Response.ok(bytes, headers: headers); } // If this is a metadata file, then it might be in the in-memory cache. // Attempt to lookup the file by URI. - if (hasMetadata(requestPath)) { - final List bytes = getMetadata(requestPath); + if (hasMetadata(lookupPath)) { + final List bytes = getMetadata(lookupPath); headers[HttpHeaders.contentLengthHeader] = bytes.length.toString(); headers[HttpHeaders.contentTypeHeader] = 'application/json'; return shelf.Response.ok(bytes, headers: headers); @@ -173,6 +196,11 @@ class TestAssetServer implements AssetReader { _files[filePath] = Uint8List.fromList(utf8.encode(contents)); } + /// Delete a single file from the in-memory cache. + void deleteFile(String filePath) { + _files.remove(filePath); + } + /// Update the in-memory asset server with the provided source and manifest /// files. /// @@ -259,6 +287,20 @@ class TestAssetServer implements AssetReader { // Attempt to resolve `path` to a dart file. File _resolveDartFile(String path) { + // Expression evaluation and debugger requests may reference sources + // using `package:` URIs. Resolve them to files using the packageConfig. + if (path.startsWith('package:')) { + final serverPath = _packageUriMapper.appUriToServerPath(path); + if (serverPath != null) { + final resolved = _packageUriMapper.serverPathToResolvedUri(serverPath); + if (resolved != null) { + final packageFile = _fileSystem.file(resolved); + if (packageFile.existsSync()) { + return packageFile; + } + } + } + } // If this is a dart file, it must be on the local file system and is // likely coming from a source map request. The tool doesn't currently // consider the case of Dart files as assets. @@ -294,11 +336,10 @@ class TestAssetServer implements AssetReader { @override Future dartSourceContents(String serverPath) async { final stripped = _stripBasePath(serverPath, basePath); - if (stripped != null) { - final result = _resolveDartFile(stripped); - if (result.existsSync()) { - return result.readAsString(); - } + if (stripped == null) return null; + final result = _resolveDartFile(stripped); + if (result.existsSync()) { + return result.readAsString(); } _logger.severe('Source not found: $serverPath'); return null; @@ -307,10 +348,9 @@ class TestAssetServer implements AssetReader { @override Future sourceMapContents(String serverPath) async { final stripped = _stripBasePath(serverPath, basePath); - if (stripped != null) { - if (hasSourceMap(stripped)) { - return utf8.decode(getSourceMap(stripped)); - } + if (stripped == null) return null; + if (hasSourceMap(stripped)) { + return utf8.decode(getSourceMap(stripped)); } _logger.severe('Source map not found: $serverPath'); return null; @@ -319,15 +359,13 @@ class TestAssetServer implements AssetReader { @override Future metadataContents(String serverPath) async { final stripped = _stripBasePath(serverPath, basePath); - if (stripped != null) { - if (stripped.endsWith('.ddc_merged_metadata')) { - return _mergedMetadata; - } - if (hasMetadata(stripped)) { - return utf8.decode(getMetadata(stripped)); - } + if (stripped == null) return null; + if (stripped.endsWith('.ddc_merged_metadata')) { + return _mergedMetadata; + } + if (hasMetadata(stripped)) { + return utf8.decode(getMetadata(stripped)); } - _logger.severe('Metadata not found: $serverPath'); return null; } @@ -344,6 +382,9 @@ class TestAssetServer implements AssetReader { String? _stripBasePath(String path, String basePath) { path = stripLeadingSlashes(path); + // Requests starting with 'packages/' are top-level and served relative + // to the root directory, so they don't contain the app's base path. + if (path.startsWith('packages/')) return path; if (path.startsWith(basePath)) { path = path.substring(basePath.length); } else { diff --git a/dwds_test_common/lib/frontend_server_common/devfs.dart b/dwds_test_common/lib/frontend_server_common/devfs.dart index a7800f38a1..a9991f4736 100644 --- a/dwds_test_common/lib/frontend_server_common/devfs.dart +++ b/dwds_test_common/lib/frontend_server_common/devfs.dart @@ -10,13 +10,12 @@ import 'dart:io'; import 'package:dwds/asset_reader.dart'; import 'package:dwds/config.dart'; import 'package:dwds/expression_compiler.dart'; -// ignore: implementation_imports import 'package:dwds/src/debugging/metadata/module_metadata.dart'; import 'package:dwds/utilities.dart'; -import 'package:dwds_test_common/test_sdk_layout.dart'; import 'package:file/file.dart'; import 'package:path/path.dart' as p; +import '../test_sdk_layout.dart'; import 'asset_server.dart'; import 'bootstrap.dart'; import 'frontend_server_client.dart'; @@ -39,7 +38,7 @@ class WebDevFS { final String hostname; final int port; final Uri projectDirectory; - final PackageUriMapper packageUriMapper; + final PathResolver packageUriMapper; final String index; final UrlEncoder? urlTunneler; List sources = []; @@ -188,10 +187,11 @@ class WebDevFS { Uri.parse('org-dartlang-app:///$mainUri'), invalidatedFiles, outputPath: p.join(dillOutputPath, 'app.dill'), - packageConfig: packageUriMapper.packageConfig, + packageConfig: packageUriMapper.packageConfig!, recompileRestart: fullRestart, ); if (compilerOutput == null || compilerOutput.errorCount > 0) { + assetServer.deleteFile('reloaded_sources.json'); return UpdateFSReport(success: false); } sources = compilerOutput.sources; diff --git a/dwds_test_common/lib/frontend_server_common/frontend_server_client.dart b/dwds_test_common/lib/frontend_server_common/frontend_server_client.dart index 9c3ee5d2c1..ccfce39b3a 100644 --- a/dwds_test_common/lib/frontend_server_common/frontend_server_client.dart +++ b/dwds_test_common/lib/frontend_server_common/frontend_server_client.dart @@ -9,10 +9,10 @@ import 'dart:convert'; import 'dart:io'; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/test_sdk_layout.dart'; import 'package:logging/logging.dart'; import 'package:package_config/package_config.dart'; +import '../test_sdk_layout.dart'; import 'utilities.dart'; import 'uuid.dart'; @@ -411,7 +411,9 @@ class ResidentCompiler { if (compilerOptions.canaryFeatures) '--dartdevc-canary', if (verbose) '--verbose', if (compilerOptions.moduleFormat == ModuleFormat.ddc) - '--dartdevc-module-format=ddc', + '--dartdevc-module-format=ddc' + else if (compilerOptions.moduleFormat == ModuleFormat.amd) + '--dartdevc-module-format=amd', ]; _logger.info(args.join(' ')); final workingDirectory = projectDirectory.toFilePath(); @@ -444,8 +446,12 @@ class ResidentCompiler { unawaited( server.exitCode.then((int code) { - if (code != 0) { - throw Exception('the Dart compiler exited unexpectedly.'); + // Ignore exit codes that signal expected process termination: + // -9 (SIGKILL), -15 (SIGTERM), and 255 (process killed). + if (code != 0 && code != -9 && code != -15 && code != 255) { + throw Exception( + 'the Dart compiler exited unexpectedly with exit code: $code.', + ); } }), ); diff --git a/dwds_test_common/lib/frontend_server_common/resident_runner.dart b/dwds_test_common/lib/frontend_server_common/resident_runner.dart index 905d7c61db..fda6cc1cac 100644 --- a/dwds_test_common/lib/frontend_server_common/resident_runner.dart +++ b/dwds_test_common/lib/frontend_server_common/resident_runner.dart @@ -10,10 +10,10 @@ import 'dart:async'; import 'package:dwds/asset_reader.dart'; import 'package:dwds/config.dart'; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/test_sdk_layout.dart'; import 'package:file/file.dart'; import 'package:logging/logging.dart'; +import '../test_sdk_layout.dart'; import 'devfs.dart'; import 'frontend_server_client.dart'; @@ -54,7 +54,7 @@ class ResidentWebRunner { final Uri mainUri; final Uri projectDirectory; final Uri packageConfigFile; - final PackageUriMapper packageUriMapper; + final PathResolver packageUriMapper; final String outputPath; final List fileSystemRoots; final String fileSystemScheme; diff --git a/dwds_test_common/lib/integration/hot_reload.dart b/dwds_test_common/lib/integration/hot_reload.dart index ff6b124ef4..7be6676729 100644 --- a/dwds_test_common/lib/integration/hot_reload.dart +++ b/dwds_test_common/lib/integration/hot_reload.dart @@ -14,6 +14,7 @@ import 'package:vm_service/vm_service.dart'; const originalString = 'Hello World!'; const newString = 'Bonjour le monde!'; +const anotherString = 'Hola Mundo!'; void runTests({ required TestSdkConfigurationProvider provider, @@ -71,6 +72,7 @@ void runTests({ await context.setUp( testSettings: TestSettings( enableExpressionEvaluation: true, + verboseCompiler: true, moduleFormat: provider.ddcModuleFormat, canaryFeatures: provider.canaryFeatures, ), @@ -88,10 +90,21 @@ void runTests({ await makeEditAndRecompile(); final vm = await client.getVM(); final isolate = await client.getIsolate(vm.isolates!.first.id!); - final report = await fakeClient.reloadSources(isolate.id!); + var report = await fakeClient.reloadSources(isolate.id!); expect(report.success, true); - await callEvaluateAndWaitForLog(newString); + await context.makeEdits([ + ( + file: 'library1.dart', + originalString: newString, + newString: anotherString, + ), + ]); + await recompile(); + report = await fakeClient.reloadSources(isolate.id!); + expect(report.success, true); + + await callEvaluateAndWaitForLog(anotherString); }); test('can hot reload with no changes, hot reload with changes, and ' @@ -121,5 +134,44 @@ void runTests({ await callEvaluateAndWaitForLog(newString); }); + + test('can reject hot reload and recover with hot restart', () async { + final client = context.debugConnection.vmService; + + await context.makeEdits([ + ( + file: 'library1.dart', + originalString: "String get reloadValue => '$originalString';", + newString: + ''' +String get reloadValue => '$newString'; +class Bar {} +class Baz {} +class Foo extends Bar {} +''', + ), + ]); + await recompile(); + final vm = await client.getVM(); + final isolate = await client.getIsolate(vm.isolates!.first.id!); + var report = await fakeClient.reloadSources(isolate.id!); + expect(report.success, true); + + // Make an illegal edit. + await context.makeEdits([ + ( + file: 'library1.dart', + originalString: 'class Foo extends Bar', + newString: 'class Foo extends Bar', + ), + ]); + await context.recompile(fullRestart: false, allowFailure: true); + report = await fakeClient.reloadSources(isolate.id!); + expect(report.success, false); + + // Successfully recover with hot restart. + await context.recompile(fullRestart: true); + await callEvaluateAndWaitForLog(newString); + }); }, timeout: const Timeout.factor(2)); } diff --git a/dwds_test_common/lib/integration/hot_restart.dart b/dwds_test_common/lib/integration/hot_restart.dart index 80beb7ef3f..06f5d73afa 100644 --- a/dwds_test_common/lib/integration/hot_restart.dart +++ b/dwds_test_common/lib/integration/hot_restart.dart @@ -33,14 +33,13 @@ void runTests({ tearDownAll(provider.dispose); Future recompile({bool hasEdits = false}) async { - if (context.usesFrontendServer) { - await context.recompile(fullRestart: true); - } else { - assert(context.usesBuildDaemon); + if (context.usesBuildDaemon) { if (hasEdits) { // Only gets a new build if there were edits. await context.waitForSuccessfulBuild(); } + } else if (context.usesFrontendServer) { + await context.recompile(fullRestart: true); } } @@ -162,7 +161,11 @@ void runTests({ }); }, // `BuildResult`s are only ever emitted when using the build daemon. +<<<<<<< HEAD skip: context.usesBuildDaemon ? null : true, +======= + skip: compilationMode.usesBuildDaemon ? null : true, +>>>>>>> 216e5b64 (DWDS Feature: Daemon Expression Compiler & FES Support) timeout: const Timeout.factor(2), ); @@ -556,7 +559,11 @@ void runTests({ }); }, // `BuildResult`s are only ever emitted when using the build daemon. +<<<<<<< HEAD skip: context.usesBuildDaemon ? null : true, +======= + skip: compilationMode.usesBuildDaemon ? null : true, +>>>>>>> 216e5b64 (DWDS Feature: Daemon Expression Compiler & FES Support) timeout: const Timeout.factor(2), ); diff --git a/dwds_test_common/lib/integration/hot_restart_breakpoints.dart b/dwds_test_common/lib/integration/hot_restart_breakpoints.dart index 096bb53a9d..b03ab5f910 100644 --- a/dwds_test_common/lib/integration/hot_restart_breakpoints.dart +++ b/dwds_test_common/lib/integration/hot_restart_breakpoints.dart @@ -402,7 +402,7 @@ void runTests({ expect(consoleLogs.contains(newGenLog), false); await resumeAndWaitForLog(newGenLog); }); - }); + }, timeout: const Timeout.factor(4)); } TypeMatcher _hasKind(String kind) => diff --git a/dwds_test_common/lib/integration/hot_restart_correctness.dart b/dwds_test_common/lib/integration/hot_restart_correctness.dart index 889f427c13..7ce70c5caf 100644 --- a/dwds_test_common/lib/integration/hot_restart_correctness.dart +++ b/dwds_test_common/lib/integration/hot_restart_correctness.dart @@ -44,15 +44,13 @@ void runTests({ newString: newString, ), ]); - if (context.usesFrontendServer) { - await context.recompile(fullRestart: true); - } else { - assert(context.usesBuildDaemon); + if (context.usesBuildDaemon) { await context.waitForSuccessfulBuild(propagateToBrowser: true); + } else if (context.usesFrontendServer) { + await context.recompile(fullRestart: true); } } - // Wait for `expectedString` to be printed to the console. Future waitForLog(String expectedString) async { final completer = Completer(); final subscription = context.webkitDebugger.onConsoleAPICalled.listen((e) { @@ -195,7 +193,11 @@ void runTests({ }); }, // `BuildResult`s are only ever emitted when using the build daemon. +<<<<<<< HEAD skip: context.usesBuildDaemon ? null : true, +======= + skip: compilationMode.usesBuildDaemon ? null : true, +>>>>>>> 216e5b64 (DWDS Feature: Daemon Expression Compiler & FES Support) timeout: const Timeout.factor(2), ); } diff --git a/dwds_test_common/lib/integration/readers/proxy_server_asset_reader.dart b/dwds_test_common/lib/integration/readers/proxy_server_asset_reader.dart index ed844ba471..fc4085534c 100644 --- a/dwds_test_common/lib/integration/readers/proxy_server_asset_reader.dart +++ b/dwds_test_common/lib/integration/readers/proxy_server_asset_reader.dart @@ -44,14 +44,14 @@ void testAll({ }); test('can read source maps', () async { - final result = await assetReader.dartSourceContents( + final result = await assetReader.sourceMapContents( 'hello_world/main.ddc.js.map', ); expect(result, isNotNull); }); test('returns null if the source map path does not exist', () async { - final result = await assetReader.dartSourceContents( + final result = await assetReader.sourceMapContents( 'hello_world/foo.ddc.js.map', ); expect(result, isNull); diff --git a/dwds_test_common/lib/integration/sdk_configuration.dart b/dwds_test_common/lib/integration/sdk_configuration.dart index d9cc69bb0b..5d30e29ae2 100644 --- a/dwds_test_common/lib/integration/sdk_configuration.dart +++ b/dwds_test_common/lib/integration/sdk_configuration.dart @@ -5,11 +5,12 @@ import 'dart:io'; import 'package:dwds/src/utilities/sdk_configuration.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:file/memory.dart'; import 'package:path/path.dart' as p; import 'package:test/test.dart'; +import '../test_sdk_configuration.dart'; + var _throwsDoesNotExistException = throwsA( isA().having( (e) => '$e', diff --git a/webdev/pubspec.yaml b/webdev/pubspec.yaml index b05db3f050..390aca6293 100644 --- a/webdev/pubspec.yaml +++ b/webdev/pubspec.yaml @@ -57,3 +57,5 @@ executables: webdev: dependency_overrides: + dwds: + path: ../dwds diff --git a/webdev/test/helpers/context.dart b/webdev/test/helpers/context.dart index c3047260da..ef3a65922b 100644 --- a/webdev/test/helpers/context.dart +++ b/webdev/test/helpers/context.dart @@ -1,23 +1,30 @@ -import 'package:dwds/data/build_result.dart' as dwds; -import 'package:dwds/asset_reader.dart'; -import 'package:build_daemon/data/build_status.dart' as daemon; +import 'dart:async'; +import 'dart:convert'; +import 'dart:io'; +import 'dart:typed_data'; +import 'package:build_daemon/client.dart'; +import 'package:build_daemon/data/build_status.dart' as daemon; import 'package:build_daemon/data/build_target.dart'; +import 'package:dwds/asset_reader.dart'; +import 'package:dwds/data/build_result.dart' as dwds; import 'package:dwds/expression_compiler.dart'; - import 'package:dwds/src/loaders/build_runner_strategy_provider.dart'; import 'package:dwds/src/loaders/frontend_server_strategy_provider.dart'; - - - import 'package:dwds/src/readers/proxy_server_asset_reader.dart'; +import 'package:dwds/src/services/daemon_expression_compiler.dart'; import 'package:dwds/src/services/expression_compiler_service.dart'; +import 'package:dwds/src/utilities/web_path_translator.dart'; import 'package:dwds_test_common/fixtures/context.dart'; - import 'package:dwds_test_common/fixtures/utilities.dart'; - +import 'package:dwds_test_common/utilities.dart'; +import 'package:dwds_test_common/frontend_server_common/devfs.dart'; import 'package:file/local.dart'; import 'package:logging/logging.dart' as logging; +import 'package:path/path.dart' as p; +import 'package:shelf/shelf.dart' as shelf; +import 'package:shelf/shelf.dart'; +import 'package:shelf_proxy/shelf_proxy.dart'; class BuildDaemonTestContext extends TestContext { final _logger = logging.Logger('BuildDaemonTestContext'); @@ -68,6 +75,7 @@ class BuildDaemonTestContext extends TestContext { 'build_web_compilers|entrypoint_marker=ddc-library-bundle=true', ], '--verbose', + '--build-filter=${project.directoryToServe}/**', ]; daemonClient = await connectClient( sdkLayout.dartPath, @@ -76,16 +84,15 @@ class BuildDaemonTestContext extends TestContext { (log) { final record = log.toLogRecord(); final name = record.loggerName == '' ? '' : '${record.loggerName}: '; - _logger.log( - record.level, - '$name${record.message}', - record.error, - record.stackTrace, - ); + print('${record.level.name}: $name${record.message}'); }, ); daemonClient.registerBuildTarget( - DefaultBuildTarget((b) => b..target = project.directoryToServe), + DefaultBuildTarget( + (b) => b + ..target = project.webAssetsPath + ..reportChangedAssets = true, + ), ); daemonClient.startBuild(); @@ -94,11 +101,14 @@ class BuildDaemonTestContext extends TestContext { final assetServerPort = daemonPort( project.absolutePackageDirectory, ); - assetHandler = createBuildRunnerProxyHandler(assetServerPort); - if (testSettings.moduleFormat == ModuleFormat.ddc && - buildSettings.canaryFeatures) { - assetHandler = handleReloadedSources(assetHandler); - } + assetHandler = switch (( + testSettings.moduleFormat, + buildSettings.canaryFeatures, + )) { + (ModuleFormat.ddc, true) => + _createBuildRunnerDdcLibraryBundleAssetHandler(this, assetServerPort), + _ => createBuildRunnerProxyHandler(assetServerPort), + }; assetReader = ProxyServerAssetReader( assetServerPort, root: project.directoryToServe, @@ -137,7 +147,7 @@ class BuildDaemonTestContext extends TestContext { buildResults = daemonClient.buildResults.map((results) { final result = results.results.firstWhere( - (result) => result.target == project.directoryToServe, + (result) => result.target == project.webAssetsPath, ); switch (result.status) { case daemon.BuildStatus.started: @@ -166,7 +176,36 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { bool get usesBuildDaemon => true; @override bool get usesDdcModulesOnly => true; + /// Forwards expression compilation requests to the persistent Frontend Server + /// process via socket. + Future> _compileExpressionWithDaemon( + Map request, + ) async { + final file = _fesManagerConfigFile(this); + if (!await file.exists()) { + throw StateError('FES port not found in ${file.path}'); + } + final content = await file.readAsString(); + final json = jsonDecode(content) as Map; + final port = json['port'] as int?; + if (port == null) { + throw StateError('FES port not found in ${file.path}'); + } + + final socket = await Socket.connect(InternetAddress.loopbackIPv4, port); + try { + socket.writeln(jsonEncode(request)); + final responseStr = await socket + .cast>() + .transform(utf8.decoder) + .transform(const LineSplitter()) + .first; + return jsonDecode(responseStr) as Map; + } finally { + await socket.close(); + } + } @override Future modeSetUp({ required TestSettings testSettings, @@ -202,53 +241,217 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { '--define', 'build_web_compilers|ddc_modules=web-hot-reload=true', '--verbose', + '--build-filter=${project.directoryToServe}/**', ]; - daemonClient = await connectClient( - sdkLayout.dartPath, - project.absolutePackageDirectory, - options, - (log) { - final record = log.toLogRecord(); - final name = record.loggerName == '' ? '' : '${record.loggerName}: '; - _logger.log( - record.level, - '$name${record.message}', - record.error, - record.stackTrace, + + if (testSettings.enableExpressionEvaluation) { + _logger.info('Starting Frontend Server Manager'); + final sdkDir = p.dirname(p.dirname(sdkLayout.dartPath)); + final testScratchSpaceDir = Directory( + p.join( + project.absolutePackageDirectory, + '.dart_tool', + 'test_scratch_space', + ), + ); + if (testScratchSpaceDir.existsSync()) { + testScratchSpaceDir.deleteSync(recursive: true); + } + testScratchSpaceDir.createSync(recursive: true); + + final sourcePackagesFile = File( + p.join( + project.absolutePackageDirectory, + '.dart_tool', + 'package_config.json', + ), + ); + final packagesFile = File( + p.join( + testScratchSpaceDir.path, + '.dart_tool', + 'package_config.json', + ), + ); + packagesFile.parent.createSync(recursive: true); + + final originalJson = jsonDecode(sourcePackagesFile.readAsStringSync()) + as Map; + final packagesList = originalJson['packages'] as List; + for (final package in packagesList) { + final packageMap = package as Map; + var rootUri = Uri.parse(packageMap['rootUri'] as String); + if (!rootUri.isAbsolute) { + rootUri = sourcePackagesFile.parent.uri.resolveUri(rootUri); + } + packageMap['rootUri'] = rootUri.toString(); + } + packagesFile.writeAsStringSync(jsonEncode(originalJson)); + + options.addAll([ + '--define', + 'build_web_compilers|ddc=scratch-space-dir=' + '${testScratchSpaceDir.path}', + ]); + final fesSnapshot = p.join( + project.absolutePackageDirectory, + '.dart_tool', + 'fes_manager.snapshot', + ); + + final buildWebCompilers = packagesList.firstWhere( + (pkg) => (pkg as Map)['name'] == 'build_web_compilers', + orElse: () => null, + ) as Map?; + String fesManagerPath; + if (buildWebCompilers != null) { + final pkgRootUri = Uri.parse( + buildWebCompilers['rootUri'] as String, ); - }, - ); + fesManagerPath = p.join( + pkgRootUri.toFilePath(), + 'bin', + 'fes_manager.dart', + ); + } else { + final localBuildRepoDir = p.join( + p.dirname(projectRootDir), + 'build', + ); + fesManagerPath = p.join( + localBuildRepoDir, + 'builder_pkgs', + 'build_web_compilers', + 'bin', + 'fes_manager.dart', + ); + } + final compileResult = await Process.run(sdkLayout.dartPath, [ + 'compile', + 'kernel', + '--packages=${sourcePackagesFile.path}', + '-o', + fesSnapshot, + fesManagerPath, + ]); + if (compileResult.exitCode != 0) { + _logger.severe( + 'Failed to compile Frontend Server Manager:\n' + 'Exit code: ${compileResult.exitCode}\n' + 'Stdout: ${compileResult.stdout}\n' + 'Stderr: ${compileResult.stderr}', + ); + } + + final args = [ + fesSnapshot, + sdkDir, + p.toUri(testScratchSpaceDir.path).toString(), + p.toUri(packagesFile.path).toString(), + ]; + fesProcess = await Process.start( + sdkLayout.dartPath, + args, + workingDirectory: project.absolutePackageDirectory, + ); + + fesProcess!.stdout + .transform(utf8.decoder) + .transform(const LineSplitter()) + .listen((line) { + _logger.info('FES Manager STDOUT: $line'); + }); + fesProcess!.stderr + .transform(utf8.decoder) + .transform(const LineSplitter()) + .listen((line) { + _logger.warning('FES Manager STDERR: $line'); + }); + + final configFile = _fesManagerConfigFile(this); + while (!await configFile.exists()) { + await Future.delayed(const Duration(milliseconds: 100)); + } + } + + try { + daemonClient = await connectClient( + sdkLayout.dartPath, + project.absolutePackageDirectory, + options, + (log) { + final record = log.toLogRecord(); + _logger.log( + record.level, + record.message, + record.error, + record.stackTrace, + ); + }, + ); + } catch (e) { + final daemonLogFile = File( + p.join( + project.absolutePackageDirectory, + '.dart_tool', + 'build', + 'daemon', + 'log', + ), + ); + if (daemonLogFile.existsSync()) { + _logger.warning( + 'Daemon startup log content:\n' + '${daemonLogFile.readAsStringSync()}', + ); + } else { + _logger.warning( + 'Daemon startup log file does not exist at: ' + '${daemonLogFile.path}', + ); + } + rethrow; + } daemonClient.registerBuildTarget( - DefaultBuildTarget((b) => b..target = project.directoryToServe), + DefaultBuildTarget( + (b) => b + ..target = project.webAssetsPath + ..outputLocation = OutputLocation( + (o) => o + ..output = outputDir.path + ..useSymlinks = false + ..hoist = true, + ).toBuilder() + ..reportChangedAssets = true, + ), ); + final buildFuture = waitForSuccessfulBuild(); daemonClient.startBuild(); - await waitForSuccessfulBuild(); + await buildFuture; final assetServerPort = daemonPort( project.absolutePackageDirectory, ); - assetHandler = createBuildRunnerProxyHandler(assetServerPort); - if (testSettings.moduleFormat == ModuleFormat.ddc && - buildSettings.canaryFeatures) { - assetHandler = handleReloadedSources(assetHandler); - } - assetReader = ProxyServerAssetReader( - assetServerPort, - root: project.directoryToServe, - ); + assetHandler = _createBuildRunnerDdcLibraryBundleAssetHandler(this, assetServerPort); + + // Using standard constructor if fromHandler is not available or if it's simpler. + // In "theirs" they used ProxyServerAssetReader.fromHandler(_assetHandler!); + // Let's check if ProxyServerAssetReader has fromHandler in this branch. + // I can try using it, and if it fails to compile I will revert. + // Wait, I should verify if it exists. + // I grepped for ProxyServerAssetReader earlier but didn't check its constructors. + // Let's use standard constructor for now to be safe, or try fromHandler if I want to be faithful to branch 1. + // Let's try fromHandler as it was in branch 1. + assetReader = ProxyServerAssetReader.fromHandler(assetHandler); if (testSettings.enableExpressionEvaluation) { - ddcService = ExpressionCompilerService( - 'localhost', - port, - verbose: testSettings.verboseCompiler, - sdkConfigurationProvider: sdkConfigurationProvider, + expressionCompiler = DaemonExpressionCompiler( + _compileExpressionWithDaemon, ); - expressionCompiler = ddcService; } frontendServerFileSystem = const LocalFileSystem(); - final packageUriMapper = await PackageUriMapper.create( + final packageUriMapper = await BuildRunnerPathResolver.create( frontendServerFileSystem, project.packageConfigFile, useDebuggerModuleNames: testSettings.useDebuggerModuleNames, @@ -256,9 +459,10 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { loadStrategy = switch (( testSettings.moduleFormat, buildSettings.canaryFeatures, + testSettings.enableExpressionEvaluation, )) { - (ModuleFormat.ddc, true) => - FrontendServerDdcLibraryBundleStrategyProvider( + (ModuleFormat.ddc, true, true) => + FrontendServerBuildDaemonStrategyProvider( testSettings.reloadConfiguration, assetReader, packageUriMapper, @@ -267,11 +471,230 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { injectScriptLoad: false, reloadedSourcesUri: reloadedSourcesUri, ).strategy, + (ModuleFormat.ddc, true, false) => + BuildRunnerDdcLibraryBundleStrategyProvider( + testSettings.reloadConfiguration, + assetReader, + buildSettings, + reloadedSourcesUri: reloadedSourcesUri, + ).strategy, _ => throw Exception( 'Unsupported DDC module format when compiling with Frontend ' 'Server + build_runner ${testSettings.moduleFormat.name}.', ), }; - buildResults = const Stream.empty(); + + // Map build results. + buildResults = testSettings.enableExpressionEvaluation + ? const Stream.empty() + : daemonClient.buildResults.map((results) { + final result = results.results.firstWhere( + (result) => result.target == project.webAssetsPath, + ); + switch (result.status) { + case daemon.BuildStatus.started: + return dwds.BuildResult(status: dwds.BuildStatus.started); + case daemon.BuildStatus.failed: + return dwds.BuildResult(status: dwds.BuildStatus.failed); + case daemon.BuildStatus.succeeded: + return dwds.BuildResult(status: dwds.BuildStatus.succeeded); + } + throw StateError('Unexpected Daemon build result: $result'); + }); } } + +File _fesManagerConfigFile(TestContext context) => File( + p.join( + context.project.absolutePackageDirectory, + '.dart_tool', + 'build', + 'fes_manager_config', + ), + ); + +Handler _createBuildRunnerDdcLibraryBundleAssetHandler( + TestContext context, + int assetServerPort, +) { + final rootProxy = proxyHandler( + 'http://localhost:$assetServerPort/', + client: context.client, + ); + final entrypointProxy = proxyHandler( + 'http://localhost:$assetServerPort/${context.project.directoryToServe}/', + client: context.client, + ); + + return (request) async { + final path = request.url.path; + var newPath = path; + + // Translate FES paths to package:build paths. + newPath = WebPathTranslator.translateFesToBuildRunnerPath(newPath); + var requestToProxy = request; + if (newPath != path) { + requestToProxy = shelf.Request( + request.method, + request.requestedUri.replace(path: newPath), + headers: request.headers, + body: request.read(), + context: request.context, + ); + } + + // Serve reloaded_sources.json. + if (newPath.endsWith(WebDevFS.reloadedSourcesFileName)) { + if (context.lastBuildFailed) { + return shelf.Response.internalServerError( + body: 'Last build failed, no reloaded sources.', + ); + } + return shelf.Response.ok(jsonEncode(context.reloadedSources)); + } + + // Resolve compiled files (.js, .js.map, .metadata, .dill, .full.dill) + // from either the test scratch space or the build cache. + final isDill = newPath.endsWith('.dill') || newPath.endsWith('.full.dill'); + final isMetadata = newPath.endsWith('.metadata'); + final isPackage = newPath.startsWith('packages/'); + final isJsOrMap = newPath.endsWith('.js') || newPath.endsWith('.js.map'); + + if (isDill || isMetadata || (isPackage && isJsOrMap)) { + String relativePath; + if (isPackage) { + final parts = newPath.split('/'); + relativePath = parts.length > 2 ? parts.sublist(2).join('/') : newPath; + } else { + final prefix = '${context.project.directoryToServe}/'; + relativePath = newPath.startsWith(prefix) + ? newPath.substring(prefix.length) + : newPath; + } + + final subDir = isPackage ? 'lib' : context.project.directoryToServe; + + final scratchFile = File( + p.join( + context.project.absolutePackageDirectory, + '.dart_tool', + 'build', + 'test_scratch_space', + subDir, + relativePath, + ), + ); + + final generatedFile = File( + p.join( + context.project.absolutePackageDirectory, + '.dart_tool', + 'build', + 'generated', + context.project.packageName, + subDir, + relativePath, + ), + ); + + Uint8List? fileBytes; + if (scratchFile.existsSync()) { + fileBytes = scratchFile.readAsBytesSync(); + } else if (generatedFile.existsSync()) { + fileBytes = generatedFile.readAsBytesSync(); + } + + if (fileBytes != null) { + final String mimeType; + if (newPath.endsWith('.js')) { + mimeType = 'application/javascript'; + } else if (newPath.endsWith('.json') || + newPath.endsWith('.map') || + newPath.endsWith('.metadata')) { + mimeType = 'application/json'; + } else { + mimeType = 'application/octet-stream'; + } + + return shelf.Response.ok( + fileBytes, + headers: { + HttpHeaders.contentTypeHeader: mimeType, + HttpHeaders.contentLengthHeader: fileBytes.length.toString(), + }, + ); + } + } + + // Serve the DDC merged metadata. Merging is done by the FES manager. + if (newPath.endsWith('.ddc_merged_metadata')) { + String? mergedContent; + final configFile = _fesManagerConfigFile(context); + if (await configFile.exists()) { + try { + final configJson = + jsonDecode(await configFile.readAsString()) as Map; + final port = configJson['port'] as int?; + if (port != null) { + final socket = await Socket.connect( + InternetAddress.loopbackIPv4, + port, + ); + try { + socket.writeln( + jsonEncode({'instruction': 'MERGE_ALL_METADATA'}), + ); + final responseStr = await socket + .cast>() + .transform(utf8.decoder) + .transform(const LineSplitter()) + .first; + final response = jsonDecode(responseStr) as Map; + mergedContent = response['content'] as String?; + } finally { + await socket.close(); + } + } + } catch (_) { + // Ignore socket or parsing errors, letting the request fail + // gracefully or fall through. + } + } + + if (mergedContent != null) { + final bytes = Uint8List.fromList(utf8.encode(mergedContent)); + return shelf.Response.ok( + bytes, + headers: { + HttpHeaders.contentTypeHeader: 'application/json', + HttpHeaders.contentLengthHeader: bytes.length.toString(), + }, + ); + } + } + + // Swap between [rootProxy] and [entrypointProxy] to handle path serving + // differences for entrypoints vs library files. + // + // Use [rootProxy] for paths that already include the directory to serve + // (e.g., 'web/main.dart', 'packages/...', 'example/...'). + // + // Use [entrypointProxy] for files requested at the root (e.g. 'main.dart' + // or 'index.html'), These implicitly prepend [directoryToServe]. + final prefix = '${context.project.directoryToServe}/'; + var requestToProxyFinal = requestToProxy; + if (newPath.startsWith(prefix)) { + requestToProxyFinal = requestToProxy.change( + path: context.project.directoryToServe, + ); + } + + final response = + await (newPath.startsWith(prefix) || + newPath.startsWith('packages/') || + newPath.startsWith('example/') + ? rootProxy(requestToProxyFinal) + : entrypointProxy(requestToProxyFinal)); + return response; + }; +} From dab17bd7d1bf47056c2f58ca2c013216ca50860e Mon Sep 17 00:00:00 2001 From: MarkZ Date: Mon, 10 Aug 2026 17:51:23 -0700 Subject: [PATCH 095/134] Webdev CLI Integration & Spanning Tests --- .../fixtures/_experiment/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test/pubspec.yaml | 2 +- .../fixtures/_test_circular1/pubspec.yaml | 2 +- .../fixtures/_test_circular2/pubspec.yaml | 2 +- .../_test_dot_shorthands/pubspec.yaml | 2 +- .../fixtures/_test_hot_reload/pubspec.yaml | 2 +- .../_test_hot_reload_breakpoints/pubspec.yaml | 2 +- .../fixtures/_test_hot_restart1/pubspec.yaml | 2 +- .../fixtures/_test_hot_restart2/pubspec.yaml | 2 +- .../pubspec.yaml | 2 +- .../fixtures/_test_package/pubspec.yaml | 2 +- .../fixtures/_test_parts/pubspec.yaml | 2 +- .../fixtures/_webdev_smoke/pubspec.yaml | 2 +- webdev/CHANGELOG.md | 8 +- webdev/lib/src/daemon/app_domain.dart | 18 +- webdev/lib/src/pubspec.dart | 2 +- webdev/lib/src/serve/dev_workflow.dart | 62 ++++- webdev/lib/src/serve/server_manager.dart | 8 +- webdev/lib/src/serve/webdev_server.dart | 215 +++++++++++++++--- webdev/lib/src/util.dart | 4 +- webdev/lib/src/version.dart | 2 +- webdev/pubspec.yaml | 2 +- webdev/test/daemon/app_domain_common.dart | 23 +- .../app_domain_ddc_library_bundle_test.dart | 26 ++- ...daemon_domain_ddc_library_bundle_test.dart | 26 ++- webdev/test/daemon/launch_app_common.dart | 7 + .../launch_app_ddc_library_bundle_test.dart | 26 ++- webdev/test/e2e_common.dart | 37 ++- webdev/test/e2e_ddc_library_bundle_test.dart | 26 ++- webdev/test/integration_common.dart | 2 +- .../integration_ddc_library_bundle_test.dart | 26 ++- webdev/test/tls_common.dart | 30 +-- webdev/test/tls_ddc_library_bundle_test.dart | 26 ++- 33 files changed, 444 insertions(+), 158 deletions(-) diff --git a/dwds_test_common/fixtures/_experiment/pubspec.yaml b/dwds_test_common/fixtures/_experiment/pubspec.yaml index b1064110b2..a471297711 100644 --- a/dwds_test_common/fixtures/_experiment/pubspec.yaml +++ b/dwds_test_common/fixtures/_experiment/pubspec.yaml @@ -13,4 +13,4 @@ dependencies: dev_dependencies: build_daemon: ^4.1.4 build_runner: ^2.16.0 - build_web_compilers: ^4.4.12 + build_web_compilers: ^4.8.9 diff --git a/dwds_test_common/fixtures/_test/pubspec.yaml b/dwds_test_common/fixtures/_test/pubspec.yaml index 3e86a35057..4e2fa3ec83 100644 --- a/dwds_test_common/fixtures/_test/pubspec.yaml +++ b/dwds_test_common/fixtures/_test/pubspec.yaml @@ -13,5 +13,5 @@ dependencies: dev_dependencies: build_daemon: ^4.1.4 build_runner: ^2.16.0 - build_web_compilers: ^4.8.1 + build_web_compilers: ^4.8.9 diff --git a/dwds_test_common/fixtures/_test_circular1/pubspec.yaml b/dwds_test_common/fixtures/_test_circular1/pubspec.yaml index b81da7fd68..b85726d8f4 100644 --- a/dwds_test_common/fixtures/_test_circular1/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_circular1/pubspec.yaml @@ -15,4 +15,4 @@ dependencies: dev_dependencies: build_daemon: ^4.1.4 build_runner: ^2.16.0 - build_web_compilers: ^4.4.12 + build_web_compilers: ^4.8.9 diff --git a/dwds_test_common/fixtures/_test_circular2/pubspec.yaml b/dwds_test_common/fixtures/_test_circular2/pubspec.yaml index e814478484..6108e4275c 100644 --- a/dwds_test_common/fixtures/_test_circular2/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_circular2/pubspec.yaml @@ -13,4 +13,4 @@ dependencies: dev_dependencies: build_daemon: ^4.1.4 build_runner: ^2.16.0 - build_web_compilers: ^4.4.12 + build_web_compilers: ^4.8.9 diff --git a/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml b/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml index bbc2e8bb54..8c214d2a45 100644 --- a/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml @@ -9,4 +9,4 @@ environment: dev_dependencies: build_daemon: ^4.1.4 build_runner: ^2.16.0 - build_web_compilers: ^4.4.12 + build_web_compilers: ^4.8.9 diff --git a/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml b/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml index 6dc814abea..9693eb2f98 100644 --- a/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml @@ -9,4 +9,4 @@ environment: dev_dependencies: build_daemon: ^4.1.4 build_runner: ^2.16.0 - build_web_compilers: ^4.8.1 + build_web_compilers: ^4.8.9 diff --git a/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml b/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml index 916f64976a..bac3ee9f06 100644 --- a/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml @@ -9,4 +9,4 @@ environment: dev_dependencies: build_daemon: ^4.1.4 build_runner: ^2.16.0 - build_web_compilers: ^4.8.1 + build_web_compilers: ^4.8.9 diff --git a/dwds_test_common/fixtures/_test_hot_restart1/pubspec.yaml b/dwds_test_common/fixtures/_test_hot_restart1/pubspec.yaml index 9acf0a4555..72fdaa2711 100644 --- a/dwds_test_common/fixtures/_test_hot_restart1/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_restart1/pubspec.yaml @@ -13,4 +13,4 @@ dependencies: dev_dependencies: build_daemon: ^4.1.4 build_runner: ^2.16.0 - build_web_compilers: ^4.4.12 + build_web_compilers: ^4.6.0 diff --git a/dwds_test_common/fixtures/_test_hot_restart2/pubspec.yaml b/dwds_test_common/fixtures/_test_hot_restart2/pubspec.yaml index 1027a22740..eb2eef0d53 100644 --- a/dwds_test_common/fixtures/_test_hot_restart2/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_restart2/pubspec.yaml @@ -15,4 +15,4 @@ dependencies: dev_dependencies: build_daemon: ^4.1.4 build_runner: ^2.16.0 - build_web_compilers: ^4.8.1 + build_web_compilers: ^4.8.9 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 8bbeb523ef..4bbedce520 100644 --- a/dwds_test_common/fixtures/_test_hot_restart_breakpoints/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_restart_breakpoints/pubspec.yaml @@ -9,5 +9,5 @@ environment: dev_dependencies: build_daemon: ^4.1.4 build_runner: ^2.16.0 - build_web_compilers: ^4.8.1 + build_web_compilers: ^4.8.9 diff --git a/dwds_test_common/fixtures/_test_package/pubspec.yaml b/dwds_test_common/fixtures/_test_package/pubspec.yaml index 97258123ea..b0825d3c5f 100644 --- a/dwds_test_common/fixtures/_test_package/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_package/pubspec.yaml @@ -13,4 +13,4 @@ dependencies: dev_dependencies: build_daemon: ^4.1.4 build_runner: ^2.16.0 - build_web_compilers: ^4.4.12 \ No newline at end of file + build_web_compilers: ^4.8.9 diff --git a/dwds_test_common/fixtures/_test_parts/pubspec.yaml b/dwds_test_common/fixtures/_test_parts/pubspec.yaml index c3129bf5ef..76ee24b689 100644 --- a/dwds_test_common/fixtures/_test_parts/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_parts/pubspec.yaml @@ -13,4 +13,4 @@ dependencies: dev_dependencies: build_daemon: ^4.1.4 build_runner: ^2.16.0 - build_web_compilers: ^4.4.12 + build_web_compilers: ^4.8.9 diff --git a/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml b/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml index f9bf432554..31bfa45baa 100644 --- a/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml +++ b/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml @@ -9,4 +9,4 @@ environment: dev_dependencies: build_daemon: ^4.1.4 build_runner: ^2.16.0 - build_web_compilers: ^4.4.12 + build_web_compilers: ^4.8.9 diff --git a/webdev/CHANGELOG.md b/webdev/CHANGELOG.md index 792eb60b33..3c99521a47 100644 --- a/webdev/CHANGELOG.md +++ b/webdev/CHANGELOG.md @@ -1,4 +1,10 @@ -## 4.1.0-wip +## 4.1.0 +- Enable hot reload support in Frontend Server + Build Daemon mode. +- Support expression evaluation in Frontend Server + Build Daemon mode via DaemonExpressionCompiler. +- Bump `build_web_compilers` constraint to `^4.8.8`. +- Bump `dwds` constraint to `^28.0.0`. + +## Unreleased - Internal test infrastructure refactoring: Move common test files to `dwds_test_common`. diff --git a/webdev/lib/src/daemon/app_domain.dart b/webdev/lib/src/daemon/app_domain.dart index eea0bee5cd..8fbbf817ac 100644 --- a/webdev/lib/src/daemon/app_domain.dart +++ b/webdev/lib/src/daemon/app_domain.dart @@ -176,7 +176,23 @@ class AppDomain extends Domain { } final fullRestart = getBoolArg(args, 'fullRestart') ?? false; if (!fullRestart) { - return {'code': 1, 'message': 'hot reload not yet supported by webdev'}; + try { + final vm = await appState.vmService!.getVM(); + final isolateId = vm.isolates!.first.id!; + final report = await appState.vmService!.reloadSources(isolateId); + + if (report.success!) { + return {'code': 0, 'message': 'Hot reload successful'}; + } else { + return { + 'code': 1, + 'message': 'Hot reload failed', + 'notices': report.toJson()['notices'], + }; + } + } catch (e) { + return {'code': 1, 'message': 'Hot reload failed: $e'}; + } } // TODO(grouma) - Support pauseAfterRestart. // var pauseAfterRestart = getBoolArg(args, 'pause') ?? false; diff --git a/webdev/lib/src/pubspec.dart b/webdev/lib/src/pubspec.dart index b82d111bb5..c2bc6ec53d 100644 --- a/webdev/lib/src/pubspec.dart +++ b/webdev/lib/src/pubspec.dart @@ -188,7 +188,7 @@ Future> _validateBuildDaemonVersion( } final buildRunnerConstraint = VersionConstraint.parse('^2.4.0'); -final buildWebCompilersConstraint = VersionConstraint.parse('^4.4.12'); +final buildWebCompilersConstraint = VersionConstraint.parse('^4.8.9'); // Note the minimum versions should never be dev versions as users will not // get them by default. diff --git a/webdev/lib/src/serve/dev_workflow.dart b/webdev/lib/src/serve/dev_workflow.dart index 17542e592f..198f21e87a 100644 --- a/webdev/lib/src/serve/dev_workflow.dart +++ b/webdev/lib/src/serve/dev_workflow.dart @@ -15,6 +15,7 @@ import 'package:path/path.dart' as p; import '../command/configuration.dart'; import '../daemon_client.dart'; import '../logging.dart'; +import '../util.dart'; import 'chrome.dart'; import 'server_manager.dart'; import 'webdev_server.dart'; @@ -108,10 +109,7 @@ Future _startServerManager( ); } logWriter(logging.Level.INFO, 'Starting resource servers...'); - final serverManager = await ServerManager.start( - serverOptions, - client.buildResults, - ); + final serverManager = await ServerManager.start(serverOptions, client); for (final server in serverManager.servers) { logWriter( @@ -179,13 +177,19 @@ class DevWorkflow { final _doneCompleter = Completer(); final BuildDaemonClient _client; final Chrome? _chrome; + final Process? _fesProcess; final ServerManager serverManager; StreamSubscription? _resultsSub; final _wrapWidth = stdout.hasTerminal ? stdout.terminalColumns - 8 : 72; - DevWorkflow._(this._client, this._chrome, this.serverManager) { + DevWorkflow._( + this._client, + this._chrome, + this.serverManager, + this._fesProcess, + ) { _resultsSub = _client.buildResults.listen((data) { if (data.results.any( (result) => @@ -206,13 +210,56 @@ class DevWorkflow { Future get done => _doneCompleter.future; + static Future _startFesManager(String workingDirectory) async { + final sdkDir = p.dirname(p.dirname(dartPath)); + final packagesFile = p.join( + workingDirectory, + '.dart_tool', + 'package_config.json', + ); + + final args = [ + 'run', + 'build_web_compilers:fes_manager', + sdkDir, + p.toUri(workingDirectory).toString(), + p.toUri(packagesFile).toString(), + ]; + + return await Process.start( + dartPath, + args, + workingDirectory: workingDirectory, + ); + } + + static Future _waitForFile(File file) async { + while (!await file.exists()) { + await Future.delayed(const Duration(milliseconds: 100)); + } + } + static Future start( Configuration configuration, List buildOptions, Map targetPorts, ) async { final workingDirectory = Directory.current.path; - final client = await _startBuildDaemon(workingDirectory, buildOptions); + + Process? fesProcess; + if (configuration.webHotReload) { + logWriter(logging.Level.INFO, 'Starting Frontend Server Manager...'); + final configFile = File( + p.join(workingDirectory, '.dart_tool', 'build', 'fes_manager_config'), + ); + if (await configFile.exists()) { + await configFile.delete(); + } + fesProcess = await _startFesManager(workingDirectory); + await _waitForFile(configFile); + } + + final client = await _startBuildDaemon(workingDirectory, [...buildOptions]); logWriter(logging.Level.INFO, 'Registering build targets...'); _registerBuildTargets(client, configuration, targetPorts); logWriter(logging.Level.INFO, 'Starting initial build...'); @@ -224,7 +271,7 @@ class DevWorkflow { client, ); final chrome = await _startChrome(configuration, serverManager, client); - return DevWorkflow._(client, chrome, serverManager); + return DevWorkflow._(client, chrome, serverManager, fesProcess); } Future shutDown() async { @@ -232,6 +279,7 @@ class DevWorkflow { await _chrome?.close(); await _client.close(); await serverManager.stop(); + _fesProcess?.kill(); if (!_doneCompleter.isCompleted) _doneCompleter.complete(); } } diff --git a/webdev/lib/src/serve/server_manager.dart b/webdev/lib/src/serve/server_manager.dart index 39e237dbd6..cd708c3d6f 100644 --- a/webdev/lib/src/serve/server_manager.dart +++ b/webdev/lib/src/serve/server_manager.dart @@ -4,7 +4,7 @@ import 'dart:async'; -import 'package:build_daemon/data/build_status.dart'; +import 'package:build_daemon/client.dart'; import 'webdev_server.dart'; @@ -16,11 +16,13 @@ class ServerManager { static Future start( Set serverOptions, - Stream buildResults, + BuildDaemonClient client, ) async { final servers = {}; for (final options in serverOptions) { - servers.add(await WebDevServer.start(options, buildResults)); + servers.add( + await WebDevServer.start(options, client.buildResults, client), + ); } return ServerManager._(servers); } diff --git a/webdev/lib/src/serve/webdev_server.dart b/webdev/lib/src/serve/webdev_server.dart index 309a4adcdd..efeff0eb78 100644 --- a/webdev/lib/src/serve/webdev_server.dart +++ b/webdev/lib/src/serve/webdev_server.dart @@ -6,6 +6,7 @@ import 'dart:async'; import 'dart:convert'; import 'dart:io'; +import 'package:build_daemon/client.dart'; import 'package:build_daemon/data/build_status.dart' as daemon; import 'package:dwds/data/build_result.dart'; import 'package:dwds/dwds.dart'; @@ -15,7 +16,6 @@ import 'package:http/io_client.dart'; import 'package:http_multi_server/http_multi_server.dart'; import 'package:logging/logging.dart'; import 'package:path/path.dart' as p; - import 'package:shelf/shelf.dart'; import 'package:shelf_proxy/shelf_proxy.dart'; @@ -85,7 +85,7 @@ class WebDevServer { /// Can be null if client.js injection is disabled. final Dwds? dwds; - final ExpressionCompilerService? ddcService; + final ExpressionCompiler? ddcService; final String target; @@ -123,7 +123,10 @@ class WebDevServer { Future stop() async { await dwds?.stop(); - await ddcService?.stop(); + final service = ddcService; + if (service is ExpressionCompilerService) { + await service.stop(); + } await _server.close(force: true); _client.close(); } @@ -131,6 +134,7 @@ class WebDevServer { static Future start( ServerOptions options, Stream buildResults, + BuildDaemonClient daemonClient, ) async { final basePath = ''; var pipeline = const Pipeline(); @@ -168,19 +172,22 @@ class WebDevServer { // Only provide relevant build results final filteredBuildResults = buildResults.asyncMap((results) { + // Clear reloaded sources for the new build results. + reloadedSources.clear(); if (options.configuration.usesDdcLibraryBundle) { - // Clear reloaded sources for the new build results. - reloadedSources.clear(); - results.changedAssets?.forEach((uri) { - if (uri.path.endsWith(jsLibraryBundleExtension)) { - final reloadedSource = { - 'src': ddcUriToSourceUrl(basePath, options.target, uri), - 'module': ddcUriToLibraryId(uri), - 'libraries': [ddcUriToLibraryId(uri)], - }; - reloadedSources.add(reloadedSource); + final changedAssets = results.changedAssets; + if (changedAssets != null) { + for (final uri in changedAssets) { + if (uri.path.endsWith(jsLibraryBundleExtension)) { + final reloadedSource = { + 'src': ddcUriToSourceUrl(basePath, options.target, uri), + 'module': ddcUriToLibraryId(uri), + 'libraries': [ddcUriToLibraryId(uri)], + }; + reloadedSources.add(reloadedSource); + } } - }); + } } final result = results.results.firstWhere( (result) => result.target == options.target, @@ -211,35 +218,56 @@ class WebDevServer { ); Dwds? dwds; - ExpressionCompilerService? ddcService; + ExpressionCompiler? ddcService; if (options.configuration.enableInjectedClient) { final assetReader = ProxyServerAssetReader( options.daemonPort, root: options.target, ); + // Read the entrypoint metadata generated by build_web_compilers if + // available. This avoids having to hard code 'main.dart' and allows us + // to initialize the frontend server if the build is fully cached. + String? canonicalUri; + if (options.configuration.webHotReload && + !options.configuration.release) { + final entrypointJsonStr = await assetReader.dartSourceContents( + '.web.entrypoint.json', + ); + if (entrypointJsonStr != null) { + try { + final json = jsonDecode(entrypointJsonStr) as Map; + canonicalUri = json['canonicalUri'] as String?; + } catch (e) { + _logger.warning('Failed to parse .web.entrypoint.json', e); + } + } + } + // TODO(https://github.com/flutter/devtools/issues/5350): Figure out how // to determine the build settings from the build. // Can we save build metadata in build_web_compilers and and read it in // the load strategy? final buildSettings = BuildSettings( appEntrypoint: Uri.parse( - '$multiRootScheme:///${options.target}/main.dart', + canonicalUri ?? '$multiRootScheme:///${options.target}/main.dart', ), canaryFeatures: options.configuration.canaryFeatures, isFlutterApp: false, experiments: options.configuration.experiments, + useDebuggerModuleNames: false, ); final LoadStrategy loadStrategy; - if (options.configuration.webHotReload) { - final frontendServerFileSystem = LocalFileSystem(); - final packageUriMapper = await PackageUriMapper.create( + if (options.configuration.webHotReload && + !options.configuration.release) { + final frontendServerFileSystem = const LocalFileSystem(); + final packageUriMapper = await BuildRunnerPathResolver.create( frontendServerFileSystem, findPackageConfigUri()!, useDebuggerModuleNames: false, ); - loadStrategy = FrontendServerDdcLibraryBundleStrategyProvider( + loadStrategy = FrontendServerBuildDaemonStrategyProvider( options.configuration.reload, assetReader, packageUriMapper, @@ -249,23 +277,21 @@ class WebDevServer { reloadedSourcesUri: Uri.parse('$basePath/$reloadedSourcesFileName'), injectScriptLoad: false, ).strategy; + } else if (options.configuration.moduleFormat == 'ddc') { + loadStrategy = BuildRunnerDdcLibraryBundleStrategyProvider( + options.configuration.reload, + assetReader, + buildSettings, + packageConfigPath: findPackageConfigFilePath(), + reloadedSourcesUri: Uri.parse('$basePath/$reloadedSourcesFileName'), + ).strategy; } else { - if (options.configuration.moduleFormat == 'ddc') { - loadStrategy = BuildRunnerDdcLibraryBundleStrategyProvider( - options.configuration.reload, - assetReader, - buildSettings, - packageConfigPath: findPackageConfigFilePath(), - reloadedSourcesUri: Uri.parse('$basePath/$reloadedSourcesFileName'), - ).strategy; - } else { - loadStrategy = BuildRunnerRequireStrategyProvider( - options.configuration.reload, - assetReader, - buildSettings, - packageConfigPath: findPackageConfigFilePath(), - ).strategy; - } + loadStrategy = BuildRunnerRequireStrategyProvider( + options.configuration.reload, + assetReader, + buildSettings, + packageConfigPath: findPackageConfigFilePath(), + ).strategy; } // Check that we're running from a compiled binary (like webdev.exe) and not @@ -290,7 +316,53 @@ class WebDevServer { } if (options.configuration.enableExpressionEvaluation) { - if (isAotMode && !useAotDdc) { + if (options.configuration.webHotReload && + !options.configuration.release) { + // Use the daemon expression compiler when web hot reload is enabled + // to reuse the Frontend Server's in-memory state. + var cachedFesPort = await _readFesPort(); + // Pre-initialize the Frontend Server if a port and canonical URI + // are found. Required for cached builds. + if (cachedFesPort != null && canonicalUri != null) { + _logger.info( + 'Early initializing Frontend Server with $canonicalUri', + ); + try { + final responseStr = await _sendFesRawRequest(cachedFesPort, { + 'instruction': 'COMPILE', + 'entrypoint': canonicalUri, + }); + _logger.fine('Early initialization response: $responseStr'); + } catch (e) { + _logger.warning('Failed to early initialize FES', e); + } + } + + ddcService = DaemonExpressionCompiler((request) async { + if (cachedFesPort != null) { + try { + return await _sendRequestToFes(cachedFesPort!, request); + } catch (e) { + _logger.warning( + 'Failed to connect to FES at $cachedFesPort, re-reading config file', + e, + ); + cachedFesPort = null; + } + } + + final port = await _readFesPort(); + if (port != null) { + cachedFesPort = port; + return await _sendRequestToFes(port, request); + } + return { + 'result': + 'InternalError: Failed to connect to Frontend Server worker.', + 'isError': true, + }; + }); + } else if (isAotMode && !useAotDdc) { _logger.warning( 'Expression evaluation will be disabled in AOT mode because ' 'dartdevc_aot.dart.snapshot was not found in the SDK.', @@ -445,3 +517,72 @@ String ddcUriToLibraryId(Uri uri) { ); return '$prefix.dart'; } + +Future _readFesPort() async { + try { + final file = File(p.join('.dart_tool', 'build', 'fes_manager_config')); + if (await file.exists()) { + final content = await file.readAsString(); + final json = jsonDecode(content) as Map; + return json['port'] as int?; + } + } catch (e) { + _logger.warning('Failed to read FES config', e); + } + return null; +} + +Future _sendFesRawRequest( + int port, + Map request, +) async { + final socket = await Socket.connect(InternetAddress.loopbackIPv4, port); + try { + socket.writeln(jsonEncode(request)); + await socket.flush(); + final responseStr = await socket + .cast>() + .transform(utf8.decoder) + .transform(const LineSplitter()) + .first; + return jsonDecode(responseStr); + } finally { + await socket.close(); + } +} + +Future> _sendRequestToFes( + int port, + Map request, +) async { + final compileResult = await _sendFesRawRequest(port, request); + if (compileResult is! Map) { + return { + 'result': + 'Unexpected response format from FES. ' + 'Expected a Map but got: $compileResult', + 'isError': true, + }; + } + + final error = compileResult['error'] as String?; + final errorCount = compileResult['errorCount'] as int?; + final errorMessage = compileResult['errorMessage'] as String?; + if (error != null || (errorCount != null && errorCount > 0)) { + return { + 'result': 'FES error: ${error ?? errorMessage ?? 'Unknown error'}', + 'isError': true, + }; + } + + final expressionData = compileResult['expressionData'] as String?; + if (expressionData == null) { + return { + 'result': 'Missing expressionData in FES compile result', + 'isError': true, + }; + } + + final decodedResult = utf8.decode(base64.decode(expressionData)); + return {'result': decodedResult, 'isError': false}; +} diff --git a/webdev/lib/src/util.dart b/webdev/lib/src/util.dart index 47033d5469..e241fbe69a 100644 --- a/webdev/lib/src/util.dart +++ b/webdev/lib/src/util.dart @@ -30,12 +30,12 @@ void serveHttpRequests( final String _sdkDir = (() { // The Dart executable is in "/path/to/sdk/bin/dart", so two levels up is // "/path/to/sdk". - final String dartExecutable = Platform.isWindows + final dartExecutable = Platform.isWindows // Use 'where.exe' to support powershell as well ? (Process.runSync('where.exe', ['dart.exe']).stdout as String) .split(RegExp('(\r\n|\r|\n)')) .first - : Process.runSync('which', ['dart']).stdout; + : (Process.runSync('which', ['dart']).stdout as String).trim(); final aboveExecutable = p.dirname(p.dirname(dartExecutable)); assert(FileSystemEntity.isFileSync(p.join(aboveExecutable, 'version'))); return aboveExecutable; diff --git a/webdev/lib/src/version.dart b/webdev/lib/src/version.dart index 78c01d1a64..2384f91ac4 100644 --- a/webdev/lib/src/version.dart +++ b/webdev/lib/src/version.dart @@ -1,2 +1,2 @@ // Generated code. Do not modify. -const packageVersion = '4.1.0-wip'; +const packageVersion = '4.1.0'; diff --git a/webdev/pubspec.yaml b/webdev/pubspec.yaml index 390aca6293..140d635205 100644 --- a/webdev/pubspec.yaml +++ b/webdev/pubspec.yaml @@ -1,6 +1,6 @@ name: webdev # Every time this changes you need to run `dart run build_runner build`. -version: 4.1.0-wip +version: 4.1.0 # We should not depend on a dev SDK before publishing. # publish_to: none description: >- diff --git a/webdev/test/daemon/app_domain_common.dart b/webdev/test/daemon/app_domain_common.dart index a6009ad55c..92b38a3bde 100644 --- a/webdev/test/daemon/app_domain_common.dart +++ b/webdev/test/daemon/app_domain_common.dart @@ -114,14 +114,21 @@ void appDomainTests({required TestRunner testRunner}) { '[{"method":"app.restart","id":0,' '"params" : { "appId" : "$appId", "fullRestart" : false}}]'; webdev.stdin.add(utf8.encode('$extensionCall\n')); - await expectLater( - webdev.stdout, - emitsThrough( - startsWith( - '[{"id":0,"result":{"code":1,"message":"hot reload not yet supported', - ), - ), - ); + + var success = false; + while (await webdev.stdout.hasNext) { + final line = await webdev.stdout.next; + if (line.startsWith('[{"id":0,')) { + final unwrapped = line.substring(1, line.length - 1); + final response = json.decode(unwrapped) as Map; + final result = response['result'] as Map; + expect(result['code'], equals(0)); + expect(result['message'], equals('Hot reload successful')); + success = true; + break; + } + } + expect(success, isTrue); await exitWebdev(webdev); }, timeout: const Timeout(Duration(minutes: 2))); diff --git a/webdev/test/daemon/app_domain_ddc_library_bundle_test.dart b/webdev/test/daemon/app_domain_ddc_library_bundle_test.dart index 1f6fa8b3e7..ab58ec869b 100644 --- a/webdev/test/daemon/app_domain_ddc_library_bundle_test.dart +++ b/webdev/test/daemon/app_domain_ddc_library_bundle_test.dart @@ -12,11 +12,23 @@ import '../test_utils.dart'; import 'app_domain_common.dart'; void main() { - appDomainTests( - testRunner: TestRunner( - canaryFeatures: true, - webHotReload: false, - ddcModuleFormat: ModuleFormat.ddc, - ), - ); + group('Build Daemon', () { + appDomainTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: false, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); + + group('Build Daemon and Frontend Server', () { + appDomainTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: true, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); } diff --git a/webdev/test/daemon/daemon_domain_ddc_library_bundle_test.dart b/webdev/test/daemon/daemon_domain_ddc_library_bundle_test.dart index 30c04fb792..cad0ebcab1 100644 --- a/webdev/test/daemon/daemon_domain_ddc_library_bundle_test.dart +++ b/webdev/test/daemon/daemon_domain_ddc_library_bundle_test.dart @@ -12,11 +12,23 @@ import '../test_utils.dart'; import 'daemon_domain_common.dart'; void main() { - daemonDomainTests( - testRunner: TestRunner( - canaryFeatures: true, - webHotReload: false, - ddcModuleFormat: ModuleFormat.ddc, - ), - ); + group('Build Daemon', () { + daemonDomainTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: false, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); + + group('Build Daemon and Frontend Server', () { + daemonDomainTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: true, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); } diff --git a/webdev/test/daemon/launch_app_common.dart b/webdev/test/daemon/launch_app_common.dart index d0319a9546..43b68556b0 100644 --- a/webdev/test/daemon/launch_app_common.dart +++ b/webdev/test/daemon/launch_app_common.dart @@ -5,6 +5,8 @@ @Timeout(Duration(minutes: 2)) library; +import 'dart:io'; +import 'package:path/path.dart' as p; import 'package:test/test.dart'; import '../test_utils.dart'; @@ -16,6 +18,11 @@ void launchAppTests({required TestRunner testRunner}) { setUpAll(() async { await testRunner.setUpAll(); exampleDirectory = await testRunner.prepareWorkspace(); + // Delete 'main.dart' to ensure only one entrypoint exists. + final mainDart = File(p.join(exampleDirectory, 'web', 'main.dart')); + if (mainDart.existsSync()) { + mainDart.deleteSync(); + } }); tearDownAll(testRunner.tearDownAll); diff --git a/webdev/test/daemon/launch_app_ddc_library_bundle_test.dart b/webdev/test/daemon/launch_app_ddc_library_bundle_test.dart index d9746fe977..baac246471 100644 --- a/webdev/test/daemon/launch_app_ddc_library_bundle_test.dart +++ b/webdev/test/daemon/launch_app_ddc_library_bundle_test.dart @@ -12,11 +12,23 @@ import '../test_utils.dart'; import 'launch_app_common.dart'; void main() { - launchAppTests( - testRunner: TestRunner( - canaryFeatures: true, - webHotReload: false, - ddcModuleFormat: ModuleFormat.ddc, - ), - ); + group('Build Daemon', () { + launchAppTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: false, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); + + group('Build Daemon and Frontend Server', () { + launchAppTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: true, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); } diff --git a/webdev/test/e2e_common.dart b/webdev/test/e2e_common.dart index 9080a1ae13..b7c2205a53 100644 --- a/webdev/test/e2e_common.dart +++ b/webdev/test/e2e_common.dart @@ -14,13 +14,11 @@ import 'package:path/path.dart' as p; import 'package:pub_semver/pub_semver.dart'; import 'package:test/test.dart'; import 'package:test_descriptor/test_descriptor.dart' as d; -import 'package:test_process/test_process.dart'; import 'package:vm_service/vm_service.dart'; import 'package:vm_service/vm_service_io.dart'; import 'package:webdev/src/logging.dart'; import 'package:webdev/src/pubspec.dart'; import 'package:webdev/src/serve/utils.dart'; -import 'package:webdev/src/util.dart'; import 'package:yaml/yaml.dart'; import 'daemon/utils.dart'; @@ -44,23 +42,20 @@ void e2eTests({required TestRunner testRunner}) { setUpAll(() async { configureLogWriter(debug); await testRunner.setUpAll(); - exampleDirectory = p.absolute( - p.join(p.current, '..', 'dwds_test_common', 'fixtures', '_webdev_smoke'), - ); - - final process = await TestProcess.start( - dartPath, - ['pub', 'upgrade'], - workingDirectory: exampleDirectory, - environment: getPubEnvironment(), - ); - - await process.shouldExit(0); - - await d - .file('.dart_tool/package_config.json', isNotEmpty) - .validate(exampleDirectory); - await d.file('pubspec.lock', isNotEmpty).validate(exampleDirectory); + exampleDirectory = await testRunner.prepareWorkspace(); + // Delete files other than main.dart and index.html to ensure a single + // entrypoint exists. + final webDir = Directory(p.join(exampleDirectory, 'web')); + if (await webDir.exists()) { + await for (final entity in webDir.list()) { + if (entity is File) { + final name = p.basename(entity.path); + if (name != 'main.dart' && name != 'index.html') { + await entity.delete(); + } + } + } + } }); tearDownAll(testRunner.tearDownAll); @@ -217,10 +212,10 @@ void e2eTests({required TestRunner testRunner}) { final hostUrl = 'http://localhost:$openPort'; - // Wait for the initial build to finish. + // Wait for the server to be ready for connections. await expectLater( process.stdout, - emitsThrough(contains('Built with build_runner')), + emitsThrough(contains('Serving `web` on')), ); final client = HttpClient(); diff --git a/webdev/test/e2e_ddc_library_bundle_test.dart b/webdev/test/e2e_ddc_library_bundle_test.dart index 6a685854c2..ab0788892b 100644 --- a/webdev/test/e2e_ddc_library_bundle_test.dart +++ b/webdev/test/e2e_ddc_library_bundle_test.dart @@ -12,11 +12,23 @@ import 'e2e_common.dart'; import 'test_utils.dart'; void main() { - e2eTests( - testRunner: TestRunner( - canaryFeatures: true, - webHotReload: false, - ddcModuleFormat: ModuleFormat.ddc, - ), - ); + group('Build Daemon', () { + e2eTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: false, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); + + group('Build Daemon and Frontend Server', () { + e2eTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: true, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); } diff --git a/webdev/test/integration_common.dart b/webdev/test/integration_common.dart index 629a2d1fc1..c04c930f7e 100644 --- a/webdev/test/integration_common.dart +++ b/webdev/test/integration_common.dart @@ -296,7 +296,7 @@ dependencies: } const _supportedBuildRunnerVersion = '2.4.0'; -const _supportedWebCompilersVersion = '4.4.12'; +const _supportedWebCompilersVersion = '4.8.9'; const _supportedBuildDaemonVersion = '4.0.0'; String _pubspecYaml = ''' diff --git a/webdev/test/integration_ddc_library_bundle_test.dart b/webdev/test/integration_ddc_library_bundle_test.dart index 43870d02b4..e35e5ba8a2 100644 --- a/webdev/test/integration_ddc_library_bundle_test.dart +++ b/webdev/test/integration_ddc_library_bundle_test.dart @@ -12,11 +12,23 @@ import 'integration_common.dart'; import 'test_utils.dart'; void main() { - integrationTests( - testRunner: TestRunner( - canaryFeatures: true, - webHotReload: false, - ddcModuleFormat: ModuleFormat.ddc, - ), - ); + group('Build Daemon', () { + integrationTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: false, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); + + group('Build Daemon and Frontend Server', () { + integrationTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: true, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); } diff --git a/webdev/test/tls_common.dart b/webdev/test/tls_common.dart index 6984ae6507..939d6d3f6b 100644 --- a/webdev/test/tls_common.dart +++ b/webdev/test/tls_common.dart @@ -9,7 +9,6 @@ import 'package:logging/logging.dart'; import 'package:path/path.dart' as p; import 'package:test/test.dart'; import 'package:test_descriptor/test_descriptor.dart' as d; -import 'package:test_process/test_process.dart'; import 'package:webdev/src/logging.dart'; import 'package:webdev/src/serve/utils.dart'; @@ -26,24 +25,15 @@ void tlsTests({required TestRunner testRunner}) { setUpAll(() async { configureLogWriter(debug); await testRunner.setUpAll(); - exampleDirectory = p.absolute( - p.join( - p.current, - '..', - 'dwds_test_common', - 'fixtures', - '_webdev_smoke', - ), - ); + exampleDirectory = await testRunner.prepareWorkspace(); - final process = await TestProcess.start( - 'dart', - ['pub', 'upgrade'], - workingDirectory: exampleDirectory, - environment: getPubEnvironment(), + // Delete 'scopes_main.dart' to ensure only one entrypoint exists. + final scopesMainDart = File( + p.join(exampleDirectory, 'web', 'scopes_main.dart'), ); - - await process.shouldExit(0); + if (scopesMainDart.existsSync()) { + scopesMainDart.deleteSync(); + } await d .file('.dart_tool/package_config.json', isNotEmpty) @@ -65,9 +55,10 @@ void tlsTests({required TestRunner testRunner}) { args, workingDirectory: exampleDirectory, ); + // Wait for the server to be ready for connections. await expectLater( process.stdout, - emitsThrough(contains('Built with build_runner')), + emitsThrough(contains('Serving `web` on')), ); final client = HttpClient() @@ -101,9 +92,10 @@ void tlsTests({required TestRunner testRunner}) { args, workingDirectory: exampleDirectory, ); + // Wait for the server to be ready for connections. await expectLater( process.stdout, - emitsThrough(contains('Built with build_runner')), + emitsThrough(contains('Serving `web` on')), ); final interfaces = await NetworkInterface.list( diff --git a/webdev/test/tls_ddc_library_bundle_test.dart b/webdev/test/tls_ddc_library_bundle_test.dart index 7c83b42c25..a0dc36d591 100644 --- a/webdev/test/tls_ddc_library_bundle_test.dart +++ b/webdev/test/tls_ddc_library_bundle_test.dart @@ -12,11 +12,23 @@ import 'test_utils.dart'; import 'tls_common.dart'; void main() { - tlsTests( - testRunner: TestRunner( - canaryFeatures: true, - webHotReload: false, - ddcModuleFormat: ModuleFormat.ddc, - ), - ); + group('Build Daemon', () { + tlsTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: false, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); + + group('Build Daemon and Frontend Server', () { + tlsTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: true, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); } From f11317fed82050fe011ee336d41aef36981942d9 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Tue, 11 Aug 2026 10:57:30 -0700 Subject: [PATCH 096/134] Temp commit of fixes to match expression_eval_dwds --- dwds/CHANGELOG.md | 10 +- .../breakpoint_ddc_library_bundle_test.dart | 7 + .../callstack_ddc_library_bundle_test.dart | 7 + ...proxy_service_ddc_library_bundle_test.dart | 17 + ...ular_evaluate_ddc_library_bundle_test.dart | 7 + dwds/test/integration/dart_uri_test.dart | 4 +- .../evaluate_ddc_library_bundle_test.dart | 7 + ...d_breakpoints_ddc_library_bundle_test.dart | 7 + .../hot_reload_ddc_library_bundle_test.dart | 7 + ...t_breakpoints_ddc_library_bundle_test.dart | 7 + ...t_correctness_ddc_library_bundle_test.dart | 15 + .../hot_restart_ddc_library_bundle_test.dart | 15 + ...ss_inspection_ddc_library_bundle_test.dart | 17 + ...ot_shorthands_ddc_library_bundle_test.dart | 17 + .../instance_ddc_library_bundle_test.dart | 16 + ...ce_inspection_ddc_library_bundle_test.dart | 34 ++ ...ns_inspection_ddc_library_bundle_test.dart | 17 + ...rd_inspection_ddc_library_bundle_test.dart | 15 + ...pe_inspection_ddc_library_bundle_test.dart | 15 + ...pe_inspection_ddc_library_bundle_test.dart | 17 + .../integration/package_uri_mapper_test.dart | 22 +- ...arts_evaluate_ddc_library_bundle_test.dart | 7 + .../utilities/web_path_translator_test.dart | 308 ++++++++++++++++++ dwds_test_common/pubspec.yaml | 31 +- example/.vscode/launch.json | 14 + example/pubspec.yaml | 2 +- .../lib/src/frontend_server_client.dart | 4 +- webdev/README.md | 2 +- 28 files changed, 615 insertions(+), 33 deletions(-) create mode 100644 dwds/test/utilities/web_path_translator_test.dart create mode 100644 example/.vscode/launch.json diff --git a/dwds/CHANGELOG.md b/dwds/CHANGELOG.md index a68e5fe574..98538ff49a 100644 --- a/dwds/CHANGELOG.md +++ b/dwds/CHANGELOG.md @@ -1,8 +1,10 @@ ## 28.0.0 - -- Support expression evaluation in Frontend Server + Build Daemon mode via `DaemonExpressionCompiler`. -- Add `WebPathTranslator` to support path translation between Frontend Server and Build Daemon. -- Replace `PackageUriMapper` with `PathResolver` strategy. +- **Breaking Change**: Removed `PackageUriMapper` in favor of **`PathResolver`** - with `BuildRunnerPathResolver`, `FrontendServerPathResolver`, and `FlutterPathResolver` impls. +- **Breaking Change**: **`LoadStrategy`** implementors must now implement the **`assetScheme`** getter. +- Introduce **`AssetScheme`** to generalize asset naming schemes. +- Add support for Frontend Server + Build Daemon configuration with hot reload via **`FrontendServerBuildDaemonStrategyProvider`**. +- Expose **`DaemonExpressionCompiler`** for handling expression compilation directly via `build_daemon`. +- **`BuildSettings`** now supports **`useDebuggerModuleNames`** to distinguish between debugger-friendly paths and raw server paths. ## 27.1.3-wip diff --git a/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart b/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart index 07027e8ddd..620b58939b 100644 --- a/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart +++ b/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart @@ -32,6 +32,13 @@ void main() { ); }); + group('Build Daemon and Frontend Server |', () { + testBreakpoint( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); + group('Frontend Server |', () { testBreakpoint( provider: provider, diff --git a/dwds/test/integration/callstack_ddc_library_bundle_test.dart b/dwds/test/integration/callstack_ddc_library_bundle_test.dart index cbf8019a76..bb411562aa 100644 --- a/dwds/test/integration/callstack_ddc_library_bundle_test.dart +++ b/dwds/test/integration/callstack_ddc_library_bundle_test.dart @@ -32,6 +32,13 @@ void main() { ); }); + group('Build Daemon and Frontend Server |', () { + testCallStack( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); + group('Frontend Server |', () { testCallStack( provider: provider, diff --git a/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart b/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart index c3382df965..ea4ff46927 100644 --- a/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart +++ b/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart @@ -54,4 +54,21 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: $canaryFeatures | Build Daemon and Frontend Server |', () { + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: moduleFormat, + ); + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + tearDownAll(provider.dispose); + + runTests( + provider: provider, + moduleFormat: moduleFormat, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } diff --git a/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart b/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart index 71713dfb0d..15766b613a 100644 --- a/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart +++ b/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart @@ -33,6 +33,13 @@ void main() async { testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); }); + group('Build Daemon and Frontend Server |', () { + testAll( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); + group('Frontend Server |', () { group('Context with circular dependencies |', () { for (final indexBaseMode in IndexBaseMode.values) { diff --git a/dwds/test/integration/dart_uri_test.dart b/dwds/test/integration/dart_uri_test.dart index d436181ea2..f8e66ad84b 100644 --- a/dwds/test/integration/dart_uri_test.dart +++ b/dwds/test/integration/dart_uri_test.dart @@ -60,12 +60,12 @@ void main() { test('parses org-dartlang-app paths', () { final uri = DartUri('org-dartlang-app:///blah/main.dart'); - expect(uri.serverPath, '/blah/main.dart'); + expect(uri.serverPath, 'blah/main.dart'); }); test('parses google3 paths', () { final uri = DartUri('google3:///blah/main.dart'); - expect(uri.serverPath, '/blah/main.dart'); + expect(uri.serverPath, 'blah/main.dart'); }); test('parses packages paths', () { diff --git a/dwds/test/integration/evaluate_ddc_library_bundle_test.dart b/dwds/test/integration/evaluate_ddc_library_bundle_test.dart index 73cefbf100..edce799375 100644 --- a/dwds/test/integration/evaluate_ddc_library_bundle_test.dart +++ b/dwds/test/integration/evaluate_ddc_library_bundle_test.dart @@ -34,6 +34,13 @@ void main() async { testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); }); + group('Build Daemon and Frontend Server |', () { + testAll( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); + group('Frontend Server |', () { for (final useDebuggerModuleNames in [false, true]) { group('Debugger module names: $useDebuggerModuleNames |', () { diff --git a/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart b/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart index a3f59ef25c..aac058eaac 100644 --- a/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart +++ b/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart @@ -32,4 +32,11 @@ void main() { contextFactory: (project, provider) => FrontendServerTestContext(project, provider), ); }); + + group('Build Daemon and Frontend Server', () { + runTests( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); } diff --git a/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart b/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart index 271245ec6a..f6102c78f8 100644 --- a/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart +++ b/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart @@ -32,4 +32,11 @@ void main() { contextFactory: (project, provider) => FrontendServerTestContext(project, provider), ); }); + + group('Build Daemon and Frontend Server', () { + runTests( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); } 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 c8a591fd30..89fe2dd242 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 @@ -36,4 +36,11 @@ void main() { group('Build Daemon', () { runTests(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); }); + + group('Build Daemon and Frontend Server', () { + runTests( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); } 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 9f8e757ddc..b2a7c18357 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 @@ -50,4 +50,19 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: $canaryFeatures | Build Daemon and Frontend Server |', () { + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: moduleFormat, + ); + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + runTests( + provider: provider, + moduleFormat: moduleFormat, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } 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 d2bc2f9ca5..0840567494 100644 --- a/dwds/test/integration/hot_restart_ddc_library_bundle_test.dart +++ b/dwds/test/integration/hot_restart_ddc_library_bundle_test.dart @@ -52,4 +52,19 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: $canaryFeatures | Build Daemon and Frontend Server |', () { + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: moduleFormat, + ); + runTests( + provider: provider, + moduleFormat: moduleFormat, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } diff --git a/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart index 1b923e1f45..e84a578063 100644 --- a/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart @@ -52,4 +52,21 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } diff --git a/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart b/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart index 20beeb86ff..e7cd1b401f 100644 --- a/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart @@ -52,4 +52,21 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } diff --git a/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart b/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart index 619ea841e4..766e5fd993 100644 --- a/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart @@ -51,4 +51,20 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + canaryFeatures: canaryFeatures, + verbose: debug, + ddcModuleFormat: moduleFormat, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } diff --git a/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart index bbbc6015d2..e98cfd607b 100644 --- a/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart @@ -35,4 +35,38 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemon; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } diff --git a/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart index fa81e78f9f..97f4feaec2 100644 --- a/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart @@ -52,4 +52,21 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } diff --git a/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart index 17c17df42c..da7e976ba6 100644 --- a/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart @@ -49,4 +49,19 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } diff --git a/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart index 26e1d3e058..61f3445739 100644 --- a/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart @@ -49,4 +49,19 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } diff --git a/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart index 38f71289cf..a41764ea80 100644 --- a/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart @@ -52,4 +52,21 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } diff --git a/dwds/test/integration/package_uri_mapper_test.dart b/dwds/test/integration/package_uri_mapper_test.dart index f362797497..f104ae1c47 100644 --- a/dwds/test/integration/package_uri_mapper_test.dart +++ b/dwds/test/integration/package_uri_mapper_test.dart @@ -33,7 +33,7 @@ void main() { final resolvedPath = '${project.packageDirectory}/lib/test_library.dart'; - late final BuildRunnerPathResolver pathResolver; + late final PathResolver packageUriMapper; setUpAll(() async { await project.setUp(); // Note: Run `dart pub upgrade` before the test cases to fix @@ -51,25 +51,31 @@ void main() { ), ); - pathResolver = await BuildRunnerPathResolver.create( - fileSystem, - packageConfigFile, - useDebuggerModuleNames: useDebuggerModuleNames, - ); + packageUriMapper = useDebuggerModuleNames + ? await FrontendServerPathResolver.create( + fileSystem, + packageConfigFile, + useDebuggerModuleNames: useDebuggerModuleNames, + ) + : await BuildRunnerPathResolver.create( + fileSystem, + packageConfigFile, + useDebuggerModuleNames: useDebuggerModuleNames, + ); }); tearDownAll(project.tearDown); test('Can convert package urls to server paths', () { expect( - pathResolver.appUriToServerPath(packageUri.toString()), + packageUriMapper.appUriToServerPath(packageUri.toString()), serverPath, ); }); test('Can convert server paths to file paths', () { expect( - pathResolver.serverPathToResolvedUri(serverPath), + packageUriMapper.serverPathToResolvedUri(serverPath), isA() .having((uri) => uri.scheme, 'scheme', 'file') .having((uri) => uri.path, 'path', endsWith(resolvedPath)), diff --git a/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart b/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart index b63a2b347e..3dee26508c 100644 --- a/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart +++ b/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart @@ -33,6 +33,13 @@ void main() async { testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); }); + group('Build Daemon and Frontend Server |', () { + testAll( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); + group('Frontend Server |', () { group('Context with parts |', () { for (final indexBaseMode in IndexBaseMode.values) { diff --git a/dwds/test/utilities/web_path_translator_test.dart b/dwds/test/utilities/web_path_translator_test.dart new file mode 100644 index 0000000000..cb6434e916 --- /dev/null +++ b/dwds/test/utilities/web_path_translator_test.dart @@ -0,0 +1,308 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:dwds/src/loaders/asset_scheme.dart'; +import 'package:dwds/src/utilities/web_path_translator.dart'; +import 'package:test/test.dart'; + +const fesAssetScheme = FrontendServerAssetScheme(); +const buildAssetScheme = BuildRunnerAssetScheme(); + +void main() { + group('WebPathTranslator', () { + group('addLibSegment', () { + test('adds lib/ to packages paths', () { + // Checks: packages/foo/bar.dart -> packages/foo/lib/bar.dart + expect( + WebPathTranslator.addLibSegment('packages/foo/bar.dart'), + 'packages/foo/lib/bar.dart', + ); + }); + + test('is no-op if lib/ is already present', () { + // Checks: packages/foo/lib/bar.dart -> packages/foo/lib/bar.dart + expect( + WebPathTranslator.addLibSegment('packages/foo/lib/bar.dart'), + 'packages/foo/lib/bar.dart', + ); + }); + + test('is no-op for non-packages paths', () { + // Checks: web/main.dart -> web/main.dart + expect( + WebPathTranslator.addLibSegment('web/main.dart'), + 'web/main.dart', + ); + }); + }); + + group('removeLibSegment', () { + test('removes lib/ from packages paths', () { + // Checks: packages/foo/lib/bar.dart -> packages/foo/bar.dart + expect( + WebPathTranslator.removeLibSegment('packages/foo/lib/bar.dart'), + 'packages/foo/bar.dart', + ); + }); + + test('is no-op if lib/ is not present', () { + // Checks: packages/foo/bar.dart -> packages/foo/bar.dart + expect( + WebPathTranslator.removeLibSegment('packages/foo/bar.dart'), + 'packages/foo/bar.dart', + ); + }); + + test('is no-op for non-packages paths', () { + // Checks: web/main.dart -> web/main.dart + expect( + WebPathTranslator.removeLibSegment('web/main.dart'), + 'web/main.dart', + ); + }); + }); + + group('packagePathToPackageUri', () { + test('converts packages/ paths with lib to package: URIs', () { + expect( + WebPathTranslator.packagePathToPackageUri( + 'packages/foo/lib/bar.dart', + ), + 'package:foo/bar.dart', + ); + }); + + test('converts packages/ paths without lib to package: URIs', () { + expect( + WebPathTranslator.packagePathToPackageUri('packages/foo/bar.dart'), + 'package:foo/bar.dart', + ); + }); + + test('returns null for non-package paths', () { + expect( + WebPathTranslator.packagePathToPackageUri('web/main.dart'), + isNull, + ); + }); + }); + + group('translateLibPathToPackagePath', () { + test('translates lib/ paths to packages/ paths', () { + // Checks: lib/foo.dart -> packages/my_package/foo.dart + expect( + WebPathTranslator.translateLibPathToPackagePath( + 'lib/foo.dart', + 'my_package', + ), + 'packages/my_package/foo.dart', + ); + }); + + test('translates lib/src/ paths to packages/ paths', () { + // Checks: lib/src/foo.dart -> packages/my_package/src/foo.dart + expect( + WebPathTranslator.translateLibPathToPackagePath( + 'lib/src/foo.dart', + 'my_package', + ), + 'packages/my_package/src/foo.dart', + ); + }); + + test('is no-op for non-lib paths', () { + // Checks: web/main.dart -> web/main.dart + expect( + WebPathTranslator.translateLibPathToPackagePath( + 'web/main.dart', + 'my_package', + ), + 'web/main.dart', + ); + }); + + test( + 'throws StateError if rootPackageName is null or empty for lib/ path', + () { + // Checks: lib/foo.dart (with null package) -> StateError + expect( + () => WebPathTranslator.translateLibPathToPackagePath( + 'lib/foo.dart', + null, + ), + throwsStateError, + ); + // Checks: lib/foo.dart (with empty package) -> StateError + expect( + () => WebPathTranslator.translateLibPathToPackagePath( + 'lib/foo.dart', + '', + ), + throwsStateError, + ); + }, + ); + }); + + group('translatePackagePath', () { + test('removes lib/ segment when translating FES to BuildRunner', () { + expect( + WebPathTranslator.translatePackagePath( + 'packages/foo/lib/bar.dart', + from: fesAssetScheme, + to: buildAssetScheme, + ), + 'packages/foo/bar.dart', + ); + }); + + test('adds lib/ segment when translating BuildRunner to FES', () { + expect( + WebPathTranslator.translatePackagePath( + 'packages/foo/bar.dart', + from: buildAssetScheme, + to: fesAssetScheme, + ), + 'packages/foo/lib/bar.dart', + ); + }); + + test('is no-op when schemes are identical', () { + expect( + WebPathTranslator.translatePackagePath( + 'packages/foo/lib/bar.dart', + from: fesAssetScheme, + to: fesAssetScheme, + ), + 'packages/foo/lib/bar.dart', + ); + }); + }); + + group('translateModuleExtension', () { + test( + 'translates .dart.lib to .ddc (frontendServerOnly to buildRunner)', + () { + // Checks: main.dart.lib -> main.ddc + expect( + WebPathTranslator.translateModuleExtension( + 'main.dart.lib', + from: fesAssetScheme, + to: buildAssetScheme, + ), + 'main.ddc', + ); + // Checks: main.dart.lib.js -> main.ddc.js + expect( + WebPathTranslator.translateModuleExtension( + 'main.dart.lib.js', + from: fesAssetScheme, + to: buildAssetScheme, + ), + 'main.ddc.js', + ); + }, + ); + + test( + 'translates .ddc to .dart.lib (buildRunner to frontendServerOnly)', + () { + // Checks: main.ddc -> main.dart.lib + expect( + WebPathTranslator.translateModuleExtension( + 'main.ddc', + from: buildAssetScheme, + to: fesAssetScheme, + ), + 'main.dart.lib', + ); + // Checks: main.ddc.js -> main.dart.lib.js + expect( + WebPathTranslator.translateModuleExtension( + 'main.ddc.js', + from: buildAssetScheme, + to: fesAssetScheme, + ), + 'main.dart.lib.js', + ); + }, + ); + + test('is no-op if from and to are the same', () { + // Checks: main.dart.lib -> main.dart.lib + expect( + WebPathTranslator.translateModuleExtension( + 'main.dart.lib', + from: fesAssetScheme, + to: fesAssetScheme, + ), + 'main.dart.lib', + ); + }); + }); + + group('translateFesToBuildRunnerPath', () { + test('translates .dart.lib to .ddc', () { + // Checks: main.dart.lib -> main.ddc + expect( + WebPathTranslator.translateFesToBuildRunnerPath('main.dart.lib'), + 'main.ddc', + ); + // Checks: main.dart.lib.js -> main.ddc.js + expect( + WebPathTranslator.translateFesToBuildRunnerPath('main.dart.lib.js'), + 'main.ddc.js', + ); + }); + }); + + group('reconstructAppScheme', () { + test('is no-op if org-dartlang-app scheme is already present', () { + // Checks: org-dartlang-app:///web/main.dart -> org-dartlang-app:///web/main.dart + expect( + WebPathTranslator.reconstructAppScheme( + 'org-dartlang-app:///web/main.dart', + '/', + ), + 'org-dartlang-app:///web/main.dart', + ); + }); + + test('reconstructs scheme for default web dirs', () { + // Checks: web/main.dart -> org-dartlang-app:///web/main.dart + expect( + WebPathTranslator.reconstructAppScheme('web/main.dart', '/'), + 'org-dartlang-app:///web/main.dart', + ); + // Checks: /test/foo_test.dart -> org-dartlang-app:///test/foo_test.dart + expect( + WebPathTranslator.reconstructAppScheme('/test/foo_test.dart', '/'), + 'org-dartlang-app:///test/foo_test.dart', + ); + }); + + test('reconstructs scheme for package paths', () { + // Checks: /lib/src/library.dart -> org-dartlang-app:///packages/my_package/src/library.dart + expect( + WebPathTranslator.reconstructAppScheme( + '/lib/src/library.dart', + '/packages/my_package/subdir/main.ddc.js', + ), + 'org-dartlang-app:///packages/my_package/src/library.dart', + ); + }); + + test('handles package paths without leading slash', () { + // Checks: lib/src/library.dart -> org-dartlang-app:///packages/my_package/src/library.dart + expect( + WebPathTranslator.reconstructAppScheme( + 'lib/src/library.dart', + '/packages/my_package/subdir/main.ddc.js', + ), + 'org-dartlang-app:///packages/my_package/src/library.dart', + ); + }); + }); + }); +} diff --git a/dwds_test_common/pubspec.yaml b/dwds_test_common/pubspec.yaml index 187e8aa12e..0dbc66d318 100644 --- a/dwds_test_common/pubspec.yaml +++ b/dwds_test_common/pubspec.yaml @@ -6,25 +6,26 @@ environment: sdk: ^3.12.0-0 dependencies: - build_daemon: any - dds: any - dwds: any - file: any + build_daemon: ^4.1.4 + dds: ^5.3.0 + dwds: + path: ../dwds + file: ">=6.0.0 <8.0.0" http: any - io: any - logging: any - mime: any - package_config: any - path: any - pub_semver: any - shelf: any + io: ^1.0.5 + logging: ^1.0.1 + mime: ^2.0.0 + package_config: '>=2.0.2 <4.0.0' + path: ^1.8.1 + pub_semver: ^2.1.1 + shelf: ^1.3.0 shelf_proxy: any - test: any - vm_service: any + test: ^1.21.1 + vm_service: ">=14.2.4 <16.0.0" vm_service_interface: any webdriver: any - webkit_inspection_protocol: any - yaml: any + webkit_inspection_protocol: ^1.0.1 + yaml: ^3.1.3 dev_dependencies: dart_flutter_team_lints: ^3.5.2 diff --git a/example/.vscode/launch.json b/example/.vscode/launch.json new file mode 100644 index 0000000000..b26a16f148 --- /dev/null +++ b/example/.vscode/launch.json @@ -0,0 +1,14 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Dart Web (Hot Reload)", + "type": "dart", + "request": "launch", + "program": "web/main.dart", // entrypoint + "args": [ + "--web-hot-reload", + ] + } + ] +} \ No newline at end of file diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 8e62594da2..2c02706e64 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -8,4 +8,4 @@ environment: dev_dependencies: build_runner: ^2.16.0 - build_web_compilers: ^4.4.12 + build_web_compilers: ^4.8.9 diff --git a/frontend_server_client/lib/src/frontend_server_client.dart b/frontend_server_client/lib/src/frontend_server_client.dart index 389f5e5c16..a29931824c 100644 --- a/frontend_server_client/lib/src/frontend_server_client.dart +++ b/frontend_server_client/lib/src/frontend_server_client.dart @@ -75,9 +75,10 @@ class FrontendServerClient { List additionalSources = const [], String? nativeAssets, }) async { + final sdk = sdkRoot ?? sdkDir; final commonArguments = [ '--sdk-root', - sdkRoot ?? sdkDir, + sdk, '--platform=$platformKernel', '--target=$target', if (target == 'dartdevc') @@ -100,7 +101,6 @@ class FrontendServerClient { if (nativeAssets != null) ...['--native-assets', nativeAssets], ]; - final sdk = sdkRoot ?? sdkDir; final dartExecutable = p.join( sdk, 'bin', diff --git a/webdev/README.md b/webdev/README.md index ba81d1d0f9..110ce827d7 100644 --- a/webdev/README.md +++ b/webdev/README.md @@ -12,7 +12,7 @@ similar to: --- dev_dependencies: build_runner: ^2.4.0 - build_web_compilers: ^4.4.12 + build_web_compilers: ^4.8.9 ``` ## Installation From cccc105d2457314044d4cfaef8fd802fa9c1fac9 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Wed, 12 Aug 2026 13:53:18 -0700 Subject: [PATCH 097/134] moving tests to webdev --- dwds/lib/src/handlers/injected_client_js.dart | 2238 ++++++----------- .../test/integration/breakpoint_amd_test.dart | 7 - .../breakpoint_ddc_library_bundle_test.dart | 14 - dwds/test/integration/callstack_amd_test.dart | 7 - .../callstack_ddc_library_bundle_test.dart | 14 - ...proxy_service_ddc_library_bundle_test.dart | 36 +- .../circular_evaluate_amd_test.dart | 4 - ...ular_evaluate_ddc_library_bundle_test.dart | 11 - .../dart_uri_file_uri_amd_test.dart | 4 - ..._uri_file_uri_ddc_library_bundle_test.dart | 11 - .../integration/debug_service_amd_test.dart | 2 +- ...debug_service_ddc_library_bundle_test.dart | 2 +- dwds/test/integration/devtools_amd_test.dart | 2 +- .../devtools_ddc_library_bundle_test.dart | 2 +- dwds/test/integration/evaluate_amd_test.dart | 4 - .../evaluate_ddc_library_bundle_test.dart | 11 - dwds/test/integration/events_amd_test.dart | 8 - .../events_ddc_library_bundle_test.dart | 7 - .../expression_compiler_service_amd_test.dart | 2 +- ...piler_service_ddc_library_bundle_test.dart | 2 +- ...d_breakpoints_ddc_library_bundle_test.dart | 7 - .../hot_reload_ddc_library_bundle_test.dart | 7 - ...t_breakpoints_ddc_library_bundle_test.dart | 11 - ...t_correctness_ddc_library_bundle_test.dart | 32 +- .../hot_restart_ddc_library_bundle_test.dart | 33 +- .../instances/class_inspection_amd_test.dart | 38 +- ...ss_inspection_ddc_library_bundle_test.dart | 36 +- .../instances/dot_shorthands_amd_test.dart | 38 +- ...ot_shorthands_ddc_library_bundle_test.dart | 36 +- .../instances/instance_amd_test.dart | 54 +- .../instance_ddc_library_bundle_test.dart | 34 +- .../instance_inspection_amd_test.dart | 38 +- ...ce_inspection_ddc_library_bundle_test.dart | 34 - .../patterns_inspection_amd_test.dart | 38 +- ...ns_inspection_ddc_library_bundle_test.dart | 36 +- .../instances/record_inspection_amd_test.dart | 38 +- ...rd_inspection_ddc_library_bundle_test.dart | 32 +- .../record_type_inspection_amd_test.dart | 38 +- ...pe_inspection_ddc_library_bundle_test.dart | 32 +- .../instances/type_inspection_amd_test.dart | 38 +- ...pe_inspection_ddc_library_bundle_test.dart | 36 +- dwds/test/integration/listviews_amd_test.dart | 4 - .../listviews_ddc_library_bundle_test.dart | 11 - .../integration/load_strategy_amd_test.dart | 7 - ...load_strategy_ddc_library_bundle_test.dart | 14 - .../integration/parts_evaluate_amd_test.dart | 4 - ...arts_evaluate_ddc_library_bundle_test.dart | 11 - dwds/test/integration/refresh_amd_test.dart | 2 +- .../refresh_ddc_library_bundle_test.dart | 2 +- .../integration/run_request_amd_test.dart | 2 +- .../run_request_ddc_library_bundle_test.dart | 2 +- .../test/integration/screenshot_amd_test.dart | 2 +- .../screenshot_ddc_library_bundle_test.dart | 2 +- .../integration/variable_scope_amd_test.dart | 2 +- ...ariable_scope_ddc_library_bundle_test.dart | 2 +- webdev/test/breakpoint_amd_test.dart | 32 + .../breakpoint_ddc_library_bundle_test.dart | 40 + webdev/test/callstack_amd_test.dart | 32 + .../callstack_ddc_library_bundle_test.dart | 40 + .../test}/chrome_proxy_service_amd_test.dart | 0 ...proxy_service_ddc_library_bundle_test.dart | 56 + webdev/test/circular_evaluate_amd_test.dart | 30 + ...ular_evaluate_ddc_library_bundle_test.dart | 38 + webdev/test/class_inspection_amd_test.dart | 54 + ...ss_inspection_ddc_library_bundle_test.dart | 54 + webdev/test/dart_uri_file_uri_amd_test.dart | 29 + ..._uri_file_uri_ddc_library_bundle_test.dart | 37 + webdev/test/dot_shorthands_amd_test.dart | 54 + ...ot_shorthands_ddc_library_bundle_test.dart | 54 + webdev/test/evaluate_amd_test.dart | 33 + .../evaluate_ddc_library_bundle_test.dart | 43 + webdev/test/events_amd_test.dart | 24 + .../test/events_ddc_library_bundle_test.dart | 32 + ...d_breakpoints_ddc_library_bundle_test.dart | 34 + .../hot_reload_ddc_library_bundle_test.dart | 34 + .../test}/hot_restart_amd_test.dart | 0 ...t_breakpoints_ddc_library_bundle_test.dart | 38 + .../hot_restart_correctness_amd_test.dart | 0 ...t_correctness_ddc_library_bundle_test.dart | 52 + .../hot_restart_ddc_library_bundle_test.dart | 53 + webdev/test/instance_amd_test.dart | 66 + .../instance_ddc_library_bundle_test.dart | 53 + webdev/test/instance_inspection_amd_test.dart | 54 + ...ce_inspection_ddc_library_bundle_test.dart | 54 + webdev/test/listviews_amd_test.dart | 29 + .../listviews_ddc_library_bundle_test.dart | 37 + webdev/test/load_strategy_amd_test.dart | 32 + ...load_strategy_ddc_library_bundle_test.dart | 40 + webdev/test/parts_evaluate_amd_test.dart | 30 + ...arts_evaluate_ddc_library_bundle_test.dart | 38 + webdev/test/patterns_inspection_amd_test.dart | 54 + ...ns_inspection_ddc_library_bundle_test.dart | 54 + webdev/test/record_inspection_amd_test.dart | 54 + ...rd_inspection_ddc_library_bundle_test.dart | 51 + .../test/record_type_inspection_amd_test.dart | 54 + ...pe_inspection_ddc_library_bundle_test.dart | 54 + webdev/test/type_inspection_amd_test.dart | 54 + ...pe_inspection_ddc_library_bundle_test.dart | 54 + 98 files changed, 2606 insertions(+), 2290 deletions(-) create mode 100644 webdev/test/breakpoint_amd_test.dart create mode 100644 webdev/test/breakpoint_ddc_library_bundle_test.dart create mode 100644 webdev/test/callstack_amd_test.dart create mode 100644 webdev/test/callstack_ddc_library_bundle_test.dart rename {dwds/test/integration => webdev/test}/chrome_proxy_service_amd_test.dart (100%) create mode 100644 webdev/test/chrome_proxy_service_ddc_library_bundle_test.dart create mode 100644 webdev/test/circular_evaluate_amd_test.dart create mode 100644 webdev/test/circular_evaluate_ddc_library_bundle_test.dart create mode 100644 webdev/test/class_inspection_amd_test.dart create mode 100644 webdev/test/class_inspection_ddc_library_bundle_test.dart create mode 100644 webdev/test/dart_uri_file_uri_amd_test.dart create mode 100644 webdev/test/dart_uri_file_uri_ddc_library_bundle_test.dart create mode 100644 webdev/test/dot_shorthands_amd_test.dart create mode 100644 webdev/test/dot_shorthands_ddc_library_bundle_test.dart create mode 100644 webdev/test/evaluate_amd_test.dart create mode 100644 webdev/test/evaluate_ddc_library_bundle_test.dart create mode 100644 webdev/test/events_amd_test.dart create mode 100644 webdev/test/events_ddc_library_bundle_test.dart create mode 100644 webdev/test/hot_reload_breakpoints_ddc_library_bundle_test.dart create mode 100644 webdev/test/hot_reload_ddc_library_bundle_test.dart rename {dwds/test/integration => webdev/test}/hot_restart_amd_test.dart (100%) create mode 100644 webdev/test/hot_restart_breakpoints_ddc_library_bundle_test.dart rename {dwds/test/integration => webdev/test}/hot_restart_correctness_amd_test.dart (100%) create mode 100644 webdev/test/hot_restart_correctness_ddc_library_bundle_test.dart create mode 100644 webdev/test/hot_restart_ddc_library_bundle_test.dart create mode 100644 webdev/test/instance_amd_test.dart create mode 100644 webdev/test/instance_ddc_library_bundle_test.dart create mode 100644 webdev/test/instance_inspection_amd_test.dart create mode 100644 webdev/test/instance_inspection_ddc_library_bundle_test.dart create mode 100644 webdev/test/listviews_amd_test.dart create mode 100644 webdev/test/listviews_ddc_library_bundle_test.dart create mode 100644 webdev/test/load_strategy_amd_test.dart create mode 100644 webdev/test/load_strategy_ddc_library_bundle_test.dart create mode 100644 webdev/test/parts_evaluate_amd_test.dart create mode 100644 webdev/test/parts_evaluate_ddc_library_bundle_test.dart create mode 100644 webdev/test/patterns_inspection_amd_test.dart create mode 100644 webdev/test/patterns_inspection_ddc_library_bundle_test.dart create mode 100644 webdev/test/record_inspection_amd_test.dart create mode 100644 webdev/test/record_inspection_ddc_library_bundle_test.dart create mode 100644 webdev/test/record_type_inspection_amd_test.dart create mode 100644 webdev/test/record_type_inspection_ddc_library_bundle_test.dart create mode 100644 webdev/test/type_inspection_amd_test.dart create mode 100644 webdev/test/type_inspection_ddc_library_bundle_test.dart diff --git a/dwds/lib/src/handlers/injected_client_js.dart b/dwds/lib/src/handlers/injected_client_js.dart index 93c9b319b6..06635d89ca 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.14.0-edge.30b941a500c61ffb45fe23e49ae0576eada8d371.\n" +const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-values), the Dart to JavaScript compiler version: 3.14.0-edge.49708da8bbb61fcaf57229ecfad88ee2db967f44.\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" @@ -3830,15 +3830,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return A._TimerImpl\$(milliseconds < 0 ? 0 : milliseconds, callback);\n" " },\n" " _TimerImpl\$(milliseconds, callback) {\n" -" var t1 = new A._TimerImpl(true);\n" +" var t1 = new A._TimerImpl();\n" " t1._TimerImpl\$2(milliseconds, callback);\n" " return t1;\n" " },\n" -" _TimerImpl\$periodic(milliseconds, callback) {\n" -" var t1 = new A._TimerImpl(false);\n" -" t1._TimerImpl\$periodic\$2(milliseconds, callback);\n" -" return t1;\n" -" },\n" " _makeAsyncAwaitCompleter(\$T) {\n" " return new A._AsyncAwaitCompleter(new A._Future(\$.Zone__current, \$T._eval\$1(\"_Future<0>\")), \$T._eval\$1(\"_AsyncAwaitCompleter<0>\"));\n" " },\n" @@ -3876,91 +3871,20 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " _wrapJsFunctionForAsync(\$function) {\n" " var \$protected = function(fn, ERROR) {\n" -" return function(errorCode, result) {\n" -" while (true) {\n" -" try {\n" -" fn(errorCode, result);\n" -" break;\n" -" } catch (error) {\n" -" result = error;\n" -" errorCode = ERROR;\n" +" return function(errorCode, result) {\n" +" while (true) {\n" +" try {\n" +" fn(errorCode, result);\n" +" break;\n" +" } catch (error) {\n" +" result = error;\n" +" errorCode = ERROR;\n" +" }\n" " }\n" -" }\n" -" };\n" -" }(\$function, 1);\n" -" return \$.Zone__current.registerBinaryCallback\$3\$1(new A._wrapJsFunctionForAsync_closure(\$protected), type\$.void, type\$.int, type\$.dynamic);\n" -" },\n" -" _asyncStarHelper(object, bodyFunctionOrErrorCode, controller) {\n" -" var t1, t2, t3,\n" -" _s10_ = \"controller\";\n" -" if (bodyFunctionOrErrorCode === 0) {\n" -" t1 = controller.cancelationFuture;\n" -" if (t1 != null)\n" -" t1._completeWithValue\$1(null);\n" -" else {\n" -" t1 = controller.___AsyncStarStreamController_controller_A;\n" -" t1 === \$ && A.throwLateFieldNI(_s10_);\n" -" t1.close\$0();\n" -" }\n" -" return;\n" -" } else if (bodyFunctionOrErrorCode === 1) {\n" -" t1 = controller.cancelationFuture;\n" -" if (t1 != null) {\n" -" t2 = A.unwrapException(object);\n" -" t3 = A.getTraceFromException(object);\n" -" t1._completeErrorObject\$1(new A.AsyncError(t2, t3));\n" -" } else {\n" -" t1 = A.unwrapException(object);\n" -" t2 = A.getTraceFromException(object);\n" -" t3 = controller.___AsyncStarStreamController_controller_A;\n" -" t3 === \$ && A.throwLateFieldNI(_s10_);\n" -" t3.addError\$2(t1, t2);\n" -" controller.___AsyncStarStreamController_controller_A.close\$0();\n" -" }\n" -" return;\n" -" }\n" -" type\$.void_Function_int_dynamic._as(bodyFunctionOrErrorCode);\n" -" if (object instanceof A._IterationMarker) {\n" -" if (controller.cancelationFuture != null) {\n" -" bodyFunctionOrErrorCode.call\$2(2, null);\n" -" return;\n" -" }\n" -" t1 = object.state;\n" -" if (t1 === 0) {\n" -" t1 = object.value;\n" -" t2 = controller.___AsyncStarStreamController_controller_A;\n" -" t2 === \$ && A.throwLateFieldNI(_s10_);\n" -" t2.add\$1(0, controller.\$ti._precomputed1._as(t1));\n" -" A.scheduleMicrotask(new A._asyncStarHelper_closure(controller, bodyFunctionOrErrorCode));\n" -" return;\n" -" } else if (t1 === 1) {\n" -" t1 = controller.\$ti._eval\$1(\"Stream<1>\")._as(type\$.Stream_dynamic._as(object.value));\n" -" t2 = controller.___AsyncStarStreamController_controller_A;\n" -" t2 === \$ && A.throwLateFieldNI(_s10_);\n" -" t2.addStream\$2\$cancelOnError(t1, false).then\$1\$1(new A._asyncStarHelper_closure0(controller, bodyFunctionOrErrorCode), type\$.Null);\n" -" return;\n" -" }\n" -" }\n" -" A._awaitOnObject(object, bodyFunctionOrErrorCode);\n" -" },\n" -" _streamOfController(controller) {\n" -" var t1 = controller.___AsyncStarStreamController_controller_A;\n" -" t1 === \$ && A.throwLateFieldNI(\"controller\");\n" -" return new A._ControllerStream(t1, A._instanceType(t1)._eval\$1(\"_ControllerStream<1>\"));\n" -" },\n" -" _AsyncStarStreamController\$(body, \$T) {\n" -" var t1 = new A._AsyncStarStreamController(\$T._eval\$1(\"_AsyncStarStreamController<0>\"));\n" -" t1._AsyncStarStreamController\$1(body, \$T);\n" -" return t1;\n" -" },\n" -" _makeAsyncStarStreamController(body, \$T) {\n" -" return A._AsyncStarStreamController\$(body, \$T);\n" -" },\n" -" _IterationMarker_yieldStar(values) {\n" -" return new A._IterationMarker(values, 1);\n" -" },\n" -" _IterationMarker_yieldSingle(value) {\n" -" return new A._IterationMarker(value, 0);\n" +" };\n" +" }(\$function, 1),\n" +" t1 = \$.Zone__current;\n" +" return t1._registerBinaryCallbackZoned\$3\$2(t1, type\$.void_Function_int_dynamic._as(new A._wrapJsFunctionForAsync_closure(\$protected)), type\$.void, type\$.int, type\$.dynamic);\n" " },\n" " AsyncError_defaultStackTrace(error) {\n" " var stackTrace;\n" @@ -4016,9 +3940,9 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _interceptError(error, stackTrace) {\n" " var replacement, t1, t2,\n" " zone = \$.Zone__current;\n" -" if (zone === B.C__RootZone)\n" +" if (zone === B.Zone_jYP)\n" " return null;\n" -" replacement = zone.errorCallback\$2(error, stackTrace);\n" +" replacement = zone._errorCallbackZoned\$3(zone, error, stackTrace);\n" " if (replacement == null)\n" " return null;\n" " t1 = replacement.error;\n" @@ -4029,7 +3953,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " _interceptUserError(error, stackTrace) {\n" " var replacement;\n" -" if (\$.Zone__current !== B.C__RootZone) {\n" +" if (\$.Zone__current !== B.Zone_jYP) {\n" " replacement = A._interceptError(error, stackTrace);\n" " if (replacement != null)\n" " return replacement;\n" @@ -4055,7 +3979,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return t1;\n" " },\n" " _Future__chainCoreFuture(source, target, sync) {\n" -" var t2, t3, ignoreError, listeners, _box_0 = {},\n" +" var t2, t3, ignoreError, listeners, targetZone, _box_0 = {},\n" " t1 = _box_0.source = source;\n" " for (t2 = type\$._Future_dynamic; t3 = t1._state, (t3 & 4) !== 0; t1 = source) {\n" " source = t2._as(t1._resultOrListeners);\n" @@ -4089,7 +4013,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return;\n" " }\n" " target._state ^= 2;\n" -" target._zone.scheduleMicrotask\$1(new A._Future__chainCoreFuture_closure(_box_0, target));\n" +" targetZone = target._zone;\n" +" targetZone._scheduleMicrotaskZoned\$2(targetZone, new A._Future__chainCoreFuture_closure(_box_0, target));\n" " },\n" " _Future__propagateToListeners(source, listeners) {\n" " var t2, t3, _box_0, t4, t5, hasError, asyncError, nextListener, nextListener0, sourceResult, t6, zone, oldZone, result, current, _box_1 = {},\n" @@ -4102,7 +4027,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " if (listeners == null) {\n" " if (hasError && (t4 & 1) === 0) {\n" " asyncError = t2._as(t1._resultOrListeners);\n" -" t1._zone.handleUncaughtError\$2(asyncError.error, asyncError.stackTrace);\n" +" t1 = t1._zone;\n" +" t1._handleUncaughtErrorZoned\$3(t1, asyncError.error, asyncError.stackTrace);\n" " }\n" " return;\n" " }\n" @@ -4125,15 +4051,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t6 = true;\n" " if (t6) {\n" " zone = t1.result._zone;\n" -" if (hasError) {\n" +" if (hasError && t4._zone._handleUncaughtErrorFunction != zone._handleUncaughtErrorFunction) {\n" +" t2._as(sourceResult);\n" " t1 = t4._zone;\n" -" t1 = !(t1 === zone || t1.get\$errorZone() === zone.get\$errorZone());\n" -" } else\n" -" t1 = false;\n" -" if (t1) {\n" -" t1 = _box_1.source;\n" -" asyncError = t2._as(t1._resultOrListeners);\n" -" t1._zone.handleUncaughtError\$2(asyncError.error, asyncError.stackTrace);\n" +" t1._handleUncaughtErrorZoned\$3(t1, sourceResult.error, sourceResult.stackTrace);\n" " return;\n" " }\n" " oldZone = \$.Zone__current;\n" @@ -4141,7 +4062,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " \$.Zone__current = zone;\n" " else\n" " oldZone = null;\n" -" t1 = _box_0.listener.state;\n" +" t1 = t1.state;\n" " if ((t1 & 15) === 8)\n" " new A._Future__propagateToListeners_handleWhenCompleteCallback(_box_0, _box_1, hasError).call\$0();\n" " else if (t5) {\n" @@ -4192,10 +4113,12 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " },\n" " _registerErrorHandler(errorHandler, zone) {\n" -" if (type\$.dynamic_Function_Object_StackTrace._is(errorHandler))\n" -" return zone.registerBinaryCallback\$3\$1(errorHandler, type\$.dynamic, type\$.Object, type\$.StackTrace);\n" -" if (type\$.dynamic_Function_Object._is(errorHandler))\n" -" return zone.registerUnaryCallback\$2\$1(errorHandler, type\$.dynamic, type\$.Object);\n" +" var t1 = type\$.dynamic_Function_Object_StackTrace;\n" +" if (t1._is(errorHandler))\n" +" return zone._registerBinaryCallbackZoned\$3\$2(zone, t1._as(errorHandler), type\$.dynamic, type\$.Object, type\$.StackTrace);\n" +" t1 = type\$.dynamic_Function_Object;\n" +" if (t1._is(errorHandler))\n" +" return zone._registerUnaryCallbackZoned\$2\$2(zone, t1._as(errorHandler), type\$.dynamic, type\$.Object);\n" " throw A.wrapException(A.ArgumentError\$value(errorHandler, \"onError\", string\$.Error_));\n" " },\n" " _microtaskLoop() {\n" @@ -4252,32 +4175,27 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " },\n" " scheduleMicrotask(callback) {\n" -" var t1, _null = null,\n" -" currentZone = \$.Zone__current;\n" -" if (B.C__RootZone === currentZone) {\n" -" A._rootScheduleMicrotask(_null, _null, B.C__RootZone, callback);\n" +" var currentZone = \$.Zone__current;\n" +" if (B.Zone_jYP === currentZone) {\n" +" A._rootScheduleMicrotask(B.Zone_jYP, callback);\n" " return;\n" " }\n" -" if (B.C__RootZone === currentZone.get\$_scheduleMicrotask().zone)\n" -" t1 = B.C__RootZone.get\$errorZone() === currentZone.get\$errorZone();\n" -" else\n" -" t1 = false;\n" -" if (t1) {\n" -" A._rootScheduleMicrotask(_null, _null, currentZone, currentZone.registerCallback\$1\$1(callback, type\$.void));\n" +" if (currentZone._scheduleMicrotaskFunction == null && currentZone._handleUncaughtErrorFunction == null) {\n" +" A._rootScheduleMicrotask(currentZone, currentZone._registerCallbackZoned\$1\$2(currentZone, callback, type\$.void));\n" " return;\n" " }\n" -" t1 = \$.Zone__current;\n" -" t1.scheduleMicrotask\$1(t1.bindCallbackGuarded\$1(callback));\n" +" currentZone._scheduleMicrotaskZoned\$2(currentZone, currentZone.bindCallbackGuarded\$1(callback));\n" " },\n" " StreamIterator_StreamIterator(stream, \$T) {\n" " A.checkNotNullable(stream, \"stream\", type\$.Object);\n" " return new A._StreamIterator(\$T._eval\$1(\"_StreamIterator<0>\"));\n" " },\n" -" StreamController_StreamController(onCancel, onListen, onResume, \$T) {\n" -" return new A._AsyncStreamController(onListen, null, onResume, onCancel, \$T._eval\$1(\"_AsyncStreamController<0>\"));\n" +" StreamController_StreamController(\$T) {\n" +" var _null = null;\n" +" return new A._AsyncStreamController(_null, _null, _null, _null, \$T._eval\$1(\"_AsyncStreamController<0>\"));\n" " },\n" " _runGuarded(notificationHandler) {\n" -" var e, s, exception;\n" +" var e, s, exception, t1;\n" " if (notificationHandler == null)\n" " return;\n" " try {\n" @@ -4285,31 +4203,31 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" -" \$.Zone__current.handleUncaughtError\$2(e, s);\n" +" t1 = \$.Zone__current;\n" +" t1._handleUncaughtErrorZoned\$3(t1, A._asObject(e), type\$.StackTrace._as(s));\n" " }\n" " },\n" -" _AddStreamState_makeErrorHandler(controller) {\n" -" return new A._AddStreamState_makeErrorHandler_closure(controller);\n" -" },\n" " _BufferingStreamSubscription__registerDataHandler(zone, handleData, \$T) {\n" " var t1 = handleData == null ? A.async___nullDataHandler\$closure() : handleData;\n" -" return zone.registerUnaryCallback\$2\$1(t1, type\$.void, \$T);\n" +" return zone._registerUnaryCallbackZoned\$2\$2(zone, type\$.\$env_1_1_void._bind\$1(\$T)._eval\$1(\"1(2)\")._as(t1), type\$.void, \$T);\n" " },\n" " _BufferingStreamSubscription__registerErrorHandler(zone, handleError) {\n" " if (handleError == null)\n" " handleError = A.async___nullErrorHandler\$closure();\n" " if (type\$.void_Function_Object_StackTrace._is(handleError))\n" -" return zone.registerBinaryCallback\$3\$1(handleError, type\$.dynamic, type\$.Object, type\$.StackTrace);\n" +" return zone._registerBinaryCallbackZoned\$3\$2(zone, type\$.dynamic_Function_Object_StackTrace._as(handleError), type\$.dynamic, type\$.Object, type\$.StackTrace);\n" " if (type\$.void_Function_Object._is(handleError))\n" -" return zone.registerUnaryCallback\$2\$1(handleError, type\$.dynamic, type\$.Object);\n" +" return zone._registerUnaryCallbackZoned\$2\$2(zone, type\$.dynamic_Function_Object._as(handleError), type\$.dynamic, type\$.Object);\n" " throw A.wrapException(A.ArgumentError\$(string\$.handle, null));\n" " },\n" " _nullDataHandler(value) {\n" " },\n" " _nullErrorHandler(error, stackTrace) {\n" +" var t1;\n" " A._asObject(error);\n" " type\$.StackTrace._as(stackTrace);\n" -" \$.Zone__current.handleUncaughtError\$2(error, stackTrace);\n" +" t1 = \$.Zone__current;\n" +" t1._handleUncaughtErrorZoned\$3(t1, error, stackTrace);\n" " },\n" " _nullDoneHandler() {\n" " },\n" @@ -4322,34 +4240,35 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " Timer_Timer(duration, callback) {\n" " var t1 = \$.Zone__current;\n" -" if (t1 === B.C__RootZone)\n" -" return t1.createTimer\$2(duration, callback);\n" -" return t1.createTimer\$2(duration, t1.bindCallbackGuarded\$1(callback));\n" +" if (t1 === B.Zone_jYP)\n" +" return t1._createTimerZoned\$3(t1, duration, type\$.void_Function._as(callback));\n" +" return t1._createTimerZoned\$3(t1, duration, type\$.void_Function._as(t1.bindCallbackGuarded\$1(callback)));\n" " },\n" " runZonedGuarded(body, onError, \$R) {\n" -" var error, stackTrace, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, exception, _null = null, zoneSpecification = null, zoneValues = null,\n" +" var error, stackTrace, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, newZone, exception, _null = null, zoneSpecification = null, zoneValues = null,\n" " parentZone = \$.Zone__current,\n" -" errorHandler = new A.runZonedGuarded_closure(parentZone, onError);\n" +" t1 = new A.runZonedGuarded_errorHandler(parentZone, onError);\n" " if (zoneSpecification == null)\n" -" zoneSpecification = new A.ZoneSpecification(errorHandler, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null);\n" +" zoneSpecification = new A.ZoneSpecification(t1, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null);\n" " else {\n" -" t1 = zoneSpecification;\n" -" t2 = t1.run;\n" -" t3 = t1.runUnary;\n" -" t4 = t1.runBinary;\n" -" t5 = t1.registerCallback;\n" -" t6 = t1.registerUnaryCallback;\n" -" t7 = t1.registerBinaryCallback;\n" -" t8 = t1.errorCallback;\n" -" t9 = t1.scheduleMicrotask;\n" -" t10 = t1.createTimer;\n" -" t11 = t1.createPeriodicTimer;\n" -" t12 = t1.print;\n" -" t1 = t1.fork;\n" -" zoneSpecification = new A.ZoneSpecification(errorHandler, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t1);\n" +" t2 = zoneSpecification;\n" +" t3 = t2.run;\n" +" t4 = t2.runUnary;\n" +" t5 = t2.runBinary;\n" +" t6 = t2.registerCallback;\n" +" t7 = t2.registerUnaryCallback;\n" +" t8 = t2.registerBinaryCallback;\n" +" t9 = t2.errorCallback;\n" +" t10 = t2.scheduleMicrotask;\n" +" t11 = t2.createTimer;\n" +" t12 = t2.createPeriodicTimer;\n" +" t13 = t2.print;\n" +" t2 = t2.fork;\n" +" zoneSpecification = new A.ZoneSpecification(t1, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t2);\n" " }\n" " try {\n" -" t1 = parentZone.fork\$2\$specification\$zoneValues(zoneSpecification, zoneValues).run\$1\$1(body, \$R);\n" +" newZone = parentZone._forkZoned\$3(parentZone, zoneSpecification, zoneValues);\n" +" t1 = newZone._runZoned\$1\$2(newZone, body, \$R);\n" " return t1;\n" " } catch (exception) {\n" " error = A.unwrapException(exception);\n" @@ -4358,125 +4277,22 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " return _null;\n" " },\n" -" _rootHandleUncaughtError(\$self, \$parent, zone, error, stackTrace) {\n" -" A._rootHandleError(error, stackTrace);\n" -" },\n" -" _rootHandleError(error, stackTrace) {\n" -" A._schedulePriorityAsyncCallback(new A._rootHandleError_closure(error, stackTrace));\n" -" },\n" -" _rootRun(\$self, \$parent, zone, f, \$R) {\n" -" var old, t1;\n" -" type\$.nullable_Zone._as(\$self);\n" -" type\$.nullable_ZoneDelegate._as(\$parent);\n" -" type\$.Zone._as(zone);\n" -" \$R._eval\$1(\"0()\")._as(f);\n" -" t1 = \$.Zone__current;\n" -" if (t1 === zone)\n" -" return f.call\$0();\n" -" \$.Zone__current = zone;\n" -" old = t1;\n" -" try {\n" -" t1 = f.call\$0();\n" -" return t1;\n" -" } finally {\n" -" \$.Zone__current = old;\n" -" }\n" +" ZoneDelegate\$_() {\n" +" return new A.ZoneDelegate(B.Zone_jYP);\n" " },\n" -" _rootRunUnary(\$self, \$parent, zone, f, arg, \$R, \$T) {\n" -" var old, t1;\n" -" type\$.nullable_Zone._as(\$self);\n" -" type\$.nullable_ZoneDelegate._as(\$parent);\n" -" type\$.Zone._as(zone);\n" -" \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(f);\n" -" \$T._as(arg);\n" -" t1 = \$.Zone__current;\n" -" if (t1 === zone)\n" -" return f.call\$1(arg);\n" -" \$.Zone__current = zone;\n" -" old = t1;\n" -" try {\n" -" t1 = f.call\$1(arg);\n" -" return t1;\n" -" } finally {\n" -" \$.Zone__current = old;\n" -" }\n" +" _rootHandleUncaughtError(error, stackTrace) {\n" +" A._schedulePriorityAsyncCallback(new A._rootHandleUncaughtError_closure(error, stackTrace));\n" " },\n" -" _rootRunBinary(\$self, \$parent, zone, f, arg1, arg2, \$R, \$T1, \$T2) {\n" -" var old, t1;\n" -" type\$.nullable_Zone._as(\$self);\n" -" type\$.nullable_ZoneDelegate._as(\$parent);\n" -" type\$.Zone._as(zone);\n" -" \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(f);\n" -" \$T1._as(arg1);\n" -" \$T2._as(arg2);\n" -" t1 = \$.Zone__current;\n" -" if (t1 === zone)\n" -" return f.call\$2(arg1, arg2);\n" -" \$.Zone__current = zone;\n" -" old = t1;\n" -" try {\n" -" t1 = f.call\$2(arg1, arg2);\n" -" return t1;\n" -" } finally {\n" -" \$.Zone__current = old;\n" -" }\n" -" },\n" -" _rootRegisterCallback(\$self, \$parent, zone, f, \$R) {\n" -" var t1 = type\$.Zone;\n" -" t1._as(\$self);\n" -" type\$.ZoneDelegate._as(\$parent);\n" -" t1._as(zone);\n" -" return \$R._eval\$1(\"0()\")._as(f);\n" -" },\n" -" _rootRegisterUnaryCallback(\$self, \$parent, zone, f, \$R, \$T) {\n" -" var t1 = type\$.Zone;\n" -" t1._as(\$self);\n" -" type\$.ZoneDelegate._as(\$parent);\n" -" t1._as(zone);\n" -" return \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(f);\n" -" },\n" -" _rootRegisterBinaryCallback(\$self, \$parent, zone, f, \$R, \$T1, \$T2) {\n" -" var t1 = type\$.Zone;\n" -" t1._as(\$self);\n" -" type\$.ZoneDelegate._as(\$parent);\n" -" t1._as(zone);\n" -" return \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(f);\n" -" },\n" -" _rootErrorCallback(\$self, \$parent, zone, error, stackTrace) {\n" -" var t1 = type\$.Zone;\n" -" t1._as(\$self);\n" -" type\$.ZoneDelegate._as(\$parent);\n" -" t1._as(zone);\n" -" A._asObject(error);\n" -" type\$.nullable_StackTrace._as(stackTrace);\n" -" return null;\n" +" _rootScheduleMicrotask(zone, callback) {\n" +" if (B.Zone_jYP !== zone)\n" +" callback = zone._handleUncaughtErrorFunction != null ? zone.bindCallbackGuarded\$1(callback) : zone.bindCallback\$1\$1(callback, type\$.void);\n" +" A._scheduleAsyncCallback(callback);\n" " },\n" -" _rootScheduleMicrotask(\$self, \$parent, zone, f) {\n" -" var t1, t2;\n" -" type\$.void_Function._as(f);\n" -" if (B.C__RootZone !== zone) {\n" -" t1 = B.C__RootZone.get\$errorZone();\n" -" t2 = zone.get\$errorZone();\n" -" f = t1 !== t2 ? zone.bindCallbackGuarded\$1(f) : zone.bindCallback\$1\$1(f, type\$.void);\n" -" }\n" -" A._scheduleAsyncCallback(f);\n" -" },\n" -" _rootCreateTimer(\$self, \$parent, zone, duration, callback) {\n" -" callback = zone.bindCallback\$1\$1(type\$.void_Function._as(callback), type\$.void);\n" -" return A.Timer__createTimer(duration, callback);\n" -" },\n" -" _rootCreatePeriodicTimer(\$self, \$parent, zone, duration, callback) {\n" -" var milliseconds;\n" -" callback = zone.bindUnaryCallback\$2\$1(type\$.void_Function_Timer._as(callback), type\$.void, type\$.Timer);\n" -" milliseconds = duration.get\$inMilliseconds();\n" -" return A._TimerImpl\$periodic(milliseconds.\$lt(0, 0) ? 0 : milliseconds, callback);\n" -" },\n" -" _rootPrint(\$self, \$parent, zone, line) {\n" -" A.printString(line);\n" -" },\n" -" _rootFork(\$self, \$parent, zone, specification, zoneValues) {\n" -" var t1 = new A._CustomZone(zone.get\$_run(), zone.get\$_runUnary(), zone.get\$_runBinary(), zone.get\$_registerCallback(), zone.get\$_registerUnaryCallback(), zone.get\$_registerBinaryCallback(), zone.get\$_errorCallback(), zone.get\$_scheduleMicrotask(), zone.get\$_createTimer(), zone.get\$_createPeriodicTimer(), zone.get\$_print(), zone.get\$_fork(), zone.get\$_handleUncaughtError(), zone.get\$_zoneValues(), zone);\n" -" t1._handleUncaughtError = new A._ZoneHandleUncaughtError(t1, specification.handleUncaughtError);\n" +" _rootFork(zone, specification, zoneValues) {\n" +" var t1 = new A.ZoneDelegate(B.Zone_jYP),\n" +" t2 = new A._ZoneHandleUncaughtError(B.Zone_jYP, specification.handleUncaughtError);\n" +" t1 = t1._zone = new A.Zone(zone, t1, zone._runFunction, zone._runUnaryFunction, zone._runBinaryFunction, zone._registerCallbackFunction, zone._registerUnaryCallbackFunction, zone._registerBinaryCallbackFunction, zone._errorCallbackFunction, zone._scheduleMicrotaskFunction, zone._createTimerFunction, zone._createPeriodicTimerFunction, zone._printFunction, zone._forkFunction, t2, zone._zoneValues);\n" +" t2.zone = t1;\n" " return t1;\n" " },\n" " _AsyncRun__initializeScheduleImmediate_internalCallback: function _AsyncRun__initializeScheduleImmediate_internalCallback(t0) {\n" @@ -4493,22 +4309,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _AsyncRun__scheduleImmediateWithSetImmediate_internalCallback: function _AsyncRun__scheduleImmediateWithSetImmediate_internalCallback(t0) {\n" " this.callback = t0;\n" " },\n" -" _TimerImpl: function _TimerImpl(t0) {\n" -" this._once = t0;\n" +" _TimerImpl: function _TimerImpl() {\n" " this._handle = null;\n" -" this._tick = 0;\n" " },\n" " _TimerImpl_internalCallback: function _TimerImpl_internalCallback(t0, t1) {\n" " this.\$this = t0;\n" " this.callback = t1;\n" " },\n" -" _TimerImpl\$periodic_closure: function _TimerImpl\$periodic_closure(t0, t1, t2, t3) {\n" -" var _ = this;\n" -" _.\$this = t0;\n" -" _.milliseconds = t1;\n" -" _.start = t2;\n" -" _.callback = t3;\n" -" },\n" " _AsyncAwaitCompleter: function _AsyncAwaitCompleter(t0, t1) {\n" " this._future = t0;\n" " this.isSync = false;\n" @@ -4523,45 +4330,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _wrapJsFunctionForAsync_closure: function _wrapJsFunctionForAsync_closure(t0) {\n" " this.\$protected = t0;\n" " },\n" -" _asyncStarHelper_closure: function _asyncStarHelper_closure(t0, t1) {\n" -" this.controller = t0;\n" -" this.bodyFunction = t1;\n" -" },\n" -" _asyncStarHelper_closure0: function _asyncStarHelper_closure0(t0, t1) {\n" -" this.controller = t0;\n" -" this.bodyFunction = t1;\n" -" },\n" -" _AsyncStarStreamController: function _AsyncStarStreamController(t0) {\n" -" var _ = this;\n" -" _.___AsyncStarStreamController_controller_A = \$;\n" -" _.isSuspended = false;\n" -" _.cancelationFuture = null;\n" -" _.\$ti = t0;\n" -" },\n" -" _AsyncStarStreamController__resumeBody: function _AsyncStarStreamController__resumeBody(t0) {\n" -" this.body = t0;\n" -" },\n" -" _AsyncStarStreamController__resumeBody_closure: function _AsyncStarStreamController__resumeBody_closure(t0) {\n" -" this.body = t0;\n" -" },\n" -" _AsyncStarStreamController_closure0: function _AsyncStarStreamController_closure0(t0) {\n" -" this._resumeBody = t0;\n" -" },\n" -" _AsyncStarStreamController_closure1: function _AsyncStarStreamController_closure1(t0, t1) {\n" -" this.\$this = t0;\n" -" this._resumeBody = t1;\n" -" },\n" -" _AsyncStarStreamController_closure: function _AsyncStarStreamController_closure(t0, t1) {\n" -" this.\$this = t0;\n" -" this.body = t1;\n" -" },\n" -" _AsyncStarStreamController__closure: function _AsyncStarStreamController__closure(t0) {\n" -" this.body = t0;\n" -" },\n" -" _IterationMarker: function _IterationMarker(t0, t1) {\n" -" this.value = t0;\n" -" this.state = t1;\n" -" },\n" " AsyncError: function AsyncError(t0, t1) {\n" " this.error = t0;\n" " this.stackTrace = t1;\n" @@ -4721,21 +4489,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this._async\$_target = t0;\n" " this.\$ti = t1;\n" " },\n" -" _AddStreamState: function _AddStreamState() {\n" -" },\n" -" _AddStreamState_makeErrorHandler_closure: function _AddStreamState_makeErrorHandler_closure(t0) {\n" -" this.controller = t0;\n" -" },\n" -" _AddStreamState_cancel_closure: function _AddStreamState_cancel_closure(t0) {\n" -" this.\$this = t0;\n" -" },\n" -" _StreamControllerAddStreamState: function _StreamControllerAddStreamState(t0, t1, t2, t3) {\n" -" var _ = this;\n" -" _._varData = t0;\n" -" _.addStreamFuture = t1;\n" -" _.addSubscription = t2;\n" -" _.\$ti = t3;\n" -" },\n" " _BufferingStreamSubscription: function _BufferingStreamSubscription() {\n" " },\n" " _BufferingStreamSubscription_asFuture_closure: function _BufferingStreamSubscription_asFuture_closure(t0, t1) {\n" @@ -4798,6 +4551,26 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _EmptyStream: function _EmptyStream(t0) {\n" " this.\$ti = t0;\n" " },\n" +" _MultiStream: function _MultiStream(t0, t1, t2) {\n" +" this.isBroadcast = t0;\n" +" this._onListen = t1;\n" +" this.\$ti = t2;\n" +" },\n" +" _MultiStream_listen_closure: function _MultiStream_listen_closure(t0, t1) {\n" +" this.\$this = t0;\n" +" this.controller = t1;\n" +" },\n" +" _MultiStreamController: function _MultiStreamController(t0, t1, t2, t3, t4) {\n" +" var _ = this;\n" +" _._varData = null;\n" +" _._state = 0;\n" +" _._doneFuture = null;\n" +" _.onListen = t0;\n" +" _.onPause = t1;\n" +" _.onResume = t2;\n" +" _.onCancel = t3;\n" +" _.\$ti = t4;\n" +" },\n" " _cancelAndValue_closure: function _cancelAndValue_closure(t0, t1) {\n" " this.future = t0;\n" " this.value = t1;\n" @@ -4821,119 +4594,51 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this._source = t1;\n" " this.\$ti = t2;\n" " },\n" -" _ZoneRun: function _ZoneRun(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" -" _ZoneRunUnary: function _ZoneRunUnary(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" -" _ZoneRunBinary: function _ZoneRunBinary(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" -" _ZoneRegisterCallback: function _ZoneRegisterCallback(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" -" _ZoneRegisterUnaryCallback: function _ZoneRegisterUnaryCallback(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" -" _ZoneRegisterBinaryCallback: function _ZoneRegisterBinaryCallback(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" -" _ZoneErrorCallback: function _ZoneErrorCallback(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" -" _ZoneScheduleMicrotask: function _ZoneScheduleMicrotask(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" -" _ZoneCreateTimer: function _ZoneCreateTimer(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" -" _ZoneCreatePeriodicTimer: function _ZoneCreatePeriodicTimer() {\n" -" },\n" -" _ZonePrint: function _ZonePrint(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" -" _ZoneFork: function _ZoneFork(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" " _ZoneHandleUncaughtError: function _ZoneHandleUncaughtError(t0, t1) {\n" " this.zone = t0;\n" " this.\$function = t1;\n" " },\n" -" _ZoneValues: function _ZoneValues(t0, t1) {\n" -" this.zone = t0;\n" -" this.map = t1;\n" -" },\n" -" _Zone: function _Zone() {\n" -" },\n" -" _CustomZone: function _CustomZone(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) {\n" +" Zone: function Zone(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) {\n" " var _ = this;\n" -" _._run = t0;\n" -" _._runUnary = t1;\n" -" _._runBinary = t2;\n" -" _._registerCallback = t3;\n" -" _._registerUnaryCallback = t4;\n" -" _._registerBinaryCallback = t5;\n" -" _._errorCallback = t6;\n" -" _._scheduleMicrotask = t7;\n" -" _._createTimer = t8;\n" -" _._createPeriodicTimer = t9;\n" -" _._print = t10;\n" -" _._fork = t11;\n" -" _._handleUncaughtError = t12;\n" -" _._zoneValues = t13;\n" -" _._delegateCache = null;\n" -" _.parent = t14;\n" -" },\n" -" _CustomZone_bindCallback_closure: function _CustomZone_bindCallback_closure(t0, t1, t2) {\n" +" _._parent = t0;\n" +" _._delegate = t1;\n" +" _._runFunction = t2;\n" +" _._runUnaryFunction = t3;\n" +" _._runBinaryFunction = t4;\n" +" _._registerCallbackFunction = t5;\n" +" _._registerUnaryCallbackFunction = t6;\n" +" _._registerBinaryCallbackFunction = t7;\n" +" _._errorCallbackFunction = t8;\n" +" _._scheduleMicrotaskFunction = t9;\n" +" _._createTimerFunction = t10;\n" +" _._createPeriodicTimerFunction = t11;\n" +" _._printFunction = t12;\n" +" _._forkFunction = t13;\n" +" _._handleUncaughtErrorFunction = t14;\n" +" _._zoneValues = t15;\n" +" },\n" +" Zone_bindCallback_closure: function Zone_bindCallback_closure(t0, t1, t2) {\n" " this.\$this = t0;\n" " this.registered = t1;\n" " this.R = t2;\n" " },\n" -" _CustomZone_bindCallbackGuarded_closure: function _CustomZone_bindCallbackGuarded_closure(t0, t1) {\n" +" Zone_bindCallbackGuarded_closure: function Zone_bindCallbackGuarded_closure(t0, t1) {\n" " this.\$this = t0;\n" " this.registered = t1;\n" " },\n" -" _CustomZone_bindUnaryCallbackGuarded_closure: function _CustomZone_bindUnaryCallbackGuarded_closure(t0, t1, t2) {\n" +" Zone_bindUnaryCallbackGuarded_closure: function Zone_bindUnaryCallbackGuarded_closure(t0, t1, t2) {\n" " this.\$this = t0;\n" " this.registered = t1;\n" " this.T = t2;\n" " },\n" -" _RootZone: function _RootZone() {\n" -" },\n" -" _RootZone_bindCallback_closure: function _RootZone_bindCallback_closure(t0, t1, t2) {\n" -" this.\$this = t0;\n" -" this.f = t1;\n" -" this.R = t2;\n" -" },\n" -" _RootZone_bindCallbackGuarded_closure: function _RootZone_bindCallbackGuarded_closure(t0, t1) {\n" -" this.\$this = t0;\n" -" this.f = t1;\n" -" },\n" -" _RootZone_bindUnaryCallbackGuarded_closure: function _RootZone_bindUnaryCallbackGuarded_closure(t0, t1, t2) {\n" -" this.\$this = t0;\n" -" this.f = t1;\n" -" this.T = t2;\n" -" },\n" -" runZonedGuarded_closure: function runZonedGuarded_closure(t0, t1) {\n" +" runZonedGuarded_errorHandler: function runZonedGuarded_errorHandler(t0, t1) {\n" " this.parentZone = t0;\n" " this.onError = t1;\n" " },\n" -" _ZoneDelegate: function _ZoneDelegate(t0) {\n" -" this._delegationTarget = t0;\n" +" ZoneDelegate: function ZoneDelegate(t0) {\n" +" this._zone = t0;\n" " },\n" -" _rootHandleError_closure: function _rootHandleError_closure(t0, t1) {\n" +" _rootHandleUncaughtError_closure: function _rootHandleUncaughtError_closure(t0, t1) {\n" " this.error = t0;\n" " this.stackTrace = t1;\n" " },\n" @@ -5268,7 +4973,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this._data = null;\n" " },\n" " _JsonMapKeyIterable: function _JsonMapKeyIterable(t0) {\n" -" this._parent = t0;\n" +" this._convert\$_parent = t0;\n" " },\n" " _Utf8Decoder__decoder_closure: function _Utf8Decoder__decoder_closure() {\n" " },\n" @@ -7648,35 +7353,35 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " BaseResponse: function BaseResponse() {\n" " },\n" -" _rethrowAsClientException(e, st, request) {\n" -" var t1, message;\n" -" if (type\$.JSObject._is(e))\n" -" t1 = A._asString(e.name) === \"AbortError\";\n" -" else\n" -" t1 = false;\n" -" if (t1)\n" -" A.Error_throwWithStackTrace(new A.RequestAbortedException(\"Request aborted by `abortTrigger`\", request.url), st);\n" +" _toClientException(e, request) {\n" +" var message;\n" +" if (type\$.JSObject._is(e) && \"AbortError\" === A._asString(e.name))\n" +" return new A.RequestAbortedException(\"Request aborted by `abortTrigger`\", request.url);\n" " if (!(e instanceof A.ClientException)) {\n" " message = J.toString\$0\$(e);\n" " if (B.JSString_methods.startsWith\$1(message, \"TypeError: \"))\n" " message = B.JSString_methods.substring\$1(message, 11);\n" " e = new A.ClientException(message, request.url);\n" " }\n" -" A.Error_throwWithStackTrace(e, st);\n" +" return e;\n" " },\n" -" _readBody(request, response) {\n" -" return A._readBody\$body(request, response);\n" +" _rethrowAsClientException(e, st, request) {\n" +" A.Error_throwWithStackTrace(A._toClientException(e, request), st);\n" " },\n" -" _readBody\$body(request, response) {\n" -" var \$async\$_readBody = A._wrapJsFunctionForAsync(function(\$async\$errorCode, \$async\$result) {\n" -" switch (\$async\$errorCode) {\n" -" case 2:\n" -" \$async\$next = \$async\$nextWhenCanceled;\n" -" \$async\$goto = \$async\$next.pop();\n" -" break;\n" -" case 1:\n" -" \$async\$errorStack.push(\$async\$result);\n" -" \$async\$goto = \$async\$handler;\n" +" _bodyToStream(request, response) {\n" +" return new A._MultiStream(false, new A._bodyToStream_closure(request, response), type\$._MultiStream_List_int);\n" +" },\n" +" _readStreamBody(request, response, controller) {\n" +" return A._readStreamBody\$body(request, response, controller);\n" +" },\n" +" _readStreamBody\$body(request, response, controller) {\n" +" var \$async\$goto = 0,\n" +" \$async\$completer = A._makeAsyncAwaitCompleter(type\$.void),\n" +" \$async\$returnValue, \$async\$handler = 2, \$async\$errorStack = [], chunk, e, s, t2, t3, t4, t5, exception, t6, t7, _box_0, t1, reader, \$async\$exception;\n" +" var \$async\$_readStreamBody = A._wrapJsFunctionForAsync(function(\$async\$errorCode, \$async\$result) {\n" +" if (\$async\$errorCode === 1) {\n" +" \$async\$errorStack.push(\$async\$result);\n" +" \$async\$goto = \$async\$handler;\n" " }\n" " for (;;)\n" " switch (\$async\$goto) {\n" @@ -7684,114 +7389,124 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " // Function start\n" " _box_0 = {};\n" " t1 = A._asJSObjectQ(response.body);\n" -" bodyStreamReader = t1 == null ? null : A._asJSObject(t1.getReader());\n" -" if (bodyStreamReader == null) {\n" -" // goto return\n" -" \$async\$goto = 1;\n" -" break;\n" -" }\n" -" isDone = false;\n" -" _box_0.isError = false;\n" -" \$async\$handler = 4;\n" -" t1 = type\$.NativeUint8List, t2 = type\$.JSObject;\n" -" case 7:\n" +" reader = t1 == null ? null : A._asJSObject(t1.getReader());\n" +" \$async\$goto = reader == null ? 3 : 4;\n" +" break;\n" +" case 3:\n" +" // then\n" +" \$async\$goto = 5;\n" +" return A._asyncAwait(controller.close\$0(), \$async\$_readStreamBody);\n" +" case 5:\n" +" // returning from await.\n" +" // goto return\n" +" \$async\$goto = 1;\n" +" break;\n" +" case 4:\n" +" // join\n" +" _box_0.resumeSignal = null;\n" +" _box_0.hadError = _box_0.cancelled = false;\n" +" controller.set\$onResume(new A._readStreamBody_closure(_box_0));\n" +" controller.set\$onCancel(new A._readStreamBody_closure0(_box_0, reader, request));\n" +" t1 = type\$.NativeUint8List, t2 = controller.\$ti._precomputed1, t3 = type\$.JSObject, t4 = type\$._Future_void, t5 = type\$._AsyncCompleter_void;\n" +" case 6:\n" " // for condition\n" " // trivial condition\n" -" \$async\$goto = 9;\n" -" return A._asyncStarHelper(A.promiseToFuture(A._asJSObject(bodyStreamReader.read()), t2), \$async\$_readBody, \$async\$controller);\n" -" case 9:\n" +" chunk = null;\n" +" \$async\$handler = 9;\n" +" \$async\$goto = 12;\n" +" return A._asyncAwait(A.promiseToFuture(A._asJSObject(reader.read()), t3), \$async\$_readStreamBody);\n" +" case 12:\n" " // returning from await.\n" " chunk = \$async\$result;\n" -" if (A._asBool(chunk.done)) {\n" -" isDone = true;\n" -" // goto after for\n" -" \$async\$goto = 8;\n" -" break;\n" -" }\n" -" t3 = chunk.value;\n" -" t3.toString;\n" -" \$async\$goto = 10;\n" -" \$async\$nextWhenCanceled = [1, 5];\n" -" return A._asyncStarHelper(A._IterationMarker_yieldSingle(t1._as(t3)), \$async\$_readBody, \$async\$controller);\n" -" case 10:\n" -" // after yield\n" -" // goto for condition\n" -" \$async\$goto = 7;\n" -" break;\n" -" case 8:\n" -" // after for\n" -" \$async\$next.push(6);\n" -" // goto finally\n" -" \$async\$goto = 5;\n" +" \$async\$handler = 2;\n" +" // goto after finally\n" +" \$async\$goto = 11;\n" " break;\n" -" case 4:\n" +" case 9:\n" " // catch\n" -" \$async\$handler = 3;\n" +" \$async\$handler = 8;\n" " \$async\$exception = \$async\$errorStack.pop();\n" " e = A.unwrapException(\$async\$exception);\n" -" st = A.getTraceFromException(\$async\$exception);\n" -" _box_0.isError = true;\n" -" A._rethrowAsClientException(e, st, request);\n" -" \$async\$next.push(6);\n" -" // goto finally\n" -" \$async\$goto = 5;\n" -" break;\n" -" case 3:\n" -" // uncaught\n" -" \$async\$next = [2];\n" -" case 5:\n" -" // finally\n" -" \$async\$handler = 2;\n" -" \$async\$goto = !isDone ? 11 : 12;\n" +" s = A.getTraceFromException(\$async\$exception);\n" +" \$async\$goto = !_box_0.cancelled ? 13 : 14;\n" " break;\n" -" case 11:\n" +" case 13:\n" " // then\n" -" \$async\$handler = 14;\n" -" \$async\$goto = 17;\n" -" return A._asyncStarHelper(A.promiseToFuture(A._asJSObject(bodyStreamReader.cancel()), type\$.nullable_Object).catchError\$2\$test(new A._readBody_closure(), new A._readBody_closure0(_box_0)), \$async\$_readBody, \$async\$controller);\n" -" case 17:\n" +" _box_0.hadError = true;\n" +" t1 = A._toClientException(e, request);\n" +" t2 = type\$.nullable_StackTrace._as(s);\n" +" t3 = controller._state;\n" +" if (t3 >= 4)\n" +" A.throwExpression(controller._badEventState\$0());\n" +" if ((t3 & 1) !== 0) {\n" +" t3 = controller.get\$_subscription();\n" +" t3._addError\$2(t1, t2 == null ? B._StringStackTrace_OdL : t2);\n" +" }\n" +" \$async\$goto = 15;\n" +" return A._asyncAwait(controller.close\$0(), \$async\$_readStreamBody);\n" +" case 15:\n" " // returning from await.\n" -" \$async\$handler = 2;\n" -" // goto after finally\n" -" \$async\$goto = 16;\n" -" break;\n" " case 14:\n" -" // catch\n" -" \$async\$handler = 13;\n" -" \$async\$exception1 = \$async\$errorStack.pop();\n" -" e0 = A.unwrapException(\$async\$exception1);\n" -" st0 = A.getTraceFromException(\$async\$exception1);\n" -" if (!_box_0.isError)\n" -" A._rethrowAsClientException(e0, st0, request);\n" +" // join\n" +" // goto after for\n" +" \$async\$goto = 7;\n" +" break;\n" " // goto after finally\n" -" \$async\$goto = 16;\n" +" \$async\$goto = 11;\n" " break;\n" -" case 13:\n" +" case 8:\n" " // uncaught\n" " // goto rethrow\n" " \$async\$goto = 2;\n" " break;\n" -" case 16:\n" +" case 11:\n" " // after finally\n" -" case 12:\n" -" // join\n" -" // goto the next finally handler\n" -" \$async\$goto = \$async\$next.pop();\n" +" if (A._asBool(chunk.done)) {\n" +" controller.closeSync\$0();\n" +" // goto after for\n" +" \$async\$goto = 7;\n" +" break;\n" +" } else {\n" +" t6 = chunk.value;\n" +" t6.toString;\n" +" t6 = t2._as(t1._as(t6));\n" +" t7 = controller._state;\n" +" if (t7 >= 4)\n" +" A.throwExpression(controller._badEventState\$0());\n" +" if ((t7 & 1) !== 0)\n" +" controller.get\$_subscription()._add\$1(t6);\n" +" }\n" +" t6 = controller._state;\n" +" \$async\$goto = ((t6 & 1) !== 0 ? (controller.get\$_subscription()._state & 4) !== 0 : (t6 & 2) === 0) ? 16 : 17;\n" " break;\n" -" case 6:\n" -" // after finally\n" -" case 1:\n" -" // return\n" -" return A._asyncStarHelper(null, 0, \$async\$controller);\n" -" case 2:\n" -" // rethrow\n" -" return A._asyncStarHelper(\$async\$errorStack.at(-1), 1, \$async\$controller);\n" -" }\n" +" case 16:\n" +" // then\n" +" t6 = _box_0.resumeSignal;\n" +" \$async\$goto = 18;\n" +" return A._asyncAwait((t6 == null ? _box_0.resumeSignal = new A._AsyncCompleter(new A._Future(\$.Zone__current, t4), t5) : t6).future, \$async\$_readStreamBody);\n" +" case 18:\n" +" // returning from await.\n" +" case 17:\n" +" // join\n" +" if ((controller._state & 1) === 0) {\n" +" // goto after for\n" +" \$async\$goto = 7;\n" +" break;\n" +" }\n" +" // goto for condition\n" +" \$async\$goto = 6;\n" +" break;\n" +" case 7:\n" +" // after for\n" +" case 1:\n" +" // return\n" +" return A._asyncReturn(\$async\$returnValue, \$async\$completer);\n" +" case 2:\n" +" // rethrow\n" +" return A._asyncRethrow(\$async\$errorStack.at(-1), \$async\$completer);\n" +" }\n" " });\n" -" var \$async\$goto = 0,\n" -" \$async\$controller = A._makeAsyncStarStreamController(\$async\$_readBody, type\$.List_int),\n" -" \$async\$nextWhenCanceled, \$async\$handler = 2, \$async\$errorStack = [], \$async\$next = [], isDone, chunk, e, st, e0, st0, t2, t3, exception, _box_0, t1, bodyStreamReader, \$async\$exception, \$async\$exception1;\n" -" return A._streamOfController(\$async\$controller);\n" +" return A._asyncStartSync(\$async\$_readStreamBody, \$async\$completer);\n" " },\n" " BrowserClient: function BrowserClient(t0) {\n" " this.withCredentials = false;\n" @@ -7800,10 +7515,17 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " BrowserClient_send_closure: function BrowserClient_send_closure(t0) {\n" " this.headers = t0;\n" " },\n" -" _readBody_closure: function _readBody_closure() {\n" +" _bodyToStream_closure: function _bodyToStream_closure(t0, t1) {\n" +" this.request = t0;\n" +" this.response = t1;\n" +" },\n" +" _readStreamBody_closure: function _readStreamBody_closure(t0) {\n" +" this._box_0 = t0;\n" " },\n" -" _readBody_closure0: function _readBody_closure0(t0) {\n" +" _readStreamBody_closure0: function _readStreamBody_closure0(t0, t1, t2) {\n" " this._box_0 = t0;\n" +" this.reader = t1;\n" +" this.request = t2;\n" " },\n" " ByteStream: function ByteStream(t0) {\n" " this._stream = t0;\n" @@ -8390,10 +8112,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _.text = t3;\n" " },\n" " SseClient\$(serverUrl, debugKey) {\n" -" var t3, t4, t5, _null = null,\n" +" var t3, t4, t5,\n" " t1 = type\$.String,\n" -" t2 = A.StreamController_StreamController(_null, _null, _null, t1);\n" -" t1 = A.StreamController_StreamController(_null, _null, _null, t1);\n" +" t2 = A.StreamController_StreamController(t1);\n" +" t1 = A.StreamController_StreamController(t1);\n" " t3 = A.Logger_Logger(\"SseClient\");\n" " t4 = \$.Zone__current;\n" " t5 = A.generateId();\n" @@ -8458,7 +8180,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " _wrapZone(callback, \$T) {\n" " var t1 = \$.Zone__current;\n" -" if (t1 === B.C__RootZone)\n" +" if (t1 === B.Zone_jYP)\n" " return callback;\n" " return t1.bindUnaryCallbackGuarded\$1\$1(callback, \$T);\n" " },\n" @@ -8508,7 +8230,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t1 = type\$.JSArray_nullable_Object._as(new t1());\n" " webSocket = A._asJSObject(new t2(t3, t1));\n" " webSocket.binaryType = \"arraybuffer\";\n" -" browserSocket = new A.BrowserWebSocket(webSocket, A.StreamController_StreamController(null, null, null, type\$.WebSocketEvent));\n" +" browserSocket = new A.BrowserWebSocket(webSocket, A.StreamController_StreamController(type\$.WebSocketEvent));\n" " t1 = new A._Future(\$.Zone__current, type\$._Future_BrowserWebSocket);\n" " webSocketConnected = new A._AsyncCompleter(t1, type\$._AsyncCompleter_BrowserWebSocket);\n" " if (A._asInt(webSocket.readyState) === 1)\n" @@ -9964,12 +9686,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return result;\n" " return result + other;\n" " },\n" -" \$tdiv(receiver, other) {\n" -" if ((receiver | 0) === receiver)\n" -" if (other >= 1)\n" -" return receiver / other | 0;\n" -" return this._tdivSlow\$1(receiver, other);\n" -" },\n" " _tdivFast\$1(receiver, other) {\n" " return (receiver | 0) === receiver ? receiver / other | 0 : this._tdivSlow\$1(receiver, other);\n" " },\n" @@ -10204,20 +9920,30 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return this.__internal\$_source.cancel\$0();\n" " },\n" " onData\$1(handleData) {\n" -" var t1 = this.\$ti;\n" +" var t2,\n" +" t1 = this.\$ti;\n" " t1._eval\$1(\"~(2)?\")._as(handleData);\n" -" this.__internal\$_handleData = handleData == null ? null : this.__internal\$_zone.registerUnaryCallback\$2\$1(handleData, type\$.dynamic, t1._rest[1]);\n" +" if (handleData == null)\n" +" t1 = null;\n" +" else {\n" +" t2 = this.__internal\$_zone;\n" +" t1 = t1._rest[1];\n" +" t1 = t2._registerUnaryCallbackZoned\$2\$2(t2, type\$.\$env_1_1_dynamic._bind\$1(t1)._eval\$1(\"1(2)\")._as(handleData), type\$.dynamic, t1);\n" +" }\n" +" this.__internal\$_handleData = t1;\n" " },\n" " onError\$1(handleError) {\n" -" var _this = this;\n" +" var t1, _this = this;\n" " _this.__internal\$_source.onError\$1(handleError);\n" " if (handleError == null)\n" " _this.__internal\$_handleError = null;\n" -" else if (type\$.void_Function_Object_StackTrace._is(handleError))\n" -" _this.__internal\$_handleError = _this.__internal\$_zone.registerBinaryCallback\$3\$1(handleError, type\$.dynamic, type\$.Object, type\$.StackTrace);\n" -" else if (type\$.void_Function_Object._is(handleError))\n" -" _this.__internal\$_handleError = _this.__internal\$_zone.registerUnaryCallback\$2\$1(handleError, type\$.dynamic, type\$.Object);\n" -" else\n" +" else if (type\$.void_Function_Object_StackTrace._is(handleError)) {\n" +" t1 = _this.__internal\$_zone;\n" +" _this.__internal\$_handleError = t1._registerBinaryCallbackZoned\$3\$2(t1, type\$.dynamic_Function_Object_StackTrace._as(handleError), type\$.dynamic, type\$.Object, type\$.StackTrace);\n" +" } else if (type\$.void_Function_Object._is(handleError)) {\n" +" t1 = _this.__internal\$_zone;\n" +" _this.__internal\$_handleError = t1._registerUnaryCallbackZoned\$2\$2(t1, type\$.dynamic_Function_Object._as(handleError), type\$.dynamic, type\$.Object);\n" +" } else\n" " throw A.wrapException(A.ArgumentError\$(string\$.handle, null));\n" " },\n" " __internal\$_onData\$1(data) {\n" @@ -10234,9 +9960,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " error = A.unwrapException(exception);\n" " stack = A.getTraceFromException(exception);\n" " handleError = _this.__internal\$_handleError;\n" -" if (handleError == null)\n" -" _this.__internal\$_zone.handleUncaughtError\$2(error, stack);\n" -" else {\n" +" if (handleError == null) {\n" +" t1 = _this.__internal\$_zone;\n" +" t1._handleUncaughtErrorZoned\$3(t1, A._asObject(error), type\$.StackTrace._as(stack));\n" +" } else {\n" " t1 = type\$.Object;\n" " t2 = _this.__internal\$_zone;\n" " if (type\$.void_Function_Object_StackTrace._is(handleError))\n" @@ -10423,7 +10150,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$0() {\n" " return A.Future_Future\$value(null, type\$.void);\n" " },\n" -" \$signature: 9\n" +" \$signature: 6\n" " };\n" " A.SentinelValue.prototype = {};\n" " A.EfficientLengthIterable.prototype = {};\n" @@ -10989,9 +10716,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$2(a0, a1) {\n" " return this._genericClosure.call\$1\$2(a0, a1, this.\$ti._rest[0]);\n" " },\n" -" call\$4(a0, a1, a2, a3) {\n" -" return this._genericClosure.call\$1\$4(a0, a1, a2, a3, this.\$ti._rest[0]);\n" -" },\n" " \$signature() {\n" " return A.instantiatedGenericFunctionType(A.closureFunctionType(this._genericClosure), this.\$ti);\n" " }\n" @@ -11428,13 +11152,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$2(o, tag) {\n" " return this.getUnknownTag(o, tag);\n" " },\n" -" \$signature: 31\n" +" \$signature: 73\n" " };\n" " A.initHooks_closure1.prototype = {\n" " call\$1(tag) {\n" " return this.prototypeForTag(A._asString(tag));\n" " },\n" -" \$signature: 30\n" +" \$signature: 59\n" " };\n" " A._Record.prototype = {\n" " get\$runtimeType(_) {\n" @@ -11942,7 +11666,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t1.storedCallback = null;\n" " f.call\$0();\n" " },\n" -" \$signature: 4\n" +" \$signature: 8\n" " };\n" " A._AsyncRun__initializeScheduleImmediate_closure.prototype = {\n" " call\$1(callback) {\n" @@ -11952,7 +11676,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t2 = this.span;\n" " t1.firstChild ? t1.removeChild(t2) : t1.appendChild(t2);\n" " },\n" -" \$signature: 49\n" +" \$signature: 43\n" " };\n" " A._AsyncRun__scheduleImmediateJsOverride_internalCallback.prototype = {\n" " call\$0() {\n" @@ -11973,12 +11697,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " else\n" " throw A.wrapException(A.UnsupportedError\$(\"`setTimeout()` not found.\"));\n" " },\n" -" _TimerImpl\$periodic\$2(milliseconds, callback) {\n" -" if (self.setTimeout != null)\n" -" this._handle = self.setInterval(A.convertDartClosureToJS(new A._TimerImpl\$periodic_closure(this, milliseconds, Date.now(), callback), 0), milliseconds);\n" -" else\n" -" throw A.wrapException(A.UnsupportedError\$(\"Periodic timer.\"));\n" -" },\n" " get\$isActive() {\n" " return this._handle != null;\n" " },\n" @@ -11987,10 +11705,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " var t1 = this._handle;\n" " if (t1 == null)\n" " return;\n" -" if (this._once)\n" -" self.clearTimeout(t1);\n" -" else\n" -" self.clearInterval(t1);\n" +" self.clearTimeout(t1);\n" " this._handle = null;\n" " } else\n" " throw A.wrapException(A.UnsupportedError\$(\"Canceling a timer.\"));\n" @@ -11999,29 +11714,11 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._TimerImpl_internalCallback.prototype = {\n" " call\$0() {\n" -" var t1 = this.\$this;\n" -" t1._handle = null;\n" -" t1._tick = 1;\n" +" this.\$this._handle = null;\n" " this.callback.call\$0();\n" " },\n" " \$signature: 0\n" " };\n" -" A._TimerImpl\$periodic_closure.prototype = {\n" -" call\$0() {\n" -" var duration, _this = this,\n" -" t1 = _this.\$this,\n" -" tick = t1._tick + 1,\n" -" t2 = _this.milliseconds;\n" -" if (t2 > 0) {\n" -" duration = Date.now() - _this.start;\n" -" if (duration > (tick + 1) * t2)\n" -" tick = B.JSInt_methods.\$tdiv(duration, t2);\n" -" }\n" -" t1._tick = tick;\n" -" _this.callback.call\$1(t1);\n" -" },\n" -" \$signature: 1\n" -" };\n" " A._AsyncAwaitCompleter.prototype = {\n" " complete\$1(value) {\n" " var t2, _this = this,\n" @@ -12052,104 +11749,19 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(result) {\n" " return this.bodyFunction.call\$2(0, result);\n" " },\n" -" \$signature: 5\n" +" \$signature: 4\n" " };\n" " A._awaitOnObject_closure0.prototype = {\n" " call\$2(error, stackTrace) {\n" " this.bodyFunction.call\$2(1, new A.ExceptionAndStackTrace(error, type\$.StackTrace._as(stackTrace)));\n" " },\n" -" \$signature: 54\n" +" \$signature: 48\n" " };\n" " A._wrapJsFunctionForAsync_closure.prototype = {\n" " call\$2(errorCode, result) {\n" " this.\$protected(A._asInt(errorCode), result);\n" " },\n" -" \$signature: 59\n" -" };\n" -" A._asyncStarHelper_closure.prototype = {\n" -" call\$0() {\n" -" var t3,\n" -" t1 = this.controller,\n" -" t2 = t1.___AsyncStarStreamController_controller_A;\n" -" t2 === \$ && A.throwLateFieldNI(\"controller\");\n" -" t3 = t2._state;\n" -" if ((t3 & 1) !== 0 ? (t2.get\$_subscription()._state & 4) !== 0 : (t3 & 2) === 0) {\n" -" t1.isSuspended = true;\n" -" return;\n" -" }\n" -" t1 = t1.cancelationFuture != null ? 2 : 0;\n" -" this.bodyFunction.call\$2(t1, null);\n" -" },\n" -" \$signature: 0\n" -" };\n" -" A._asyncStarHelper_closure0.prototype = {\n" -" call\$1(__wc0_formal) {\n" -" var errorCode = this.controller.cancelationFuture != null ? 2 : 0;\n" -" this.bodyFunction.call\$2(errorCode, null);\n" -" },\n" -" \$signature: 4\n" -" };\n" -" A._AsyncStarStreamController.prototype = {\n" -" _AsyncStarStreamController\$1(body, \$T) {\n" -" var _this = this,\n" -" t1 = new A._AsyncStarStreamController__resumeBody(body);\n" -" _this.___AsyncStarStreamController_controller_A = _this.\$ti._eval\$1(\"StreamController<1>\")._as(A.StreamController_StreamController(new A._AsyncStarStreamController_closure(_this, body), new A._AsyncStarStreamController_closure0(t1), new A._AsyncStarStreamController_closure1(_this, t1), \$T));\n" -" }\n" -" };\n" -" A._AsyncStarStreamController__resumeBody.prototype = {\n" -" call\$0() {\n" -" A.scheduleMicrotask(new A._AsyncStarStreamController__resumeBody_closure(this.body));\n" -" },\n" -" \$signature: 1\n" -" };\n" -" A._AsyncStarStreamController__resumeBody_closure.prototype = {\n" -" call\$0() {\n" -" this.body.call\$2(0, null);\n" -" },\n" -" \$signature: 0\n" -" };\n" -" A._AsyncStarStreamController_closure0.prototype = {\n" -" call\$0() {\n" -" this._resumeBody.call\$0();\n" -" },\n" -" \$signature: 0\n" -" };\n" -" A._AsyncStarStreamController_closure1.prototype = {\n" -" call\$0() {\n" -" var t1 = this.\$this;\n" -" if (t1.isSuspended) {\n" -" t1.isSuspended = false;\n" -" this._resumeBody.call\$0();\n" -" }\n" -" },\n" -" \$signature: 0\n" -" };\n" -" A._AsyncStarStreamController_closure.prototype = {\n" -" call\$0() {\n" -" var t1 = this.\$this,\n" -" t2 = t1.___AsyncStarStreamController_controller_A;\n" -" t2 === \$ && A.throwLateFieldNI(\"controller\");\n" -" if ((t2._state & 4) === 0) {\n" -" t1.cancelationFuture = new A._Future(\$.Zone__current, type\$._Future_dynamic);\n" -" if (t1.isSuspended) {\n" -" t1.isSuspended = false;\n" -" A.scheduleMicrotask(new A._AsyncStarStreamController__closure(this.body));\n" -" }\n" -" return t1.cancelationFuture;\n" -" }\n" -" },\n" -" \$signature: 60\n" -" };\n" -" A._AsyncStarStreamController__closure.prototype = {\n" -" call\$0() {\n" -" this.body.call\$2(2, null);\n" -" },\n" -" \$signature: 0\n" -" };\n" -" A._IterationMarker.prototype = {\n" -" toString\$0(_) {\n" -" return \"IterationMarker(\" + this.state + \", \" + A.S(this.value) + \")\";\n" -" }\n" +" \$signature: 55\n" " };\n" " A.AsyncError.prototype = {\n" " toString\$0(_) {\n" @@ -12235,9 +11847,11 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._FutureListener.prototype = {\n" " matchesErrorTest\$1(asyncError) {\n" +" var t1;\n" " if ((this.state & 15) !== 6)\n" " return true;\n" -" return this.result._zone.runUnary\$2\$2(type\$.bool_Function_Object._as(this.callback), asyncError.error, type\$.bool, type\$.Object);\n" +" t1 = this.result._zone;\n" +" return t1._runUnaryZoned\$2\$3(t1, type\$.bool_Function_Object._as(this.callback), asyncError.error, type\$.bool, type\$.Object);\n" " },\n" " handleError\$1(asyncError) {\n" " var exception, _this = this,\n" @@ -12248,9 +11862,9 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t3 = asyncError.error,\n" " t4 = _this.result._zone;\n" " if (type\$.dynamic_Function_Object_StackTrace._is(errorCallback))\n" -" result = t4.runBinary\$3\$3(errorCallback, t3, asyncError.stackTrace, t1, t2, type\$.StackTrace);\n" +" result = t4._runBinaryZoned\$3\$4(t4, errorCallback, t3, asyncError.stackTrace, t1, t2, type\$.StackTrace);\n" " else\n" -" result = t4.runUnary\$2\$2(type\$.dynamic_Function_Object._as(errorCallback), t3, t1, t2);\n" +" result = t4._runUnaryZoned\$2\$3(t4, type\$.dynamic_Function_Object._as(errorCallback), t3, t1, t2);\n" " try {\n" " t1 = _this.\$ti._eval\$1(\"2/\")._as(result);\n" " return t1;\n" @@ -12266,15 +11880,16 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._Future.prototype = {\n" " then\$1\$2\$onError(f, onError, \$R) {\n" -" var currentZone, result, t2,\n" +" var currentZone, t2, result,\n" " t1 = this.\$ti;\n" " t1._bind\$1(\$R)._eval\$1(\"1/(2)\")._as(f);\n" " currentZone = \$.Zone__current;\n" -" if (currentZone === B.C__RootZone) {\n" +" if (currentZone === B.Zone_jYP) {\n" " if (onError != null && !type\$.dynamic_Function_Object_StackTrace._is(onError) && !type\$.dynamic_Function_Object._is(onError))\n" " throw A.wrapException(A.ArgumentError\$value(onError, \"onError\", string\$.Error_));\n" " } else {\n" -" f = currentZone.registerUnaryCallback\$2\$1(f, \$R._eval\$1(\"0/\"), t1._precomputed1);\n" +" t2 = t1._precomputed1;\n" +" f = currentZone._registerUnaryCallbackZoned\$2\$2(currentZone, \$R._eval\$1(\"@<0/>\")._bind\$1(t2)._eval\$1(\"1(2)\")._as(f), \$R._eval\$1(\"0/\"), t2);\n" " if (onError != null)\n" " onError = A._registerErrorHandler(onError, currentZone);\n" " }\n" @@ -12294,32 +11909,23 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this._addListener\$1(new A._FutureListener(result, 19, f, onError, t1._eval\$1(\"@<1>\")._bind\$1(\$E)._eval\$1(\"_FutureListener<1,2>\")));\n" " return result;\n" " },\n" -" catchError\$2\$test(onError, test) {\n" -" var t1, t2, result;\n" -" type\$.nullable_bool_Function_Object._as(test);\n" -" t1 = this.\$ti;\n" -" t2 = \$.Zone__current;\n" -" result = new A._Future(t2, t1);\n" -" if (t2 !== B.C__RootZone) {\n" -" onError = A._registerErrorHandler(onError, t2);\n" -" if (test != null)\n" -" test = t2.registerUnaryCallback\$2\$1(test, type\$.bool, type\$.Object);\n" -" }\n" -" t2 = test == null ? 2 : 6;\n" -" this._addListener\$1(new A._FutureListener(result, t2, test, onError, t1._eval\$1(\"_FutureListener<1,1>\")));\n" -" return result;\n" -" },\n" " catchError\$1(onError) {\n" -" return this.catchError\$2\$test(onError, null);\n" +" var t1 = this.\$ti,\n" +" resultZone = \$.Zone__current,\n" +" result = new A._Future(resultZone, t1);\n" +" if (resultZone !== B.Zone_jYP)\n" +" onError = A._registerErrorHandler(onError, resultZone);\n" +" this._addListener\$1(new A._FutureListener(result, 2, null, onError, t1._eval\$1(\"_FutureListener<1,1>\")));\n" +" return result;\n" " },\n" " whenComplete\$1(action) {\n" -" var t1, t2, result;\n" +" var t1, resultZone, result;\n" " type\$.dynamic_Function._as(action);\n" " t1 = this.\$ti;\n" -" t2 = \$.Zone__current;\n" -" result = new A._Future(t2, t1);\n" -" if (t2 !== B.C__RootZone)\n" -" action = t2.registerCallback\$1\$1(action, type\$.dynamic);\n" +" resultZone = \$.Zone__current;\n" +" result = new A._Future(resultZone, t1);\n" +" if (resultZone !== B.Zone_jYP)\n" +" action = resultZone._registerCallbackZoned\$1\$2(resultZone, action, type\$.dynamic);\n" " this._addListener\$1(new A._FutureListener(result, 8, action, null, t1._eval\$1(\"_FutureListener<1,1>\")));\n" " return result;\n" " },\n" @@ -12346,7 +11952,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " _this._cloneResult\$1(source);\n" " }\n" -" _this._zone.scheduleMicrotask\$1(new A._Future__addListener_closure(_this, listener));\n" +" t1 = _this._zone;\n" +" t1._scheduleMicrotaskZoned\$2(t1, new A._Future__addListener_closure(_this, listener));\n" " }\n" " },\n" " _prependListeners\$1(listeners) {\n" @@ -12374,7 +11981,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _this._cloneResult\$1(source);\n" " }\n" " _box_0.listeners = _this._reverseListeners\$1(listeners);\n" -" _this._zone.scheduleMicrotask\$1(new A._Future__prependListeners_closure(_box_0, _this));\n" +" t1 = _this._zone;\n" +" t1._scheduleMicrotaskZoned\$2(t1, new A._Future__prependListeners_closure(_box_0, _this));\n" " }\n" " },\n" " _removeListeners\$0() {\n" @@ -12413,14 +12021,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " A._Future__propagateToListeners(_this, listeners);\n" " },\n" " _completeWithResultOf\$1(source) {\n" -" var t1, t2, listeners, _this = this;\n" -" if ((source._state & 16) !== 0) {\n" -" t1 = _this._zone;\n" -" t2 = source._zone;\n" -" t1 = !(t1 === t2 || t1.get\$errorZone() === t2.get\$errorZone());\n" -" } else\n" -" t1 = false;\n" -" if (t1)\n" +" var listeners, _this = this;\n" +" if ((source._state & 16) !== 0 && _this._zone._handleUncaughtErrorFunction != source._zone._handleUncaughtErrorFunction)\n" " return;\n" " listeners = _this._removeListeners\$0();\n" " _this._cloneResult\$1(source);\n" @@ -12446,18 +12048,21 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this._asyncCompleteWithValue\$1(value);\n" " },\n" " _asyncCompleteWithValue\$1(value) {\n" -" var _this = this;\n" +" var t1, _this = this;\n" " _this.\$ti._precomputed1._as(value);\n" " _this._state ^= 2;\n" -" _this._zone.scheduleMicrotask\$1(new A._Future__asyncCompleteWithValue_closure(_this, value));\n" +" t1 = _this._zone;\n" +" t1._scheduleMicrotaskZoned\$2(t1, new A._Future__asyncCompleteWithValue_closure(_this, value));\n" " },\n" " _chainFuture\$1(value) {\n" " A._Future__chainCoreFuture(this.\$ti._eval\$1(\"Future<1>\")._as(value), this, false);\n" " return;\n" " },\n" " _asyncCompleteErrorObject\$1(error) {\n" +" var t1;\n" " this._state ^= 2;\n" -" this._zone.scheduleMicrotask\$1(new A._Future__asyncCompleteErrorObject_closure(this, error));\n" +" t1 = this._zone;\n" +" t1._scheduleMicrotaskZoned\$2(t1, new A._Future__asyncCompleteErrorObject_closure(this, error));\n" " },\n" " timeout\$2\$onTimeout(timeLimit, onTimeout) {\n" " var t3, _future, _this = this, t1 = {},\n" @@ -12471,7 +12076,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t3 = \$.Zone__current;\n" " _future = new A._Future(t3, t2);\n" " t1.timer = null;\n" -" t1.timer = A.Timer_Timer(timeLimit, new A._Future_timeout_closure(_this, _future, t3, t3.registerCallback\$1\$1(onTimeout, t2._eval\$1(\"1/\"))));\n" +" t1.timer = A.Timer_Timer(timeLimit, new A._Future_timeout_closure(_this, _future, t3, t3._registerCallbackZoned\$1\$2(t3, t2._eval\$1(\"1/()\")._as(onTimeout), t2._eval\$1(\"1/\"))));\n" " _this.then\$1\$2\$onError(new A._Future_timeout_closure0(t1, _this, _future), new A._Future_timeout_closure1(t1, _future), type\$.Null);\n" " return _future;\n" " },\n" @@ -12509,10 +12114,11 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._Future__propagateToListeners_handleWhenCompleteCallback.prototype = {\n" " call\$0() {\n" -" var e, s, t1, exception, t2, t3, originalSource, joinedResult, _this = this, completeResult = null;\n" +" var e, s, t1, t2, exception, t3, originalSource, joinedResult, _this = this, completeResult = null;\n" " try {\n" " t1 = _this._box_0.listener;\n" -" completeResult = t1.result._zone.run\$1\$1(type\$.dynamic_Function._as(t1.callback), type\$.dynamic);\n" +" t2 = t1.result._zone;\n" +" completeResult = t2._runZoned\$1\$2(t2, type\$.dynamic_Function._as(t1.callback), type\$.dynamic);\n" " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" @@ -12554,7 +12160,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(__wc0_formal) {\n" " this.joinedResult._completeWithResultOf\$1(this.originalSource);\n" " },\n" -" \$signature: 4\n" +" \$signature: 8\n" " };\n" " A._Future__propagateToListeners_handleWhenCompleteCallback_closure0.prototype = {\n" " call\$2(e, s) {\n" @@ -12566,14 +12172,15 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._Future__propagateToListeners_handleValueCallback.prototype = {\n" " call\$0() {\n" -" var e, s, t1, t2, t3, t4, t5, exception;\n" +" var e, s, t1, t2, t3, t4, t5, t6, exception;\n" " try {\n" " t1 = this._box_0;\n" " t2 = t1.listener;\n" " t3 = t2.\$ti;\n" " t4 = t3._precomputed1;\n" " t5 = t4._as(this.sourceResult);\n" -" t1.listenerValueOrError = t2.result._zone.runUnary\$2\$2(t3._eval\$1(\"2/(1)\")._as(t2.callback), t5, t3._eval\$1(\"2/\"), t4);\n" +" t6 = t2.result._zone;\n" +" t1.listenerValueOrError = t6._runUnaryZoned\$2\$3(t6, t3._eval\$1(\"2/(1)\")._as(t2.callback), t5, t3._eval\$1(\"2/\"), t4);\n" " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" @@ -12622,9 +12229,11 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._Future_timeout_closure.prototype = {\n" " call\$0() {\n" -" var e, s, exception, t1, t2, _this = this;\n" +" var e, s, t1, t2, exception, _this = this;\n" " try {\n" -" _this._future._complete\$1(_this.zone.run\$1\$1(_this.onTimeoutHandler, _this.\$this.\$ti._eval\$1(\"1/\")));\n" +" t1 = _this.zone;\n" +" t2 = _this.\$this.\$ti;\n" +" _this._future._complete\$1(t1._runZoned\$1\$2(t1, t2._eval\$1(\"1/()\")._as(_this.onTimeoutHandler), t2._eval\$1(\"1/\")));\n" " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" @@ -12733,10 +12342,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " if ((_this._state & 8) === 0)\n" " return A._instanceType(_this)._eval\$1(\"_PendingEvents<1>?\")._as(_this._varData);\n" " t1 = A._instanceType(_this);\n" -" return t1._eval\$1(\"_PendingEvents<1>?\")._as(t1._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(_this._varData)._varData);\n" +" return t1._eval\$1(\"_PendingEvents<1>?\")._as(t1._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(_this._varData).get\$_varData());\n" " },\n" " _ensurePendingEvents\$0() {\n" -" var events, t1, state, _this = this;\n" +" var events, t1, _this = this;\n" " if ((_this._state & 8) === 0) {\n" " events = _this._varData;\n" " if (events == null)\n" @@ -12744,16 +12353,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return A._instanceType(_this)._eval\$1(\"_PendingEvents<1>\")._as(events);\n" " }\n" " t1 = A._instanceType(_this);\n" -" state = t1._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(_this._varData);\n" -" events = state._varData;\n" -" if (events == null)\n" -" events = state._varData = new A._PendingEvents(t1._eval\$1(\"_PendingEvents<1>\"));\n" +" events = t1._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(_this._varData).get\$_varData();\n" " return t1._eval\$1(\"_PendingEvents<1>\")._as(events);\n" " },\n" " get\$_subscription() {\n" " var varData = this._varData;\n" " if ((this._state & 8) !== 0)\n" -" varData = type\$._StreamControllerAddStreamState_nullable_Object._as(varData)._varData;\n" +" varData = type\$._StreamControllerAddStreamState_nullable_Object._as(varData).get\$_varData();\n" " return A._instanceType(this)._eval\$1(\"_ControllerSubscription<1>\")._as(varData);\n" " },\n" " _badEventState\$0() {\n" @@ -12761,31 +12367,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return new A.StateError(\"Cannot add event after closing\");\n" " return new A.StateError(\"Cannot add event while adding a stream\");\n" " },\n" -" addStream\$2\$cancelOnError(source, cancelOnError) {\n" -" var t2, t3, t4, t5, t6, _this = this,\n" -" t1 = A._instanceType(_this);\n" -" t1._eval\$1(\"Stream<1>\")._as(source);\n" -" t2 = _this._state;\n" -" if (t2 >= 4)\n" -" throw A.wrapException(_this._badEventState\$0());\n" -" if ((t2 & 2) !== 0) {\n" -" t1 = new A._Future(\$.Zone__current, type\$._Future_dynamic);\n" -" t1._asyncComplete\$1(null);\n" -" return t1;\n" -" }\n" -" t2 = _this._varData;\n" -" t3 = cancelOnError === true;\n" -" t4 = new A._Future(\$.Zone__current, type\$._Future_dynamic);\n" -" t5 = t1._eval\$1(\"~(1)\")._as(_this.get\$_add());\n" -" t6 = t3 ? A._AddStreamState_makeErrorHandler(_this) : _this.get\$_addError();\n" -" t6 = source.listen\$4\$cancelOnError\$onDone\$onError(t5, t3, _this.get\$_close(), t6);\n" -" t3 = _this._state;\n" -" if ((t3 & 1) !== 0 ? (_this.get\$_subscription()._state & 4) !== 0 : (t3 & 2) === 0)\n" -" t6.pause\$0();\n" -" _this._varData = new A._StreamControllerAddStreamState(t2, t4, t6, t1._eval\$1(\"_StreamControllerAddStreamState<1>\"));\n" -" _this._state |= 8;\n" -" return t4;\n" -" },\n" " _ensureDoneFuture\$0() {\n" " var t1 = this._doneFuture;\n" " if (t1 == null)\n" @@ -12799,16 +12380,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " throw A.wrapException(_this._badEventState\$0());\n" " _this._add\$1(value);\n" " },\n" -" addError\$2(error, stackTrace) {\n" -" var _0_0;\n" -" if (this._state >= 4)\n" -" throw A.wrapException(this._badEventState\$0());\n" -" _0_0 = A._interceptUserError(error, stackTrace);\n" -" this._addError\$2(_0_0.error, _0_0.stackTrace);\n" -" },\n" -" addError\$1(error) {\n" -" return this.addError\$2(error, null);\n" -" },\n" " close\$0() {\n" " var _this = this,\n" " t1 = _this._state;\n" @@ -12836,23 +12407,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " else if ((t2 & 3) === 0)\n" " _this._ensurePendingEvents\$0().add\$1(0, new A._DelayedData(value, t1._eval\$1(\"_DelayedData<1>\")));\n" " },\n" -" _addError\$2(error, stackTrace) {\n" -" var t1;\n" -" A._asObject(error);\n" -" type\$.StackTrace._as(stackTrace);\n" -" t1 = this._state;\n" -" if ((t1 & 1) !== 0)\n" -" this._sendError\$2(error, stackTrace);\n" -" else if ((t1 & 3) === 0)\n" -" this._ensurePendingEvents\$0().add\$1(0, new A._DelayedError(error, stackTrace));\n" -" },\n" -" _close\$0() {\n" -" var _this = this,\n" -" addState = A._instanceType(_this)._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(_this._varData);\n" -" _this._varData = addState._varData;\n" -" _this._state &= 4294967287;\n" -" addState.addStreamFuture._asyncComplete\$1(null);\n" -" },\n" " _subscribe\$4(onData, onError, onDone, cancelOnError) {\n" " var t2, t3, t4, t5, t6, t7, subscription, pendingEvents, addState, _this = this,\n" " t1 = A._instanceType(_this);\n" @@ -12866,12 +12420,12 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t5 = A._BufferingStreamSubscription__registerDataHandler(t2, onData, t1._precomputed1);\n" " t6 = A._BufferingStreamSubscription__registerErrorHandler(t2, onError);\n" " t7 = onDone == null ? A.async___nullDoneHandler\$closure() : onDone;\n" -" subscription = new A._ControllerSubscription(_this, t5, t6, t2.registerCallback\$1\$1(t7, type\$.void), t2, t3 | t4, t1._eval\$1(\"_ControllerSubscription<1>\"));\n" +" subscription = new A._ControllerSubscription(_this, t5, t6, t2._registerCallbackZoned\$1\$2(t2, type\$.void_Function._as(t7), type\$.void), t2, t3 | t4, t1._eval\$1(\"_ControllerSubscription<1>\"));\n" " pendingEvents = _this.get\$_pendingEvents();\n" " if (((_this._state |= 1) & 8) !== 0) {\n" " addState = t1._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(_this._varData);\n" -" addState._varData = subscription;\n" -" addState.addSubscription.resume\$0();\n" +" addState.set\$_varData(subscription);\n" +" addState.resume\$0();\n" " } else\n" " _this._varData = subscription;\n" " subscription._setPendingEvents\$1(pendingEvents);\n" @@ -12915,6 +12469,12 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " set\$onListen(onListen) {\n" " this.onListen = type\$.nullable_void_Function._as(onListen);\n" " },\n" +" set\$onResume(onResume) {\n" +" this.onResume = type\$.nullable_void_Function._as(onResume);\n" +" },\n" +" set\$onCancel(onCancel) {\n" +" this.onCancel = type\$.nullable_void_Function._as(onCancel);\n" +" },\n" " \$isStreamSink: 1,\n" " \$isStreamController: 1,\n" " \$is_StreamControllerLifecycle: 1,\n" @@ -12937,7 +12497,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._AsyncStreamControllerDispatch.prototype = {\n" " _sendData\$1(data) {\n" -" var t1 = this.\$ti;\n" +" var t1 = A._instanceType(this);\n" " t1._precomputed1._as(data);\n" " this.get\$_subscription()._addPending\$1(new A._DelayedData(data, t1._eval\$1(\"_DelayedData<1>\")));\n" " },\n" @@ -12970,7 +12530,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t2 = A._instanceType(t1);\n" " t2._eval\$1(\"StreamSubscription<1>\")._as(this);\n" " if ((t1._state & 8) !== 0)\n" -" t2._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(t1._varData).addSubscription.pause\$0();\n" +" t2._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(t1._varData).pause\$0();\n" " A._runGuarded(t1.onPause);\n" " },\n" " _onResume\$0() {\n" @@ -12978,32 +12538,11 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t2 = A._instanceType(t1);\n" " t2._eval\$1(\"StreamSubscription<1>\")._as(this);\n" " if ((t1._state & 8) !== 0)\n" -" t2._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(t1._varData).addSubscription.resume\$0();\n" +" t2._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(t1._varData).resume\$0();\n" " A._runGuarded(t1.onResume);\n" " }\n" " };\n" " A._StreamSinkWrapper.prototype = {\$isStreamSink: 1};\n" -" A._AddStreamState.prototype = {\n" -" cancel\$0() {\n" -" var cancel = this.addSubscription.cancel\$0();\n" -" return cancel.whenComplete\$1(new A._AddStreamState_cancel_closure(this));\n" -" }\n" -" };\n" -" A._AddStreamState_makeErrorHandler_closure.prototype = {\n" -" call\$2(e, s) {\n" -" var t1 = this.controller;\n" -" t1._addError\$2(A._asObject(e), type\$.StackTrace._as(s));\n" -" t1._close\$0();\n" -" },\n" -" \$signature: 3\n" -" };\n" -" A._AddStreamState_cancel_closure.prototype = {\n" -" call\$0() {\n" -" this.\$this.addStreamFuture._asyncComplete\$1(null);\n" -" },\n" -" \$signature: 1\n" -" };\n" -" A._StreamControllerAddStreamState.prototype = {};\n" " A._BufferingStreamSubscription.prototype = {\n" " _setPendingEvents\$1(pendingEvents) {\n" " var _this = this;\n" @@ -13457,7 +12996,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t1 = new A._DoneStreamSubscription(t2, t1._eval\$1(\"_DoneStreamSubscription<1>\"));\n" " A.scheduleMicrotask(t1.get\$_onMicrotask());\n" " if (onDone != null)\n" -" t1._onDone = t2.registerCallback\$1\$1(onDone, type\$.void);\n" +" t1._onDone = t2._registerCallbackZoned\$1\$2(t2, type\$.void_Function._as(onDone), type\$.void);\n" " return t1;\n" " },\n" " listen\$3\$onDone\$onError(onData, onDone, onError) {\n" @@ -13467,6 +13006,44 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return this.listen\$4\$cancelOnError\$onDone\$onError(onData, cancelOnError, onDone, null);\n" " }\n" " };\n" +" A._MultiStream.prototype = {\n" +" listen\$4\$cancelOnError\$onDone\$onError(onData, cancelOnError, onDone, onError) {\n" +" var controller, _null = null,\n" +" t1 = this.\$ti;\n" +" t1._eval\$1(\"~(1)?\")._as(onData);\n" +" type\$.nullable_void_Function._as(onDone);\n" +" controller = new A._MultiStreamController(_null, _null, _null, _null, t1._eval\$1(\"_MultiStreamController<1>\"));\n" +" controller.set\$onListen(new A._MultiStream_listen_closure(this, controller));\n" +" return controller._subscribe\$4(onData, onError, onDone, cancelOnError === true);\n" +" },\n" +" listen\$3\$onDone\$onError(onData, onDone, onError) {\n" +" return this.listen\$4\$cancelOnError\$onDone\$onError(onData, null, onDone, onError);\n" +" },\n" +" listen\$3\$cancelOnError\$onDone(onData, cancelOnError, onDone) {\n" +" return this.listen\$4\$cancelOnError\$onDone\$onError(onData, cancelOnError, onDone, null);\n" +" }\n" +" };\n" +" A._MultiStream_listen_closure.prototype = {\n" +" call\$0() {\n" +" this.\$this._onListen.call\$1(this.controller);\n" +" },\n" +" \$signature: 0\n" +" };\n" +" A._MultiStreamController.prototype = {\n" +" closeSync\$0() {\n" +" var _this = this,\n" +" t1 = _this._state;\n" +" if ((t1 & 4) !== 0)\n" +" return;\n" +" if (t1 >= 4)\n" +" throw A.wrapException(_this._badEventState\$0());\n" +" t1 |= 4;\n" +" _this._state = t1;\n" +" if ((t1 & 1) !== 0)\n" +" _this.get\$_subscription()._close\$0();\n" +" },\n" +" \$isMultiStreamController: 1\n" +" };\n" " A._cancelAndValue_closure.prototype = {\n" " call\$0() {\n" " return this.future._complete\$1(this.value);\n" @@ -13485,7 +13062,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t5 = A._BufferingStreamSubscription__registerDataHandler(t2, onData, t1._rest[1]);\n" " t6 = A._BufferingStreamSubscription__registerErrorHandler(t2, onError);\n" " t7 = onDone == null ? A.async___nullDoneHandler\$closure() : onDone;\n" -" t1 = new A._ForwardingStreamSubscription(this, t5, t6, t2.registerCallback\$1\$1(t7, type\$.void), t2, t3 | t4, t1._eval\$1(\"_ForwardingStreamSubscription<1,2>\"));\n" +" t1 = new A._ForwardingStreamSubscription(this, t5, t6, t2._registerCallbackZoned\$1\$2(t2, type\$.void_Function._as(t7), type\$.void), t2, t3 | t4, t1._eval\$1(\"_ForwardingStreamSubscription<1,2>\"));\n" " t1._subscription = this._source.listen\$3\$onDone\$onError(t1.get\$_handleData(), t1.get\$_handleDone(), t1.get\$_handleError());\n" " return t1;\n" " },\n" @@ -13567,453 +13144,270 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " sink._add\$1(outputEvent);\n" " }\n" " };\n" -" A._ZoneRun.prototype = {};\n" -" A._ZoneRunUnary.prototype = {};\n" -" A._ZoneRunBinary.prototype = {};\n" -" A._ZoneRegisterCallback.prototype = {};\n" -" A._ZoneRegisterUnaryCallback.prototype = {};\n" -" A._ZoneRegisterBinaryCallback.prototype = {};\n" -" A._ZoneErrorCallback.prototype = {};\n" -" A._ZoneScheduleMicrotask.prototype = {};\n" -" A._ZoneCreateTimer.prototype = {};\n" -" A._ZoneCreatePeriodicTimer.prototype = {};\n" -" A._ZonePrint.prototype = {};\n" -" A._ZoneFork.prototype = {};\n" -" A._ZoneHandleUncaughtError.prototype = {\n" -" function\$5(arg0, arg1, arg2, arg3, arg4) {\n" -" return this.\$function.call\$5(arg0, arg1, arg2, arg3, arg4);\n" -" }\n" -" };\n" -" A._ZoneValues.prototype = {};\n" -" A._Zone.prototype = {\n" -" _processUncaughtError\$3(zone, error, stackTrace) {\n" -" var implementation, implZone, parentZone, currentZone, e, s, t1, exception;\n" -" type\$.StackTrace._as(stackTrace);\n" -" implementation = this.get\$_handleUncaughtError();\n" -" implZone = implementation.zone;\n" -" if (implZone === B.C__RootZone) {\n" -" A._rootHandleError(error, stackTrace);\n" -" return;\n" -" }\n" -" t1 = implZone.get\$parent();\n" -" t1.toString;\n" -" parentZone = t1;\n" -" currentZone = \$.Zone__current;\n" -" try {\n" -" \$.Zone__current = parentZone;\n" -" implementation.function\$5(implZone, implZone.get\$_parentDelegate(), zone, error, stackTrace);\n" -" \$.Zone__current = currentZone;\n" -" } catch (exception) {\n" -" e = A.unwrapException(exception);\n" -" s = A.getTraceFromException(exception);\n" -" \$.Zone__current = currentZone;\n" -" t1 = error === e ? stackTrace : s;\n" -" parentZone._processUncaughtError\$3(implZone, e, t1);\n" -" }\n" -" },\n" -" \$isZone: 1\n" -" };\n" -" A._CustomZone.prototype = {\n" -" get\$_delegate() {\n" -" var t1 = this._delegateCache;\n" -" return t1 == null ? this._delegateCache = new A._ZoneDelegate(this) : t1;\n" -" },\n" -" get\$_parentDelegate() {\n" -" return this.parent.get\$_delegate();\n" -" },\n" -" get\$errorZone() {\n" -" return this._handleUncaughtError.zone;\n" +" A._ZoneHandleUncaughtError.prototype = {};\n" +" A.Zone.prototype = {\n" +" run\$1\$1(action, \$R) {\n" +" return this._runZoned\$1\$2(this, \$R._eval\$1(\"0()\")._as(action), \$R);\n" " },\n" -" runGuarded\$1(f) {\n" -" var e, s, exception;\n" -" type\$.void_Function._as(f);\n" -" try {\n" -" this.run\$1\$1(f, type\$.void);\n" -" } catch (exception) {\n" -" e = A.unwrapException(exception);\n" -" s = A.getTraceFromException(exception);\n" -" this._processUncaughtError\$3(this, A._asObject(e), type\$.StackTrace._as(s));\n" -" }\n" -" },\n" -" runUnaryGuarded\$1\$2(f, arg, \$T) {\n" -" var e, s, exception;\n" -" \$T._eval\$1(\"~(0)\")._as(f);\n" -" \$T._as(arg);\n" -" try {\n" -" this.runUnary\$2\$2(f, arg, type\$.void, \$T);\n" -" } catch (exception) {\n" -" e = A.unwrapException(exception);\n" -" s = A.getTraceFromException(exception);\n" -" this._processUncaughtError\$3(this, A._asObject(e), type\$.StackTrace._as(s));\n" -" }\n" -" },\n" -" runBinaryGuarded\$2\$3(f, arg1, arg2, \$T1, \$T2) {\n" -" var e, s, exception;\n" -" \$T1._eval\$1(\"@<0>\")._bind\$1(\$T2)._eval\$1(\"~(1,2)\")._as(f);\n" -" \$T1._as(arg1);\n" -" \$T2._as(arg2);\n" -" try {\n" -" this.runBinary\$3\$3(f, arg1, arg2, type\$.void, \$T1, \$T2);\n" -" } catch (exception) {\n" -" e = A.unwrapException(exception);\n" -" s = A.getTraceFromException(exception);\n" -" this._processUncaughtError\$3(this, A._asObject(e), type\$.StackTrace._as(s));\n" -" }\n" -" },\n" -" bindCallback\$1\$1(f, \$R) {\n" -" return new A._CustomZone_bindCallback_closure(this, this.registerCallback\$1\$1(\$R._eval\$1(\"0()\")._as(f), \$R), \$R);\n" -" },\n" -" bindCallbackGuarded\$1(f) {\n" -" return new A._CustomZone_bindCallbackGuarded_closure(this, this.registerCallback\$1\$1(type\$.void_Function._as(f), type\$.void));\n" -" },\n" -" bindUnaryCallbackGuarded\$1\$1(f, \$T) {\n" -" return new A._CustomZone_bindUnaryCallbackGuarded_closure(this, this.registerUnaryCallback\$2\$1(\$T._eval\$1(\"~(0)\")._as(f), type\$.void, \$T), \$T);\n" -" },\n" -" handleUncaughtError\$2(error, stackTrace) {\n" -" this._processUncaughtError\$3(this, error, type\$.StackTrace._as(stackTrace));\n" -" },\n" -" fork\$2\$specification\$zoneValues(specification, zoneValues) {\n" -" var implementation = this._fork,\n" -" zone = implementation.zone;\n" -" return implementation.\$function.call\$5(zone, zone.get\$_parentDelegate(), this, specification, zoneValues);\n" -" },\n" -" run\$1\$1(f, \$R) {\n" -" var implementation, zone;\n" -" \$R._eval\$1(\"0()\")._as(f);\n" -" implementation = this._run;\n" -" zone = implementation.zone;\n" -" return implementation.\$function.call\$1\$4(zone, zone.get\$_parentDelegate(), this, f, \$R);\n" -" },\n" -" runUnary\$2\$2(f, arg, \$R, \$T) {\n" -" var implementation, zone;\n" -" \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(f);\n" -" \$T._as(arg);\n" -" implementation = this._runUnary;\n" -" zone = implementation.zone;\n" -" return implementation.\$function.call\$2\$5(zone, zone.get\$_parentDelegate(), this, f, arg, \$R, \$T);\n" -" },\n" -" runBinary\$3\$3(f, arg1, arg2, \$R, \$T1, \$T2) {\n" -" var implementation, zone;\n" -" \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(f);\n" -" \$T1._as(arg1);\n" -" \$T2._as(arg2);\n" -" implementation = this._runBinary;\n" -" zone = implementation.zone;\n" -" return implementation.\$function.call\$3\$6(zone, zone.get\$_parentDelegate(), this, f, arg1, arg2, \$R, \$T1, \$T2);\n" -" },\n" -" registerCallback\$1\$1(callback, \$R) {\n" -" var implementation, zone;\n" -" \$R._eval\$1(\"0()\")._as(callback);\n" -" implementation = this._registerCallback;\n" -" zone = implementation.zone;\n" -" return implementation.\$function.call\$1\$4(zone, zone.get\$_parentDelegate(), this, callback, \$R);\n" -" },\n" -" registerUnaryCallback\$2\$1(callback, \$R, \$T) {\n" -" var implementation, zone;\n" -" \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(callback);\n" -" implementation = this._registerUnaryCallback;\n" -" zone = implementation.zone;\n" -" return implementation.\$function.call\$2\$4(zone, zone.get\$_parentDelegate(), this, callback, \$R, \$T);\n" -" },\n" -" registerBinaryCallback\$3\$1(callback, \$R, \$T1, \$T2) {\n" -" var implementation, zone;\n" -" \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(callback);\n" -" implementation = this._registerBinaryCallback;\n" -" zone = implementation.zone;\n" -" return implementation.\$function.call\$3\$4(zone, zone.get\$_parentDelegate(), this, callback, \$R, \$T1, \$T2);\n" -" },\n" -" errorCallback\$2(error, stackTrace) {\n" -" var implementation = this._errorCallback,\n" -" zone = implementation.zone;\n" -" if (zone === B.C__RootZone)\n" -" return null;\n" -" return implementation.\$function.call\$5(zone, zone.get\$_parentDelegate(), this, error, stackTrace);\n" -" },\n" -" scheduleMicrotask\$1(f) {\n" -" var implementation, zone;\n" -" type\$.void_Function._as(f);\n" -" implementation = this._scheduleMicrotask;\n" -" zone = implementation.zone;\n" -" return implementation.\$function.call\$4(zone, zone.get\$_parentDelegate(), this, f);\n" -" },\n" -" createTimer\$2(duration, f) {\n" -" var implementation, zone;\n" -" type\$.void_Function._as(f);\n" -" implementation = this._createTimer;\n" -" zone = implementation.zone;\n" -" return implementation.\$function.call\$5(zone, zone.get\$_parentDelegate(), this, duration, f);\n" -" },\n" -" get\$_run() {\n" -" return this._run;\n" -" },\n" -" get\$_runUnary() {\n" -" return this._runUnary;\n" -" },\n" -" get\$_runBinary() {\n" -" return this._runBinary;\n" -" },\n" -" get\$_registerCallback() {\n" -" return this._registerCallback;\n" -" },\n" -" get\$_registerUnaryCallback() {\n" -" return this._registerUnaryCallback;\n" -" },\n" -" get\$_registerBinaryCallback() {\n" -" return this._registerBinaryCallback;\n" -" },\n" -" get\$_errorCallback() {\n" -" return this._errorCallback;\n" -" },\n" -" get\$_scheduleMicrotask() {\n" -" return this._scheduleMicrotask;\n" -" },\n" -" get\$_createTimer() {\n" -" return this._createTimer;\n" -" },\n" -" get\$_createPeriodicTimer() {\n" -" return this._createPeriodicTimer;\n" -" },\n" -" get\$_print() {\n" -" return this._print;\n" -" },\n" -" get\$_fork() {\n" -" return this._fork;\n" -" },\n" -" get\$_handleUncaughtError() {\n" -" return this._handleUncaughtError;\n" -" },\n" -" get\$_zoneValues() {\n" -" return this._zoneValues;\n" -" },\n" -" get\$parent() {\n" -" return this.parent;\n" -" }\n" -" };\n" -" A._CustomZone_bindCallback_closure.prototype = {\n" -" call\$0() {\n" -" return this.\$this.run\$1\$1(this.registered, this.R);\n" -" },\n" -" \$signature() {\n" -" return this.R._eval\$1(\"0()\");\n" -" }\n" -" };\n" -" A._CustomZone_bindCallbackGuarded_closure.prototype = {\n" -" call\$0() {\n" -" return this.\$this.runGuarded\$1(this.registered);\n" -" },\n" -" \$signature: 0\n" -" };\n" -" A._CustomZone_bindUnaryCallbackGuarded_closure.prototype = {\n" -" call\$1(arg) {\n" -" var t1 = this.T;\n" -" return this.\$this.runUnaryGuarded\$1\$2(this.registered, t1._as(arg), t1);\n" -" },\n" -" \$signature() {\n" -" return this.T._eval\$1(\"~(0)\");\n" -" }\n" -" };\n" -" A._RootZone.prototype = {\n" -" get\$_run() {\n" -" return B._ZoneRun__RootZone__rootRun;\n" -" },\n" -" get\$_runUnary() {\n" -" return B._ZoneRunUnary__RootZone__rootRunUnary;\n" -" },\n" -" get\$_runBinary() {\n" -" return B._ZoneRunBinary__RootZone__rootRunBinary;\n" -" },\n" -" get\$_registerCallback() {\n" -" return B._ZoneRegisterCallback__RootZone__rootRegisterCallback;\n" -" },\n" -" get\$_registerUnaryCallback() {\n" -" return B._ZoneRegisterUnaryCallback_a9v;\n" -" },\n" -" get\$_registerBinaryCallback() {\n" -" return B._ZoneRegisterBinaryCallback_sk0;\n" -" },\n" -" get\$_errorCallback() {\n" -" return B._ZoneErrorCallback__RootZone__rootErrorCallback;\n" -" },\n" -" get\$_scheduleMicrotask() {\n" -" return B._ZoneScheduleMicrotask__RootZone__rootScheduleMicrotask;\n" -" },\n" -" get\$_createTimer() {\n" -" return B._ZoneCreateTimer__RootZone__rootCreateTimer;\n" -" },\n" -" get\$_createPeriodicTimer() {\n" -" return B.C__ZoneCreatePeriodicTimer;\n" -" },\n" -" get\$_print() {\n" -" return B._ZonePrint__RootZone__rootPrint;\n" -" },\n" -" get\$_fork() {\n" -" return B._ZoneFork__RootZone__rootFork;\n" -" },\n" -" get\$_handleUncaughtError() {\n" -" return B._ZoneHandleUncaughtError_wQ6;\n" -" },\n" -" get\$_zoneValues() {\n" -" return B._ZoneValues__RootZone_Map_empty;\n" -" },\n" -" get\$parent() {\n" -" return null;\n" -" },\n" -" get\$_delegate() {\n" -" var t1 = \$._RootZone__rootDelegate;\n" -" return t1 == null ? \$._RootZone__rootDelegate = new A._ZoneDelegate(this) : t1;\n" -" },\n" -" get\$_parentDelegate() {\n" -" var t1 = \$._RootZone__rootDelegate;\n" -" return t1 == null ? \$._RootZone__rootDelegate = new A._ZoneDelegate(this) : t1;\n" -" },\n" -" get\$errorZone() {\n" -" return this;\n" -" },\n" -" runGuarded\$1(f) {\n" -" var e, s, exception;\n" -" type\$.void_Function._as(f);\n" -" try {\n" -" if (B.C__RootZone === \$.Zone__current) {\n" -" f.call\$0();\n" -" return;\n" -" }\n" -" A._rootRun(null, null, this, f, type\$.void);\n" +" runGuarded\$1(action) {\n" +" var e, s, t1, exception, _this = this;\n" +" type\$.void_Function._as(action);\n" +" try {\n" +" t1 = _this._runZoned\$1\$2(_this, action, type\$.void);\n" +" return t1;\n" " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" -" A._rootHandleError(A._asObject(e), type\$.StackTrace._as(s));\n" +" _this._handleUncaughtErrorZoned\$3(_this, e, s);\n" " }\n" " },\n" -" runUnaryGuarded\$1\$2(f, arg, \$T) {\n" -" var e, s, exception;\n" -" \$T._eval\$1(\"~(0)\")._as(f);\n" -" \$T._as(arg);\n" +" runUnaryGuarded\$1\$2(action, argument, \$T) {\n" +" var e, s, t1, exception, _this = this;\n" +" \$T._eval\$1(\"~(0)\")._as(action);\n" +" \$T._as(argument);\n" " try {\n" -" if (B.C__RootZone === \$.Zone__current) {\n" -" f.call\$1(arg);\n" -" return;\n" -" }\n" -" A._rootRunUnary(null, null, this, f, arg, type\$.void, \$T);\n" +" t1 = _this._runUnaryZoned\$2\$3(_this, action, argument, type\$.void, \$T);\n" +" return t1;\n" " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" -" A._rootHandleError(A._asObject(e), type\$.StackTrace._as(s));\n" +" _this._handleUncaughtErrorZoned\$3(_this, e, s);\n" " }\n" " },\n" -" runBinaryGuarded\$2\$3(f, arg1, arg2, \$T1, \$T2) {\n" -" var e, s, exception;\n" -" \$T1._eval\$1(\"@<0>\")._bind\$1(\$T2)._eval\$1(\"~(1,2)\")._as(f);\n" -" \$T1._as(arg1);\n" -" \$T2._as(arg2);\n" +" runBinaryGuarded\$2\$3(action, argument1, argument2, \$T1, \$T2) {\n" +" var e, s, t1, exception, _this = this;\n" +" \$T1._eval\$1(\"@<0>\")._bind\$1(\$T2)._eval\$1(\"~(1,2)\")._as(action);\n" +" \$T1._as(argument1);\n" +" \$T2._as(argument2);\n" " try {\n" -" if (B.C__RootZone === \$.Zone__current) {\n" -" f.call\$2(arg1, arg2);\n" -" return;\n" -" }\n" -" A._rootRunBinary(null, null, this, f, arg1, arg2, type\$.void, \$T1, \$T2);\n" +" t1 = _this._runBinaryZoned\$3\$4(_this, action, argument1, argument2, type\$.void, \$T1, \$T2);\n" +" return t1;\n" " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" -" A._rootHandleError(A._asObject(e), type\$.StackTrace._as(s));\n" +" _this._handleUncaughtErrorZoned\$3(_this, e, s);\n" " }\n" " },\n" -" bindCallback\$1\$1(f, \$R) {\n" -" return new A._RootZone_bindCallback_closure(this, \$R._eval\$1(\"0()\")._as(f), \$R);\n" +" bindCallback\$1\$1(callback, \$R) {\n" +" return new A.Zone_bindCallback_closure(this, this._registerCallbackZoned\$1\$2(this, \$R._eval\$1(\"0()\")._as(callback), \$R), \$R);\n" " },\n" -" bindCallbackGuarded\$1(f) {\n" -" return new A._RootZone_bindCallbackGuarded_closure(this, type\$.void_Function._as(f));\n" +" bindCallbackGuarded\$1(callback) {\n" +" return new A.Zone_bindCallbackGuarded_closure(this, this._registerCallbackZoned\$1\$2(this, type\$.void_Function._as(callback), type\$.void));\n" " },\n" -" bindUnaryCallbackGuarded\$1\$1(f, \$T) {\n" -" return new A._RootZone_bindUnaryCallbackGuarded_closure(this, \$T._eval\$1(\"~(0)\")._as(f), \$T);\n" +" bindUnaryCallbackGuarded\$1\$1(callback, \$T) {\n" +" return new A.Zone_bindUnaryCallbackGuarded_closure(this, this._registerUnaryCallbackZoned\$2\$2(this, \$T._eval\$1(\"~(0)\")._as(callback), type\$.void, \$T), \$T);\n" " },\n" -" handleUncaughtError\$2(error, stackTrace) {\n" -" A._rootHandleError(error, type\$.StackTrace._as(stackTrace));\n" +" get\$_parentDelegate() {\n" +" var t1 = this._parent;\n" +" t1 = t1 == null ? null : t1._delegate;\n" +" return t1 == null ? \$.\$get\$_rootDelegate() : t1;\n" +" },\n" +" _handleUncaughtErrorZoned\$3(zone, error, stackTrace) {\n" +" var implementation, implZone, parentZone, currentZone, e, s, t1, exception;\n" +" type\$.StackTrace._as(stackTrace);\n" +" implementation = this._handleUncaughtErrorFunction;\n" +" if (implementation == null) {\n" +" A._rootHandleUncaughtError(error, stackTrace);\n" +" return;\n" +" }\n" +" implZone = implementation.zone;\n" +" t1 = implZone._parent;\n" +" t1.toString;\n" +" parentZone = t1;\n" +" currentZone = \$.Zone__current;\n" +" try {\n" +" \$.Zone__current = parentZone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" implementation.\$function.call\$5(implZone, t1, zone, error, stackTrace);\n" +" \$.Zone__current = currentZone;\n" +" } catch (exception) {\n" +" e = A.unwrapException(exception);\n" +" s = A.getTraceFromException(exception);\n" +" \$.Zone__current = currentZone;\n" +" t1 = error === e ? stackTrace : s;\n" +" parentZone._handleUncaughtErrorZoned\$3(implZone, e, t1);\n" +" }\n" " },\n" -" fork\$2\$specification\$zoneValues(specification, zoneValues) {\n" -" return A._rootFork(null, null, this, specification, zoneValues);\n" +" _forkZoned\$3(zone, specification, zoneValues) {\n" +" var implZone, t1,\n" +" implementation = this._forkFunction;\n" +" if (implementation == null)\n" +" return A._rootFork(zone, specification, zoneValues);\n" +" implZone = implementation.zone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" return implementation.\$function.call\$5(implZone, t1, zone, specification, zoneValues);\n" " },\n" -" run\$1\$1(f, \$R) {\n" -" \$R._eval\$1(\"0()\")._as(f);\n" -" if (\$.Zone__current === B.C__RootZone)\n" -" return f.call\$0();\n" -" return A._rootRun(null, null, this, f, \$R);\n" +" _runZoned\$1\$2(zone, callback, \$R) {\n" +" var oldZone, implementation, t1, implZone;\n" +" \$R._eval\$1(\"0()\")._as(callback);\n" +" implementation = this._runFunction;\n" +" if (implementation == null) {\n" +" t1 = \$.Zone__current;\n" +" if (t1 === zone)\n" +" return callback.call\$0();\n" +" oldZone = t1;\n" +" \$.Zone__current = zone;\n" +" try {\n" +" t1 = callback.call\$0();\n" +" return t1;\n" +" } finally {\n" +" \$.Zone__current = oldZone;\n" +" }\n" +" }\n" +" implZone = implementation.zone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" return implementation.\$function.call\$1\$4(implZone, t1, zone, callback, \$R);\n" " },\n" -" runUnary\$2\$2(f, arg, \$R, \$T) {\n" -" \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(f);\n" -" \$T._as(arg);\n" -" if (\$.Zone__current === B.C__RootZone)\n" -" return f.call\$1(arg);\n" -" return A._rootRunUnary(null, null, this, f, arg, \$R, \$T);\n" +" _runUnaryZoned\$2\$3(zone, callback, argument, \$R, \$T) {\n" +" var oldZone, implementation, t1, implZone;\n" +" \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(callback);\n" +" \$T._as(argument);\n" +" implementation = this._runUnaryFunction;\n" +" if (implementation == null) {\n" +" t1 = \$.Zone__current;\n" +" if (t1 === zone)\n" +" return callback.call\$1(argument);\n" +" oldZone = t1;\n" +" \$.Zone__current = zone;\n" +" try {\n" +" t1 = callback.call\$1(argument);\n" +" return t1;\n" +" } finally {\n" +" \$.Zone__current = oldZone;\n" +" }\n" +" }\n" +" implZone = implementation.zone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" return implementation.\$function.call\$2\$5(implZone, t1, zone, callback, argument, \$R, \$T);\n" " },\n" -" runBinary\$3\$3(f, arg1, arg2, \$R, \$T1, \$T2) {\n" -" \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(f);\n" -" \$T1._as(arg1);\n" -" \$T2._as(arg2);\n" -" if (\$.Zone__current === B.C__RootZone)\n" -" return f.call\$2(arg1, arg2);\n" -" return A._rootRunBinary(null, null, this, f, arg1, arg2, \$R, \$T1, \$T2);\n" +" _runBinaryZoned\$3\$4(zone, callback, argument1, argument2, \$R, \$T1, \$T2) {\n" +" var oldZone, implementation, t1, implZone;\n" +" \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(callback);\n" +" \$T1._as(argument1);\n" +" \$T2._as(argument2);\n" +" implementation = this._runBinaryFunction;\n" +" if (implementation == null) {\n" +" t1 = \$.Zone__current;\n" +" if (t1 === zone)\n" +" return callback.call\$2(argument1, argument2);\n" +" oldZone = t1;\n" +" \$.Zone__current = zone;\n" +" try {\n" +" t1 = callback.call\$2(argument1, argument2);\n" +" return t1;\n" +" } finally {\n" +" \$.Zone__current = oldZone;\n" +" }\n" +" }\n" +" implZone = implementation.zone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" return implementation.\$function.call\$3\$6(implZone, t1, zone, callback, argument1, argument2, \$R, \$T1, \$T2);\n" " },\n" -" registerCallback\$1\$1(f, \$R) {\n" -" return \$R._eval\$1(\"0()\")._as(f);\n" +" _registerCallbackZoned\$1\$2(zone, callback, \$R) {\n" +" var implementation, implZone, t1;\n" +" \$R._eval\$1(\"0()\")._as(callback);\n" +" implementation = this._registerCallbackFunction;\n" +" if (implementation == null)\n" +" return callback;\n" +" implZone = implementation.zone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" return implementation.\$function.call\$1\$4(implZone, t1, zone, callback, \$R);\n" " },\n" -" registerUnaryCallback\$2\$1(f, \$R, \$T) {\n" -" return \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(f);\n" +" _registerUnaryCallbackZoned\$2\$2(zone, callback, \$R, \$T) {\n" +" var implementation, implZone, t1;\n" +" \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(callback);\n" +" implementation = this._registerUnaryCallbackFunction;\n" +" if (implementation == null)\n" +" return callback;\n" +" implZone = implementation.zone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" return implementation.\$function.call\$2\$4(implZone, t1, zone, callback, \$R, \$T);\n" " },\n" -" registerBinaryCallback\$3\$1(f, \$R, \$T1, \$T2) {\n" -" return \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(f);\n" +" _registerBinaryCallbackZoned\$3\$2(zone, callback, \$R, \$T1, \$T2) {\n" +" var implementation, implZone, t1;\n" +" \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(callback);\n" +" implementation = this._registerBinaryCallbackFunction;\n" +" if (implementation == null)\n" +" return callback;\n" +" implZone = implementation.zone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" return implementation.\$function.call\$3\$4(implZone, t1, zone, callback, \$R, \$T1, \$T2);\n" " },\n" -" errorCallback\$2(error, stackTrace) {\n" -" return null;\n" +" _errorCallbackZoned\$3(zone, error, stackTrace) {\n" +" var implZone, t1,\n" +" implementation = this._errorCallbackFunction;\n" +" if (implementation == null)\n" +" return null;\n" +" implZone = implementation.zone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" return implementation.\$function.call\$5(implZone, t1, zone, error, stackTrace);\n" " },\n" -" scheduleMicrotask\$1(f) {\n" -" A._rootScheduleMicrotask(null, null, this, type\$.void_Function._as(f));\n" +" _scheduleMicrotaskZoned\$2(zone, callback) {\n" +" var implementation, implZone, t1;\n" +" type\$.void_Function._as(callback);\n" +" implementation = this._scheduleMicrotaskFunction;\n" +" if (implementation == null) {\n" +" A._rootScheduleMicrotask(zone, callback);\n" +" return;\n" +" }\n" +" implZone = implementation.zone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" implementation.\$function.call\$4(implZone, t1, zone, callback);\n" " },\n" -" createTimer\$2(duration, f) {\n" -" return A.Timer__createTimer(duration, type\$.void_Function._as(f));\n" +" _createTimerZoned\$3(zone, duration, callback) {\n" +" var implementation, implZone, t1;\n" +" type\$.void_Function._as(callback);\n" +" implementation = this._createTimerFunction;\n" +" if (implementation == null)\n" +" return A.Timer__createTimer(duration, B.Zone_jYP !== zone ? zone.bindCallback\$1\$1(callback, type\$.void) : callback);\n" +" implZone = implementation.zone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" return implementation.\$function.call\$5(implZone, t1, zone, duration, callback);\n" " }\n" " };\n" -" A._RootZone_bindCallback_closure.prototype = {\n" +" A.Zone_bindCallback_closure.prototype = {\n" " call\$0() {\n" -" return this.\$this.run\$1\$1(this.f, this.R);\n" +" var t1 = this.\$this;\n" +" return t1._runZoned\$1\$2(t1, this.registered, this.R);\n" " },\n" " \$signature() {\n" " return this.R._eval\$1(\"0()\");\n" " }\n" " };\n" -" A._RootZone_bindCallbackGuarded_closure.prototype = {\n" +" A.Zone_bindCallbackGuarded_closure.prototype = {\n" " call\$0() {\n" -" return this.\$this.runGuarded\$1(this.f);\n" +" return this.\$this.runGuarded\$1(this.registered);\n" " },\n" " \$signature: 0\n" " };\n" -" A._RootZone_bindUnaryCallbackGuarded_closure.prototype = {\n" -" call\$1(arg) {\n" +" A.Zone_bindUnaryCallbackGuarded_closure.prototype = {\n" +" call\$1(argument) {\n" " var t1 = this.T;\n" -" return this.\$this.runUnaryGuarded\$1\$2(this.f, t1._as(arg), t1);\n" +" return this.\$this.runUnaryGuarded\$1\$2(this.registered, t1._as(argument), t1);\n" " },\n" " \$signature() {\n" " return this.T._eval\$1(\"~(0)\");\n" " }\n" " };\n" -" A.runZonedGuarded_closure.prototype = {\n" +" A.runZonedGuarded_errorHandler.prototype = {\n" " call\$5(\$self, \$parent, zone, error, stackTrace) {\n" -" var e, s, exception, t1;\n" +" var e, s, t1, exception, t2;\n" " try {\n" -" this.parentZone.runBinary\$3\$3(this.onError, error, stackTrace, type\$.void, type\$.Object, type\$.StackTrace);\n" +" t1 = this.parentZone;\n" +" t1._runBinaryZoned\$3\$4(t1, type\$.void_Function_Object_StackTrace._as(this.onError), error, stackTrace, type\$.void, type\$.Object, type\$.StackTrace);\n" " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" -" t1 = \$parent._delegationTarget;\n" -" if (e === error)\n" -" t1._processUncaughtError\$3(zone, error, stackTrace);\n" -" else\n" -" t1._processUncaughtError\$3(zone, A._asObject(e), type\$.StackTrace._as(s));\n" +" t1 = e === error ? stackTrace : s;\n" +" t2 = A._asObject(e);\n" +" type\$.StackTrace._as(t1);\n" +" \$parent._zone._handleUncaughtErrorZoned\$3(zone, t2, t1);\n" " }\n" " },\n" -" \$signature: 42\n" +" \$signature: 32\n" " };\n" -" A._ZoneDelegate.prototype = {\$isZoneDelegate: 1};\n" -" A._rootHandleError_closure.prototype = {\n" +" A.ZoneDelegate.prototype = {};\n" +" A._rootHandleUncaughtError_closure.prototype = {\n" " call\$0() {\n" " A.Error_throwWithStackTrace(this.error, this.stackTrace);\n" " },\n" @@ -14284,7 +13678,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(v) {\n" " return this.K._is(v);\n" " },\n" -" \$signature: 44\n" +" \$signature: 41\n" " };\n" " A._HashSet.prototype = {\n" " get\$iterator(_) {\n" @@ -14507,21 +13901,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " take\$1(receiver, count) {\n" " return A.SubListIterable\$(receiver, 0, A.checkNotNullable(count, \"count\", type\$.int), A.instanceType(receiver)._eval\$1(\"ListBase.E\"));\n" " },\n" -" toList\$1\$growable(receiver, growable) {\n" -" var t1, first, result, i, _this = this;\n" -" if (_this.get\$isEmpty(receiver)) {\n" -" t1 = J.JSArray_JSArray\$growable(0, A.instanceType(receiver)._eval\$1(\"ListBase.E\"));\n" -" return t1;\n" -" }\n" -" first = _this.\$index(receiver, 0);\n" -" result = A.List_List\$filled(_this.get\$length(receiver), first, true, A.instanceType(receiver)._eval\$1(\"ListBase.E\"));\n" -" for (i = 1; i < _this.get\$length(receiver); ++i)\n" -" B.JSArray_methods.\$indexSet(result, i, _this.\$index(receiver, i));\n" -" return result;\n" -" },\n" -" toList\$0(receiver) {\n" -" return this.toList\$1\$growable(receiver, true);\n" -" },\n" " add\$1(receiver, element) {\n" " var t1;\n" " A.instanceType(receiver)._eval\$1(\"ListBase.E\")._as(element);\n" @@ -15144,8 +14523,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " containsKey\$1(key) {\n" " if (this._processed == null)\n" " return this._data.containsKey\$1(key);\n" -" if (typeof key != \"string\")\n" -" return false;\n" " return Object.prototype.hasOwnProperty.call(this._original, key);\n" " },\n" " forEach\$1(_, f) {\n" @@ -15199,10 +14576,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._JsonMapKeyIterable.prototype = {\n" " get\$length(_) {\n" -" return this._parent.get\$length(0);\n" +" return this._convert\$_parent.get\$length(0);\n" " },\n" " elementAt\$1(_, index) {\n" -" var t1 = this._parent;\n" +" var t1 = this._convert\$_parent;\n" " if (t1._processed == null)\n" " t1 = t1.get\$keys().elementAt\$1(0, index);\n" " else {\n" @@ -15214,7 +14591,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return t1;\n" " },\n" " get\$iterator(_) {\n" -" var t1 = this._parent;\n" +" var t1 = this._convert\$_parent;\n" " if (t1._processed == null) {\n" " t1 = t1.get\$keys();\n" " t1 = t1.get\$iterator(t1);\n" @@ -15225,7 +14602,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return t1;\n" " },\n" " contains\$1(_, key) {\n" -" return this._parent.containsKey\$1(key);\n" +" return this._convert\$_parent.containsKey\$1(key);\n" " }\n" " };\n" " A._Utf8Decoder__decoder_closure.prototype = {\n" @@ -16433,7 +15810,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$2(msg, position) {\n" " throw A.wrapException(A.FormatException\$(\"Illegal IPv6 address, \" + msg, this.host, position));\n" " },\n" -" \$signature: 56\n" +" \$signature: 53\n" " };\n" " A._Uri.prototype = {\n" " get\$_text() {\n" @@ -16733,7 +16110,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(s) {\n" " return A._Uri__uriEncode(64, A._asString(s), B.C_Utf8Codec, false);\n" " },\n" -" \$signature: 10\n" +" \$signature: 9\n" " };\n" " A.UriData.prototype = {\n" " get\$uri() {\n" @@ -17073,7 +16450,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t1.call(t1, value);\n" " return value;\n" " },\n" -" \$signature: 11\n" +" \$signature: 10\n" " };\n" " A.FutureOfJSAnyToJSPromise_get_toJS__closure0.prototype = {\n" " call\$2(error, stackTrace) {\n" @@ -17091,7 +16468,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t1.call(t1, wrapper);\n" " return wrapper;\n" " },\n" -" \$signature: 68\n" +" \$signature: 61\n" " };\n" " A.FutureOfVoidToJSPromise_get_toJS_closure.prototype = {\n" " call\$2(resolve, reject) {\n" @@ -17105,7 +16482,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " var t1 = this.resolve;\n" " return t1.call(t1);\n" " },\n" -" \$signature: 74\n" +" \$signature: 67\n" " };\n" " A.FutureOfVoidToJSPromise_get_toJS__closure0.prototype = {\n" " call\$2(error, stackTrace) {\n" @@ -17148,13 +16525,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " } else\n" " return o;\n" " },\n" -" \$signature: 11\n" +" \$signature: 10\n" " };\n" " A.promiseToFuture_closure.prototype = {\n" " call\$1(r) {\n" " return this.completer.complete\$1(this.T._eval\$1(\"0/?\")._as(r));\n" " },\n" -" \$signature: 5\n" +" \$signature: 4\n" " };\n" " A.promiseToFuture_closure0.prototype = {\n" " call\$1(e) {\n" @@ -17162,7 +16539,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return this.completer.completeError\$1(new A.NullRejectionException(e === undefined));\n" " return this.completer.completeError\$1(e);\n" " },\n" -" \$signature: 5\n" +" \$signature: 4\n" " };\n" " A.dartify_convert.prototype = {\n" " call\$1(o) {\n" @@ -17214,7 +16591,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " return o;\n" " },\n" -" \$signature: 11\n" +" \$signature: 10\n" " };\n" " A._JSRandom.prototype = {\n" " nextInt\$1(max) {\n" @@ -17630,13 +17007,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(e) {\n" " return type\$.BuildStatus._as(e)._name === this.json;\n" " },\n" -" \$signature: 75\n" +" \$signature: 29\n" " };\n" " A.BuildStatus_BuildStatus\$fromJson_closure0.prototype = {\n" " call\$0() {\n" " throw A.wrapException(A.ArgumentError\$(\"Unknown BuildStatus: \" + this.json, null));\n" " },\n" -" \$signature: 89\n" +" \$signature: 74\n" " };\n" " A.BuildResult.prototype = {\n" " toJson\$0() {\n" @@ -17712,7 +17089,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(e) {\n" " return type\$.DebugEvent._as(e).toJson\$0();\n" " },\n" -" \$signature: 90\n" +" \$signature: 75\n" " };\n" " A.DebugInfo.prototype = {\n" " toJson\$0() {\n" @@ -18125,14 +17502,14 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(o) {\n" " return J.toString\$0\$(o);\n" " },\n" -" \$signature: 29\n" +" \$signature: 30\n" " };\n" " A.PersistentWebSocket.prototype = {\n" " get\$_incomingStreamController() {\n" " var result, _this = this,\n" " value = _this.__PersistentWebSocket__incomingStreamController_FI;\n" " if (value === \$) {\n" -" result = A.StreamController_StreamController(null, null, null, type\$.dynamic);\n" +" result = A.StreamController_StreamController(type\$.dynamic);\n" " result.set\$onListen(_this.get\$_listenWithRetry());\n" " _this.__PersistentWebSocket__incomingStreamController_FI !== \$ && A.throwLateFieldADI(\"_incomingStreamController\");\n" " _this.__PersistentWebSocket__incomingStreamController_FI = result;\n" @@ -18302,9 +17679,9 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(socket) {\n" " var _this = this;\n" " type\$.WebSocket._as(socket);\n" -" return new A.PersistentWebSocket(_this.logger, _this.debugName, _this.maxRetryAttempts, new A._AsyncCompleter(new A._Future(\$.Zone__current, type\$._Future_void), type\$._AsyncCompleter_void), _this.uri, _this.onReconnect, socket, A.StreamController_StreamController(null, null, null, type\$.dynamic));\n" +" return new A.PersistentWebSocket(_this.logger, _this.debugName, _this.maxRetryAttempts, new A._AsyncCompleter(new A._Future(\$.Zone__current, type\$._Future_void), type\$._AsyncCompleter_void), _this.uri, _this.onReconnect, socket, A.StreamController_StreamController(type\$.dynamic));\n" " },\n" -" \$signature: 32\n" +" \$signature: 31\n" " };\n" " A.PersistentWebSocket__listenWithRetry_attemptRetry.prototype = {\n" " call\$1(message) {\n" @@ -18398,7 +17775,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " });\n" " return A._asyncStartSync(\$async\$call\$1, \$async\$completer);\n" " },\n" -" \$signature: 34\n" +" \$signature: 33\n" " };\n" " A._PersistentWebSocket_Object_StreamChannelMixin.prototype = {};\n" " A.safeUnawaited_closure.prototype = {\n" @@ -18407,7 +17784,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" @@ -18476,13 +17853,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$2(key1, key2) {\n" " return A._asString(key1).toLowerCase() === A._asString(key2).toLowerCase();\n" " },\n" -" \$signature: 35\n" +" \$signature: 34\n" " };\n" " A.BaseRequest_closure0.prototype = {\n" " call\$1(key) {\n" " return B.JSString_methods.get\$hashCode(A._asString(key).toLowerCase());\n" " },\n" -" \$signature: 36\n" +" \$signature: 35\n" " };\n" " A.BaseResponse.prototype = {\n" " BaseResponse\$7\$contentLength\$headers\$isRedirect\$persistentConnection\$reasonPhrase\$request(statusCode, contentLength, headers, isRedirect, persistentConnection, reasonPhrase, request) {\n" @@ -18577,7 +17954,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }(A._callDartFunctionFast3, t2);\n" " result[\$.\$get\$DART_CLOSURE_DART_JSINTEROP_PROPERTY_NAME()] = t2;\n" " t1.forEach(result);\n" -" t1 = A._readBody(request, response);\n" +" t1 = A._bodyToStream(request, response);\n" " t2 = A._asInt(response.status);\n" " t4 = headers;\n" " t5 = contentLength0;\n" @@ -18636,20 +18013,77 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$2(value, header) {\n" " return this.call\$3(value, header, null);\n" " },\n" +" \$signature: 36\n" +" };\n" +" A._bodyToStream_closure.prototype = {\n" +" call\$1(listener) {\n" +" return A._readStreamBody(this.request, this.response, type\$.MultiStreamController_List_int._as(listener));\n" +" },\n" " \$signature: 37\n" " };\n" -" A._readBody_closure.prototype = {\n" -" call\$1(_) {\n" -" return null;\n" +" A._readStreamBody_closure.prototype = {\n" +" call\$0() {\n" +" var t1 = this._box_0,\n" +" _0_0 = t1.resumeSignal;\n" +" if (_0_0 != null) {\n" +" t1.resumeSignal = null;\n" +" _0_0.complete\$0();\n" +" }\n" " },\n" -" \$signature: 4\n" +" \$signature: 0\n" " };\n" -" A._readBody_closure0.prototype = {\n" -" call\$1(_) {\n" -" A._asObject(_);\n" -" return this._box_0.isError;\n" +" A._readStreamBody_closure0.prototype = {\n" +" call\$0() {\n" +" var \$async\$goto = 0,\n" +" \$async\$completer = A._makeAsyncAwaitCompleter(type\$.void),\n" +" \$async\$handler = 1, \$async\$errorStack = [], \$async\$self = this, e, s, exception, \$async\$exception;\n" +" var \$async\$call\$0 = A._wrapJsFunctionForAsync(function(\$async\$errorCode, \$async\$result) {\n" +" if (\$async\$errorCode === 1) {\n" +" \$async\$errorStack.push(\$async\$result);\n" +" \$async\$goto = \$async\$handler;\n" +" }\n" +" for (;;)\n" +" switch (\$async\$goto) {\n" +" case 0:\n" +" // Function start\n" +" \$async\$handler = 3;\n" +" \$async\$self._box_0.cancelled = true;\n" +" \$async\$goto = 6;\n" +" return A._asyncAwait(A.promiseToFuture(A._asJSObject(\$async\$self.reader.cancel()), type\$.nullable_Object), \$async\$call\$0);\n" +" case 6:\n" +" // returning from await.\n" +" \$async\$handler = 1;\n" +" // goto after finally\n" +" \$async\$goto = 5;\n" +" break;\n" +" case 3:\n" +" // catch\n" +" \$async\$handler = 2;\n" +" \$async\$exception = \$async\$errorStack.pop();\n" +" e = A.unwrapException(\$async\$exception);\n" +" s = A.getTraceFromException(\$async\$exception);\n" +" if (!\$async\$self._box_0.hadError)\n" +" A._rethrowAsClientException(e, s, \$async\$self.request);\n" +" // goto after finally\n" +" \$async\$goto = 5;\n" +" break;\n" +" case 2:\n" +" // uncaught\n" +" // goto rethrow\n" +" \$async\$goto = 1;\n" +" break;\n" +" case 5:\n" +" // after finally\n" +" // implicit return\n" +" return A._asyncReturn(null, \$async\$completer);\n" +" case 1:\n" +" // rethrow\n" +" return A._asyncRethrow(\$async\$errorStack.at(-1), \$async\$completer);\n" +" }\n" +" });\n" +" return A._asyncStartSync(\$async\$call\$0, \$async\$completer);\n" " },\n" -" \$signature: 38\n" +" \$signature: 6\n" " };\n" " A.ByteStream.prototype = {\n" " toBytes\$0() {\n" @@ -18664,7 +18098,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(bytes) {\n" " return this.completer.complete\$1(new Uint8Array(A._ensureNativeList(type\$.List_int._as(bytes))));\n" " },\n" -" \$signature: 39\n" +" \$signature: 38\n" " };\n" " A.ClientException.prototype = {\n" " toString\$0(_) {\n" @@ -18752,7 +18186,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " scanner.expectDone\$0();\n" " return A.MediaType\$(t4, t5, parameters);\n" " },\n" -" \$signature: 40\n" +" \$signature: 39\n" " };\n" " A.MediaType_toString_closure.prototype = {\n" " call\$2(attribute, value) {\n" @@ -18771,7 +18205,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " } else\n" " t1._contents = t3 + value;\n" " },\n" -" \$signature: 41\n" +" \$signature: 40\n" " };\n" " A.MediaType_toString__closure.prototype = {\n" " call\$1(match) {\n" @@ -18874,7 +18308,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " \$parent._children.\$indexSet(0, thisName, t1);\n" " return t1;\n" " },\n" -" \$signature: 43\n" +" \$signature: 42\n" " };\n" " A.Context.prototype = {\n" " absolute\$15(part1, part2, part3, part4, part5, part6, part7, part8, part9, part10, part11, part12, part13, part14, part15) {\n" @@ -19121,7 +18555,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " A._asStringQ(arg);\n" " return arg == null ? \"null\" : '\"' + arg + '\"';\n" " },\n" -" \$signature: 45\n" +" \$signature: 44\n" " };\n" " A.InternalStyle.prototype = {\n" " getRoot\$1(path) {\n" @@ -19575,7 +19009,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " var t1 = this.\$this;\n" " t1._onReleaseCompleters.removeFirst\$0().complete\$1(new A.PoolResource(t1));\n" " },\n" -" \$signature: 46\n" +" \$signature: 45\n" " };\n" " A.Pool__runOnRelease_closure0.prototype = {\n" " call\$2(error, stackTrace) {\n" @@ -19593,23 +19027,27 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " get\$lines() {\n" " return this._lineStarts.length;\n" " },\n" -" SourceFile\$decoded\$2\$url(decodedChars, url) {\n" -" var t1, t2, t3, i, c, j, t4;\n" -" for (t1 = this._decodedChars, t2 = t1.length, t3 = this._lineStarts, i = 0; i < t2; ++i) {\n" -" c = t1[i];\n" +" SourceFile\$_fromList\$2\$url(decodedChars, url) {\n" +" var t1, t2, t3, t4, t5, t6, i, c, j, t7;\n" +" for (t1 = this._decodedChars, t2 = t1.length, t3 = decodedChars.__internal\$_string, t4 = t3.length, t5 = t1.\$flags | 0, t6 = this._lineStarts, i = 0; i < t2; ++i) {\n" +" if (!(i < t4))\n" +" return A.ioore(t3, i);\n" +" c = t3.charCodeAt(i);\n" +" t5 & 2 && A.throwUnsupportedOperation(t1);\n" +" t1[i] = c;\n" " if (c === 13) {\n" " j = i + 1;\n" -" if (j < t2) {\n" -" if (!(j < t2))\n" -" return A.ioore(t1, j);\n" -" t4 = t1[j] !== 10;\n" +" if (j < t4) {\n" +" if (!(j < t4))\n" +" return A.ioore(t3, j);\n" +" t7 = t3.charCodeAt(j) !== 10;\n" " } else\n" -" t4 = true;\n" -" if (t4)\n" +" t7 = true;\n" +" if (t7)\n" " c = 10;\n" " }\n" " if (c === 10)\n" -" B.JSArray_methods.add\$1(t3, i + 1);\n" +" B.JSArray_methods.add\$1(t6, i + 1);\n" " }\n" " },\n" " getLine\$1(offset) {\n" @@ -20015,7 +19453,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$0() {\n" " return this.color;\n" " },\n" -" \$signature: 47\n" +" \$signature: 46\n" " };\n" " A.Highlighter\$__closure.prototype = {\n" " call\$1(line) {\n" @@ -20023,7 +19461,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t2 = A._arrayInstanceType(t1);\n" " return new A.WhereIterable(t1, t2._eval\$1(\"bool(1)\")._as(new A.Highlighter\$___closure()), t2._eval\$1(\"WhereIterable<1>\")).get\$length(0);\n" " },\n" -" \$signature: 48\n" +" \$signature: 47\n" " };\n" " A.Highlighter\$___closure.prototype = {\n" " call\$1(highlight) {\n" @@ -20036,21 +19474,21 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(line) {\n" " return type\$._Line._as(line).url;\n" " },\n" -" \$signature: 50\n" +" \$signature: 49\n" " };\n" " A.Highlighter__collateLines_closure.prototype = {\n" " call\$1(highlight) {\n" " var t1 = type\$._Highlight._as(highlight).span.get\$sourceUrl();\n" " return t1 == null ? new A.Object() : t1;\n" " },\n" -" \$signature: 51\n" +" \$signature: 50\n" " };\n" " A.Highlighter__collateLines_closure0.prototype = {\n" " call\$2(highlight1, highlight2) {\n" " var t1 = type\$._Highlight;\n" " return t1._as(highlight1).span.compareTo\$1(0, t1._as(highlight2).span);\n" " },\n" -" \$signature: 52\n" +" \$signature: 51\n" " };\n" " A.Highlighter__collateLines_closure1.prototype = {\n" " call\$1(entry) {\n" @@ -20093,7 +19531,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " return lines;\n" " },\n" -" \$signature: 53\n" +" \$signature: 78\n" " };\n" " A.Highlighter__collateLines__closure.prototype = {\n" " call\$1(highlight) {\n" @@ -20260,7 +19698,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " return A._Highlight__normalizeEndOfLine(A._Highlight__normalizeTrailingNewline(A._Highlight__normalizeNewlines(newSpan)));\n" " },\n" -" \$signature: 55\n" +" \$signature: 54\n" " };\n" " A._Line.prototype = {\n" " toString\$0(_) {\n" @@ -20473,8 +19911,18 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _this._outgoingController.close\$0();\n" " },\n" " _closeWithError\$1(error) {\n" -" var t1;\n" -" this._incomingController.addError\$1(error);\n" +" var _0_0, error0, stackTrace, t2,\n" +" t1 = this._incomingController;\n" +" if (t1._state >= 4)\n" +" A.throwExpression(t1._badEventState\$0());\n" +" _0_0 = A._interceptUserError(error, null);\n" +" error0 = _0_0.error;\n" +" stackTrace = _0_0.stackTrace;\n" +" t2 = t1._state;\n" +" if ((t2 & 1) !== 0)\n" +" t1._sendError\$2(error0, stackTrace);\n" +" else if ((t2 & 3) === 0)\n" +" t1._ensurePendingEvents\$0().add\$1(0, new A._DelayedError(error0, stackTrace));\n" " this.close\$0();\n" " t1 = this._onConnected;\n" " if ((t1.future._state & 30) === 0)\n" @@ -20628,7 +20076,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " });\n" " return A._asyncStartSync(\$async\$call\$0, \$async\$completer);\n" " },\n" -" \$signature: 58\n" +" \$signature: 57\n" " };\n" " A.StreamChannelMixin.prototype = {};\n" " A.StringScannerException.prototype = {\n" @@ -20675,7 +20123,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this._fail\$1(\"no more input\");\n" " },\n" " error\$3\$length\$position(message, \$length, position) {\n" -" var t2, t3, t4, t5, sourceFile, end,\n" +" var t2, t3, end, sourceFile, end0,\n" " t1 = this.string;\n" " if (position < 0)\n" " A.throwExpression(A.RangeError\$(\"position must be greater than or equal to 0.\"));\n" @@ -20685,17 +20133,16 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " if (t2)\n" " A.throwExpression(A.RangeError\$(\"position plus length must not go beyond the end of the string.\"));\n" " t2 = this.sourceUrl;\n" -" t3 = new A.CodeUnits(t1);\n" -" t4 = A._setArrayType([0], type\$.JSArray_int);\n" -" t5 = new Uint32Array(A._ensureNativeList(t3.toList\$0(t3)));\n" -" sourceFile = new A.SourceFile(t2, t4, t5);\n" -" sourceFile.SourceFile\$decoded\$2\$url(t3, t2);\n" -" end = position + \$length;\n" -" if (end > t5.length)\n" -" A.throwExpression(A.RangeError\$(\"End \" + end + string\$.x20must_ + sourceFile.get\$length(0) + \".\"));\n" +" t3 = A._setArrayType([0], type\$.JSArray_int);\n" +" end = t1.length;\n" +" sourceFile = new A.SourceFile(t2, t3, new Uint32Array(end));\n" +" sourceFile.SourceFile\$_fromList\$2\$url(new A.CodeUnits(t1), t2);\n" +" end0 = position + \$length;\n" +" if (end0 > end)\n" +" A.throwExpression(A.RangeError\$(\"End \" + end0 + string\$.x20must_ + sourceFile.get\$length(0) + \".\"));\n" " else if (position < 0)\n" " A.throwExpression(A.RangeError\$(\"Start may not be negative, was \" + position + \".\"));\n" -" throw A.wrapException(new A.StringScannerException(t1, message, new A._FileSpan(sourceFile, position, end)));\n" +" throw A.wrapException(new A.StringScannerException(t1, message, new A._FileSpan(sourceFile, position, end0)));\n" " },\n" " _fail\$1(\$name) {\n" " this.error\$3\$length\$position(\"expected \" + \$name + \".\", 0, this._string_scanner\$_position);\n" @@ -21001,8 +20448,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " 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(null, null, null, type\$.DebugEvent);\n" -" t5 = A.StreamController_StreamController(null, null, null, type\$.List_DebugEvent);\n" +" t4 = A.StreamController_StreamController(type\$.DebugEvent);\n" +" t5 = A.StreamController_StreamController(type\$.List_DebugEvent);\n" " debugEventController = new A.BatchedStreamController(t3, 1000, t4, t5, new A._AsyncCompleter(new A._Future(t2, type\$._Future_bool), type\$._AsyncCompleter_bool), type\$.BatchedStreamController_DebugEvent);\n" " t2 = A.List_List\$filled(A.QueueList__computeInitialCapacity(null), null, false, type\$.nullable_Result_DebugEvent);\n" " t3 = A.ListQueue\$(type\$._EventRequest_dynamic);\n" @@ -21024,25 +20471,25 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " });\n" " return A._asyncStartSync(\$async\$call\$0, \$async\$completer);\n" " },\n" -" \$signature: 9\n" +" \$signature: 6\n" " };\n" " A.main__closure.prototype = {\n" " call\$0() {\n" " return A.FutureOfJSAnyToJSPromise_get_toJS(this.manager._restarter.hotReloadStart\$1(A._asStringQ(init.G.\$reloadedSourcesPath)), 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" " return A.FutureOfJSAnyToJSPromise_get_toJS(this.manager.hotRestartBegin\$1(A._asStringQ(init.G.\$reloadedSourcesPath)), type\$.JSArray_nullable_Object);\n" " },\n" -" \$signature: 7\n" +" \$signature: 5\n" " };\n" " A.main__closure2.prototype = {\n" " call\$2(runId, pauseIsolatesOnStart) {\n" @@ -21062,7 +20509,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(runId) {\n" " return this.call\$2(runId, null);\n" " },\n" -" \$signature: 92\n" +" \$signature: 60\n" " };\n" " A.main__closure3.prototype = {\n" " call\$1(runId) {\n" @@ -21092,7 +20539,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " if (A._asBool(init.G.\$dartEmitDebugEvents))\n" " A._trySendEvent(this.client.get\$sink(), B.C_JsonCodec.encode\$2\$toEncodable(A._setArrayType([\"BatchedDebugEvents\", new A.BatchedDebugEvents(events).toJson\$0()], type\$.JSArray_Object), null), type\$.dynamic);\n" " },\n" -" \$signature: 63\n" +" \$signature: 62\n" " };\n" " A.main__closure6.prototype = {\n" " call\$2(kind, eventData) {\n" @@ -21104,7 +20551,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " A._trySendEvent(new A._StreamSinkWrapper(t1, A._instanceType(t1)._eval\$1(\"_StreamSinkWrapper<1>\")), new A.DebugEvent(kind, eventData, Date.now()), type\$.DebugEvent);\n" " }\n" " },\n" -" \$signature: 64\n" +" \$signature: 63\n" " };\n" " A.main__closure7.prototype = {\n" " call\$1(eventData) {\n" @@ -21316,7 +20763,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " A.main__closure10.prototype = {\n" " call\$1(error) {\n" " },\n" -" \$signature: 4\n" +" \$signature: 8\n" " };\n" " A.main__closure11.prototype = {\n" " call\$1(e) {\n" @@ -21335,25 +20782,25 @@ 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" " return A._dispatchEvent(\"dart-auth-response\", \"\" + A._asBool(isAuthenticated));\n" " },\n" -" \$signature: 65\n" +" \$signature: 64\n" " };\n" " A._sendHotReloadResponse_closure.prototype = {\n" " call\$3(id, success, errorMessage) {\n" " return new A.HotReloadResponse(id, success, errorMessage);\n" " },\n" -" \$signature: 66\n" +" \$signature: 65\n" " };\n" " A._sendHotRestartResponse_closure.prototype = {\n" " call\$3(id, success, errorMessage) {\n" " return new A.HotRestartResponse(id, success, errorMessage);\n" " },\n" -" \$signature: 67\n" +" \$signature: 66\n" " };\n" " A.DdcLibraryBundleRestarter.prototype = {\n" " _runMainWhenReady\$2(readyToRunMain, runMain) {\n" @@ -21761,7 +21208,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this.sub.cancel\$0();\n" " return value;\n" " },\n" -" \$signature: 69\n" +" \$signature: 68\n" " };\n" " A.ReloadingManager.prototype = {\n" " hotRestart\$3\$readyToRunMain\$reloadedSourcesPath\$runId(readyToRunMain, reloadedSourcesPath, runId) {\n" @@ -22327,7 +21774,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(e) {\n" " this.completer.completeError\$2(new A.HotReloadFailedException(A._asString(type\$.JavaScriptObject._as(e).message)), this.stackTrace);\n" " },\n" -" \$signature: 72\n" +" \$signature: 71\n" " };\n" " A._createScript_closure.prototype = {\n" " call\$0() {\n" @@ -22336,13 +21783,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return new A._createScript__closure();\n" " return new A._createScript__closure0(nonce);\n" " },\n" -" \$signature: 73\n" +" \$signature: 72\n" " };\n" " A._createScript__closure.prototype = {\n" " 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" @@ -22350,7 +21797,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" @@ -22389,52 +21836,23 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _instance_1_u = hunkHelpers._instance_1u,\n" " _static_1 = hunkHelpers._static_1,\n" " _static_0 = hunkHelpers._static_0,\n" -" _static = hunkHelpers.installStaticTearOff,\n" " _instance = hunkHelpers.installInstanceTearOff,\n" " _instance_2_u = hunkHelpers._instance_2u,\n" " _instance_0_u = hunkHelpers._instance_0u,\n" -" _instance_1_i = hunkHelpers._instance_1i;\n" +" _instance_1_i = hunkHelpers._instance_1i,\n" +" _static = hunkHelpers.installStaticTearOff;\n" " _static_2(J, \"_interceptors_JSArray__compareAny\$closure\", \"JSArray__compareAny\", 27);\n" -" _instance_1_u(A.CastStreamSubscription.prototype, \"get\$__internal\$_onData\", \"__internal\$_onData\$1\", 8);\n" +" _instance_1_u(A.CastStreamSubscription.prototype, \"get\$__internal\$_onData\", \"__internal\$_onData\$1\", 11);\n" " _static_1(A, \"async__AsyncRun__scheduleImmediateJsOverride\$closure\", \"_AsyncRun__scheduleImmediateJsOverride\", 14);\n" " _static_1(A, \"async__AsyncRun__scheduleImmediateWithSetImmediate\$closure\", \"_AsyncRun__scheduleImmediateWithSetImmediate\", 14);\n" " _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\", 5);\n" -" _static_2(A, \"async___nullErrorHandler\$closure\", \"_nullErrorHandler\", 6);\n" +" _static_1(A, \"async___nullDataHandler\$closure\", \"_nullDataHandler\", 4);\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\"], 76, 0);\n" -" _static(A, \"async___rootRun\$closure\", 4, null, [\"call\$1\$4\", \"call\$4\"], [\"_rootRun\", function(\$self, \$parent, zone, f) {\n" -" return A._rootRun(\$self, \$parent, zone, f, type\$.dynamic);\n" -" }], 77, 0);\n" -" _static(A, \"async___rootRunUnary\$closure\", 5, null, [\"call\$2\$5\", \"call\$5\"], [\"_rootRunUnary\", function(\$self, \$parent, zone, f, arg) {\n" -" var t1 = type\$.dynamic;\n" -" return A._rootRunUnary(\$self, \$parent, zone, f, arg, t1, t1);\n" -" }], 78, 0);\n" -" _static(A, \"async___rootRunBinary\$closure\", 6, null, [\"call\$3\$6\"], [\"_rootRunBinary\"], 79, 0);\n" -" _static(A, \"async___rootRegisterCallback\$closure\", 4, null, [\"call\$1\$4\", \"call\$4\"], [\"_rootRegisterCallback\", function(\$self, \$parent, zone, f) {\n" -" return A._rootRegisterCallback(\$self, \$parent, zone, f, type\$.dynamic);\n" -" }], 80, 0);\n" -" _static(A, \"async___rootRegisterUnaryCallback\$closure\", 4, null, [\"call\$2\$4\", \"call\$4\"], [\"_rootRegisterUnaryCallback\", function(\$self, \$parent, zone, f) {\n" -" var t1 = type\$.dynamic;\n" -" return A._rootRegisterUnaryCallback(\$self, \$parent, zone, f, t1, t1);\n" -" }], 81, 0);\n" -" _static(A, \"async___rootRegisterBinaryCallback\$closure\", 4, null, [\"call\$3\$4\", \"call\$4\"], [\"_rootRegisterBinaryCallback\", function(\$self, \$parent, zone, f) {\n" -" var t1 = type\$.dynamic;\n" -" return A._rootRegisterBinaryCallback(\$self, \$parent, zone, f, t1, t1, t1);\n" -" }], 82, 0);\n" -" _static(A, \"async___rootErrorCallback\$closure\", 5, null, [\"call\$5\"], [\"_rootErrorCallback\"], 83, 0);\n" -" _static(A, \"async___rootScheduleMicrotask\$closure\", 4, null, [\"call\$4\"], [\"_rootScheduleMicrotask\"], 84, 0);\n" -" _static(A, \"async___rootCreateTimer\$closure\", 5, null, [\"call\$5\"], [\"_rootCreateTimer\"], 85, 0);\n" -" _static(A, \"async___rootCreatePeriodicTimer\$closure\", 5, null, [\"call\$5\"], [\"_rootCreatePeriodicTimer\"], 86, 0);\n" -" _static(A, \"async___rootPrint\$closure\", 4, null, [\"call\$4\"], [\"_rootPrint\"], 87, 0);\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\"], 62, 0, 0);\n" -" _instance_2_u(A._Future.prototype, \"get\$_completeError\", \"_completeError\$2\", 6);\n" +" _instance(A._Completer.prototype, \"get\$completeError\", 0, 1, null, [\"call\$2\", \"call\$1\"], [\"completeError\$2\", \"completeError\$1\"], 58, 0, 0);\n" +" _instance_2_u(A._Future.prototype, \"get\$_completeError\", \"_completeError\$2\", 7);\n" " var _;\n" -" _instance_1_u(_ = A._StreamController.prototype, \"get\$_add\", \"_add\$1\", 8);\n" -" _instance_2_u(_, \"get\$_addError\", \"_addError\$2\", 6);\n" -" _instance_0_u(_, \"get\$_close\", \"_close\$0\", 0);\n" " _instance_0_u(_ = A._ControllerSubscription.prototype, \"get\$_onPause\", \"_onPause\$0\", 0);\n" " _instance_0_u(_, \"get\$_onResume\", \"_onResume\$0\", 0);\n" " _instance_0_u(_ = A._BufferingStreamSubscription.prototype, \"get\$_onPause\", \"_onPause\$0\", 0);\n" @@ -22442,59 +21860,59 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _instance_0_u(A._DoneStreamSubscription.prototype, \"get\$_onMicrotask\", \"_onMicrotask\$0\", 0);\n" " _instance_0_u(_ = A._ForwardingStreamSubscription.prototype, \"get\$_onPause\", \"_onPause\$0\", 0);\n" " _instance_0_u(_, \"get\$_onResume\", \"_onResume\$0\", 0);\n" -" _instance_1_u(_, \"get\$_handleData\", \"_handleData\$1\", 8);\n" -" _instance_2_u(_, \"get\$_handleError\", \"_handleError\$2\", 33);\n" +" _instance_1_u(_, \"get\$_handleData\", \"_handleData\$1\", 11);\n" +" _instance_2_u(_, \"get\$_handleError\", \"_handleError\$2\", 76);\n" " _instance_0_u(_, \"get\$_handleDone\", \"_handleDone\$0\", 0);\n" " _static_2(A, \"collection___defaultEquals\$closure\", \"_defaultEquals0\", 28);\n" " _static_1(A, \"collection___defaultHashCode\$closure\", \"_defaultHashCode\", 15);\n" " _static_2(A, \"collection_ListBase__compareAny\$closure\", \"ListBase__compareAny\", 27);\n" " _static_1(A, \"convert___defaultToEncodable\$closure\", \"_defaultToEncodable\", 16);\n" -" _instance_1_i(_ = A._ByteCallbackSink.prototype, \"get\$add\", \"add\$1\", 8);\n" +" _instance_1_i(_ = A._ByteCallbackSink.prototype, \"get\$add\", \"add\$1\", 11);\n" " _instance_0_u(_, \"get\$close\", \"close\$0\", 0);\n" " _static_1(A, \"core__identityHashCode\$closure\", \"identityHashCode\", 15);\n" " _static_2(A, \"core__identical\$closure\", \"identical\", 28);\n" -" _static_1(A, \"core_Uri_decodeComponent\$closure\", \"Uri_decodeComponent\", 10);\n" +" _static_1(A, \"core_Uri_decodeComponent\$closure\", \"Uri_decodeComponent\", 9);\n" " _static(A, \"math__max\$closure\", 2, null, [\"call\$1\$2\", \"call\$2\"], [\"max\", function(a, b) {\n" " return A.max(a, b, type\$.num);\n" -" }], 91, 0);\n" -" _instance_1_u(_ = A.PersistentWebSocket.prototype, \"get\$_writeToWebSocket\", \"_writeToWebSocket\$1\", 5);\n" -" _instance_0_u(_, \"get\$_listenWithRetry\", \"_listenWithRetry\$0\", 9);\n" -" _static_1(A, \"case_insensitive_map_CaseInsensitiveMap__canonicalizer\$closure\", \"CaseInsensitiveMap__canonicalizer\", 10);\n" +" }], 77, 0);\n" +" _instance_1_u(_ = A.PersistentWebSocket.prototype, \"get\$_writeToWebSocket\", \"_writeToWebSocket\$1\", 4);\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" " _instance_0_u(_, \"get\$_onOutgoingDone\", \"_onOutgoingDone\$0\", 0);\n" -" _instance_1_u(_, \"get\$_onOutgoingMessage\", \"_onOutgoingMessage\$1\", 57);\n" -" _static_1(A, \"client__initializeConnection\$closure\", \"initializeConnection\", 61);\n" +" _instance_1_u(_, \"get\$_onOutgoingMessage\", \"_onOutgoingMessage\$1\", 56);\n" +" _static_1(A, \"client__initializeConnection\$closure\", \"initializeConnection\", 52);\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\", 70);\n" -" _instance_2_u(_, \"get\$_moduleTopologicalCompare\", \"_moduleTopologicalCompare\$2\", 71);\n" +" _instance_1_u(_ = A.RequireRestarter.prototype, \"get\$_moduleParents\", \"_moduleParents\$1\", 69);\n" +" _instance_2_u(_, \"get\$_moduleTopologicalCompare\", \"_moduleTopologicalCompare\$2\", 70);\n" " })();\n" " (function inheritance() {\n" " var _mixin = hunkHelpers.mixin,\n" " _inherit = hunkHelpers.inherit,\n" " _inheritMany = hunkHelpers.inheritMany;\n" " _inherit(A.Object, null);\n" -" _inheritMany(A.Object, [A.JS_CONST, J.Interceptor, A.SafeToStringHook, J.ArrayIterator, A.Stream, A.CastStreamSubscription, A.Iterable, A.CastIterator, A.Closure, A.MapBase, A.Error, A.ListBase, A.SentinelValue, A.ListIterator, A.MappedIterator, A.WhereIterator, A.ExpandIterator, A.TakeIterator, A.SkipIterator, A.EmptyIterator, A.WhereTypeIterator, A.FixedLengthListMixin, A.UnmodifiableListMixin, A._Record, A.ConstantMap, A._KeysOrValuesOrElementsIterator, A.TypeErrorDecoder, A.NullThrownFromJavaScriptException, A.ExceptionAndStackTrace, A._StackTrace, A.LinkedHashMapCell, A.LinkedHashMapKeyIterator, A.LinkedHashMapValueIterator, A.LinkedHashMapEntryIterator, A.JSSyntaxRegExp, A._MatchImplementation, A._AllMatchesIterator, A.StringMatch, A._StringAllMatchesIterator, A._Cell, A._UnmodifiableNativeByteBufferView, A.Rti, A._FunctionParameters, A._Type, A._TimerImpl, A._AsyncAwaitCompleter, A._AsyncStarStreamController, A._IterationMarker, A.AsyncError, A._Completer, A._FutureListener, A._Future, A._AsyncCallbackEntry, A._StreamController, A._AsyncStreamControllerDispatch, A._BufferingStreamSubscription, A._StreamSinkWrapper, A._AddStreamState, A._DelayedEvent, A._DelayedDone, A._PendingEvents, A._DoneStreamSubscription, A._StreamIterator, A._ZoneRun, A._ZoneRunUnary, A._ZoneRunBinary, A._ZoneRegisterCallback, A._ZoneRegisterUnaryCallback, A._ZoneRegisterBinaryCallback, A._ZoneErrorCallback, A._ZoneScheduleMicrotask, A._ZoneCreateTimer, A._ZoneCreatePeriodicTimer, A._ZonePrint, A._ZoneFork, A._ZoneHandleUncaughtError, A._ZoneValues, A._Zone, A._ZoneDelegate, A.ZoneSpecification, A._HashMapKeyIterator, A.SetBase, A._HashSetIterator, A._UnmodifiableMapMixin, A.MapView, A._ListQueueIterator, A._SplayTreeNode, A._SplayTree, A._SplayTreeIterator, A.Codec, A.Converter, A.ByteConversionSink, A._JsonStringifier, A._Utf8Encoder, A._Utf8Decoder, A.DateTime, A.Duration, A._Enum, A.OutOfMemoryError, A.StackOverflowError, A._Exception, A.FormatException, A.MapEntry, A.Null, A._StringStackTrace, A.StringBuffer, A._Uri, A.UriData, A._SimpleUri, A.NullRejectionException, A._JSRandom, A._JSSecureRandom, A.AsyncMemoizer, A.ErrorResult, A.ValueResult, A.StreamQueue, A._NextRequest, A._HasNextRequest, A.CanonicalizedMap, A._QueueList_Object_ListMixin, A.BuildResult, A.ConnectRequest, A.DebugEvent, A.BatchedDebugEvents, A.DebugInfo, A.DevToolsRequest, A.DevToolsResponse, A.ErrorResponse, A.HotReloadRequest, A.HotReloadResponse, A.HotRestartRequest, A.HotRestartResponse, A.PingRequest, A.RegisterEvent, A.RunRequest, A.ServiceExtensionRequest, A.ServiceExtensionResponse, A.BatchedStreamController, A.SocketClient, A._PersistentWebSocket_Object_StreamChannelMixin, A.Uuid, A._StackState, A.ClientException, A.BaseClient, A.BaseRequest, A.BaseResponse, A.MediaType, A.Level, A.LogRecord, A.Logger, A.Context, A.Style, A.ParsedPath, A.PathException, A.Pool, A.PoolResource, A.SourceFile, A.SourceLocationMixin, A.SourceSpanMixin, A.Highlighter, A._Highlight, A._Line, A.SourceLocation, A.SourceSpanException, A.StreamChannelMixin, A.StringScanner, A.EventStreamProvider, A._EventStreamSubscription, A.BrowserWebSocket, A.WebSocketEvent, A.WebSocketException, A.DdcLibraryBundleRestarter, A.DdcRestarter, A.ReloadingManager, A.HotReloadFailedException, A.RequireRestarter]);\n" +" _inheritMany(A.Object, [A.JS_CONST, J.Interceptor, A.SafeToStringHook, J.ArrayIterator, A.Stream, A.CastStreamSubscription, A.Iterable, A.CastIterator, A.Closure, A.MapBase, A.Error, A.ListBase, A.SentinelValue, A.ListIterator, A.MappedIterator, A.WhereIterator, A.ExpandIterator, A.TakeIterator, A.SkipIterator, A.EmptyIterator, A.WhereTypeIterator, A.FixedLengthListMixin, A.UnmodifiableListMixin, A._Record, A.ConstantMap, A._KeysOrValuesOrElementsIterator, A.TypeErrorDecoder, A.NullThrownFromJavaScriptException, A.ExceptionAndStackTrace, A._StackTrace, A.LinkedHashMapCell, A.LinkedHashMapKeyIterator, A.LinkedHashMapValueIterator, A.LinkedHashMapEntryIterator, A.JSSyntaxRegExp, A._MatchImplementation, A._AllMatchesIterator, A.StringMatch, A._StringAllMatchesIterator, A._Cell, A._UnmodifiableNativeByteBufferView, A.Rti, A._FunctionParameters, A._Type, A._TimerImpl, A._AsyncAwaitCompleter, A.AsyncError, A._Completer, A._FutureListener, A._Future, A._AsyncCallbackEntry, A._StreamController, A._AsyncStreamControllerDispatch, A._BufferingStreamSubscription, A._StreamSinkWrapper, A._DelayedEvent, A._DelayedDone, A._PendingEvents, A._DoneStreamSubscription, A._StreamIterator, A._ZoneHandleUncaughtError, A.Zone, A.ZoneDelegate, A.ZoneSpecification, A._HashMapKeyIterator, A.SetBase, A._HashSetIterator, A._UnmodifiableMapMixin, A.MapView, A._ListQueueIterator, A._SplayTreeNode, A._SplayTree, A._SplayTreeIterator, A.Codec, A.Converter, A.ByteConversionSink, A._JsonStringifier, A._Utf8Encoder, A._Utf8Decoder, A.DateTime, A.Duration, A._Enum, A.OutOfMemoryError, A.StackOverflowError, A._Exception, A.FormatException, A.MapEntry, A.Null, A._StringStackTrace, A.StringBuffer, A._Uri, A.UriData, A._SimpleUri, A.NullRejectionException, A._JSRandom, A._JSSecureRandom, A.AsyncMemoizer, A.ErrorResult, A.ValueResult, A.StreamQueue, A._NextRequest, A._HasNextRequest, A.CanonicalizedMap, A._QueueList_Object_ListMixin, A.BuildResult, A.ConnectRequest, A.DebugEvent, A.BatchedDebugEvents, A.DebugInfo, A.DevToolsRequest, A.DevToolsResponse, A.ErrorResponse, A.HotReloadRequest, A.HotReloadResponse, A.HotRestartRequest, A.HotRestartResponse, A.PingRequest, A.RegisterEvent, A.RunRequest, A.ServiceExtensionRequest, A.ServiceExtensionResponse, A.BatchedStreamController, A.SocketClient, A._PersistentWebSocket_Object_StreamChannelMixin, A.Uuid, A._StackState, A.ClientException, A.BaseClient, A.BaseRequest, A.BaseResponse, A.MediaType, A.Level, A.LogRecord, A.Logger, A.Context, A.Style, A.ParsedPath, A.PathException, A.Pool, A.PoolResource, A.SourceFile, A.SourceLocationMixin, A.SourceSpanMixin, A.Highlighter, A._Highlight, A._Line, A.SourceLocation, A.SourceSpanException, A.StreamChannelMixin, A.StringScanner, A.EventStreamProvider, A._EventStreamSubscription, A.BrowserWebSocket, A.WebSocketEvent, A.WebSocketException, A.DdcLibraryBundleRestarter, A.DdcRestarter, A.ReloadingManager, A.HotReloadFailedException, A.RequireRestarter]);\n" " _inheritMany(J.Interceptor, [J.JSBool, J.JSNull, J.JavaScriptObject, J.JavaScriptBigInt, J.JavaScriptSymbol, J.JSNumber, J.JSString]);\n" " _inheritMany(J.JavaScriptObject, [J.LegacyJavaScriptObject, J.JSArray, A.NativeByteBuffer, A.NativeTypedData]);\n" " _inheritMany(J.LegacyJavaScriptObject, [J.PlainJavaScriptObject, J.UnknownJavaScriptObject, J.JavaScriptFunction]);\n" " _inherit(J.JSArraySafeToStringHook, A.SafeToStringHook);\n" " _inherit(J.JSUnmodifiableArray, J.JSArray);\n" " _inheritMany(J.JSNumber, [J.JSInt, J.JSNumNotInt]);\n" -" _inheritMany(A.Stream, [A.CastStream, A.StreamView, A._StreamImpl, A._EmptyStream, A._ForwardingStream, A._EventStream]);\n" +" _inheritMany(A.Stream, [A.CastStream, A.StreamView, A._StreamImpl, A._EmptyStream, A._MultiStream, A._ForwardingStream, A._EventStream]);\n" " _inheritMany(A.Iterable, [A._CastIterableBase, A.EfficientLengthIterable, A.MappedIterable, A.WhereIterable, A.ExpandIterable, A.TakeIterable, A.SkipIterable, A.WhereTypeIterable, A._KeysOrValues, A._AllMatchesIterable, A._StringAllMatchesIterable]);\n" " _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._asyncStarHelper_closure0, A._Future__propagateToListeners_handleWhenCompleteCallback_closure, A._Future_timeout_closure0, A.Stream_length_closure, A.Stream_first_closure0, A._CustomZone_bindUnaryCallbackGuarded_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._readBody_closure, A._readBody_closure0, 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._AddStreamState_makeErrorHandler_closure, 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" +" _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.Zone_bindUnaryCallbackGuarded_closure, A.runZonedGuarded_errorHandler, 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._asyncStarHelper_closure, A._AsyncStarStreamController__resumeBody, A._AsyncStarStreamController__resumeBody_closure, A._AsyncStarStreamController_closure0, A._AsyncStarStreamController_closure1, A._AsyncStarStreamController_closure, A._AsyncStarStreamController__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._AddStreamState_cancel_closure, A._BufferingStreamSubscription_asFuture_closure, A._BufferingStreamSubscription_asFuture__closure, A._BufferingStreamSubscription__sendError_sendError, A._BufferingStreamSubscription__sendDone_sendDone, A._PendingEvents_schedule_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.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.Closure0Args, [A.nullFuture_closure, A._AsyncRun__scheduleImmediateJsOverride_internalCallback, A._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, A._TimerImpl_internalCallback, 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.Zone_bindCallback_closure, A.Zone_bindCallbackGuarded_closure, A._rootHandleUncaughtError_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" @@ -22521,10 +21939,9 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _inherit(A._AsyncStreamController, A._StreamController);\n" " _inherit(A._ControllerStream, A._StreamImpl);\n" " _inheritMany(A._BufferingStreamSubscription, [A._ControllerSubscription, A._ForwardingStreamSubscription]);\n" -" _inherit(A._StreamControllerAddStreamState, A._AddStreamState);\n" " _inheritMany(A._DelayedEvent, [A._DelayedData, A._DelayedError]);\n" +" _inherit(A._MultiStreamController, A._AsyncStreamController);\n" " _inherit(A._MapStream, A._ForwardingStream);\n" -" _inheritMany(A._Zone, [A._CustomZone, A._RootZone]);\n" " _inherit(A._IdentityHashMap, A._HashMap);\n" " _inherit(A._SetBase, A.SetBase);\n" " _inherit(A._HashSet, A._SetBase);\n" @@ -22585,7 +22002,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)\", \"Null(@)\", \"~(@)\", \"~(Object,StackTrace)\", \"JSObject()\", \"~(Object?)\", \"Future<~>()\", \"String(String)\", \"Object?(Object?)\", \"bool(_Highlight)\", \"Null(JSObject)\", \"~(~())\", \"int(Object?)\", \"@(@)\", \"~(Object?,Object?)\", \"@()\", \"Null(JavaScriptFunction,JavaScriptFunction)\", \"bool()\", \"Future<~>(String)\", \"String(Match)\", \"bool(String)\", \"int()\", \"Null(String)\", \"Null(JavaScriptFunction)\", \"int(@,@)\", \"bool(Object?,Object?)\", \"String(@)\", \"@(String)\", \"@(@,String)\", \"PersistentWebSocket(WebSocket)\", \"~(@,StackTrace)\", \"Future<~>(WebSocketEvent)\", \"bool(String,String)\", \"int(String)\", \"Null(String,String[Object?])\", \"bool(Object)\", \"~(List)\", \"MediaType()\", \"~(String,String)\", \"~(Zone,ZoneDelegate,Zone,Object,StackTrace)\", \"Logger()\", \"bool(Object?)\", \"String(String?)\", \"Null(~)\", \"String?()\", \"int(_Line)\", \"Null(~())\", \"Object(_Line)\", \"Object(_Highlight)\", \"int(_Highlight,_Highlight)\", \"List<_Line>(MapEntry>)\", \"Null(@,StackTrace)\", \"SourceSpanWithContext()\", \"0&(String,int?)\", \"~(String?)\", \"Future()\", \"~(int,@)\", \"_Future<@>?()\", \"~(StreamSink<@>)\", \"~(Object[StackTrace?])\", \"~(List)\", \"Null(String,String)\", \"~(bool)\", \"HotReloadResponse(String,bool,String?)\", \"HotRestartResponse(String,bool,String?)\", \"JSObject(Object,StackTrace)\", \"bool(bool)\", \"List(String)\", \"int(String,String)\", \"Null(JavaScriptObject)\", \"JSObject()()\", \"Object?(~)\", \"bool(BuildStatus)\", \"~(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)\", \"Zone(Zone?,ZoneDelegate?,Zone,ZoneSpecification?,Map?)\", \"0&()\", \"Map(DebugEvent)\", \"0^(0^,0^)\", \"JSObject(String[bool?])\"],\n" +" types: [\"~()\", \"Null()\", \"~(JSObject)\", \"Null(Object,StackTrace)\", \"~(@)\", \"JSObject()\", \"Future<~>()\", \"~(Object,StackTrace)\", \"Null(@)\", \"String(String)\", \"Object?(Object?)\", \"~(Object?)\", \"bool(_Highlight)\", \"Null(JSObject)\", \"~(~())\", \"int(Object?)\", \"@(@)\", \"~(Object?,Object?)\", \"@()\", \"Null(JavaScriptFunction,JavaScriptFunction)\", \"bool()\", \"Future<~>(String)\", \"String(Match)\", \"bool(String)\", \"int()\", \"Null(String)\", \"Null(JavaScriptFunction)\", \"int(@,@)\", \"bool(Object?,Object?)\", \"bool(BuildStatus)\", \"String(@)\", \"PersistentWebSocket(WebSocket)\", \"~(Zone,ZoneDelegate,Zone,Object,StackTrace)\", \"Future<~>(WebSocketEvent)\", \"bool(String,String)\", \"int(String)\", \"Null(String,String[Object?])\", \"~(MultiStreamController>)\", \"~(List)\", \"MediaType()\", \"~(String,String)\", \"bool(Object?)\", \"Logger()\", \"Null(~())\", \"String(String?)\", \"Null(~)\", \"String?()\", \"int(_Line)\", \"Null(@,StackTrace)\", \"Object(_Line)\", \"Object(_Highlight)\", \"int(_Highlight,_Highlight)\", \"~(StreamSink<@>)\", \"0&(String,int?)\", \"SourceSpanWithContext()\", \"~(int,@)\", \"~(String?)\", \"Future()\", \"~(Object[StackTrace?])\", \"@(String)\", \"JSObject(String[bool?])\", \"JSObject(Object,StackTrace)\", \"~(List)\", \"Null(String,String)\", \"~(bool)\", \"HotReloadResponse(String,bool,String?)\", \"HotRestartResponse(String,bool,String?)\", \"Object?(~)\", \"bool(bool)\", \"List(String)\", \"int(String,String)\", \"Null(JavaScriptObject)\", \"JSObject()()\", \"@(@,String)\", \"0&()\", \"Map(DebugEvent)\", \"~(@,StackTrace)\", \"0^(0^,0^)\", \"List<_Line>(MapEntry>)\"],\n" " interceptorsByTag: null,\n" " leafTags: null,\n" " arrayRti: Symbol(\"\$ti\"),\n" @@ -22593,7 +22010,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\":[]},\"_Future\":{\"Future\":[\"1\"]},\"_TimerImpl\":{\"Timer\":[]},\"_AsyncAwaitCompleter\":{\"Completer\":[\"1\"]},\"_Completer\":{\"Completer\":[\"1\"]},\"_AsyncCompleter\":{\"_Completer\":[\"1\"],\"Completer\":[\"1\"]},\"_SyncCompleter\":{\"_Completer\":[\"1\"],\"Completer\":[\"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\"]},\"_StreamControllerAddStreamState\":{\"_AddStreamState\":[\"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\"},\"_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\":[]},\"_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_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\"},\"_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" @@ -22610,6 +22027,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " var type\$ = (function rtii() {\n" " var findType = A.findType;\n" " return {\n" +" \$env_1_1_dynamic: findType(\"@<@>\"),\n" +" \$env_1_1_void: findType(\"@<~>\"),\n" " AsyncError: findType(\"AsyncError\"),\n" " BatchedStreamController_DebugEvent: findType(\"BatchedStreamController\"),\n" " BrowserWebSocket: findType(\"BrowserWebSocket\"),\n" @@ -22667,6 +22086,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " Map_dynamic_dynamic: findType(\"Map<@,@>\"),\n" " MappedListIterable_String_dynamic: findType(\"MappedListIterable\"),\n" " MediaType: findType(\"MediaType\"),\n" +" MultiStreamController_List_int: findType(\"MultiStreamController>\"),\n" " NativeArrayBuffer: findType(\"NativeArrayBuffer\"),\n" " NativeTypedArrayOfInt: findType(\"NativeTypedArrayOfInt\"),\n" " NativeUint8List: findType(\"NativeUint8List\"),\n" @@ -22688,11 +22108,9 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " SplayTreeSet_String: findType(\"SplayTreeSet\"),\n" " StackTrace: findType(\"StackTrace\"),\n" " StreamQueue_DebugEvent: findType(\"StreamQueue\"),\n" -" Stream_dynamic: findType(\"Stream<@>\"),\n" " StreamedResponse: findType(\"StreamedResponse\"),\n" " String: findType(\"String\"),\n" " String_Function_Match: findType(\"String(Match)\"),\n" -" Timer: findType(\"Timer\"),\n" " TrustedGetRuntimeType: findType(\"TrustedGetRuntimeType\"),\n" " TwoPhaseRestarter: findType(\"TwoPhaseRestarter\"),\n" " TypeError: findType(\"TypeError\"),\n" @@ -22706,8 +22124,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " WebSocket: findType(\"WebSocket\"),\n" " WebSocketEvent: findType(\"WebSocketEvent\"),\n" " WhereTypeIterable_String: findType(\"WhereTypeIterable\"),\n" -" Zone: findType(\"Zone\"),\n" -" ZoneDelegate: findType(\"ZoneDelegate\"),\n" " _AsyncCompleter_BrowserWebSocket: findType(\"_AsyncCompleter\"),\n" " _AsyncCompleter_PoolResource: findType(\"_AsyncCompleter\"),\n" " _AsyncCompleter_String: findType(\"_AsyncCompleter\"),\n" @@ -22729,6 +22145,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _Highlight: findType(\"_Highlight\"),\n" " _IdentityHashMap_of_nullable_Object_and_nullable_Object: findType(\"_IdentityHashMap\"),\n" " _Line: findType(\"_Line\"),\n" +" _MultiStream_List_int: findType(\"_MultiStream>\"),\n" " _StreamControllerAddStreamState_nullable_Object: findType(\"_StreamControllerAddStreamState\"),\n" " _SyncCompleter_PoolResource: findType(\"_SyncCompleter\"),\n" " bool: findType(\"bool\"),\n" @@ -22752,13 +22169,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " nullable_StackTrace: findType(\"StackTrace?\"),\n" " nullable_String: findType(\"String?\"),\n" " nullable_String_Function_Match: findType(\"String(Match)?\"),\n" -" nullable_Zone: findType(\"Zone?\"),\n" -" nullable_ZoneDelegate: findType(\"ZoneDelegate?\"),\n" " nullable__DelayedEvent_dynamic: findType(\"_DelayedEvent<@>?\"),\n" " nullable__FutureListener_dynamic_dynamic: findType(\"_FutureListener<@,@>?\"),\n" " nullable__Highlight: findType(\"_Highlight?\"),\n" " nullable_bool: findType(\"bool?\"),\n" -" nullable_bool_Function_Object: findType(\"bool(Object)?\"),\n" " nullable_double: findType(\"double?\"),\n" " nullable_int: findType(\"int?\"),\n" " nullable_num: findType(\"num?\"),\n" @@ -22771,7 +22185,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " void_Function_Object: findType(\"~(Object)\"),\n" " void_Function_Object_StackTrace: findType(\"~(Object,StackTrace)\"),\n" " void_Function_String_dynamic: findType(\"~(String,@)\"),\n" -" void_Function_Timer: findType(\"~(Timer)\"),\n" " void_Function_int_dynamic: findType(\"~(int,@)\")\n" " };\n" " })();\n" @@ -22931,8 +22344,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " B.C_Uuid = new A.Uuid();\n" " B.C__DelayedDone = new A._DelayedDone();\n" " B.C__JSRandom = new A._JSRandom();\n" -" B.C__RootZone = new A._RootZone();\n" -" B.C__ZoneCreatePeriodicTimer = new A._ZoneCreatePeriodicTimer();\n" " B.Duration_0 = new A.Duration(0);\n" " B.Duration_5000000 = new A.Duration(5000000);\n" " B.JsonDecoder_null = new A.JsonDecoder(null);\n" @@ -22968,21 +22379,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " B.Type_Uint8ClampedList_04U = A.typeLiteral(\"Uint8ClampedList\");\n" " B.Type_Uint8List_8Eb = A.typeLiteral(\"Uint8List\");\n" " B.Utf8Decoder_false = new A.Utf8Decoder(false);\n" +" B.Zone_jYP = new A.Zone(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null);\n" " B._StringStackTrace_OdL = new A._StringStackTrace(\"\");\n" -" B._ZoneCreateTimer__RootZone__rootCreateTimer = new A._ZoneCreateTimer(B.C__RootZone, A.async___rootCreateTimer\$closure());\n" -" B._ZoneErrorCallback__RootZone__rootErrorCallback = new A._ZoneErrorCallback(B.C__RootZone, A.async___rootErrorCallback\$closure());\n" -" B._ZoneFork__RootZone__rootFork = new A._ZoneFork(B.C__RootZone, A.async___rootFork\$closure());\n" -" B._ZoneHandleUncaughtError_wQ6 = new A._ZoneHandleUncaughtError(B.C__RootZone, A.async___rootHandleUncaughtError\$closure());\n" -" B._ZonePrint__RootZone__rootPrint = new A._ZonePrint(B.C__RootZone, A.async___rootPrint\$closure());\n" -" B._ZoneRegisterBinaryCallback_sk0 = new A._ZoneRegisterBinaryCallback(B.C__RootZone, A.async___rootRegisterBinaryCallback\$closure());\n" -" B._ZoneRegisterCallback__RootZone__rootRegisterCallback = new A._ZoneRegisterCallback(B.C__RootZone, A.async___rootRegisterCallback\$closure());\n" -" B._ZoneRegisterUnaryCallback_a9v = new A._ZoneRegisterUnaryCallback(B.C__RootZone, A.async___rootRegisterUnaryCallback\$closure());\n" -" B._ZoneRunBinary__RootZone__rootRunBinary = new A._ZoneRunBinary(B.C__RootZone, A.async___rootRunBinary\$closure());\n" -" B._ZoneRunUnary__RootZone__rootRunUnary = new A._ZoneRunUnary(B.C__RootZone, A.async___rootRunUnary\$closure());\n" -" B._ZoneRun__RootZone__rootRun = new A._ZoneRun(B.C__RootZone, A.async___rootRun\$closure());\n" -" B._ZoneScheduleMicrotask__RootZone__rootScheduleMicrotask = new A._ZoneScheduleMicrotask(B.C__RootZone, A.async___rootScheduleMicrotask\$closure());\n" -" B.Map_empty1 = new A.ConstantStringMap(B.Object_empty, [], A.findType(\"ConstantStringMap\"));\n" -" B._ZoneValues__RootZone_Map_empty = new A._ZoneValues(B.C__RootZone, B.Map_empty1);\n" " })();\n" " (function staticFields() {\n" " \$._JS_INTEROP_INTERCEPTOR_TAG = null;\n" @@ -23002,8 +22400,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " \$._lastCallback = null;\n" " \$._lastPriorityCallback = null;\n" " \$._isInCallbackLoop = false;\n" -" \$.Zone__current = B.C__RootZone;\n" -" \$._RootZone__rootDelegate = null;\n" +" \$.Zone__current = B.Zone_jYP;\n" " \$.Uri__cachedBaseString = \"\";\n" " \$.Uri__cachedBaseUri = null;\n" " \$.LogRecord__nextNumber = 0;\n" @@ -23016,7 +22413,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " var _lazyFinal = hunkHelpers.lazyFinal;\n" " _lazyFinal(\$, \"DART_CLOSURE_PROPERTY_NAME\", \"\$get\$DART_CLOSURE_PROPERTY_NAME\", () => A.getIsolateAffinityTag(\"_\$dart_dartClosure\"));\n" " _lazyFinal(\$, \"DART_CLOSURE_DART_JSINTEROP_PROPERTY_NAME\", \"\$get\$DART_CLOSURE_DART_JSINTEROP_PROPERTY_NAME\", () => A.getIsolateAffinityTag(\"_\$dart_dartClosure_dartJSInterop\"));\n" -" _lazyFinal(\$, \"nullFuture\", \"\$get\$nullFuture\", () => B.C__RootZone.run\$1\$1(new A.nullFuture_closure(), type\$.Future_void));\n" +" _lazyFinal(\$, \"nullFuture\", \"\$get\$nullFuture\", () => B.Zone_jYP.run\$1\$1(new A.nullFuture_closure(), type\$.Future_void));\n" " _lazyFinal(\$, \"_safeToStringHooks\", \"\$get\$_safeToStringHooks\", () => A._setArrayType([new J.JSArraySafeToStringHook()], A.findType(\"JSArray\")));\n" " _lazyFinal(\$, \"TypeErrorDecoder_noSuchMethodPattern\", \"\$get\$TypeErrorDecoder_noSuchMethodPattern\", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokeCallErrorOn({\n" " toString: function() {\n" @@ -23064,6 +22461,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }()));\n" " _lazyFinal(\$, \"_AsyncRun__scheduleImmediateClosure\", \"\$get\$_AsyncRun__scheduleImmediateClosure\", () => A._AsyncRun__initializeScheduleImmediate());\n" " _lazyFinal(\$, \"Future__nullFuture\", \"\$get\$Future__nullFuture\", () => \$.\$get\$nullFuture());\n" +" _lazyFinal(\$, \"_rootDelegate\", \"\$get\$_rootDelegate\", () => A.ZoneDelegate\$_());\n" " _lazyFinal(\$, \"_Utf8Decoder__reusableBuffer\", \"\$get\$_Utf8Decoder__reusableBuffer\", () => A.NativeUint8List_NativeUint8List(4096));\n" " _lazyFinal(\$, \"_Utf8Decoder__decoder\", \"\$get\$_Utf8Decoder__decoder\", () => new A._Utf8Decoder__decoder_closure().call\$0());\n" " _lazyFinal(\$, \"_Utf8Decoder__decoderNonfatal\", \"\$get\$_Utf8Decoder__decoderNonfatal\", () => new A._Utf8Decoder__decoderNonfatal_closure().call\$0());\n" @@ -23153,11 +22551,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " Function.prototype.call\$0 = function() {\n" " return this();\n" " };\n" -" Function.prototype.call\$1\$1 = function(a) {\n" -" return this(a);\n" -" };\n" -" Function.prototype.call\$3\$3 = function(a, b, c) {\n" -" return this(a, b, c);\n" +" Function.prototype.call\$1\$4 = function(a, b, c, d) {\n" +" return this(a, b, c, d);\n" " };\n" " Function.prototype.call\$5 = function(a, b, c, d, e) {\n" " return this(a, b, c, d, e);\n" @@ -23165,38 +22560,23 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " Function.prototype.call\$3 = function(a, b, c) {\n" " return this(a, b, c);\n" " };\n" -" Function.prototype.call\$3\$6 = function(a, b, c, d, e, f) {\n" -" return this(a, b, c, d, e, f);\n" -" };\n" -" Function.prototype.call\$1\$4 = function(a, b, c, d) {\n" -" return this(a, b, c, d);\n" -" };\n" -" Function.prototype.call\$2\$1 = function(a) {\n" -" return this(a);\n" -" };\n" " Function.prototype.call\$4 = function(a, b, c, d) {\n" " return this(a, b, c, d);\n" " };\n" -" Function.prototype.call\$3\$1 = function(a) {\n" -" return this(a);\n" +" Function.prototype.call\$3\$6 = function(a, b, c, d, e, f) {\n" +" return this(a, b, c, d, e, f);\n" " };\n" " Function.prototype.call\$3\$4 = function(a, b, c, d) {\n" " return this(a, b, c, d);\n" " };\n" -" Function.prototype.call\$2\$4 = function(a, b, c, d) {\n" -" return this(a, b, c, d);\n" -" };\n" -" Function.prototype.call\$2\$2 = function(a, b) {\n" -" return this(a, b);\n" -" };\n" " Function.prototype.call\$2\$5 = function(a, b, c, d, e) {\n" " return this(a, b, c, d, e);\n" " };\n" -" Function.prototype.call\$2\$3 = function(a, b, c) {\n" -" return this(a, b, c);\n" +" Function.prototype.call\$2\$4 = function(a, b, c, d) {\n" +" return this(a, b, c, d);\n" " };\n" -" Function.prototype.call\$1\$2 = function(a, b) {\n" -" return this(a, b);\n" +" Function.prototype.call\$1\$1 = function(a) {\n" +" return this(a);\n" " };\n" " Function.prototype.call\$2\$0 = function() {\n" " return this();\n" diff --git a/dwds/test/integration/breakpoint_amd_test.dart b/dwds/test/integration/breakpoint_amd_test.dart index 1a5052829a..88b785934e 100644 --- a/dwds/test/integration/breakpoint_amd_test.dart +++ b/dwds/test/integration/breakpoint_amd_test.dart @@ -24,13 +24,6 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - testBreakpoint( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - ); - }); - group('Frontend Server |', () { testBreakpoint( provider: provider, diff --git a/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart b/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart index 620b58939b..a072ed6dd7 100644 --- a/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart +++ b/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart @@ -25,20 +25,6 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - testBreakpoint( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - ); - }); - - group('Build Daemon and Frontend Server |', () { - testBreakpoint( - provider: provider, - compilationMode: CompilationMode.buildDaemonAndFrontendServer, - ); - }); - group('Frontend Server |', () { testBreakpoint( provider: provider, diff --git a/dwds/test/integration/callstack_amd_test.dart b/dwds/test/integration/callstack_amd_test.dart index 9b016fdc9a..4f2af882ee 100644 --- a/dwds/test/integration/callstack_amd_test.dart +++ b/dwds/test/integration/callstack_amd_test.dart @@ -24,13 +24,6 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - testCallStack( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - ); - }); - group('Frontend Server |', () { testCallStack( provider: provider, diff --git a/dwds/test/integration/callstack_ddc_library_bundle_test.dart b/dwds/test/integration/callstack_ddc_library_bundle_test.dart index bb411562aa..d7bc92570c 100644 --- a/dwds/test/integration/callstack_ddc_library_bundle_test.dart +++ b/dwds/test/integration/callstack_ddc_library_bundle_test.dart @@ -25,20 +25,6 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - testCallStack( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - ); - }); - - group('Build Daemon and Frontend Server |', () { - testCallStack( - provider: provider, - compilationMode: CompilationMode.buildDaemonAndFrontendServer, - ); - }); - group('Frontend Server |', () { testCallStack( provider: provider, diff --git a/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart b/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart index ea4ff46927..94a3af140f 100644 --- a/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart +++ b/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart @@ -33,41 +33,7 @@ void main() { runTests( provider: provider, moduleFormat: moduleFormat, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: $canaryFeatures | Build Daemon |', () { - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: moduleFormat, - ); - - tearDownAll(provider.dispose); - - runTests( - provider: provider, - moduleFormat: moduleFormat, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: $canaryFeatures | Build Daemon and Frontend Server |', () { - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: moduleFormat, - ); - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; - tearDownAll(provider.dispose); - - runTests( - provider: provider, - moduleFormat: moduleFormat, - compilationMode: compilationMode, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/circular_evaluate_amd_test.dart b/dwds/test/integration/circular_evaluate_amd_test.dart index 84f2c4e639..47839a2e2f 100644 --- a/dwds/test/integration/circular_evaluate_amd_test.dart +++ b/dwds/test/integration/circular_evaluate_amd_test.dart @@ -28,10 +28,6 @@ void main() async { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); - }); - group('Frontend Server |', () { group('Context with circular dependencies |', () { for (final indexBaseMode in IndexBaseMode.values) { diff --git a/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart b/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart index 15766b613a..d59a791e25 100644 --- a/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart +++ b/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart @@ -29,17 +29,6 @@ void main() async { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); - }); - - group('Build Daemon and Frontend Server |', () { - testAll( - provider: provider, - compilationMode: CompilationMode.buildDaemonAndFrontendServer, - ); - }); - group('Frontend Server |', () { group('Context with circular dependencies |', () { for (final indexBaseMode in IndexBaseMode.values) { diff --git a/dwds/test/integration/dart_uri_file_uri_amd_test.dart b/dwds/test/integration/dart_uri_file_uri_amd_test.dart index d4a43f5c13..5924eb7df4 100644 --- a/dwds/test/integration/dart_uri_file_uri_amd_test.dart +++ b/dwds/test/integration/dart_uri_file_uri_amd_test.dart @@ -24,10 +24,6 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - runTests(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); - }); - group('Frontend Server |', () { runTests( provider: provider, diff --git a/dwds/test/integration/dart_uri_file_uri_ddc_library_bundle_test.dart b/dwds/test/integration/dart_uri_file_uri_ddc_library_bundle_test.dart index 0aa776425b..d2804fc34a 100644 --- a/dwds/test/integration/dart_uri_file_uri_ddc_library_bundle_test.dart +++ b/dwds/test/integration/dart_uri_file_uri_ddc_library_bundle_test.dart @@ -25,17 +25,6 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - runTests(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); - }); - - group('Build Daemon and Frontend Server |', () { - runTests( - provider: provider, - contextFactory: (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider), - ); - }); - group('Frontend Server |', () { runTests( provider: provider, diff --git a/dwds/test/integration/debug_service_amd_test.dart b/dwds/test/integration/debug_service_amd_test.dart index f59e6a74c8..eb6f5d2b86 100644 --- a/dwds/test/integration/debug_service_amd_test.dart +++ b/dwds/test/integration/debug_service_amd_test.dart @@ -18,5 +18,5 @@ void main() { final provider = TestSdkConfigurationProvider(verbose: debug); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); } diff --git a/dwds/test/integration/debug_service_ddc_library_bundle_test.dart b/dwds/test/integration/debug_service_ddc_library_bundle_test.dart index 5d3b8842b6..c2978d59c9 100644 --- a/dwds/test/integration/debug_service_ddc_library_bundle_test.dart +++ b/dwds/test/integration/debug_service_ddc_library_bundle_test.dart @@ -24,5 +24,5 @@ void main() { ); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); } diff --git a/dwds/test/integration/devtools_amd_test.dart b/dwds/test/integration/devtools_amd_test.dart index 5fc51bdb7c..2ff69527fa 100644 --- a/dwds/test/integration/devtools_amd_test.dart +++ b/dwds/test/integration/devtools_amd_test.dart @@ -19,5 +19,5 @@ void main() { ); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); } diff --git a/dwds/test/integration/devtools_ddc_library_bundle_test.dart b/dwds/test/integration/devtools_ddc_library_bundle_test.dart index 7a6aca623d..886a5a3f13 100644 --- a/dwds/test/integration/devtools_ddc_library_bundle_test.dart +++ b/dwds/test/integration/devtools_ddc_library_bundle_test.dart @@ -20,5 +20,5 @@ void main() { ); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); } diff --git a/dwds/test/integration/evaluate_amd_test.dart b/dwds/test/integration/evaluate_amd_test.dart index 985911a52a..3cf9f3fcc8 100644 --- a/dwds/test/integration/evaluate_amd_test.dart +++ b/dwds/test/integration/evaluate_amd_test.dart @@ -30,10 +30,6 @@ void main() async { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); - }); - group('Frontend Server |', () { for (final useDebuggerModuleNames in [false, true]) { group('Debugger module names: $useDebuggerModuleNames |', () { diff --git a/dwds/test/integration/evaluate_ddc_library_bundle_test.dart b/dwds/test/integration/evaluate_ddc_library_bundle_test.dart index edce799375..605d5555c3 100644 --- a/dwds/test/integration/evaluate_ddc_library_bundle_test.dart +++ b/dwds/test/integration/evaluate_ddc_library_bundle_test.dart @@ -30,17 +30,6 @@ void main() async { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); - }); - - group('Build Daemon and Frontend Server |', () { - testAll( - provider: provider, - compilationMode: CompilationMode.buildDaemonAndFrontendServer, - ); - }); - group('Frontend Server |', () { for (final useDebuggerModuleNames in [false, true]) { group('Debugger module names: $useDebuggerModuleNames |', () { diff --git a/dwds/test/integration/events_amd_test.dart b/dwds/test/integration/events_amd_test.dart index 39578854bb..1667e75e8a 100644 --- a/dwds/test/integration/events_amd_test.dart +++ b/dwds/test/integration/events_amd_test.dart @@ -10,7 +10,6 @@ import 'dart:io'; import 'package:dwds/src/events.dart'; import 'package:dwds/src/utilities/server.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/events.dart'; import 'package:dwds_test_common/logging.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; @@ -78,11 +77,4 @@ void main() { await events; }); }); - - group('Build Daemon', () { - testWithDwds( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - ); - }); } diff --git a/dwds/test/integration/events_ddc_library_bundle_test.dart b/dwds/test/integration/events_ddc_library_bundle_test.dart index 2437cf08f9..b603fcc467 100644 --- a/dwds/test/integration/events_ddc_library_bundle_test.dart +++ b/dwds/test/integration/events_ddc_library_bundle_test.dart @@ -30,11 +30,4 @@ void main() { contextFactory: (project, provider) => FrontendServerTestContext(project, provider), ); }); - - group('Build Daemon', () { - testWithDwds( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - ); - }); } diff --git a/dwds/test/integration/expression_compiler_service_amd_test.dart b/dwds/test/integration/expression_compiler_service_amd_test.dart index 928b5a9075..e880f2b283 100644 --- a/dwds/test/integration/expression_compiler_service_amd_test.dart +++ b/dwds/test/integration/expression_compiler_service_amd_test.dart @@ -21,7 +21,7 @@ void main() async { canaryFeatures: false, experiments: const [], ), - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), ); } diff --git a/dwds/test/integration/expression_compiler_service_ddc_library_bundle_test.dart b/dwds/test/integration/expression_compiler_service_ddc_library_bundle_test.dart index 58a1f62cf1..bf88ddc965 100644 --- a/dwds/test/integration/expression_compiler_service_ddc_library_bundle_test.dart +++ b/dwds/test/integration/expression_compiler_service_ddc_library_bundle_test.dart @@ -21,7 +21,7 @@ void main() async { canaryFeatures: true, experiments: const [], ), - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), ); } diff --git a/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart b/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart index aac058eaac..a3f59ef25c 100644 --- a/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart +++ b/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart @@ -32,11 +32,4 @@ void main() { contextFactory: (project, provider) => FrontendServerTestContext(project, provider), ); }); - - group('Build Daemon and Frontend Server', () { - runTests( - provider: provider, - compilationMode: CompilationMode.buildDaemonAndFrontendServer, - ); - }); } diff --git a/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart b/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart index f6102c78f8..271245ec6a 100644 --- a/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart +++ b/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart @@ -32,11 +32,4 @@ void main() { contextFactory: (project, provider) => FrontendServerTestContext(project, provider), ); }); - - group('Build Daemon and Frontend Server', () { - runTests( - provider: provider, - compilationMode: CompilationMode.buildDaemonAndFrontendServer, - ); - }); } 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 89fe2dd242..6587a7681f 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,15 +32,4 @@ void main() { contextFactory: (project, provider) => FrontendServerTestContext(project, provider), ); }); - - group('Build Daemon', () { - runTests(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); - }); - - group('Build Daemon and Frontend Server', () { - runTests( - provider: provider, - compilationMode: CompilationMode.buildDaemonAndFrontendServer, - ); - }); } 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 b2a7c18357..3d357d2a60 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 @@ -31,37 +31,7 @@ void main() { runTests( provider: provider, moduleFormat: moduleFormat, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: $canaryFeatures | Build Daemon |', () { - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: moduleFormat, - ); - - runTests( - provider: provider, - moduleFormat: moduleFormat, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: $canaryFeatures | Build Daemon and Frontend Server |', () { - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: moduleFormat, - ); - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; - runTests( - provider: provider, - moduleFormat: moduleFormat, - compilationMode: compilationMode, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); 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 0840567494..9f3ac39f63 100644 --- a/dwds/test/integration/hot_restart_ddc_library_bundle_test.dart +++ b/dwds/test/integration/hot_restart_ddc_library_bundle_test.dart @@ -32,38 +32,7 @@ void main() { runTests( provider: provider, moduleFormat: moduleFormat, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: $canaryFeatures | Build Daemon |', () { - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: moduleFormat, - ); - - runTests( - provider: provider, - moduleFormat: moduleFormat, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: $canaryFeatures | Build Daemon and Frontend Server |', () { - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: moduleFormat, - ); - runTests( - provider: provider, - moduleFormat: moduleFormat, - compilationMode: compilationMode, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/class_inspection_amd_test.dart b/dwds/test/integration/instances/class_inspection_amd_test.dart index b1edca6731..f27e778fea 100644 --- a/dwds/test/integration/instances/class_inspection_amd_test.dart +++ b/dwds/test/integration/instances/class_inspection_amd_test.dart @@ -19,40 +19,6 @@ void main() { // Enable verbose logging for debugging. const debug = false; - group('canary: false | Build Daemon |', () { - final canaryFeatures = false; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - group('canary: false | Frontend Server |', () { final canaryFeatures = false; @@ -65,7 +31,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); @@ -82,7 +48,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart index e84a578063..d670689444 100644 --- a/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart @@ -31,41 +31,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon and Frontend Server |', () { - final canaryFeatures = true; - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/dot_shorthands_amd_test.dart b/dwds/test/integration/instances/dot_shorthands_amd_test.dart index 00ba23d413..9a603373d5 100644 --- a/dwds/test/integration/instances/dot_shorthands_amd_test.dart +++ b/dwds/test/integration/instances/dot_shorthands_amd_test.dart @@ -19,40 +19,6 @@ void main() { // Enable verbose logging for debugging. const debug = false; - group('canary: false | Build Daemon |', () { - final canaryFeatures = false; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - group('canary: false | Frontend Server |', () { final canaryFeatures = false; @@ -65,7 +31,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); @@ -82,7 +48,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart b/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart index e7cd1b401f..9ea12ad65f 100644 --- a/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart @@ -31,41 +31,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon and Frontend Server |', () { - final canaryFeatures = true; - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/instance_amd_test.dart b/dwds/test/integration/instances/instance_amd_test.dart index df82cbc13a..920aa5ee8c 100644 --- a/dwds/test/integration/instances/instance_amd_test.dart +++ b/dwds/test/integration/instances/instance_amd_test.dart @@ -19,52 +19,6 @@ void main() { const debug = false; final moduleFormat = ModuleFormat.amd; - group('canary: false | Build Daemon |', () { - final canaryFeatures = false; - - final provider = TestSdkConfigurationProvider( - canaryFeatures: canaryFeatures, - verbose: debug, - ddcModuleFormat: moduleFormat, - ); - tearDownAll(provider.dispose); - - runTypeSystemVerificationTests( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - - runTests( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - - final provider = TestSdkConfigurationProvider( - canaryFeatures: canaryFeatures, - verbose: debug, - ddcModuleFormat: moduleFormat, - ); - tearDownAll(provider.dispose); - - runTypeSystemVerificationTests( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - - runTests( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - group('canary: false | Frontend Server |', () { final canaryFeatures = false; @@ -77,13 +31,13 @@ void main() { runTypeSystemVerificationTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); runTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); @@ -100,13 +54,13 @@ void main() { runTypeSystemVerificationTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); runTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart b/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart index 766e5fd993..7f429d4e4f 100644 --- a/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart @@ -31,39 +31,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - - final provider = TestSdkConfigurationProvider( - canaryFeatures: canaryFeatures, - verbose: debug, - ddcModuleFormat: moduleFormat, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon and Frontend Server |', () { - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; - final provider = TestSdkConfigurationProvider( - canaryFeatures: canaryFeatures, - verbose: debug, - ddcModuleFormat: moduleFormat, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/instance_inspection_amd_test.dart b/dwds/test/integration/instances/instance_inspection_amd_test.dart index 81804f8b3d..19cac7fb9a 100644 --- a/dwds/test/integration/instances/instance_inspection_amd_test.dart +++ b/dwds/test/integration/instances/instance_inspection_amd_test.dart @@ -19,40 +19,6 @@ void main() { // Enable verbose logging for debugging. const debug = false; - group('canary: false | Build Daemon |', () { - final canaryFeatures = false; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - group('canary: false | Frontend Server |', () { final canaryFeatures = false; @@ -65,7 +31,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); @@ -82,7 +48,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart index e98cfd607b..bbbc6015d2 100644 --- a/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart @@ -35,38 +35,4 @@ void main() { canaryFeatures: canaryFeatures, ); }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - final compilationMode = CompilationMode.buildDaemon; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon and Frontend Server |', () { - final canaryFeatures = true; - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); } diff --git a/dwds/test/integration/instances/patterns_inspection_amd_test.dart b/dwds/test/integration/instances/patterns_inspection_amd_test.dart index 194ef6aea8..7153427a3a 100644 --- a/dwds/test/integration/instances/patterns_inspection_amd_test.dart +++ b/dwds/test/integration/instances/patterns_inspection_amd_test.dart @@ -19,40 +19,6 @@ void main() { // Enable verbose logging for debugging. const debug = false; - group('canary: false | Build Daemon |', () { - final canaryFeatures = false; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - group('canary: false | Frontend Server |', () { final canaryFeatures = false; @@ -65,7 +31,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); @@ -82,7 +48,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart index 97f4feaec2..04917d07b4 100644 --- a/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart @@ -31,41 +31,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon and Frontend Server |', () { - final canaryFeatures = true; - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/record_inspection_amd_test.dart b/dwds/test/integration/instances/record_inspection_amd_test.dart index 84ab168228..b51d76678e 100644 --- a/dwds/test/integration/instances/record_inspection_amd_test.dart +++ b/dwds/test/integration/instances/record_inspection_amd_test.dart @@ -19,40 +19,6 @@ void main() { // Enable verbose logging for debugging. const debug = false; - group('canary: false | Build Daemon |', () { - final canaryFeatures = false; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - group('canary: false | Frontend Server |', () { final canaryFeatures = false; @@ -65,7 +31,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); @@ -82,7 +48,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart index da7e976ba6..b835867395 100644 --- a/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart @@ -30,37 +30,7 @@ void main() { tearDownAll(provider.dispose); runTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - runTests( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon and Frontend Server |', () { - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - runTests( - provider: provider, - compilationMode: compilationMode, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/record_type_inspection_amd_test.dart b/dwds/test/integration/instances/record_type_inspection_amd_test.dart index 656bfe7a1b..1714a55c95 100644 --- a/dwds/test/integration/instances/record_type_inspection_amd_test.dart +++ b/dwds/test/integration/instances/record_type_inspection_amd_test.dart @@ -19,40 +19,6 @@ void main() { // Enable verbose logging for debugging. const debug = false; - group('canary: false | Build Daemon |', () { - final canaryFeatures = false; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - group('canary: false | Frontend Server |', () { final canaryFeatures = false; @@ -65,7 +31,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); @@ -82,7 +48,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart index 61f3445739..3cdf845e83 100644 --- a/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart @@ -30,37 +30,7 @@ void main() { tearDownAll(provider.dispose); runTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - runTests( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon and Frontend Server |', () { - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - runTests( - provider: provider, - compilationMode: compilationMode, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/type_inspection_amd_test.dart b/dwds/test/integration/instances/type_inspection_amd_test.dart index 278af6fa72..0cb79b5eb7 100644 --- a/dwds/test/integration/instances/type_inspection_amd_test.dart +++ b/dwds/test/integration/instances/type_inspection_amd_test.dart @@ -19,40 +19,6 @@ void main() { // Enable verbose logging for debugging. const debug = false; - group('canary: false | Build Daemon |', () { - final canaryFeatures = false; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - group('canary: false | Frontend Server |', () { final canaryFeatures = false; @@ -65,7 +31,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); @@ -82,7 +48,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart index a41764ea80..9f6346902d 100644 --- a/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart @@ -31,41 +31,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon and Frontend Server |', () { - final canaryFeatures = true; - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/listviews_amd_test.dart b/dwds/test/integration/listviews_amd_test.dart index 250c947beb..449b0d8006 100644 --- a/dwds/test/integration/listviews_amd_test.dart +++ b/dwds/test/integration/listviews_amd_test.dart @@ -24,10 +24,6 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - runTests(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); - }); - group('Frontend Server |', () { runTests( provider: provider, diff --git a/dwds/test/integration/listviews_ddc_library_bundle_test.dart b/dwds/test/integration/listviews_ddc_library_bundle_test.dart index 873b0da3f2..1de002eef4 100644 --- a/dwds/test/integration/listviews_ddc_library_bundle_test.dart +++ b/dwds/test/integration/listviews_ddc_library_bundle_test.dart @@ -25,17 +25,6 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - runTests(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); - }); - - group('Build Daemon and Frontend Server |', () { - runTests( - provider: provider, - contextFactory: (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider), - ); - }); - group('Frontend Server |', () { runTests( provider: provider, diff --git a/dwds/test/integration/load_strategy_amd_test.dart b/dwds/test/integration/load_strategy_amd_test.dart index abb9b045cc..75d3f7ed5b 100644 --- a/dwds/test/integration/load_strategy_amd_test.dart +++ b/dwds/test/integration/load_strategy_amd_test.dart @@ -27,13 +27,6 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - runDependentTests( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - ); - }); - group('Frontend Server |', () { runDependentTests( provider: provider, diff --git a/dwds/test/integration/load_strategy_ddc_library_bundle_test.dart b/dwds/test/integration/load_strategy_ddc_library_bundle_test.dart index f249e7a44d..0fe8a6a602 100644 --- a/dwds/test/integration/load_strategy_ddc_library_bundle_test.dart +++ b/dwds/test/integration/load_strategy_ddc_library_bundle_test.dart @@ -28,20 +28,6 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - runDependentTests( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - ); - }); - - group('Build Daemon and Frontend Server |', () { - runDependentTests( - provider: provider, - contextFactory: (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider), - ); - }); - group('Frontend Server |', () { runDependentTests( provider: provider, diff --git a/dwds/test/integration/parts_evaluate_amd_test.dart b/dwds/test/integration/parts_evaluate_amd_test.dart index 130886bdd0..d7e05e3d85 100644 --- a/dwds/test/integration/parts_evaluate_amd_test.dart +++ b/dwds/test/integration/parts_evaluate_amd_test.dart @@ -28,10 +28,6 @@ void main() async { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); - }); - group('Frontend Server |', () { group('Context with parts |', () { for (final indexBaseMode in IndexBaseMode.values) { diff --git a/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart b/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart index 3dee26508c..384ad0f593 100644 --- a/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart +++ b/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart @@ -29,17 +29,6 @@ void main() async { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); - }); - - group('Build Daemon and Frontend Server |', () { - testAll( - provider: provider, - compilationMode: CompilationMode.buildDaemonAndFrontendServer, - ); - }); - group('Frontend Server |', () { group('Context with parts |', () { for (final indexBaseMode in IndexBaseMode.values) { diff --git a/dwds/test/integration/refresh_amd_test.dart b/dwds/test/integration/refresh_amd_test.dart index 48f6c8fac4..2585a024df 100644 --- a/dwds/test/integration/refresh_amd_test.dart +++ b/dwds/test/integration/refresh_amd_test.dart @@ -18,5 +18,5 @@ void main() { final provider = TestSdkConfigurationProvider(); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); } diff --git a/dwds/test/integration/refresh_ddc_library_bundle_test.dart b/dwds/test/integration/refresh_ddc_library_bundle_test.dart index e494ac51d0..7e3a2bfe72 100644 --- a/dwds/test/integration/refresh_ddc_library_bundle_test.dart +++ b/dwds/test/integration/refresh_ddc_library_bundle_test.dart @@ -27,5 +27,5 @@ void main() { ); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); } diff --git a/dwds/test/integration/run_request_amd_test.dart b/dwds/test/integration/run_request_amd_test.dart index 492ceffbc2..f6af61f753 100644 --- a/dwds/test/integration/run_request_amd_test.dart +++ b/dwds/test/integration/run_request_amd_test.dart @@ -22,5 +22,5 @@ void main() { ); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); } diff --git a/dwds/test/integration/run_request_ddc_library_bundle_test.dart b/dwds/test/integration/run_request_ddc_library_bundle_test.dart index 38959376b7..96c8226719 100644 --- a/dwds/test/integration/run_request_ddc_library_bundle_test.dart +++ b/dwds/test/integration/run_request_ddc_library_bundle_test.dart @@ -23,5 +23,5 @@ void main() { ); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); } diff --git a/dwds/test/integration/screenshot_amd_test.dart b/dwds/test/integration/screenshot_amd_test.dart index 7b0f0a2096..eb22b371a8 100644 --- a/dwds/test/integration/screenshot_amd_test.dart +++ b/dwds/test/integration/screenshot_amd_test.dart @@ -18,5 +18,5 @@ void main() { ); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); } diff --git a/dwds/test/integration/screenshot_ddc_library_bundle_test.dart b/dwds/test/integration/screenshot_ddc_library_bundle_test.dart index 2dcef1cab9..e130cea7a6 100644 --- a/dwds/test/integration/screenshot_ddc_library_bundle_test.dart +++ b/dwds/test/integration/screenshot_ddc_library_bundle_test.dart @@ -24,5 +24,5 @@ void main() { ); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); } diff --git a/dwds/test/integration/variable_scope_amd_test.dart b/dwds/test/integration/variable_scope_amd_test.dart index 5ae6337b78..2c6ed4456d 100644 --- a/dwds/test/integration/variable_scope_amd_test.dart +++ b/dwds/test/integration/variable_scope_amd_test.dart @@ -19,5 +19,5 @@ void main() { final provider = TestSdkConfigurationProvider(verbose: debug); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); } diff --git a/dwds/test/integration/variable_scope_ddc_library_bundle_test.dart b/dwds/test/integration/variable_scope_ddc_library_bundle_test.dart index d733ea15bd..0e5f05e655 100644 --- a/dwds/test/integration/variable_scope_ddc_library_bundle_test.dart +++ b/dwds/test/integration/variable_scope_ddc_library_bundle_test.dart @@ -25,5 +25,5 @@ void main() { ); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); } diff --git a/webdev/test/breakpoint_amd_test.dart b/webdev/test/breakpoint_amd_test.dart new file mode 100644 index 0000000000..79a6f3488c --- /dev/null +++ b/webdev/test/breakpoint_amd_test.dart @@ -0,0 +1,32 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/breakpoint.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + testBreakpoint( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + ); + }); +} diff --git a/webdev/test/breakpoint_ddc_library_bundle_test.dart b/webdev/test/breakpoint_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..7e874c90a9 --- /dev/null +++ b/webdev/test/breakpoint_ddc_library_bundle_test.dart @@ -0,0 +1,40 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/breakpoint.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + testBreakpoint( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + ); + }); + + group('Build Daemon and Frontend Server |', () { + testBreakpoint( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + ); + }); +} diff --git a/webdev/test/callstack_amd_test.dart b/webdev/test/callstack_amd_test.dart new file mode 100644 index 0000000000..f6a8033c77 --- /dev/null +++ b/webdev/test/callstack_amd_test.dart @@ -0,0 +1,32 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/callstack.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + testCallStack( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + ); + }); +} diff --git a/webdev/test/callstack_ddc_library_bundle_test.dart b/webdev/test/callstack_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..fe74be82b7 --- /dev/null +++ b/webdev/test/callstack_ddc_library_bundle_test.dart @@ -0,0 +1,40 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/callstack.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + testCallStack( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + ); + }); + + group('Build Daemon and Frontend Server |', () { + testCallStack( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + ); + }); +} diff --git a/dwds/test/integration/chrome_proxy_service_amd_test.dart b/webdev/test/chrome_proxy_service_amd_test.dart similarity index 100% rename from dwds/test/integration/chrome_proxy_service_amd_test.dart rename to webdev/test/chrome_proxy_service_amd_test.dart diff --git a/webdev/test/chrome_proxy_service_ddc_library_bundle_test.dart b/webdev/test/chrome_proxy_service_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..fd07b5324f --- /dev/null +++ b/webdev/test/chrome_proxy_service_ddc_library_bundle_test.dart @@ -0,0 +1,56 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Tags(['daily']) +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/chrome_proxy_service.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final canaryFeatures = true; + final moduleFormat = ModuleFormat.ddc; + + group('canary: $canaryFeatures | Build Daemon |', () { + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: moduleFormat, + ); + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + moduleFormat: moduleFormat, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: $canaryFeatures | Build Daemon and Frontend Server |', () { + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: moduleFormat, + ); + final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + moduleFormat: moduleFormat, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/circular_evaluate_amd_test.dart b/webdev/test/circular_evaluate_amd_test.dart new file mode 100644 index 0000000000..cd161e2337 --- /dev/null +++ b/webdev/test/circular_evaluate_amd_test.dart @@ -0,0 +1,30 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 5)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/evaluate_circular.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() async { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + }); +} diff --git a/webdev/test/circular_evaluate_ddc_library_bundle_test.dart b/webdev/test/circular_evaluate_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..d98a047cb4 --- /dev/null +++ b/webdev/test/circular_evaluate_ddc_library_bundle_test.dart @@ -0,0 +1,38 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 5)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/evaluate_circular.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() async { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + }); + + group('Build Daemon and Frontend Server |', () { + testAll( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + ); + }); +} diff --git a/webdev/test/class_inspection_amd_test.dart b/webdev/test/class_inspection_amd_test.dart new file mode 100644 index 0000000000..0ebd77c64c --- /dev/null +++ b/webdev/test/class_inspection_amd_test.dart @@ -0,0 +1,54 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/class_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: false | Build Daemon |', () { + final canaryFeatures = false; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/class_inspection_ddc_library_bundle_test.dart b/webdev/test/class_inspection_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..8760bd664f --- /dev/null +++ b/webdev/test/class_inspection_ddc_library_bundle_test.dart @@ -0,0 +1,54 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/class_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/dart_uri_file_uri_amd_test.dart b/webdev/test/dart_uri_file_uri_amd_test.dart new file mode 100644 index 0000000000..57db580682 --- /dev/null +++ b/webdev/test/dart_uri_file_uri_amd_test.dart @@ -0,0 +1,29 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/dart_uri_file_uri.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + runTests(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + }); +} diff --git a/webdev/test/dart_uri_file_uri_ddc_library_bundle_test.dart b/webdev/test/dart_uri_file_uri_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..23c775f0b7 --- /dev/null +++ b/webdev/test/dart_uri_file_uri_ddc_library_bundle_test.dart @@ -0,0 +1,37 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/dart_uri_file_uri.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + runTests(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + }); + + group('Build Daemon and Frontend Server |', () { + runTests( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + ); + }); +} diff --git a/webdev/test/dot_shorthands_amd_test.dart b/webdev/test/dot_shorthands_amd_test.dart new file mode 100644 index 0000000000..d35ffb1d78 --- /dev/null +++ b/webdev/test/dot_shorthands_amd_test.dart @@ -0,0 +1,54 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/dot_shorthands.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: false | Build Daemon |', () { + final canaryFeatures = false; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/dot_shorthands_ddc_library_bundle_test.dart b/webdev/test/dot_shorthands_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..2edd0b0857 --- /dev/null +++ b/webdev/test/dot_shorthands_ddc_library_bundle_test.dart @@ -0,0 +1,54 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/dot_shorthands.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/evaluate_amd_test.dart b/webdev/test/evaluate_amd_test.dart new file mode 100644 index 0000000000..6e94e16f98 --- /dev/null +++ b/webdev/test/evaluate_amd_test.dart @@ -0,0 +1,33 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 5)) +library; + +import 'dart:io'; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/fixtures/project.dart'; +import 'package:dwds_test_common/integration/evaluate.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() async { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + }); +} diff --git a/webdev/test/evaluate_ddc_library_bundle_test.dart b/webdev/test/evaluate_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..ff2474fcf8 --- /dev/null +++ b/webdev/test/evaluate_ddc_library_bundle_test.dart @@ -0,0 +1,43 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 5)) +library; + +import 'dart:io'; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/fixtures/project.dart'; +import 'package:dwds_test_common/integration/evaluate.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() async { + // Enable verbose logging for debugging. + const debug = false; + + group('Canary: true |', () { + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + }); + + group('Build Daemon and Frontend Server |', () { + testAll( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + ); + }); + }); +} diff --git a/webdev/test/events_amd_test.dart b/webdev/test/events_amd_test.dart new file mode 100644 index 0000000000..122b9582d1 --- /dev/null +++ b/webdev/test/events_amd_test.dart @@ -0,0 +1,24 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/events.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + final provider = TestSdkConfigurationProvider(); + tearDownAll(provider.dispose); + + group('Build Daemon', () { + testWithDwds( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + ); + }); +} diff --git a/webdev/test/events_ddc_library_bundle_test.dart b/webdev/test/events_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..84be064bd0 --- /dev/null +++ b/webdev/test/events_ddc_library_bundle_test.dart @@ -0,0 +1,32 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/events.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final canary = true; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canary, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + group('Build Daemon', () { + testWithDwds( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + ); + }); +} diff --git a/webdev/test/hot_reload_breakpoints_ddc_library_bundle_test.dart b/webdev/test/hot_reload_breakpoints_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..9249273422 --- /dev/null +++ b/webdev/test/hot_reload_breakpoints_ddc_library_bundle_test.dart @@ -0,0 +1,34 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 5)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/hot_reload_breakpoints.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: true, + ddcModuleFormat: ModuleFormat.ddc, + ); + + tearDownAll(provider.dispose); + + group('Build Daemon and Frontend Server', () { + runTests( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + ); + }); +} diff --git a/webdev/test/hot_reload_ddc_library_bundle_test.dart b/webdev/test/hot_reload_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..97f857d921 --- /dev/null +++ b/webdev/test/hot_reload_ddc_library_bundle_test.dart @@ -0,0 +1,34 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 5)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/hot_reload.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: true, + ddcModuleFormat: ModuleFormat.ddc, + ); + + tearDownAll(provider.dispose); + + group('Build Daemon and Frontend Server', () { + runTests( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + ); + }); +} diff --git a/dwds/test/integration/hot_restart_amd_test.dart b/webdev/test/hot_restart_amd_test.dart similarity index 100% rename from dwds/test/integration/hot_restart_amd_test.dart rename to webdev/test/hot_restart_amd_test.dart diff --git a/webdev/test/hot_restart_breakpoints_ddc_library_bundle_test.dart b/webdev/test/hot_restart_breakpoints_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..f81ed09c45 --- /dev/null +++ b/webdev/test/hot_restart_breakpoints_ddc_library_bundle_test.dart @@ -0,0 +1,38 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 5)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/hot_restart_breakpoints.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: true, + ddcModuleFormat: ModuleFormat.ddc, + ); + + tearDownAll(provider.dispose); + + group('Build Daemon', () { + runTests(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + }); + + group('Build Daemon and Frontend Server', () { + runTests( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + ); + }); +} diff --git a/dwds/test/integration/hot_restart_correctness_amd_test.dart b/webdev/test/hot_restart_correctness_amd_test.dart similarity index 100% rename from dwds/test/integration/hot_restart_correctness_amd_test.dart rename to webdev/test/hot_restart_correctness_amd_test.dart diff --git a/webdev/test/hot_restart_correctness_ddc_library_bundle_test.dart b/webdev/test/hot_restart_correctness_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..f16f780989 --- /dev/null +++ b/webdev/test/hot_restart_correctness_ddc_library_bundle_test.dart @@ -0,0 +1,52 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Tags(['daily']) +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/hot_restart_correctness.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final canaryFeatures = true; + final moduleFormat = ModuleFormat.ddc; + + group('canary: $canaryFeatures | Build Daemon |', () { + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: moduleFormat, + ); + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + runTests( + provider: provider, + moduleFormat: moduleFormat, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: $canaryFeatures | Build Daemon and Frontend Server |', () { + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: moduleFormat, + ); + final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + runTests( + provider: provider, + moduleFormat: moduleFormat, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/hot_restart_ddc_library_bundle_test.dart b/webdev/test/hot_restart_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..fd8eb00f12 --- /dev/null +++ b/webdev/test/hot_restart_ddc_library_bundle_test.dart @@ -0,0 +1,53 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Tags(['daily']) +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/hot_restart.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final canaryFeatures = true; + final moduleFormat = ModuleFormat.ddc; + + group('canary: $canaryFeatures | Build Daemon |', () { + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: moduleFormat, + ); + + runTests( + provider: provider, + moduleFormat: moduleFormat, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: $canaryFeatures | Build Daemon and Frontend Server |', () { + final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: moduleFormat, + ); + runTests( + provider: provider, + moduleFormat: moduleFormat, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/instance_amd_test.dart b/webdev/test/instance_amd_test.dart new file mode 100644 index 0000000000..3ccfb3a607 --- /dev/null +++ b/webdev/test/instance_amd_test.dart @@ -0,0 +1,66 @@ +// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/instance.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final moduleFormat = ModuleFormat.amd; + + group('canary: false | Build Daemon |', () { + final canaryFeatures = false; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + canaryFeatures: canaryFeatures, + verbose: debug, + ddcModuleFormat: moduleFormat, + ); + tearDownAll(provider.dispose); + + runTypeSystemVerificationTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + canaryFeatures: canaryFeatures, + verbose: debug, + ddcModuleFormat: moduleFormat, + ); + tearDownAll(provider.dispose); + + runTypeSystemVerificationTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/instance_ddc_library_bundle_test.dart b/webdev/test/instance_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..0481dbeaca --- /dev/null +++ b/webdev/test/instance_ddc_library_bundle_test.dart @@ -0,0 +1,53 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/instance.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final canaryFeatures = true; + final moduleFormat = ModuleFormat.ddc; + + group('canary: true | Build Daemon |', () { + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + canaryFeatures: canaryFeatures, + verbose: debug, + ddcModuleFormat: moduleFormat, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + canaryFeatures: canaryFeatures, + verbose: debug, + ddcModuleFormat: moduleFormat, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/instance_inspection_amd_test.dart b/webdev/test/instance_inspection_amd_test.dart new file mode 100644 index 0000000000..6c902de4b5 --- /dev/null +++ b/webdev/test/instance_inspection_amd_test.dart @@ -0,0 +1,54 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/instance_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: false | Build Daemon |', () { + final canaryFeatures = false; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/instance_inspection_ddc_library_bundle_test.dart b/webdev/test/instance_inspection_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..955f050bb2 --- /dev/null +++ b/webdev/test/instance_inspection_ddc_library_bundle_test.dart @@ -0,0 +1,54 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/instance_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/listviews_amd_test.dart b/webdev/test/listviews_amd_test.dart new file mode 100644 index 0000000000..a51eef7ba0 --- /dev/null +++ b/webdev/test/listviews_amd_test.dart @@ -0,0 +1,29 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/listviews.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + runTests(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + }); +} diff --git a/webdev/test/listviews_ddc_library_bundle_test.dart b/webdev/test/listviews_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..eaca4982db --- /dev/null +++ b/webdev/test/listviews_ddc_library_bundle_test.dart @@ -0,0 +1,37 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/listviews.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + runTests(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + }); + + group('Build Daemon and Frontend Server |', () { + runTests( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + ); + }); +} diff --git a/webdev/test/load_strategy_amd_test.dart b/webdev/test/load_strategy_amd_test.dart new file mode 100644 index 0000000000..a5cf8908f8 --- /dev/null +++ b/webdev/test/load_strategy_amd_test.dart @@ -0,0 +1,32 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/load_strategy.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + runDependentTests( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + ); + }); +} diff --git a/webdev/test/load_strategy_ddc_library_bundle_test.dart b/webdev/test/load_strategy_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..91bdc66fc0 --- /dev/null +++ b/webdev/test/load_strategy_ddc_library_bundle_test.dart @@ -0,0 +1,40 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/load_strategy.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + runDependentTests( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + ); + }); + + group('Build Daemon and Frontend Server |', () { + runDependentTests( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + ); + }); +} diff --git a/webdev/test/parts_evaluate_amd_test.dart b/webdev/test/parts_evaluate_amd_test.dart new file mode 100644 index 0000000000..b9bfb0175f --- /dev/null +++ b/webdev/test/parts_evaluate_amd_test.dart @@ -0,0 +1,30 @@ +// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 5)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/evaluate_parts.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() async { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + }); +} diff --git a/webdev/test/parts_evaluate_ddc_library_bundle_test.dart b/webdev/test/parts_evaluate_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..375a5751fd --- /dev/null +++ b/webdev/test/parts_evaluate_ddc_library_bundle_test.dart @@ -0,0 +1,38 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 5)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/evaluate_parts.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() async { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + }); + + group('Build Daemon and Frontend Server |', () { + testAll( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + ); + }); +} diff --git a/webdev/test/patterns_inspection_amd_test.dart b/webdev/test/patterns_inspection_amd_test.dart new file mode 100644 index 0000000000..2d024d7041 --- /dev/null +++ b/webdev/test/patterns_inspection_amd_test.dart @@ -0,0 +1,54 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/patterns_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: false | Build Daemon |', () { + final canaryFeatures = false; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/patterns_inspection_ddc_library_bundle_test.dart b/webdev/test/patterns_inspection_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..2208b0baf6 --- /dev/null +++ b/webdev/test/patterns_inspection_ddc_library_bundle_test.dart @@ -0,0 +1,54 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/patterns_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/record_inspection_amd_test.dart b/webdev/test/record_inspection_amd_test.dart new file mode 100644 index 0000000000..3bc9209aeb --- /dev/null +++ b/webdev/test/record_inspection_amd_test.dart @@ -0,0 +1,54 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/record_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: false | Build Daemon |', () { + final canaryFeatures = false; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/record_inspection_ddc_library_bundle_test.dart b/webdev/test/record_inspection_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..2e9e380e30 --- /dev/null +++ b/webdev/test/record_inspection_ddc_library_bundle_test.dart @@ -0,0 +1,51 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/record_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final canaryFeatures = true; + + group('canary: true | Build Daemon |', () { + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/record_type_inspection_amd_test.dart b/webdev/test/record_type_inspection_amd_test.dart new file mode 100644 index 0000000000..6ecbf04fd1 --- /dev/null +++ b/webdev/test/record_type_inspection_amd_test.dart @@ -0,0 +1,54 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/record_type_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: false | Build Daemon |', () { + final canaryFeatures = false; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/record_type_inspection_ddc_library_bundle_test.dart b/webdev/test/record_type_inspection_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..dd0a2a1cfd --- /dev/null +++ b/webdev/test/record_type_inspection_ddc_library_bundle_test.dart @@ -0,0 +1,54 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/record_type_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/type_inspection_amd_test.dart b/webdev/test/type_inspection_amd_test.dart new file mode 100644 index 0000000000..c3fb8012fd --- /dev/null +++ b/webdev/test/type_inspection_amd_test.dart @@ -0,0 +1,54 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/type_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: false | Build Daemon |', () { + final canaryFeatures = false; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/type_inspection_ddc_library_bundle_test.dart b/webdev/test/type_inspection_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..b4c443e448 --- /dev/null +++ b/webdev/test/type_inspection_ddc_library_bundle_test.dart @@ -0,0 +1,54 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/type_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} From 75b82486c421025b855f195b2dba4041c4d2d5b7 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Wed, 12 Aug 2026 14:59:46 -0700 Subject: [PATCH 098/134] fix unused imports in moved tests --- webdev/test/evaluate_amd_test.dart | 3 --- webdev/test/evaluate_ddc_library_bundle_test.dart | 3 --- 2 files changed, 6 deletions(-) diff --git a/webdev/test/evaluate_amd_test.dart b/webdev/test/evaluate_amd_test.dart index 6e94e16f98..75cb4131b8 100644 --- a/webdev/test/evaluate_amd_test.dart +++ b/webdev/test/evaluate_amd_test.dart @@ -7,12 +7,9 @@ @Timeout(Duration(minutes: 5)) library; -import 'dart:io'; - import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/fixtures/context.dart'; import 'helpers/context.dart'; -import 'package:dwds_test_common/fixtures/project.dart'; import 'package:dwds_test_common/integration/evaluate.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; diff --git a/webdev/test/evaluate_ddc_library_bundle_test.dart b/webdev/test/evaluate_ddc_library_bundle_test.dart index ff2474fcf8..42fef30160 100644 --- a/webdev/test/evaluate_ddc_library_bundle_test.dart +++ b/webdev/test/evaluate_ddc_library_bundle_test.dart @@ -7,12 +7,9 @@ @Timeout(Duration(minutes: 5)) library; -import 'dart:io'; - import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/fixtures/context.dart'; import 'helpers/context.dart'; -import 'package:dwds_test_common/fixtures/project.dart'; import 'package:dwds_test_common/integration/evaluate.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; From 4006a94c35e8805b3e9c451aa493b479bab905d6 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Wed, 12 Aug 2026 16:01:35 -0700 Subject: [PATCH 099/134] Fix extension tests in CI by running them from debug_extension package --- .github/workflows/dart.yml | 329 ++++++++++++++++++---------------- debug_extension/mono_pkg.yaml | 17 ++ dwds/mono_pkg.yaml | 21 +-- tool/ci.sh | 26 ++- 4 files changed, 202 insertions(+), 191 deletions(-) create mode 100644 debug_extension/mono_pkg.yaml diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 0f43dd4a15..5c7a73f44e 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -41,16 +41,16 @@ jobs: - name: mono_repo self validate run: dart pub global run mono_repo generate --validate job_002: - name: "analyzer_and_format; linux; Dart dev; PKG: dwds; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`, `dart test test/build/ensure_version_test.dart`" + name: "analyzer_and_format; linux; Dart dev; PKGS: debug_extension, dwds_test_common, dwds_test_common/fixtures/_webdev_smoke, example, frontend_server_client; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds;commands:format-analyze_0-test_0" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:debug_extension-dwds_test_common-dwds_test_common/fixtures/_webdev_smoke-example-frontend_server_client;commands:format-analyze_0" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:debug_extension-dwds_test_common-dwds_test_common/fixtures/_webdev_smoke-example-frontend_server_client os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -61,44 +61,19 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - - id: dwds_pub_upgrade - name: dwds; dart pub upgrade + - id: debug_extension_pub_upgrade + name: debug_extension; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: dwds - - name: "dwds; dart format --output=none --set-exit-if-changed ." + working-directory: debug_extension + - name: "debug_extension; dart format --output=none --set-exit-if-changed ." run: "dart format --output=none --set-exit-if-changed ." - if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" - working-directory: dwds - - name: "dwds; dart analyze --fatal-infos ." + if: "always() && steps.debug_extension_pub_upgrade.conclusion == 'success'" + working-directory: debug_extension + - name: "debug_extension; dart analyze --fatal-infos ." run: dart analyze --fatal-infos . - if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" - working-directory: dwds - - name: dwds; dart test test/build/ensure_version_test.dart - run: dart test test/build/ensure_version_test.dart - if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" - working-directory: dwds - job_003: - name: "analyzer_and_format; linux; Dart dev; PKGS: dwds_test_common, dwds_test_common/fixtures/_webdev_smoke, example, frontend_server_client; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds_test_common-dwds_test_common/fixtures/_webdev_smoke-example-frontend_server_client;commands:format-analyze_0" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds_test_common-dwds_test_common/fixtures/_webdev_smoke-example-frontend_server_client - os:ubuntu-latest;pub-cache-hosted;sdk:dev - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: dev - - id: checkout - name: Checkout repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + if: "always() && steps.debug_extension_pub_upgrade.conclusion == 'success'" + working-directory: debug_extension - id: dwds_test_common_pub_upgrade name: dwds_test_common; dart pub upgrade run: dart pub upgrade @@ -151,6 +126,44 @@ jobs: run: dart analyze --fatal-infos . if: "always() && steps.frontend_server_client_pub_upgrade.conclusion == 'success'" working-directory: frontend_server_client + job_003: + name: "analyzer_and_format; linux; Dart dev; PKG: dwds; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`, `dart test test/build/ensure_version_test.dart`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds;commands:format-analyze_0-test_1" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds + os:ubuntu-latest;pub-cache-hosted;sdk:dev + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - name: Setup Dart SDK + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c + with: + sdk: dev + - id: checkout + name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + - id: dwds_pub_upgrade + name: dwds; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: dwds + - name: "dwds; dart format --output=none --set-exit-if-changed ." + run: "dart format --output=none --set-exit-if-changed ." + if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" + working-directory: dwds + - name: "dwds; dart analyze --fatal-infos ." + run: dart analyze --fatal-infos . + if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" + working-directory: dwds + - name: dwds; dart test test/build/ensure_version_test.dart + run: dart test test/build/ensure_version_test.dart + if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" + working-directory: dwds job_004: name: "analyzer_and_format; linux; Dart dev; PKG: webdev; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`, `dart test test/build/ensure_build_test.dart`" runs-on: ubuntu-latest @@ -159,7 +172,7 @@ jobs: uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:webdev;commands:format-analyze_0-test_7" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:webdev;commands:format-analyze_0-test_6" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:webdev os:ubuntu-latest;pub-cache-hosted;sdk:dev @@ -190,16 +203,16 @@ jobs: if: "always() && steps.webdev_pub_upgrade.conclusion == 'success'" working-directory: webdev job_005: - name: "unit_test; linux; Dart dev; PKG: dwds; `Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &`, `dart test --tags=extension`" + name: "unit_test; linux; Dart dev; PKG: debug_extension; `Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &`, `dart test -j 1`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds;commands:command-test_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:debug_extension;commands:command-test_0" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:debug_extension os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -210,26 +223,65 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - - id: dwds_pub_upgrade - name: dwds; dart pub upgrade + - id: debug_extension_pub_upgrade + name: debug_extension; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: dwds - - name: "dwds; Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &" + working-directory: debug_extension + - name: "debug_extension; Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &" run: "Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &" - if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" - working-directory: dwds - - name: "dwds; dart test --tags=extension" - run: "dart test --tags=extension" - if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" - working-directory: dwds + if: "always() && steps.debug_extension_pub_upgrade.conclusion == 'success'" + working-directory: debug_extension + - name: "debug_extension; dart test -j 1" + run: dart test -j 1 + if: "always() && steps.debug_extension_pub_upgrade.conclusion == 'success'" + working-directory: debug_extension needs: - job_001 - job_002 - job_003 - job_004 job_006: - name: "unit_test; linux; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 0 --exclude-tags=extension`" + name: "unit_test; linux; Dart dev; PKG: webdev; `Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &`, `dart test -j 1`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:webdev;commands:command-test_0" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:webdev + os:ubuntu-latest;pub-cache-hosted;sdk:dev + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - name: Setup Dart SDK + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c + with: + sdk: dev + - id: checkout + name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + - id: webdev_pub_upgrade + name: webdev; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: webdev + - name: "webdev; Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &" + run: "Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &" + if: "always() && steps.webdev_pub_upgrade.conclusion == 'success'" + working-directory: webdev + - name: "webdev; dart test -j 1" + run: dart test -j 1 + if: "always() && steps.webdev_pub_upgrade.conclusion == 'success'" + working-directory: webdev + needs: + - job_001 + - job_002 + - job_003 + - job_004 + job_007: + name: "unit_test; linux; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 0`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies @@ -254,8 +306,8 @@ jobs: run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: dwds - - name: "dwds; dart test --total-shards 3 --shard-index 0 --exclude-tags=extension" - run: "dart test --total-shards 3 --shard-index 0 --exclude-tags=extension" + - name: "dwds; dart test --total-shards 3 --shard-index 0" + run: dart test --total-shards 3 --shard-index 0 if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" working-directory: dwds needs: @@ -263,8 +315,8 @@ jobs: - job_002 - job_003 - job_004 - job_007: - name: "unit_test; linux; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 1 --exclude-tags=extension`" + job_008: + name: "unit_test; linux; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 1`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies @@ -289,8 +341,8 @@ jobs: run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: dwds - - name: "dwds; dart test --total-shards 3 --shard-index 1 --exclude-tags=extension" - run: "dart test --total-shards 3 --shard-index 1 --exclude-tags=extension" + - name: "dwds; dart test --total-shards 3 --shard-index 1" + run: dart test --total-shards 3 --shard-index 1 if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" working-directory: dwds needs: @@ -298,8 +350,8 @@ jobs: - job_002 - job_003 - job_004 - job_008: - name: "unit_test; linux; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 2 --exclude-tags=extension`" + job_009: + name: "unit_test; linux; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 2`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies @@ -324,8 +376,8 @@ jobs: run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: dwds - - name: "dwds; dart test --total-shards 3 --shard-index 2 --exclude-tags=extension" - run: "dart test --total-shards 3 --shard-index 2 --exclude-tags=extension" + - name: "dwds; dart test --total-shards 3 --shard-index 2" + run: dart test --total-shards 3 --shard-index 2 if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" working-directory: dwds needs: @@ -333,7 +385,7 @@ jobs: - job_002 - job_003 - job_004 - job_009: + job_010: name: "unit_test; linux; Dart dev; PKG: dwds_test_common; `Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &`, `dart test --exclude-tags=release`" runs-on: ubuntu-latest steps: @@ -341,7 +393,7 @@ jobs: uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds_test_common;commands:command-test_6" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds_test_common;commands:command-test_5" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds_test_common os:ubuntu-latest;pub-cache-hosted;sdk:dev @@ -372,7 +424,7 @@ jobs: - job_002 - job_003 - job_004 - job_010: + job_011: name: "unit_test; linux; Dart dev; PKG: frontend_server_client; `dart test -j 1`" runs-on: ubuntu-latest steps: @@ -380,7 +432,7 @@ jobs: uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:frontend_server_client;commands:test_5" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:frontend_server_client;commands:test_0" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:frontend_server_client os:ubuntu-latest;pub-cache-hosted;sdk:dev @@ -407,47 +459,8 @@ jobs: - job_002 - job_003 - job_004 - job_011: - name: "unit_test; linux; Dart dev; PKG: webdev; `Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &`, `dart test -j 1`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:webdev;commands:command-test_5" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:webdev - os:ubuntu-latest;pub-cache-hosted;sdk:dev - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: dev - - id: checkout - name: Checkout repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - - id: webdev_pub_upgrade - name: webdev; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: webdev - - name: "webdev; Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &" - run: "Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &" - if: "always() && steps.webdev_pub_upgrade.conclusion == 'success'" - working-directory: webdev - - name: "webdev; dart test -j 1" - run: dart test -j 1 - if: "always() && steps.webdev_pub_upgrade.conclusion == 'success'" - working-directory: webdev - needs: - - job_001 - - job_002 - - job_003 - - job_004 job_012: - name: "unit_test; windows; Dart dev; PKG: dwds; `dart test --tags=extension`" + name: "unit_test; windows; Dart dev; PKG: debug_extension; `dart test -j 1`" runs-on: windows-latest steps: - name: Setup Dart SDK @@ -457,22 +470,22 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - - id: dwds_pub_upgrade - name: dwds; dart pub upgrade + - id: debug_extension_pub_upgrade + name: debug_extension; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: dwds - - name: "dwds; dart test --tags=extension" - run: "dart test --tags=extension" - if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" - working-directory: dwds + working-directory: debug_extension + - name: "debug_extension; dart test -j 1" + run: dart test -j 1 + if: "always() && steps.debug_extension_pub_upgrade.conclusion == 'success'" + working-directory: debug_extension needs: - job_001 - job_002 - job_003 - job_004 job_013: - name: "unit_test; windows; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 0 --exclude-tags=extension`" + name: "unit_test; windows; Dart dev; PKG: frontend_server_client; `dart test -j 1`" runs-on: windows-latest steps: - name: Setup Dart SDK @@ -482,22 +495,22 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - - id: dwds_pub_upgrade - name: dwds; dart pub upgrade + - id: frontend_server_client_pub_upgrade + name: frontend_server_client; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: dwds - - name: "dwds; dart test --total-shards 3 --shard-index 0 --exclude-tags=extension" - run: "dart test --total-shards 3 --shard-index 0 --exclude-tags=extension" - if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" - working-directory: dwds + working-directory: frontend_server_client + - name: "frontend_server_client; dart test -j 1" + run: dart test -j 1 + if: "always() && steps.frontend_server_client_pub_upgrade.conclusion == 'success'" + working-directory: frontend_server_client needs: - job_001 - job_002 - job_003 - job_004 job_014: - name: "unit_test; windows; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 1 --exclude-tags=extension`" + name: "unit_test; windows; Dart dev; PKG: webdev; `dart test -j 1`" runs-on: windows-latest steps: - name: Setup Dart SDK @@ -507,22 +520,22 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - - id: dwds_pub_upgrade - name: dwds; dart pub upgrade + - id: webdev_pub_upgrade + name: webdev; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: dwds - - name: "dwds; dart test --total-shards 3 --shard-index 1 --exclude-tags=extension" - run: "dart test --total-shards 3 --shard-index 1 --exclude-tags=extension" - if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" - working-directory: dwds + working-directory: webdev + - name: "webdev; dart test -j 1" + run: dart test -j 1 + if: "always() && steps.webdev_pub_upgrade.conclusion == 'success'" + working-directory: webdev needs: - job_001 - job_002 - job_003 - job_004 job_015: - name: "unit_test; windows; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 2 --exclude-tags=extension`" + name: "unit_test; windows; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 0`" runs-on: windows-latest steps: - name: Setup Dart SDK @@ -537,8 +550,8 @@ jobs: run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: dwds - - name: "dwds; dart test --total-shards 3 --shard-index 2 --exclude-tags=extension" - run: "dart test --total-shards 3 --shard-index 2 --exclude-tags=extension" + - name: "dwds; dart test --total-shards 3 --shard-index 0" + run: dart test --total-shards 3 --shard-index 0 if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" working-directory: dwds needs: @@ -547,7 +560,7 @@ jobs: - job_003 - job_004 job_016: - name: "unit_test; windows; Dart dev; PKG: dwds_test_common; `dart test --exclude-tags=release`" + name: "unit_test; windows; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 1`" runs-on: windows-latest steps: - name: Setup Dart SDK @@ -557,22 +570,22 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - - id: dwds_test_common_pub_upgrade - name: dwds_test_common; dart pub upgrade + - id: dwds_pub_upgrade + name: dwds; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: dwds_test_common - - name: "dwds_test_common; dart test --exclude-tags=release" - run: "dart test --exclude-tags=release" - if: "always() && steps.dwds_test_common_pub_upgrade.conclusion == 'success'" - working-directory: dwds_test_common + working-directory: dwds + - name: "dwds; dart test --total-shards 3 --shard-index 1" + run: dart test --total-shards 3 --shard-index 1 + if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" + working-directory: dwds needs: - job_001 - job_002 - job_003 - job_004 job_017: - name: "unit_test; windows; Dart dev; PKG: frontend_server_client; `dart test -j 1`" + name: "unit_test; windows; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 2`" runs-on: windows-latest steps: - name: Setup Dart SDK @@ -582,22 +595,22 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - - id: frontend_server_client_pub_upgrade - name: frontend_server_client; dart pub upgrade + - id: dwds_pub_upgrade + name: dwds; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: frontend_server_client - - name: "frontend_server_client; dart test -j 1" - run: dart test -j 1 - if: "always() && steps.frontend_server_client_pub_upgrade.conclusion == 'success'" - working-directory: frontend_server_client + working-directory: dwds + - name: "dwds; dart test --total-shards 3 --shard-index 2" + run: dart test --total-shards 3 --shard-index 2 + if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" + working-directory: dwds needs: - job_001 - job_002 - job_003 - job_004 job_018: - name: "unit_test; windows; Dart dev; PKG: webdev; `dart test -j 1`" + name: "unit_test; windows; Dart dev; PKG: dwds_test_common; `dart test --exclude-tags=release`" runs-on: windows-latest steps: - name: Setup Dart SDK @@ -607,15 +620,15 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - - id: webdev_pub_upgrade - name: webdev; dart pub upgrade + - id: dwds_test_common_pub_upgrade + name: dwds_test_common; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: webdev - - name: "webdev; dart test -j 1" - run: dart test -j 1 - if: "always() && steps.webdev_pub_upgrade.conclusion == 'success'" - working-directory: webdev + working-directory: dwds_test_common + - name: "dwds_test_common; dart test --exclude-tags=release" + run: "dart test --exclude-tags=release" + if: "always() && steps.dwds_test_common_pub_upgrade.conclusion == 'success'" + working-directory: dwds_test_common needs: - job_001 - job_002 @@ -630,7 +643,7 @@ jobs: uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:beta;packages:dwds;commands:command-test_5" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:beta;packages:dwds;commands:command-test_0" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:beta;packages:dwds os:ubuntu-latest;pub-cache-hosted;sdk:beta @@ -684,7 +697,7 @@ jobs: uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:beta;packages:webdev;commands:command-test_5" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:beta;packages:webdev;commands:command-test_0" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:beta;packages:webdev os:ubuntu-latest;pub-cache-hosted;sdk:beta diff --git a/debug_extension/mono_pkg.yaml b/debug_extension/mono_pkg.yaml new file mode 100644 index 0000000000..42b321e034 --- /dev/null +++ b/debug_extension/mono_pkg.yaml @@ -0,0 +1,17 @@ +# See https://pub.dev/packages/mono_repo for details +stages: + - analyzer_and_format: + - group: + - format + - analyze: --fatal-infos . + sdk: dev + - unit_test: + - group: + - command: Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & + - test: -j 1 + sdk: dev + os: + - linux + - test: -j 1 + os: windows + sdk: dev diff --git a/dwds/mono_pkg.yaml b/dwds/mono_pkg.yaml index cf4a65ad7e..334e0c0530 100644 --- a/dwds/mono_pkg.yaml +++ b/dwds/mono_pkg.yaml @@ -7,38 +7,23 @@ stages: - test: test/build/ensure_version_test.dart sdk: dev - unit_test: - # Linux extension tests: - # Note: `Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &` must be - # run first for Linux. - - group: - - command: Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & - - test: --tags=extension - sdk: dev - os: - - linux - # Windows extension tests: - - group: - - test: --tags=extension - sdk: dev - os: - - windows # First test shard: - group: - - test: --total-shards 3 --shard-index 0 --exclude-tags=extension + - test: --total-shards 3 --shard-index 0 sdk: dev os: - linux - windows # Second test shard: - group: - - test: --total-shards 3 --shard-index 1 --exclude-tags=extension + - test: --total-shards 3 --shard-index 1 sdk: dev os: - linux - windows # Third test shard: - group: - - test: --total-shards 3 --shard-index 2 --exclude-tags=extension + - test: --total-shards 3 --shard-index 2 sdk: dev os: - linux diff --git a/tool/ci.sh b/tool/ci.sh index 67171c3f9f..1827ff9ab9 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -80,34 +80,30 @@ for PKG in ${PKGS}; do dart format --output=none --set-exit-if-changed . || EXIT_CODE=$? ;; test_0) - echo 'dart test test/build/ensure_version_test.dart' - dart test test/build/ensure_version_test.dart || EXIT_CODE=$? + echo 'dart test -j 1' + dart test -j 1 || EXIT_CODE=$? ;; test_1) - echo 'dart test --tags=extension' - dart test --tags=extension || EXIT_CODE=$? + echo 'dart test test/build/ensure_version_test.dart' + dart test test/build/ensure_version_test.dart || EXIT_CODE=$? ;; test_2) - echo 'dart test --total-shards 3 --shard-index 0 --exclude-tags=extension' - dart test --total-shards 3 --shard-index 0 --exclude-tags=extension || EXIT_CODE=$? + echo 'dart test --total-shards 3 --shard-index 0' + dart test --total-shards 3 --shard-index 0 || EXIT_CODE=$? ;; test_3) - echo 'dart test --total-shards 3 --shard-index 1 --exclude-tags=extension' - dart test --total-shards 3 --shard-index 1 --exclude-tags=extension || EXIT_CODE=$? + echo 'dart test --total-shards 3 --shard-index 1' + dart test --total-shards 3 --shard-index 1 || EXIT_CODE=$? ;; test_4) - echo 'dart test --total-shards 3 --shard-index 2 --exclude-tags=extension' - dart test --total-shards 3 --shard-index 2 --exclude-tags=extension || EXIT_CODE=$? + echo 'dart test --total-shards 3 --shard-index 2' + dart test --total-shards 3 --shard-index 2 || EXIT_CODE=$? ;; test_5) - echo 'dart test -j 1' - dart test -j 1 || EXIT_CODE=$? - ;; - test_6) echo 'dart test --exclude-tags=release' dart test --exclude-tags=release || EXIT_CODE=$? ;; - test_7) + test_6) echo 'dart test test/build/ensure_build_test.dart' dart test test/build/ensure_build_test.dart || EXIT_CODE=$? ;; From bc302c26bda159915ffa650a05f3e74b052d6867 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 13 Aug 2026 14:08:35 -0700 Subject: [PATCH 100/134] Fix imports and move tests back to dwds after merge --- .../test/integration}/debug_service_amd_test.dart | 0 .../integration}/debug_service_ddc_library_bundle_test.dart | 0 {webdev/test => dwds/test/integration}/devtools_amd_test.dart | 0 .../test/integration}/devtools_ddc_library_bundle_test.dart | 0 .../test/integration/instances/class_inspection_amd_test.dart | 4 ++-- .../instances/class_inspection_ddc_library_bundle_test.dart | 4 ++-- dwds/test/integration/instances/dot_shorthands_amd_test.dart | 4 ++-- .../instances/dot_shorthands_ddc_library_bundle_test.dart | 4 ++-- dwds/test/integration/instances/instance_amd_test.dart | 4 ++-- .../instances/instance_ddc_library_bundle_test.dart | 4 ++-- .../integration/instances/instance_inspection_amd_test.dart | 4 ++-- .../instance_inspection_ddc_library_bundle_test.dart | 4 ++-- .../integration/instances/patterns_inspection_amd_test.dart | 4 ++-- .../patterns_inspection_ddc_library_bundle_test.dart | 4 ++-- .../integration/instances/record_inspection_amd_test.dart | 4 ++-- .../instances/record_inspection_ddc_library_bundle_test.dart | 4 ++-- .../instances/record_type_inspection_amd_test.dart | 4 ++-- .../record_type_inspection_ddc_library_bundle_test.dart | 4 ++-- dwds/test/integration/instances/type_inspection_amd_test.dart | 4 ++-- .../instances/type_inspection_ddc_library_bundle_test.dart | 4 ++-- {webdev/test => dwds/test/integration}/refresh_amd_test.dart | 0 .../test/integration}/refresh_ddc_library_bundle_test.dart | 0 .../test => dwds/test/integration}/run_request_amd_test.dart | 0 .../integration}/run_request_ddc_library_bundle_test.dart | 0 .../test => dwds/test/integration}/screenshot_amd_test.dart | 0 .../test/integration}/screenshot_ddc_library_bundle_test.dart | 0 .../test/integration}/variable_scope_amd_test.dart | 0 .../integration}/variable_scope_ddc_library_bundle_test.dart | 0 webdev/pubspec.yaml | 2 +- 29 files changed, 33 insertions(+), 33 deletions(-) rename {webdev/test => dwds/test/integration}/debug_service_amd_test.dart (100%) rename {webdev/test => dwds/test/integration}/debug_service_ddc_library_bundle_test.dart (100%) rename {webdev/test => dwds/test/integration}/devtools_amd_test.dart (100%) rename {webdev/test => dwds/test/integration}/devtools_ddc_library_bundle_test.dart (100%) rename {webdev/test => dwds/test/integration}/refresh_amd_test.dart (100%) rename {webdev/test => dwds/test/integration}/refresh_ddc_library_bundle_test.dart (100%) rename {webdev/test => dwds/test/integration}/run_request_amd_test.dart (100%) rename {webdev/test => dwds/test/integration}/run_request_ddc_library_bundle_test.dart (100%) rename {webdev/test => dwds/test/integration}/screenshot_amd_test.dart (100%) rename {webdev/test => dwds/test/integration}/screenshot_ddc_library_bundle_test.dart (100%) rename {webdev/test => dwds/test/integration}/variable_scope_amd_test.dart (100%) rename {webdev/test => dwds/test/integration}/variable_scope_ddc_library_bundle_test.dart (100%) diff --git a/webdev/test/debug_service_amd_test.dart b/dwds/test/integration/debug_service_amd_test.dart similarity index 100% rename from webdev/test/debug_service_amd_test.dart rename to dwds/test/integration/debug_service_amd_test.dart diff --git a/webdev/test/debug_service_ddc_library_bundle_test.dart b/dwds/test/integration/debug_service_ddc_library_bundle_test.dart similarity index 100% rename from webdev/test/debug_service_ddc_library_bundle_test.dart rename to dwds/test/integration/debug_service_ddc_library_bundle_test.dart diff --git a/webdev/test/devtools_amd_test.dart b/dwds/test/integration/devtools_amd_test.dart similarity index 100% rename from webdev/test/devtools_amd_test.dart rename to dwds/test/integration/devtools_amd_test.dart diff --git a/webdev/test/devtools_ddc_library_bundle_test.dart b/dwds/test/integration/devtools_ddc_library_bundle_test.dart similarity index 100% rename from webdev/test/devtools_ddc_library_bundle_test.dart rename to dwds/test/integration/devtools_ddc_library_bundle_test.dart diff --git a/dwds/test/integration/instances/class_inspection_amd_test.dart b/dwds/test/integration/instances/class_inspection_amd_test.dart index f27e778fea..fa5b67bc46 100644 --- a/dwds/test/integration/instances/class_inspection_amd_test.dart +++ b/dwds/test/integration/instances/class_inspection_amd_test.dart @@ -12,8 +12,8 @@ import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/class_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; +import '../fixtures/frontend_server_context.dart'; + void main() { // Enable verbose logging for debugging. diff --git a/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart index d670689444..7f1931e6e8 100644 --- a/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart @@ -12,8 +12,8 @@ import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/class_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; +import '../fixtures/frontend_server_context.dart'; + void main() { // Enable verbose logging for debugging. diff --git a/dwds/test/integration/instances/dot_shorthands_amd_test.dart b/dwds/test/integration/instances/dot_shorthands_amd_test.dart index 9a603373d5..92cebc9795 100644 --- a/dwds/test/integration/instances/dot_shorthands_amd_test.dart +++ b/dwds/test/integration/instances/dot_shorthands_amd_test.dart @@ -12,8 +12,8 @@ import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/dot_shorthands.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; +import '../fixtures/frontend_server_context.dart'; + void main() { // Enable verbose logging for debugging. diff --git a/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart b/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart index 9ea12ad65f..3d3d53c623 100644 --- a/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart @@ -12,8 +12,8 @@ import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/dot_shorthands.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; +import '../fixtures/frontend_server_context.dart'; + void main() { // Enable verbose logging for debugging. diff --git a/dwds/test/integration/instances/instance_amd_test.dart b/dwds/test/integration/instances/instance_amd_test.dart index 920aa5ee8c..074314037c 100644 --- a/dwds/test/integration/instances/instance_amd_test.dart +++ b/dwds/test/integration/instances/instance_amd_test.dart @@ -11,8 +11,8 @@ import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/instance.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; +import '../fixtures/frontend_server_context.dart'; + void main() { // Enable verbose logging for debugging. diff --git a/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart b/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart index 7f429d4e4f..d508b6fe0e 100644 --- a/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart @@ -11,8 +11,8 @@ import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/instance.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; +import '../fixtures/frontend_server_context.dart'; + void main() { // Enable verbose logging for debugging. diff --git a/dwds/test/integration/instances/instance_inspection_amd_test.dart b/dwds/test/integration/instances/instance_inspection_amd_test.dart index 19cac7fb9a..d2a5ddeeb9 100644 --- a/dwds/test/integration/instances/instance_inspection_amd_test.dart +++ b/dwds/test/integration/instances/instance_inspection_amd_test.dart @@ -12,8 +12,8 @@ import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/instance_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; +import '../fixtures/frontend_server_context.dart'; + void main() { // Enable verbose logging for debugging. diff --git a/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart index bbbc6015d2..c545041ba4 100644 --- a/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart @@ -12,8 +12,8 @@ import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/instance_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; +import '../fixtures/frontend_server_context.dart'; + void main() { // Enable verbose logging for debugging. diff --git a/dwds/test/integration/instances/patterns_inspection_amd_test.dart b/dwds/test/integration/instances/patterns_inspection_amd_test.dart index 7153427a3a..82bf52423b 100644 --- a/dwds/test/integration/instances/patterns_inspection_amd_test.dart +++ b/dwds/test/integration/instances/patterns_inspection_amd_test.dart @@ -12,8 +12,8 @@ import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/patterns_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; +import '../fixtures/frontend_server_context.dart'; + void main() { // Enable verbose logging for debugging. diff --git a/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart index 04917d07b4..5581e9f0e8 100644 --- a/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart @@ -12,8 +12,8 @@ import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/patterns_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; +import '../fixtures/frontend_server_context.dart'; + void main() { // Enable verbose logging for debugging. diff --git a/dwds/test/integration/instances/record_inspection_amd_test.dart b/dwds/test/integration/instances/record_inspection_amd_test.dart index b51d76678e..75fa57b6b5 100644 --- a/dwds/test/integration/instances/record_inspection_amd_test.dart +++ b/dwds/test/integration/instances/record_inspection_amd_test.dart @@ -12,8 +12,8 @@ import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/record_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; +import '../fixtures/frontend_server_context.dart'; + void main() { // Enable verbose logging for debugging. diff --git a/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart index b835867395..ced068f471 100644 --- a/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart @@ -12,8 +12,8 @@ import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/record_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; +import '../fixtures/frontend_server_context.dart'; + void main() { // Enable verbose logging for debugging. diff --git a/dwds/test/integration/instances/record_type_inspection_amd_test.dart b/dwds/test/integration/instances/record_type_inspection_amd_test.dart index 1714a55c95..c832599bf9 100644 --- a/dwds/test/integration/instances/record_type_inspection_amd_test.dart +++ b/dwds/test/integration/instances/record_type_inspection_amd_test.dart @@ -12,8 +12,8 @@ import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/record_type_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; +import '../fixtures/frontend_server_context.dart'; + void main() { // Enable verbose logging for debugging. diff --git a/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart index 3cdf845e83..8f87d96f60 100644 --- a/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart @@ -12,8 +12,8 @@ import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/record_type_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; +import '../fixtures/frontend_server_context.dart'; + void main() { // Enable verbose logging for debugging. diff --git a/dwds/test/integration/instances/type_inspection_amd_test.dart b/dwds/test/integration/instances/type_inspection_amd_test.dart index 0cb79b5eb7..f67e91bd86 100644 --- a/dwds/test/integration/instances/type_inspection_amd_test.dart +++ b/dwds/test/integration/instances/type_inspection_amd_test.dart @@ -12,8 +12,8 @@ import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/type_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; +import '../fixtures/frontend_server_context.dart'; + void main() { // Enable verbose logging for debugging. diff --git a/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart index 9f6346902d..95ac70c8b9 100644 --- a/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart @@ -12,8 +12,8 @@ import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/type_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; +import '../fixtures/frontend_server_context.dart'; + void main() { // Enable verbose logging for debugging. diff --git a/webdev/test/refresh_amd_test.dart b/dwds/test/integration/refresh_amd_test.dart similarity index 100% rename from webdev/test/refresh_amd_test.dart rename to dwds/test/integration/refresh_amd_test.dart diff --git a/webdev/test/refresh_ddc_library_bundle_test.dart b/dwds/test/integration/refresh_ddc_library_bundle_test.dart similarity index 100% rename from webdev/test/refresh_ddc_library_bundle_test.dart rename to dwds/test/integration/refresh_ddc_library_bundle_test.dart diff --git a/webdev/test/run_request_amd_test.dart b/dwds/test/integration/run_request_amd_test.dart similarity index 100% rename from webdev/test/run_request_amd_test.dart rename to dwds/test/integration/run_request_amd_test.dart diff --git a/webdev/test/run_request_ddc_library_bundle_test.dart b/dwds/test/integration/run_request_ddc_library_bundle_test.dart similarity index 100% rename from webdev/test/run_request_ddc_library_bundle_test.dart rename to dwds/test/integration/run_request_ddc_library_bundle_test.dart diff --git a/webdev/test/screenshot_amd_test.dart b/dwds/test/integration/screenshot_amd_test.dart similarity index 100% rename from webdev/test/screenshot_amd_test.dart rename to dwds/test/integration/screenshot_amd_test.dart diff --git a/webdev/test/screenshot_ddc_library_bundle_test.dart b/dwds/test/integration/screenshot_ddc_library_bundle_test.dart similarity index 100% rename from webdev/test/screenshot_ddc_library_bundle_test.dart rename to dwds/test/integration/screenshot_ddc_library_bundle_test.dart diff --git a/webdev/test/variable_scope_amd_test.dart b/dwds/test/integration/variable_scope_amd_test.dart similarity index 100% rename from webdev/test/variable_scope_amd_test.dart rename to dwds/test/integration/variable_scope_amd_test.dart diff --git a/webdev/test/variable_scope_ddc_library_bundle_test.dart b/dwds/test/integration/variable_scope_ddc_library_bundle_test.dart similarity index 100% rename from webdev/test/variable_scope_ddc_library_bundle_test.dart rename to dwds/test/integration/variable_scope_ddc_library_bundle_test.dart diff --git a/webdev/pubspec.yaml b/webdev/pubspec.yaml index 140d635205..364572310b 100644 --- a/webdev/pubspec.yaml +++ b/webdev/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: collection: ^1.15.0 crypto: ^3.0.2 dds: ^5.3.0 - dwds: ^27.1.2 + dwds: '>=27.1.2 <29.0.0' file: ^7.0.1 http: ^1.0.0 http_multi_server: ^3.2.0 From b3021d473c361ce01577e081a6853bb49b0e56e1 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 13 Aug 2026 14:50:24 -0700 Subject: [PATCH 101/134] Fix integration test infrastructure for Build Daemon and Frontend Server --- .../services/daemon_expression_compiler.dart | 17 ++++++++++++++-- dwds_test_common/lib/fixtures/context.dart | 13 ++++++++---- .../lib/integration/hot_reload.dart | 20 ++++++++++++------- 3 files changed, 37 insertions(+), 13 deletions(-) diff --git a/dwds/lib/src/services/daemon_expression_compiler.dart b/dwds/lib/src/services/daemon_expression_compiler.dart index 5d020f5b9b..c69db4e27d 100644 --- a/dwds/lib/src/services/daemon_expression_compiler.dart +++ b/dwds/lib/src/services/daemon_expression_compiler.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. import 'dart:async'; +import 'dart:convert'; import 'package:dwds/src/services/expression_compiler.dart'; @@ -41,8 +42,20 @@ final class DaemonExpressionCompiler implements ExpressionCompiler { 'expression': expression, }; final responseJson = await _sendRequest(requestJson); - final result = responseJson['result'] as String; - final isError = responseJson['isError'] as bool; + final expressionDataString = responseJson['expressionData'] as String?; + final errorMessage = responseJson['errorMessage'] as String?; + final errorCount = responseJson['errorCount'] as int? ?? 0; + + final isError = errorCount > 0 || expressionDataString == null; + + String result; + if (isError) { + result = errorMessage ?? 'Unknown compilation error'; + } else { + final bytes = base64.decode(expressionDataString); + result = utf8.decode(bytes); + } + return ExpressionCompilationResult(result, isError); } diff --git a/dwds_test_common/lib/fixtures/context.dart b/dwds_test_common/lib/fixtures/context.dart index 85deb477bd..d1782220cb 100644 --- a/dwds_test_common/lib/fixtures/context.dart +++ b/dwds_test_common/lib/fixtures/context.dart @@ -444,6 +444,7 @@ abstract class TestContext { _chromeDriver = null; _daemonClient = null; ddcService = null; + expressionCompiler = null; _webRunner = null; _testServer = null; _client = null; @@ -571,10 +572,14 @@ abstract class TestContext { Future recompile({required bool fullRestart}) async { - await webRunner.rerun( - fullRestart: fullRestart, - fileServerUri: Uri.parse('http://${testServer.host}:${testServer.port}'), - ); + if (usesBuildDaemon) { + await waitForSuccessfulBuild(); + } else { + await webRunner.rerun( + fullRestart: fullRestart, + fileServerUri: Uri.parse('http://${testServer.host}:${testServer.port}'), + ); + } return; } diff --git a/dwds_test_common/lib/integration/hot_reload.dart b/dwds_test_common/lib/integration/hot_reload.dart index 7be6676729..a989f60fba 100644 --- a/dwds_test_common/lib/integration/hot_reload.dart +++ b/dwds_test_common/lib/integration/hot_reload.dart @@ -24,8 +24,14 @@ void runTests({ final context = contextFactory(project, provider); - Future recompile() async { - await context.recompile(fullRestart: false); + Future recompile({bool fullRestart = false, bool hasEdits = false}) async { + if (context.usesBuildDaemon) { + if (hasEdits) { + await context.waitForSuccessfulBuild(); + } + } else { + await context.recompile(fullRestart: fullRestart); + } } Future makeEditAndRecompile() async { @@ -36,7 +42,7 @@ void runTests({ newString: newString, ), ]); - await recompile(); + await recompile(hasEdits: true); } // Call the method `evaluate` in the program and wait for `expectedString` to @@ -100,7 +106,7 @@ void runTests({ newString: anotherString, ), ]); - await recompile(); + await recompile(hasEdits: true); report = await fakeClient.reloadSources(isolate.id!); expect(report.success, true); @@ -151,7 +157,7 @@ class Foo extends Bar {} ''', ), ]); - await recompile(); + await recompile(hasEdits: true); final vm = await client.getVM(); final isolate = await client.getIsolate(vm.isolates!.first.id!); var report = await fakeClient.reloadSources(isolate.id!); @@ -165,12 +171,12 @@ class Foo extends Bar {} newString: 'class Foo extends Bar', ), ]); - await context.recompile(fullRestart: false, allowFailure: true); + await recompile(hasEdits: true); report = await fakeClient.reloadSources(isolate.id!); expect(report.success, false); // Successfully recover with hot restart. - await context.recompile(fullRestart: true); + await recompile(fullRestart: true, hasEdits: false); await callEvaluateAndWaitForLog(newString); }); }, timeout: const Timeout.factor(2)); From f23330dcacc936dfa69a190c967cbdd433fa0e7b Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 13 Aug 2026 15:10:38 -0700 Subject: [PATCH 102/134] Fix hot reload rejection test for Build Daemon and Frontend Server --- dwds_test_common/lib/fixtures/context.dart | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/dwds_test_common/lib/fixtures/context.dart b/dwds_test_common/lib/fixtures/context.dart index d1782220cb..4227210347 100644 --- a/dwds_test_common/lib/fixtures/context.dart +++ b/dwds_test_common/lib/fixtures/context.dart @@ -449,6 +449,7 @@ abstract class TestContext { _testServer = null; _client = null; _outputDir = null; + lastBuildFailed = false; } /// Given a list of edits, use file IO to write them to the file system. @@ -564,6 +565,9 @@ abstract class TestContext { return (request) { final path = request.url.path; if (path.endsWith(WebDevFS.reloadedSourcesFileName)) { + if (lastBuildFailed) { + return shelf.Response.notFound('Build failed'); + } return shelf.Response.ok(jsonEncode(reloadedSources)); } return proxy(request); @@ -571,9 +575,9 @@ abstract class TestContext { } - Future recompile({required bool fullRestart}) async { + Future recompile({required bool fullRestart, bool allowFailure = false}) async { if (usesBuildDaemon) { - await waitForSuccessfulBuild(); + await waitForSuccessfulBuild(allowFailure: allowFailure); } else { await webRunner.rerun( fullRestart: fullRestart, @@ -586,16 +590,24 @@ abstract class TestContext { Future waitForSuccessfulBuild({ Duration? timeout, bool propagateToBrowser = false, + bool allowFailure = false, }) async { + lastBuildFailed = false; // Wait for the build until the timeout is reached: - await daemonClient.buildResults + final results = await daemonClient.buildResults .firstWhere( (BuildResults results) => results.results.any( - (BuildResult result) => result.status == BuildStatus.succeeded, + (BuildResult result) => + result.status == BuildStatus.succeeded || + (allowFailure && result.status == BuildStatus.failed), ), ) .timeout(timeout ?? const Duration(seconds: 60)); + lastBuildFailed = results.results.any( + (BuildResult result) => result.status == BuildStatus.failed, + ); + if (propagateToBrowser) { // Allow change to propagate to the browser. // Windows, or at least Travis on Windows, seems to need more time. From 975cbd3e3401cdb31f91e36dbde05e666887b300 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 13 Aug 2026 18:05:12 -0700 Subject: [PATCH 103/134] Migrating to SDK-style test contexts and conventions --- dwds/pubspec.yaml | 2 - .../test/integration/breakpoint_amd_test.dart | 6 +- .../breakpoint_ddc_library_bundle_test.dart | 6 +- dwds/test/integration/callstack_amd_test.dart | 6 +- .../callstack_ddc_library_bundle_test.dart | 6 +- ...proxy_service_ddc_library_bundle_test.dart | 8 +- .../circular_evaluate_amd_test.dart | 6 +- ...ular_evaluate_ddc_library_bundle_test.dart | 6 +- .../dart_uri_file_uri_amd_test.dart | 9 +- ..._uri_file_uri_ddc_library_bundle_test.dart | 9 +- .../integration/debug_service_amd_test.dart | 4 +- ...debug_service_ddc_library_bundle_test.dart | 4 +- dwds/test/integration/devtools_amd_test.dart | 4 +- .../devtools_ddc_library_bundle_test.dart | 4 +- dwds/test/integration/evaluate_amd_test.dart | 9 +- .../evaluate_ddc_library_bundle_test.dart | 6 +- dwds/test/integration/events_amd_test.dart | 2 - .../events_ddc_library_bundle_test.dart | 6 +- .../expression_compiler_service_amd_test.dart | 4 +- ...piler_service_ddc_library_bundle_test.dart | 4 +- .../fixtures/frontend_server_context.dart | 23 +- ...d_breakpoints_ddc_library_bundle_test.dart | 9 +- .../hot_reload_ddc_library_bundle_test.dart | 9 +- ...t_breakpoints_ddc_library_bundle_test.dart | 9 +- ...t_correctness_ddc_library_bundle_test.dart | 8 +- .../hot_restart_ddc_library_bundle_test.dart | 7 +- dwds/test/integration/inspector_amd_test.dart | 9 +- .../inspector_ddc_library_bundle_test.dart | 9 +- .../instances/class_inspection_amd_test.dart | 12 +- ...ss_inspection_ddc_library_bundle_test.dart | 8 +- .../instances/dot_shorthands_amd_test.dart | 12 +- ...ot_shorthands_ddc_library_bundle_test.dart | 8 +- .../instances/instance_amd_test.dart | 16 +- .../instance_ddc_library_bundle_test.dart | 7 +- .../instance_inspection_amd_test.dart | 12 +- ...ce_inspection_ddc_library_bundle_test.dart | 8 +- .../patterns_inspection_amd_test.dart | 12 +- ...ns_inspection_ddc_library_bundle_test.dart | 8 +- .../instances/record_inspection_amd_test.dart | 12 +- ...rd_inspection_ddc_library_bundle_test.dart | 7 +- .../record_type_inspection_amd_test.dart | 12 +- ...pe_inspection_ddc_library_bundle_test.dart | 7 +- .../instances/type_inspection_amd_test.dart | 12 +- ...pe_inspection_ddc_library_bundle_test.dart | 8 +- dwds/test/integration/listviews_amd_test.dart | 9 +- .../listviews_ddc_library_bundle_test.dart | 9 +- .../integration/load_strategy_amd_test.dart | 6 +- ...load_strategy_ddc_library_bundle_test.dart | 6 +- .../integration/parts_evaluate_amd_test.dart | 6 +- ...arts_evaluate_ddc_library_bundle_test.dart | 6 +- dwds/test/integration/refresh_amd_test.dart | 4 +- .../refresh_ddc_library_bundle_test.dart | 4 +- .../integration/run_request_amd_test.dart | 4 +- .../run_request_ddc_library_bundle_test.dart | 4 +- .../test/integration/screenshot_amd_test.dart | 4 +- .../screenshot_ddc_library_bundle_test.dart | 4 +- .../integration/variable_scope_amd_test.dart | 4 +- ...ariable_scope_ddc_library_bundle_test.dart | 4 +- dwds_test_common/analysis_options.yaml | 3 +- dwds_test_common/lib/fixtures/context.dart | 27 +- .../lib/integration/chrome_proxy_service.dart | 2 +- .../lib/integration/class_inspection.dart | 123 +-- .../lib/integration/dart_uri_file_uri.dart | 4 +- .../lib/integration/dot_shorthands.dart | 205 ++-- .../lib/integration/evaluate.dart | 4 +- .../lib/integration/evaluate_circular.dart | 4 +- .../lib/integration/evaluate_parts.dart | 4 +- .../expression_compiler_service.dart | 1 - .../lib/integration/hot_reload.dart | 16 +- .../integration/hot_reload_breakpoints.dart | 60 +- .../integration/hot_restart_breakpoints.dart | 23 +- .../lib/integration/instance.dart | 865 ++++++++--------- .../lib/integration/instance_inspection.dart | 535 +++++----- .../lib/integration/patterns_inspection.dart | 225 ++--- .../lib/integration/record_inspection.dart | 913 +++++++++--------- .../integration/record_type_inspection.dart | 659 +++++++------ .../lib/integration/type_inspection.dart | 499 +++++----- webdev/lib/src/serve/webdev_server.dart | 28 +- webdev/test/asset_handler_amd_test.dart | 7 +- ...asset_handler_ddc_library_bundle_test.dart | 2 +- webdev/test/breakpoint_amd_test.dart | 6 +- .../breakpoint_ddc_library_bundle_test.dart | 8 +- webdev/test/callstack_amd_test.dart | 6 +- .../callstack_ddc_library_bundle_test.dart | 8 +- .../test/chrome_proxy_service_amd_test.dart | 9 +- ...proxy_service_ddc_library_bundle_test.dart | 8 +- webdev/test/circular_evaluate_amd_test.dart | 6 +- ...ular_evaluate_ddc_library_bundle_test.dart | 8 +- webdev/test/class_inspection_amd_test.dart | 8 +- ...ss_inspection_ddc_library_bundle_test.dart | 8 +- webdev/test/dart_uri_file_uri_amd_test.dart | 6 +- ..._uri_file_uri_ddc_library_bundle_test.dart | 8 +- webdev/test/dds_port_amd_test.dart | 2 +- .../dds_port_ddc_library_bundle_test.dart | 2 +- webdev/test/dot_shorthands_amd_test.dart | 8 +- ...ot_shorthands_ddc_library_bundle_test.dart | 8 +- webdev/test/evaluate_amd_test.dart | 6 +- .../evaluate_ddc_library_bundle_test.dart | 8 +- webdev/test/events_amd_test.dart | 6 +- .../test/events_ddc_library_bundle_test.dart | 6 +- webdev/test/helpers/context.dart | 122 ++- ...d_breakpoints_ddc_library_bundle_test.dart | 6 +- .../hot_reload_ddc_library_bundle_test.dart | 6 +- webdev/test/hot_restart_amd_test.dart | 9 +- ...t_breakpoints_ddc_library_bundle_test.dart | 8 +- .../hot_restart_correctness_amd_test.dart | 9 +- ...t_correctness_ddc_library_bundle_test.dart | 8 +- .../hot_restart_ddc_library_bundle_test.dart | 8 +- webdev/test/inspector_amd_test.dart | 2 +- .../inspector_ddc_library_bundle_test.dart | 4 +- webdev/test/instance_amd_test.dart | 8 +- .../instance_ddc_library_bundle_test.dart | 8 +- webdev/test/instance_inspection_amd_test.dart | 8 +- ...ce_inspection_ddc_library_bundle_test.dart | 8 +- webdev/test/listviews_amd_test.dart | 6 +- .../listviews_ddc_library_bundle_test.dart | 8 +- webdev/test/load_strategy_amd_test.dart | 6 +- ...load_strategy_ddc_library_bundle_test.dart | 8 +- webdev/test/parts_evaluate_amd_test.dart | 6 +- ...arts_evaluate_ddc_library_bundle_test.dart | 8 +- webdev/test/patterns_inspection_amd_test.dart | 8 +- ...ns_inspection_ddc_library_bundle_test.dart | 8 +- .../proxy_server_asset_reader_amd_test.dart | 2 +- ..._asset_reader_ddc_library_bundle_test.dart | 2 +- webdev/test/record_inspection_amd_test.dart | 8 +- ...rd_inspection_ddc_library_bundle_test.dart | 8 +- .../test/record_type_inspection_amd_test.dart | 8 +- ...pe_inspection_ddc_library_bundle_test.dart | 8 +- webdev/test/type_inspection_amd_test.dart | 8 +- ...pe_inspection_ddc_library_bundle_test.dart | 8 +- 130 files changed, 2552 insertions(+), 2545 deletions(-) diff --git a/dwds/pubspec.yaml b/dwds/pubspec.yaml index 3f620903bf..c2bde53d57 100644 --- a/dwds/pubspec.yaml +++ b/dwds/pubspec.yaml @@ -49,5 +49,3 @@ dev_dependencies: web: ^1.1.0 webdriver: ^3.0.0 yaml: ^3.1.3 - webdev: - path: ../webdev diff --git a/dwds/test/integration/breakpoint_amd_test.dart b/dwds/test/integration/breakpoint_amd_test.dart index 88b785934e..3d16a8a6fe 100644 --- a/dwds/test/integration/breakpoint_amd_test.dart +++ b/dwds/test/integration/breakpoint_amd_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/breakpoint.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -27,7 +27,7 @@ void main() { group('Frontend Server |', () { testBreakpoint( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, ); }); } diff --git a/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart b/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart index a072ed6dd7..ec07cbf531 100644 --- a/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart +++ b/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/breakpoint.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -28,7 +28,7 @@ void main() { group('Frontend Server |', () { testBreakpoint( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, ); }); } diff --git a/dwds/test/integration/callstack_amd_test.dart b/dwds/test/integration/callstack_amd_test.dart index 4f2af882ee..aa9049c74a 100644 --- a/dwds/test/integration/callstack_amd_test.dart +++ b/dwds/test/integration/callstack_amd_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/callstack.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -27,7 +27,7 @@ void main() { group('Frontend Server |', () { testCallStack( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, ); }); } diff --git a/dwds/test/integration/callstack_ddc_library_bundle_test.dart b/dwds/test/integration/callstack_ddc_library_bundle_test.dart index d7bc92570c..c9c2948909 100644 --- a/dwds/test/integration/callstack_ddc_library_bundle_test.dart +++ b/dwds/test/integration/callstack_ddc_library_bundle_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/callstack.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -28,7 +28,7 @@ void main() { group('Frontend Server |', () { testCallStack( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, ); }); } diff --git a/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart b/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart index 94a3af140f..ce61fee0d7 100644 --- a/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart +++ b/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/chrome_proxy_service.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -27,13 +27,13 @@ void main() { canaryFeatures: canaryFeatures, ddcModuleFormat: moduleFormat, ); - + tearDownAll(provider.dispose); runTests( provider: provider, moduleFormat: moduleFormat, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/circular_evaluate_amd_test.dart b/dwds/test/integration/circular_evaluate_amd_test.dart index 47839a2e2f..54b812eb1d 100644 --- a/dwds/test/integration/circular_evaluate_amd_test.dart +++ b/dwds/test/integration/circular_evaluate_amd_test.dart @@ -10,13 +10,13 @@ library; import 'dart:io'; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/fixtures/project.dart'; import 'package:dwds_test_common/integration/evaluate_circular.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() async { // Enable verbose logging for debugging. @@ -36,7 +36,7 @@ void main() async { () { testAll( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, indexBaseMode: indexBaseMode, useDebuggerModuleNames: true, ); diff --git a/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart b/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart index d59a791e25..167f526631 100644 --- a/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart +++ b/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart @@ -10,13 +10,13 @@ library; import 'dart:io'; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/fixtures/project.dart'; import 'package:dwds_test_common/integration/evaluate_circular.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() async { // Enable verbose logging for debugging. @@ -37,7 +37,7 @@ void main() async { () { testAll( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, indexBaseMode: indexBaseMode, useDebuggerModuleNames: true, ); diff --git a/dwds/test/integration/dart_uri_file_uri_amd_test.dart b/dwds/test/integration/dart_uri_file_uri_amd_test.dart index 5924eb7df4..730bd957f4 100644 --- a/dwds/test/integration/dart_uri_file_uri_amd_test.dart +++ b/dwds/test/integration/dart_uri_file_uri_amd_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/dart_uri_file_uri.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -25,9 +25,6 @@ void main() { tearDownAll(provider.dispose); group('Frontend Server |', () { - runTests( - provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), - ); + runTests(provider: provider, contextFactory: FrontendServerTestContext.new); }); } diff --git a/dwds/test/integration/dart_uri_file_uri_ddc_library_bundle_test.dart b/dwds/test/integration/dart_uri_file_uri_ddc_library_bundle_test.dart index d2804fc34a..c3c5c8808f 100644 --- a/dwds/test/integration/dart_uri_file_uri_ddc_library_bundle_test.dart +++ b/dwds/test/integration/dart_uri_file_uri_ddc_library_bundle_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/dart_uri_file_uri.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -26,9 +26,6 @@ void main() { tearDownAll(provider.dispose); group('Frontend Server |', () { - runTests( - provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), - ); + runTests(provider: provider, contextFactory: FrontendServerTestContext.new); }); } diff --git a/dwds/test/integration/debug_service_amd_test.dart b/dwds/test/integration/debug_service_amd_test.dart index eb6f5d2b86..fc3253601d 100644 --- a/dwds/test/integration/debug_service_amd_test.dart +++ b/dwds/test/integration/debug_service_amd_test.dart @@ -9,8 +9,8 @@ library; import 'package:dwds_test_common/integration/debug_service.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -18,5 +18,5 @@ void main() { final provider = TestSdkConfigurationProvider(verbose: debug); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); + testAll(provider: provider, contextFactory: FrontendServerTestContext.new); } diff --git a/dwds/test/integration/debug_service_ddc_library_bundle_test.dart b/dwds/test/integration/debug_service_ddc_library_bundle_test.dart index c2978d59c9..78535159ee 100644 --- a/dwds/test/integration/debug_service_ddc_library_bundle_test.dart +++ b/dwds/test/integration/debug_service_ddc_library_bundle_test.dart @@ -10,8 +10,8 @@ import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/integration/debug_service.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -24,5 +24,5 @@ void main() { ); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); + testAll(provider: provider, contextFactory: FrontendServerTestContext.new); } diff --git a/dwds/test/integration/devtools_amd_test.dart b/dwds/test/integration/devtools_amd_test.dart index 2ff69527fa..fb4a867b3d 100644 --- a/dwds/test/integration/devtools_amd_test.dart +++ b/dwds/test/integration/devtools_amd_test.dart @@ -10,8 +10,8 @@ import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/integration/devtools.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { final provider = TestSdkConfigurationProvider( @@ -19,5 +19,5 @@ void main() { ); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); + testAll(provider: provider, contextFactory: FrontendServerTestContext.new); } diff --git a/dwds/test/integration/devtools_ddc_library_bundle_test.dart b/dwds/test/integration/devtools_ddc_library_bundle_test.dart index 886a5a3f13..c3c9d5b72a 100644 --- a/dwds/test/integration/devtools_ddc_library_bundle_test.dart +++ b/dwds/test/integration/devtools_ddc_library_bundle_test.dart @@ -10,8 +10,8 @@ import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/integration/devtools.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { final provider = TestSdkConfigurationProvider( @@ -20,5 +20,5 @@ void main() { ); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); + testAll(provider: provider, contextFactory: FrontendServerTestContext.new); } diff --git a/dwds/test/integration/evaluate_amd_test.dart b/dwds/test/integration/evaluate_amd_test.dart index 3cf9f3fcc8..e92cd122bf 100644 --- a/dwds/test/integration/evaluate_amd_test.dart +++ b/dwds/test/integration/evaluate_amd_test.dart @@ -10,19 +10,16 @@ library; import 'dart:io'; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/fixtures/project.dart'; import 'package:dwds_test_common/integration/evaluate.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; -import '../../../webdev/test/helpers/context.dart'; import 'fixtures/frontend_server_context.dart'; -import 'package:test/test.dart'; - void main() async { // Enable verbose logging for debugging. - const debug = false; + const debug = true; final provider = TestSdkConfigurationProvider( verbose: debug, @@ -39,7 +36,7 @@ void main() async { () { testAll( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, indexBaseMode: indexBaseMode, useDebuggerModuleNames: useDebuggerModuleNames, ); diff --git a/dwds/test/integration/evaluate_ddc_library_bundle_test.dart b/dwds/test/integration/evaluate_ddc_library_bundle_test.dart index 605d5555c3..a5083d4f55 100644 --- a/dwds/test/integration/evaluate_ddc_library_bundle_test.dart +++ b/dwds/test/integration/evaluate_ddc_library_bundle_test.dart @@ -10,13 +10,13 @@ library; import 'dart:io'; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/fixtures/project.dart'; import 'package:dwds_test_common/integration/evaluate.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() async { // Enable verbose logging for debugging. @@ -39,7 +39,7 @@ void main() async { () { testAll( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, indexBaseMode: indexBaseMode, useDebuggerModuleNames: useDebuggerModuleNames, ); diff --git a/dwds/test/integration/events_amd_test.dart b/dwds/test/integration/events_amd_test.dart index 1667e75e8a..cc6a8fa79f 100644 --- a/dwds/test/integration/events_amd_test.dart +++ b/dwds/test/integration/events_amd_test.dart @@ -14,8 +14,6 @@ import 'package:dwds_test_common/integration/events.dart'; import 'package:dwds_test_common/logging.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { final provider = TestSdkConfigurationProvider(); diff --git a/dwds/test/integration/events_ddc_library_bundle_test.dart b/dwds/test/integration/events_ddc_library_bundle_test.dart index b603fcc467..fbe9d3f5f5 100644 --- a/dwds/test/integration/events_ddc_library_bundle_test.dart +++ b/dwds/test/integration/events_ddc_library_bundle_test.dart @@ -6,12 +6,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/events.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -27,7 +27,7 @@ void main() { group('Frontend Server', () { testWithDwds( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, ); }); } diff --git a/dwds/test/integration/expression_compiler_service_amd_test.dart b/dwds/test/integration/expression_compiler_service_amd_test.dart index e880f2b283..77902c2fc0 100644 --- a/dwds/test/integration/expression_compiler_service_amd_test.dart +++ b/dwds/test/integration/expression_compiler_service_amd_test.dart @@ -11,7 +11,6 @@ import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/integration/expression_compiler_service.dart'; import 'package:test/test.dart'; -import '../../../webdev/test/helpers/context.dart'; import 'fixtures/frontend_server_context.dart'; void main() async { @@ -21,7 +20,6 @@ void main() async { canaryFeatures: false, experiments: const [], ), - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, ); - } diff --git a/dwds/test/integration/expression_compiler_service_ddc_library_bundle_test.dart b/dwds/test/integration/expression_compiler_service_ddc_library_bundle_test.dart index bf88ddc965..0d077e0281 100644 --- a/dwds/test/integration/expression_compiler_service_ddc_library_bundle_test.dart +++ b/dwds/test/integration/expression_compiler_service_ddc_library_bundle_test.dart @@ -11,7 +11,6 @@ import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/integration/expression_compiler_service.dart'; import 'package:test/test.dart'; -import '../../../webdev/test/helpers/context.dart'; import 'fixtures/frontend_server_context.dart'; void main() async { @@ -21,7 +20,6 @@ void main() async { canaryFeatures: true, experiments: const [], ), - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, ); - } diff --git a/dwds/test/integration/fixtures/frontend_server_context.dart b/dwds/test/integration/fixtures/frontend_server_context.dart index 86b933d250..86f99da9b8 100644 --- a/dwds/test/integration/fixtures/frontend_server_context.dart +++ b/dwds/test/integration/fixtures/frontend_server_context.dart @@ -1,19 +1,13 @@ import 'dart:io'; -import 'package:dwds/data/build_result.dart' as dwds; import 'package:dwds/asset_reader.dart'; +import 'package:dwds/data/build_result.dart' as dwds; import 'package:dwds/expression_compiler.dart'; import 'package:dwds/src/loaders/frontend_server_strategy_provider.dart'; - - -import 'package:dwds/src/loaders/strategy.dart'; import 'package:dwds/src/utilities/server.dart'; import 'package:dwds_test_common/fixtures/context.dart'; -import 'package:dwds_test_common/fixtures/project.dart'; import 'package:dwds_test_common/fixtures/utilities.dart'; -import 'package:dwds_test_common/frontend_server_common/devfs.dart'; import 'package:dwds_test_common/frontend_server_common/resident_runner.dart'; -import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:dwds_test_common/utilities.dart'; import 'package:file/local.dart'; import 'package:logging/logging.dart' as logging; @@ -22,10 +16,7 @@ import 'package:path/path.dart' as p; class FrontendServerTestContext extends TestContext { final _logger = logging.Logger('FrontendServerTestContext'); - FrontendServerTestContext( - super.project, - super.sdkConfigurationProvider, - ); + FrontendServerTestContext(super.project, super.sdkConfigurationProvider); @override bool get usesFrontendServer => true; @@ -73,9 +64,7 @@ class FrontendServerTestContext extends TestContext { projectDirectory: Directory(project.absolutePackageDirectory).uri, packageConfigFile: project.packageConfigFile, packageUriMapper: packageUriMapper, - fileSystemRoots: [ - Directory(project.absolutePackageDirectory).uri, - ], + fileSystemRoots: [Directory(project.absolutePackageDirectory).uri], fileSystemScheme: 'org-dartlang-app', outputPath: outputDir.path, compilerOptions: compilerOptions, @@ -92,9 +81,9 @@ class FrontendServerTestContext extends TestContext { index: filePathToServe, ); - if (testSettings.enableExpressionEvaluation) { - expressionCompiler = webRunner.expressionCompiler; - } + expressionCompiler = testSettings.enableExpressionEvaluation + ? webRunner.expressionCompiler + : null; basePath = webRunner.devFS!.assetServer.basePath; assetReader = webRunner.devFS!.assetServer; diff --git a/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart b/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart index a3f59ef25c..3d51827e0f 100644 --- a/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart +++ b/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/hot_reload_breakpoints.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -27,9 +27,6 @@ void main() { tearDownAll(provider.dispose); group('Frontend Server', () { - runTests( - provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), - ); + runTests(provider: provider, contextFactory: FrontendServerTestContext.new); }); } diff --git a/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart b/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart index 271245ec6a..e709feff33 100644 --- a/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart +++ b/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/hot_reload.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -27,9 +27,6 @@ void main() { tearDownAll(provider.dispose); group('Frontend Server', () { - runTests( - provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), - ); + runTests(provider: provider, contextFactory: FrontendServerTestContext.new); }); } 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 6587a7681f..985116cc58 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 @@ -8,12 +8,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/hot_restart_breakpoints.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -27,9 +27,6 @@ void main() { tearDownAll(provider.dispose); group('Frontend Server', () { - runTests( - provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), - ); + runTests(provider: provider, contextFactory: FrontendServerTestContext.new); }); } 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 3d357d2a60..72ccbe78ea 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 @@ -8,12 +8,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/hot_restart_correctness.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -27,11 +27,11 @@ void main() { canaryFeatures: canaryFeatures, ddcModuleFormat: moduleFormat, ); - + runTests( provider: provider, moduleFormat: moduleFormat, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, canaryFeatures: canaryFeatures, ); }); 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 9f3ac39f63..46c4ff2f3a 100644 --- a/dwds/test/integration/hot_restart_ddc_library_bundle_test.dart +++ b/dwds/test/integration/hot_restart_ddc_library_bundle_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/hot_restart.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -22,7 +22,6 @@ void main() { final moduleFormat = ModuleFormat.ddc; group('canary: $canaryFeatures | Frontend Server |', () { - final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -32,7 +31,7 @@ void main() { runTests( provider: provider, moduleFormat: moduleFormat, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/inspector_amd_test.dart b/dwds/test/integration/inspector_amd_test.dart index 84bd279993..bf3e13864c 100644 --- a/dwds/test/integration/inspector_amd_test.dart +++ b/dwds/test/integration/inspector_amd_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/inspector.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -25,9 +25,6 @@ void main() { tearDownAll(provider.dispose); group('Frontend Server |', () { - runTests( - provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), - ); + runTests(provider: provider, contextFactory: FrontendServerTestContext.new); }); } diff --git a/dwds/test/integration/inspector_ddc_library_bundle_test.dart b/dwds/test/integration/inspector_ddc_library_bundle_test.dart index 79aa112cdb..b2565b009c 100644 --- a/dwds/test/integration/inspector_ddc_library_bundle_test.dart +++ b/dwds/test/integration/inspector_ddc_library_bundle_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/inspector.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -26,9 +26,6 @@ void main() { tearDownAll(provider.dispose); group('Frontend Server |', () { - runTests( - provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), - ); + runTests(provider: provider, contextFactory: FrontendServerTestContext.new); }); } diff --git a/dwds/test/integration/instances/class_inspection_amd_test.dart b/dwds/test/integration/instances/class_inspection_amd_test.dart index fa5b67bc46..a9789ec5ae 100644 --- a/dwds/test/integration/instances/class_inspection_amd_test.dart +++ b/dwds/test/integration/instances/class_inspection_amd_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/class_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/frontend_server_context.dart'; +import '../fixtures/frontend_server_context.dart'; void main() { // Enable verbose logging for debugging. @@ -21,7 +21,7 @@ void main() { group('canary: false | Frontend Server |', () { final canaryFeatures = false; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -31,14 +31,14 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, canaryFeatures: canaryFeatures, ); }); group('canary: true | Frontend Server |', () { final canaryFeatures = true; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -48,7 +48,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart index 7f1931e6e8..f83e3c5510 100644 --- a/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/class_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/frontend_server_context.dart'; +import '../fixtures/frontend_server_context.dart'; void main() { // Enable verbose logging for debugging. @@ -21,7 +21,7 @@ void main() { group('canary: true | Frontend Server |', () { final canaryFeatures = true; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -31,7 +31,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/dot_shorthands_amd_test.dart b/dwds/test/integration/instances/dot_shorthands_amd_test.dart index 92cebc9795..db9414bfa8 100644 --- a/dwds/test/integration/instances/dot_shorthands_amd_test.dart +++ b/dwds/test/integration/instances/dot_shorthands_amd_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/dot_shorthands.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/frontend_server_context.dart'; +import '../fixtures/frontend_server_context.dart'; void main() { // Enable verbose logging for debugging. @@ -21,7 +21,7 @@ void main() { group('canary: false | Frontend Server |', () { final canaryFeatures = false; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -31,14 +31,14 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, canaryFeatures: canaryFeatures, ); }); group('canary: true | Frontend Server |', () { final canaryFeatures = true; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -48,7 +48,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart b/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart index 3d3d53c623..0e8fa43a82 100644 --- a/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/dot_shorthands.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/frontend_server_context.dart'; +import '../fixtures/frontend_server_context.dart'; void main() { // Enable verbose logging for debugging. @@ -21,7 +21,7 @@ void main() { group('canary: true | Frontend Server |', () { final canaryFeatures = true; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -31,7 +31,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/instance_amd_test.dart b/dwds/test/integration/instances/instance_amd_test.dart index 074314037c..46077c449b 100644 --- a/dwds/test/integration/instances/instance_amd_test.dart +++ b/dwds/test/integration/instances/instance_amd_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/instance.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/frontend_server_context.dart'; +import '../fixtures/frontend_server_context.dart'; void main() { // Enable verbose logging for debugging. @@ -21,7 +21,7 @@ void main() { group('canary: false | Frontend Server |', () { final canaryFeatures = false; - + final provider = TestSdkConfigurationProvider( canaryFeatures: canaryFeatures, verbose: debug, @@ -31,20 +31,20 @@ void main() { runTypeSystemVerificationTests( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, canaryFeatures: canaryFeatures, ); runTests( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, canaryFeatures: canaryFeatures, ); }); group('canary: true | Frontend Server |', () { final canaryFeatures = true; - + final provider = TestSdkConfigurationProvider( canaryFeatures: canaryFeatures, verbose: debug, @@ -54,13 +54,13 @@ void main() { runTypeSystemVerificationTests( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, canaryFeatures: canaryFeatures, ); runTests( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart b/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart index d508b6fe0e..c62bd7304c 100644 --- a/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/instance.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/frontend_server_context.dart'; +import '../fixtures/frontend_server_context.dart'; void main() { // Enable verbose logging for debugging. @@ -21,7 +21,6 @@ void main() { final moduleFormat = ModuleFormat.ddc; group('canary: true | Frontend Server |', () { - final provider = TestSdkConfigurationProvider( canaryFeatures: canaryFeatures, verbose: debug, @@ -31,7 +30,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/instance_inspection_amd_test.dart b/dwds/test/integration/instances/instance_inspection_amd_test.dart index d2a5ddeeb9..a4966a1283 100644 --- a/dwds/test/integration/instances/instance_inspection_amd_test.dart +++ b/dwds/test/integration/instances/instance_inspection_amd_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/instance_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/frontend_server_context.dart'; +import '../fixtures/frontend_server_context.dart'; void main() { // Enable verbose logging for debugging. @@ -21,7 +21,7 @@ void main() { group('canary: false | Frontend Server |', () { final canaryFeatures = false; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -31,14 +31,14 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, canaryFeatures: canaryFeatures, ); }); group('canary: true | Frontend Server |', () { final canaryFeatures = true; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -48,7 +48,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart index c545041ba4..f96a572ac8 100644 --- a/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/instance_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/frontend_server_context.dart'; +import '../fixtures/frontend_server_context.dart'; void main() { // Enable verbose logging for debugging. @@ -21,7 +21,7 @@ void main() { group('canary: true | Frontend Server |', () { final canaryFeatures = true; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -31,7 +31,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/patterns_inspection_amd_test.dart b/dwds/test/integration/instances/patterns_inspection_amd_test.dart index 82bf52423b..be9b3d7592 100644 --- a/dwds/test/integration/instances/patterns_inspection_amd_test.dart +++ b/dwds/test/integration/instances/patterns_inspection_amd_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/patterns_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/frontend_server_context.dart'; +import '../fixtures/frontend_server_context.dart'; void main() { // Enable verbose logging for debugging. @@ -21,7 +21,7 @@ void main() { group('canary: false | Frontend Server |', () { final canaryFeatures = false; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -31,14 +31,14 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, canaryFeatures: canaryFeatures, ); }); group('canary: true | Frontend Server |', () { final canaryFeatures = true; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -48,7 +48,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart index 5581e9f0e8..ee316f56eb 100644 --- a/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/patterns_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/frontend_server_context.dart'; +import '../fixtures/frontend_server_context.dart'; void main() { // Enable verbose logging for debugging. @@ -21,7 +21,7 @@ void main() { group('canary: true | Frontend Server |', () { final canaryFeatures = true; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -31,7 +31,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/record_inspection_amd_test.dart b/dwds/test/integration/instances/record_inspection_amd_test.dart index 75fa57b6b5..553a910045 100644 --- a/dwds/test/integration/instances/record_inspection_amd_test.dart +++ b/dwds/test/integration/instances/record_inspection_amd_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/record_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/frontend_server_context.dart'; +import '../fixtures/frontend_server_context.dart'; void main() { // Enable verbose logging for debugging. @@ -21,7 +21,7 @@ void main() { group('canary: false | Frontend Server |', () { final canaryFeatures = false; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -31,14 +31,14 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, canaryFeatures: canaryFeatures, ); }); group('canary: true | Frontend Server |', () { final canaryFeatures = true; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -48,7 +48,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart index ced068f471..11565480c5 100644 --- a/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/record_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/frontend_server_context.dart'; +import '../fixtures/frontend_server_context.dart'; void main() { // Enable verbose logging for debugging. @@ -21,7 +21,6 @@ void main() { final canaryFeatures = true; group('canary: true | Frontend Server |', () { - final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -30,7 +29,7 @@ void main() { tearDownAll(provider.dispose); runTests( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/record_type_inspection_amd_test.dart b/dwds/test/integration/instances/record_type_inspection_amd_test.dart index c832599bf9..a95be72d27 100644 --- a/dwds/test/integration/instances/record_type_inspection_amd_test.dart +++ b/dwds/test/integration/instances/record_type_inspection_amd_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/record_type_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/frontend_server_context.dart'; +import '../fixtures/frontend_server_context.dart'; void main() { // Enable verbose logging for debugging. @@ -21,7 +21,7 @@ void main() { group('canary: false | Frontend Server |', () { final canaryFeatures = false; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -31,14 +31,14 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, canaryFeatures: canaryFeatures, ); }); group('canary: true | Frontend Server |', () { final canaryFeatures = true; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -48,7 +48,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart index 8f87d96f60..0002d5278b 100644 --- a/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/record_type_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/frontend_server_context.dart'; +import '../fixtures/frontend_server_context.dart'; void main() { // Enable verbose logging for debugging. @@ -21,7 +21,6 @@ void main() { final canaryFeatures = true; group('canary: true | Frontend Server |', () { - final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -30,7 +29,7 @@ void main() { tearDownAll(provider.dispose); runTests( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/type_inspection_amd_test.dart b/dwds/test/integration/instances/type_inspection_amd_test.dart index f67e91bd86..47ade24bc8 100644 --- a/dwds/test/integration/instances/type_inspection_amd_test.dart +++ b/dwds/test/integration/instances/type_inspection_amd_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/type_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/frontend_server_context.dart'; +import '../fixtures/frontend_server_context.dart'; void main() { // Enable verbose logging for debugging. @@ -21,7 +21,7 @@ void main() { group('canary: false | Frontend Server |', () { final canaryFeatures = false; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -31,14 +31,14 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, canaryFeatures: canaryFeatures, ); }); group('canary: true | Frontend Server |', () { final canaryFeatures = true; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -48,7 +48,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart index 95ac70c8b9..b5e2f85a57 100644 --- a/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/type_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import '../fixtures/frontend_server_context.dart'; +import '../fixtures/frontend_server_context.dart'; void main() { // Enable verbose logging for debugging. @@ -21,7 +21,7 @@ void main() { group('canary: true | Frontend Server |', () { final canaryFeatures = true; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -31,7 +31,7 @@ void main() { runTests( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/listviews_amd_test.dart b/dwds/test/integration/listviews_amd_test.dart index 449b0d8006..6e12af0175 100644 --- a/dwds/test/integration/listviews_amd_test.dart +++ b/dwds/test/integration/listviews_amd_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/listviews.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -25,9 +25,6 @@ void main() { tearDownAll(provider.dispose); group('Frontend Server |', () { - runTests( - provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), - ); + runTests(provider: provider, contextFactory: FrontendServerTestContext.new); }); } diff --git a/dwds/test/integration/listviews_ddc_library_bundle_test.dart b/dwds/test/integration/listviews_ddc_library_bundle_test.dart index 1de002eef4..b217889fb8 100644 --- a/dwds/test/integration/listviews_ddc_library_bundle_test.dart +++ b/dwds/test/integration/listviews_ddc_library_bundle_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/listviews.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -26,9 +26,6 @@ void main() { tearDownAll(provider.dispose); group('Frontend Server |', () { - runTests( - provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), - ); + runTests(provider: provider, contextFactory: FrontendServerTestContext.new); }); } diff --git a/dwds/test/integration/load_strategy_amd_test.dart b/dwds/test/integration/load_strategy_amd_test.dart index 75d3f7ed5b..9f13d2a227 100644 --- a/dwds/test/integration/load_strategy_amd_test.dart +++ b/dwds/test/integration/load_strategy_amd_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/load_strategy.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { // Run independent tests once. @@ -30,7 +30,7 @@ void main() { group('Frontend Server |', () { runDependentTests( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, ); }); } diff --git a/dwds/test/integration/load_strategy_ddc_library_bundle_test.dart b/dwds/test/integration/load_strategy_ddc_library_bundle_test.dart index 0fe8a6a602..2d803561e6 100644 --- a/dwds/test/integration/load_strategy_ddc_library_bundle_test.dart +++ b/dwds/test/integration/load_strategy_ddc_library_bundle_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/load_strategy.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { // Run independent tests once. @@ -31,7 +31,7 @@ void main() { group('Frontend Server |', () { runDependentTests( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, ); }); } diff --git a/dwds/test/integration/parts_evaluate_amd_test.dart b/dwds/test/integration/parts_evaluate_amd_test.dart index d7e05e3d85..67b3cdeea9 100644 --- a/dwds/test/integration/parts_evaluate_amd_test.dart +++ b/dwds/test/integration/parts_evaluate_amd_test.dart @@ -10,13 +10,13 @@ library; import 'dart:io'; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/fixtures/project.dart'; import 'package:dwds_test_common/integration/evaluate_parts.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() async { // Enable verbose logging for debugging. @@ -36,7 +36,7 @@ void main() async { () { testAll( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, indexBaseMode: indexBaseMode, useDebuggerModuleNames: true, ); diff --git a/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart b/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart index 384ad0f593..8403ff0dfb 100644 --- a/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart +++ b/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart @@ -10,13 +10,13 @@ library; import 'dart:io'; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/fixtures/project.dart'; import 'package:dwds_test_common/integration/evaluate_parts.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() async { // Enable verbose logging for debugging. @@ -37,7 +37,7 @@ void main() async { () { testAll( provider: provider, - contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + contextFactory: FrontendServerTestContext.new, indexBaseMode: indexBaseMode, useDebuggerModuleNames: true, ); diff --git a/dwds/test/integration/refresh_amd_test.dart b/dwds/test/integration/refresh_amd_test.dart index 2585a024df..143822f31f 100644 --- a/dwds/test/integration/refresh_amd_test.dart +++ b/dwds/test/integration/refresh_amd_test.dart @@ -11,12 +11,12 @@ library; import 'package:dwds_test_common/integration/refresh.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { final provider = TestSdkConfigurationProvider(); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); + testAll(provider: provider, contextFactory: FrontendServerTestContext.new); } diff --git a/dwds/test/integration/refresh_ddc_library_bundle_test.dart b/dwds/test/integration/refresh_ddc_library_bundle_test.dart index 7e3a2bfe72..7569ec5398 100644 --- a/dwds/test/integration/refresh_ddc_library_bundle_test.dart +++ b/dwds/test/integration/refresh_ddc_library_bundle_test.dart @@ -12,8 +12,8 @@ import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/integration/refresh.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -27,5 +27,5 @@ void main() { ); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); + testAll(provider: provider, contextFactory: FrontendServerTestContext.new); } diff --git a/dwds/test/integration/run_request_amd_test.dart b/dwds/test/integration/run_request_amd_test.dart index f6af61f753..91ca24d327 100644 --- a/dwds/test/integration/run_request_amd_test.dart +++ b/dwds/test/integration/run_request_amd_test.dart @@ -9,8 +9,8 @@ import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/integration/run_request.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -22,5 +22,5 @@ void main() { ); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); + testAll(provider: provider, contextFactory: FrontendServerTestContext.new); } diff --git a/dwds/test/integration/run_request_ddc_library_bundle_test.dart b/dwds/test/integration/run_request_ddc_library_bundle_test.dart index 96c8226719..37306cd102 100644 --- a/dwds/test/integration/run_request_ddc_library_bundle_test.dart +++ b/dwds/test/integration/run_request_ddc_library_bundle_test.dart @@ -9,8 +9,8 @@ import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/integration/run_request.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -23,5 +23,5 @@ void main() { ); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); + testAll(provider: provider, contextFactory: FrontendServerTestContext.new); } diff --git a/dwds/test/integration/screenshot_amd_test.dart b/dwds/test/integration/screenshot_amd_test.dart index eb22b371a8..27f73202cb 100644 --- a/dwds/test/integration/screenshot_amd_test.dart +++ b/dwds/test/integration/screenshot_amd_test.dart @@ -9,8 +9,8 @@ import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/integration/screenshot.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { final provider = TestSdkConfigurationProvider( @@ -18,5 +18,5 @@ void main() { ); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); + testAll(provider: provider, contextFactory: FrontendServerTestContext.new); } diff --git a/dwds/test/integration/screenshot_ddc_library_bundle_test.dart b/dwds/test/integration/screenshot_ddc_library_bundle_test.dart index e130cea7a6..5d56a37124 100644 --- a/dwds/test/integration/screenshot_ddc_library_bundle_test.dart +++ b/dwds/test/integration/screenshot_ddc_library_bundle_test.dart @@ -9,8 +9,8 @@ import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/integration/screenshot.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -24,5 +24,5 @@ void main() { ); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); + testAll(provider: provider, contextFactory: FrontendServerTestContext.new); } diff --git a/dwds/test/integration/variable_scope_amd_test.dart b/dwds/test/integration/variable_scope_amd_test.dart index 2c6ed4456d..d3c48e41fc 100644 --- a/dwds/test/integration/variable_scope_amd_test.dart +++ b/dwds/test/integration/variable_scope_amd_test.dart @@ -9,8 +9,8 @@ library; import 'package:dwds_test_common/integration/variable_scope.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { // set to true for debug logging. @@ -19,5 +19,5 @@ void main() { final provider = TestSdkConfigurationProvider(verbose: debug); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); + testAll(provider: provider, contextFactory: FrontendServerTestContext.new); } diff --git a/dwds/test/integration/variable_scope_ddc_library_bundle_test.dart b/dwds/test/integration/variable_scope_ddc_library_bundle_test.dart index 0e5f05e655..782d196066 100644 --- a/dwds/test/integration/variable_scope_ddc_library_bundle_test.dart +++ b/dwds/test/integration/variable_scope_ddc_library_bundle_test.dart @@ -10,8 +10,8 @@ import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/integration/variable_scope.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -25,5 +25,5 @@ void main() { ); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); + testAll(provider: provider, contextFactory: FrontendServerTestContext.new); } diff --git a/dwds_test_common/analysis_options.yaml b/dwds_test_common/analysis_options.yaml index 51156f109e..08f4768a7c 100644 --- a/dwds_test_common/analysis_options.yaml +++ b/dwds_test_common/analysis_options.yaml @@ -6,5 +6,4 @@ analyzer: prefer_relative_imports: ignore exclude: - fixtures/** - errors: - implementation_imports: ignore + diff --git a/dwds_test_common/lib/fixtures/context.dart b/dwds_test_common/lib/fixtures/context.dart index 4227210347..f21bb9c000 100644 --- a/dwds_test_common/lib/fixtures/context.dart +++ b/dwds_test_common/lib/fixtures/context.dart @@ -15,7 +15,6 @@ import 'package:dwds/asset_reader.dart'; import 'package:dwds/dart_web_debug_service.dart'; import 'package:dwds/data/build_result.dart' as dwds_data; - import 'package:dwds/src/connections/app_connection.dart'; import 'package:dwds/src/connections/debug_connection.dart'; import 'package:dwds/src/debugging/webkit_debugger.dart'; @@ -69,12 +68,11 @@ Matcher isRPCErrorWithCode(int code) => isA().having((RPCError e) => e.code, 'code', equals(code)); Matcher throwsRPCErrorWithCode(int code) => throwsA(isRPCErrorWithCode(code)); -typedef TestContextFactory = TestContext Function( - TestProject project, - TestSdkConfigurationProvider sdkConfigurationProvider, -); - - +typedef TestContextFactory = + TestContext Function( + TestProject project, + TestSdkConfigurationProvider sdkConfigurationProvider, + ); abstract class TestContext { final TestProject project; @@ -136,7 +134,6 @@ abstract class TestContext { required Uri reloadedSourcesUri, }); - ExpressionCompilerService? ddcService; int get port => _port!; @@ -155,8 +152,6 @@ abstract class TestContext { late LocalFileSystem frontendServerFileSystem; - - /// Internal VM service. /// /// Prefer using [vmService] instead in tests when possible, to include @@ -181,6 +176,7 @@ abstract class TestContext { canaryFeatures: testSettings.canaryFeatures, isFlutterApp: testSettings.isFlutterApp, experiments: testSettings.experiments, + useDebuggerModuleNames: testSettings.useDebuggerModuleNames, ); // Make sure configuration was created correctly. @@ -281,7 +277,6 @@ abstract class TestContext { reloadedSourcesUri: reloadedSourcesUri, ); - final debugPort = await findUnusedPort(); if (testSettings.launchChrome) { // If the environment variable DWDS_DEBUG_CHROME is set to the string @@ -574,14 +569,18 @@ abstract class TestContext { }; } - - Future recompile({required bool fullRestart, bool allowFailure = false}) async { + Future recompile({ + required bool fullRestart, + bool allowFailure = false, + }) async { if (usesBuildDaemon) { await waitForSuccessfulBuild(allowFailure: allowFailure); } else { await webRunner.rerun( fullRestart: fullRestart, - fileServerUri: Uri.parse('http://${testServer.host}:${testServer.port}'), + fileServerUri: Uri.parse( + 'http://${testServer.host}:${testServer.port}', + ), ); } return; diff --git a/dwds_test_common/lib/integration/chrome_proxy_service.dart b/dwds_test_common/lib/integration/chrome_proxy_service.dart index a5d4ea76c9..23dada420d 100644 --- a/dwds_test_common/lib/integration/chrome_proxy_service.dart +++ b/dwds_test_common/lib/integration/chrome_proxy_service.dart @@ -44,7 +44,7 @@ void runTests({ verboseCompiler: false, moduleFormat: provider.ddcModuleFormat, canaryFeatures: canaryFeatures, - ), + ), ); }); diff --git a/dwds_test_common/lib/integration/class_inspection.dart b/dwds_test_common/lib/integration/class_inspection.dart index e6313acd78..76ae37bc0a 100644 --- a/dwds_test_common/lib/integration/class_inspection.dart +++ b/dwds_test_common/lib/integration/class_inspection.dart @@ -43,75 +43,78 @@ void runTests({ Future getObject(String instanceId) => service.getObject(isolateId, instanceId); - group('${context.usesFrontendServer ? "frontendServer" : "buildDaemon"} |', () { - setUpAll(() async { - setCurrentLogWriter(debug: provider.verbose); - await context.setUp( - testSettings: TestSettings( - enableExpressionEvaluation: true, - verboseCompiler: provider.verbose, - experiments: ['dot-shorthands'], - canaryFeatures: canaryFeatures, - moduleFormat: provider.ddcModuleFormat, - ), - ); - service = context.debugConnection.vmService; + group( + '${context.usesFrontendServer ? "frontendServer" : "buildDaemon"} |', + () { + setUpAll(() async { + setCurrentLogWriter(debug: provider.verbose); + await context.setUp( + testSettings: TestSettings( + enableExpressionEvaluation: true, + verboseCompiler: provider.verbose, + experiments: ['dot-shorthands'], + canaryFeatures: canaryFeatures, + moduleFormat: provider.ddcModuleFormat, + ), + ); + service = context.debugConnection.vmService; - final vm = await service.getVM(); - isolateId = vm.isolates!.first.id!; - final scripts = await service.getScripts(isolateId); + final vm = await service.getVM(); + isolateId = vm.isolates!.first.id!; + final scripts = await service.getScripts(isolateId); - await service.streamListen('Debug'); - stream = service.onEvent('Debug'); + await service.streamListen('Debug'); + stream = service.onEvent('Debug'); - mainScript = scripts.scripts!.firstWhere( - (each) => each.uri!.contains('main.dart'), - ); - }); + mainScript = scripts.scripts!.firstWhere( + (each) => each.uri!.contains('main.dart'), + ); + }); - tearDownAll(() async { - await context.tearDown(); - }); + tearDownAll(() async { + await context.tearDown(); + }); - setUp(() => setCurrentLogWriter(debug: provider.verbose)); - tearDown(() => service.resume(isolateId)); + setUp(() => setCurrentLogWriter(debug: provider.verbose)); + tearDown(() => service.resume(isolateId)); - group('calling getObject for an existent class', () { - test('returns the correct class representation', () async { - await onBreakPoint('testClass1Case1', (Event event) async { - // classes|dart:core|Object_Diagnosticable - final result = await getObject( - 'classes|org-dartlang-app:///web/main.dart|GreeterClass', - ); - final clazz = result as Class?; - expect(clazz!.name, equals('GreeterClass')); - expect( - clazz.fields!.map((field) => field.name), - unorderedEquals(['greeteeName', 'useFrench']), - ); - expect( - clazz.functions!.map((fn) => fn.name), - containsAll(['sayHello', 'greetInEnglish', 'greetInFrench']), - ); + group('calling getObject for an existent class', () { + test('returns the correct class representation', () async { + await onBreakPoint('testClass1Case1', (Event event) async { + // classes|dart:core|Object_Diagnosticable + final result = await getObject( + 'classes|org-dartlang-app:///web/main.dart|GreeterClass', + ); + final clazz = result as Class?; + expect(clazz!.name, equals('GreeterClass')); + expect( + clazz.fields!.map((field) => field.name), + unorderedEquals(['greeteeName', 'useFrench']), + ); + expect( + clazz.functions!.map((fn) => fn.name), + containsAll(['sayHello', 'greetInEnglish', 'greetInFrench']), + ); + }); }); }); - }); - group('calling getObject for a non-existent class', () { - // TODO(https://github.com/dart-lang/webdev/issues/2297): Ideally we - // should throw an error in this case for the client to catch instead - // of returning an empty class. - test('returns an empty class representation', () async { - await onBreakPoint('testClass1Case1', (Event event) async { - final result = await getObject( - 'classes|dart:core|Object_Diagnosticable', - ); - final clazz = result as Class?; - expect(clazz!.name, equals('Object_Diagnosticable')); - expect(clazz.fields, isEmpty); - expect(clazz.functions, isEmpty); + group('calling getObject for a non-existent class', () { + // TODO(https://github.com/dart-lang/webdev/issues/2297): Ideally we + // should throw an error in this case for the client to catch instead + // of returning an empty class. + test('returns an empty class representation', () async { + await onBreakPoint('testClass1Case1', (Event event) async { + final result = await getObject( + 'classes|dart:core|Object_Diagnosticable', + ); + final clazz = result as Class?; + expect(clazz!.name, equals('Object_Diagnosticable')); + expect(clazz.fields, isEmpty); + expect(clazz.functions, isEmpty); + }); }); }); - }); - }); + }, + ); } diff --git a/dwds_test_common/lib/integration/dart_uri_file_uri.dart b/dwds_test_common/lib/integration/dart_uri_file_uri.dart index 0052d3cfef..654d6c2748 100644 --- a/dwds_test_common/lib/integration/dart_uri_file_uri.dart +++ b/dwds_test_common/lib/integration/dart_uri_file_uri.dart @@ -29,8 +29,7 @@ void runTests({ ? 'web/main.dart' : 'main.dart'; - final serverPath = - context.usesFrontendServer && useDebuggerModuleNames + final serverPath = context.usesFrontendServer && useDebuggerModuleNames ? 'packages/${testPackageProject.packageDirectory}/lib/test_library.dart' : 'packages/${testPackageProject.packageName}/test_library.dart'; @@ -39,7 +38,6 @@ void runTests({ ? 'packages/${testProject.packageDirectory}/lib/library.dart' : 'packages/${testProject.packageName}/library.dart'; - setUpAll(() async { await context.setUp( testSettings: TestSettings( diff --git a/dwds_test_common/lib/integration/dot_shorthands.dart b/dwds_test_common/lib/integration/dot_shorthands.dart index c4111e960a..e60b5e6765 100644 --- a/dwds_test_common/lib/integration/dot_shorthands.dart +++ b/dwds_test_common/lib/integration/dot_shorthands.dart @@ -39,110 +39,113 @@ void runTests({ Future getInstanceRef(int frame, String expression) => testInspector.getInstanceRef(isolateId, frame, expression); - group('${context.usesFrontendServer ? "frontendServer" : "buildDaemon"} | dot shorthands:', () { - setUp(() async { - setCurrentLogWriter(debug: provider.verbose); - await context.setUp( - testSettings: TestSettings( - enableExpressionEvaluation: true, - verboseCompiler: provider.verbose, - experiments: ['dot-shorthands'], - canaryFeatures: canaryFeatures, - moduleFormat: provider.ddcModuleFormat, - ), - ); - service = context.debugConnection.vmService; - - final vm = await service.getVM(); - isolateId = vm.isolates!.first.id!; - final scripts = await service.getScripts(isolateId); - - await service.streamListen(EventStreams.kDebug); - stream = service.onDebugEvent; - - mainScript = scripts.scripts!.firstWhere( - (each) => each.uri!.contains('main.dart'), - ); - }); - - tearDown(() async { - await context.tearDown(); - }); - - test('expression evaluation', () async { - final bp = onBreakpoint('testDotShorthands', (Event event) async { - final frame = event.topFrame!.index!; - - var instanceRef = await getInstanceRef(frame, '(c = .two).value'); - expect(instanceRef.valueAsString, '2'); - - instanceRef = await getInstanceRef(frame, '(c = .three).value'); - expect(instanceRef.valueAsString, '3'); - - instanceRef = await getInstanceRef(frame, '(c = .four()).value'); - expect(instanceRef.valueAsString, '4'); - - await service.resume(isolateId); + group( + '${context.usesFrontendServer ? "frontendServer" : "buildDaemon"} | dot shorthands:', + () { + setUp(() async { + setCurrentLogWriter(debug: provider.verbose); + await context.setUp( + testSettings: TestSettings( + enableExpressionEvaluation: true, + verboseCompiler: provider.verbose, + experiments: ['dot-shorthands'], + canaryFeatures: canaryFeatures, + moduleFormat: provider.ddcModuleFormat, + ), + ); + service = context.debugConnection.vmService; + + final vm = await service.getVM(); + isolateId = vm.isolates!.first.id!; + final scripts = await service.getScripts(isolateId); + + await service.streamListen(EventStreams.kDebug); + stream = service.onDebugEvent; + + mainScript = scripts.scripts!.firstWhere( + (each) => each.uri!.contains('main.dart'), + ); }); - final isolate = await service.getIsolate(isolateId); - await service.evaluate( - isolateId, - isolate.rootLib!.id!, - 'testDotShorthands()', - ); - await bp; - }); - - test('single-stepping', () async { - final bp = onBreakpoint('testDotShorthands', (Event event) async { - final scriptBasename = basename(mainScript.uri!); - - const lineA = 9; - const lineB = 11; - const lineC = 12; - const lineD = 13; - const lineE = 20; - const lineF = 22; - const lineG = 24; - const lineH = 25; - - final expected = [ - '$scriptBasename:$lineE:3', // on 'c' - '$scriptBasename:$lineB:15', // on 'C' - '$scriptBasename:$lineA:10', // on 'v' of 'value' - '$scriptBasename:$lineA:16', // on ';' - '$scriptBasename:$lineB:20', // on '2' - '$scriptBasename:$lineF:3', // on 'c' - '$scriptBasename:$lineC:25', // on 'C' - '$scriptBasename:$lineA:10', // on 'v' of 'value' - '$scriptBasename:$lineA:16', // on ';' - '$scriptBasename:$lineC:27', // on '3' - '$scriptBasename:$lineG:3', // on 'c' - '$scriptBasename:$lineD:22', // on 'C' - '$scriptBasename:$lineA:10', // on 'v' of 'value' - '$scriptBasename:$lineA:16', // on ';' - '$scriptBasename:$lineD:24', // on '4' - '$scriptBasename:$lineH:3', // on 'p' of 'print' - ]; - - final stops = []; - await testInspector.runStepIntoThroughProgramRecordingStops( + + tearDown(() async { + await context.tearDown(); + }); + + test('expression evaluation', () async { + final bp = onBreakpoint('testDotShorthands', (Event event) async { + final frame = event.topFrame!.index!; + + var instanceRef = await getInstanceRef(frame, '(c = .two).value'); + expect(instanceRef.valueAsString, '2'); + + instanceRef = await getInstanceRef(frame, '(c = .three).value'); + expect(instanceRef.valueAsString, '3'); + + instanceRef = await getInstanceRef(frame, '(c = .four()).value'); + expect(instanceRef.valueAsString, '4'); + + await service.resume(isolateId); + }); + final isolate = await service.getIsolate(isolateId); + await service.evaluate( isolateId, - stops, - expected.length, + isolate.rootLib!.id!, + 'testDotShorthands()', ); + await bp; + }); - expect(stops, expected); - - await service.resume(isolateId); + test('single-stepping', () async { + final bp = onBreakpoint('testDotShorthands', (Event event) async { + final scriptBasename = basename(mainScript.uri!); + + const lineA = 9; + const lineB = 11; + const lineC = 12; + const lineD = 13; + const lineE = 20; + const lineF = 22; + const lineG = 24; + const lineH = 25; + + final expected = [ + '$scriptBasename:$lineE:3', // on 'c' + '$scriptBasename:$lineB:15', // on 'C' + '$scriptBasename:$lineA:10', // on 'v' of 'value' + '$scriptBasename:$lineA:16', // on ';' + '$scriptBasename:$lineB:20', // on '2' + '$scriptBasename:$lineF:3', // on 'c' + '$scriptBasename:$lineC:25', // on 'C' + '$scriptBasename:$lineA:10', // on 'v' of 'value' + '$scriptBasename:$lineA:16', // on ';' + '$scriptBasename:$lineC:27', // on '3' + '$scriptBasename:$lineG:3', // on 'c' + '$scriptBasename:$lineD:22', // on 'C' + '$scriptBasename:$lineA:10', // on 'v' of 'value' + '$scriptBasename:$lineA:16', // on ';' + '$scriptBasename:$lineD:24', // on '4' + '$scriptBasename:$lineH:3', // on 'p' of 'print' + ]; + + final stops = []; + await testInspector.runStepIntoThroughProgramRecordingStops( + isolateId, + stops, + expected.length, + ); + + expect(stops, expected); + + await service.resume(isolateId); + }); + final isolate = await service.getIsolate(isolateId); + await service.evaluate( + isolateId, + isolate.rootLib!.id!, + 'testDotShorthands()', + ); + await bp; }); - final isolate = await service.getIsolate(isolateId); - await service.evaluate( - isolateId, - isolate.rootLib!.id!, - 'testDotShorthands()', - ); - await bp; - }); - }); + }, + ); } diff --git a/dwds_test_common/lib/integration/evaluate.dart b/dwds_test_common/lib/integration/evaluate.dart index 8d63129bca..aeb4f74c67 100644 --- a/dwds_test_common/lib/integration/evaluate.dart +++ b/dwds_test_common/lib/integration/evaluate.dart @@ -29,14 +29,12 @@ void testAll({ final testPackageProject = TestProject.testPackage(baseMode: indexBaseMode); final context = contextFactory(testPackageProject, provider); - if (context.usesBuildDaemon && - indexBaseMode == IndexBaseMode.base) { + if (context.usesBuildDaemon && indexBaseMode == IndexBaseMode.base) { throw StateError( 'build daemon scenario does not support non-empty base in index file', ); } - Future onBp( Stream stream, String isolate, diff --git a/dwds_test_common/lib/integration/evaluate_circular.dart b/dwds_test_common/lib/integration/evaluate_circular.dart index 6814433a8c..a4d2d7a1f4 100644 --- a/dwds_test_common/lib/integration/evaluate_circular.dart +++ b/dwds_test_common/lib/integration/evaluate_circular.dart @@ -25,14 +25,12 @@ void testAll({ final testCircular2 = TestProject.testCircular2(baseMode: indexBaseMode); final context = contextFactory(testCircular2, provider); - if (context.usesBuildDaemon && - indexBaseMode == IndexBaseMode.base) { + if (context.usesBuildDaemon && indexBaseMode == IndexBaseMode.base) { throw StateError( 'build daemon scenario does not support non-empty base in index file', ); } - Future onBreakPoint( String isolate, ScriptRef script, diff --git a/dwds_test_common/lib/integration/evaluate_parts.dart b/dwds_test_common/lib/integration/evaluate_parts.dart index fb499fecda..ba0082526b 100644 --- a/dwds_test_common/lib/integration/evaluate_parts.dart +++ b/dwds_test_common/lib/integration/evaluate_parts.dart @@ -20,14 +20,12 @@ void testAll({ final testParts = TestProject.testParts(baseMode: indexBaseMode); final context = contextFactory(testParts, provider); - if (context.usesBuildDaemon && - indexBaseMode == IndexBaseMode.base) { + if (context.usesBuildDaemon && indexBaseMode == IndexBaseMode.base) { throw StateError( 'build daemon scenario does not support non-empty base in index file', ); } - Future onBreakPoint( String isolate, ScriptRef script, diff --git a/dwds_test_common/lib/integration/expression_compiler_service.dart b/dwds_test_common/lib/integration/expression_compiler_service.dart index eb5dc4e025..c7ee804a99 100644 --- a/dwds_test_common/lib/integration/expression_compiler_service.dart +++ b/dwds_test_common/lib/integration/expression_compiler_service.dart @@ -20,7 +20,6 @@ import 'package:logging/logging.dart'; import 'package:shelf/shelf.dart'; import 'package:test/test.dart'; - ExpressionCompilerService get service => _service!; late ExpressionCompilerService? _service; diff --git a/dwds_test_common/lib/integration/hot_reload.dart b/dwds_test_common/lib/integration/hot_reload.dart index a989f60fba..89c45b8ecc 100644 --- a/dwds_test_common/lib/integration/hot_reload.dart +++ b/dwds_test_common/lib/integration/hot_reload.dart @@ -23,14 +23,20 @@ void runTests({ final project = TestProject.testHotReload; final context = contextFactory(project, provider); - - Future recompile({bool fullRestart = false, bool hasEdits = false}) async { + Future recompile({ + bool fullRestart = false, + bool hasEdits = false, + bool allowFailure = false, + }) async { if (context.usesBuildDaemon) { if (hasEdits) { - await context.waitForSuccessfulBuild(); + await context.waitForSuccessfulBuild(allowFailure: allowFailure); } } else { - await context.recompile(fullRestart: fullRestart); + await context.recompile( + fullRestart: fullRestart, + allowFailure: allowFailure, + ); } } @@ -171,7 +177,7 @@ class Foo extends Bar {} newString: 'class Foo extends Bar', ), ]); - await recompile(hasEdits: true); + await recompile(hasEdits: true, allowFailure: true); report = await fakeClient.reloadSources(isolate.id!); expect(report.success, false); diff --git a/dwds_test_common/lib/integration/hot_reload_breakpoints.dart b/dwds_test_common/lib/integration/hot_reload_breakpoints.dart index fdd7799432..5b6c7d13ad 100644 --- a/dwds_test_common/lib/integration/hot_reload_breakpoints.dart +++ b/dwds_test_common/lib/integration/hot_reload_breakpoints.dart @@ -22,9 +22,22 @@ void runTests({ final callLogMarker = 'callLog'; final capturedStringMarker = 'capturedString'; + Future recompile({ + bool fullRestart = false, + bool hasEdits = false, + }) async { + if (context.usesBuildDaemon) { + if (hasEdits) { + await context.waitForSuccessfulBuild(); + } + } else { + await context.recompile(fullRestart: fullRestart); + } + } + Future makeEditsAndRecompile(List edits) async { await context.makeEdits(edits); - await context.recompile(fullRestart: true); + await recompile(fullRestart: true, hasEdits: true); } group('when pause_isolates_on_start is true', () { @@ -220,7 +233,7 @@ void runTests({ await breakpointFuture; await resumeAndWaitForLog(genString); - await context.recompile(fullRestart: false); + await recompile(fullRestart: false, hasEdits: false); await hotReloadAndHandlePausePost([ (file: mainFile, breakpointMarker: callLogMarker, bp: bp), @@ -356,13 +369,6 @@ void runTests({ final libFile = 'library.dart'; final libGenLog = 'library gen0'; final libValueMarker = 'libValue'; - context.addLibraryFile( - libFileName: libFile, - contents: - '''String get libraryValue { - return '$libGenLog'; // Breakpoint: $libValueMarker - }''', - ); final oldImports = "import 'dart:js_interop';"; final newImports = '$oldImports\n' @@ -373,7 +379,18 @@ void runTests({ final oldLog = "log('\$mainValue');"; final newLog = "log('\$libraryValue');"; edits.add((file: mainFile, originalString: oldLog, newString: newLog)); - await makeEditsAndRecompile(edits); + + await context.makeEdits(edits); + + context.addLibraryFile( + libFileName: libFile, + contents: + '''String get libraryValue { + return '$libGenLog'; // Breakpoint: $libValueMarker + }''', + ); + + await recompile(fullRestart: true, hasEdits: true); await hotReloadAndHandlePausePost([ (file: mainFile, breakpointMarker: callLogMarker, bp: bp), @@ -420,13 +437,6 @@ void runTests({ final edits = []; for (var i = 1; i <= numFiles; i++) { final libFile = 'library$i.dart'; - context.addLibraryFile( - libFileName: libFile, - contents: - '''String get libraryValue$i { - return 'library$i gen1'; // Breakpoint: libValue$i - }''', - ); final oldImports = "import 'dart:js_interop';"; final newImports = '$oldImports\n' @@ -440,7 +450,21 @@ void runTests({ final oldLog = "log('\$mainValue');"; final newLog = "log('\$libraryValue$numFiles');"; edits.add((file: mainFile, originalString: oldLog, newString: newLog)); - await makeEditsAndRecompile(edits); + + await context.makeEdits(edits); + + for (var i = 1; i <= numFiles; i++) { + final libFile = 'library$i.dart'; + context.addLibraryFile( + libFileName: libFile, + contents: + '''String get libraryValue$i { + return 'library$i gen1'; // Breakpoint: libValue$i + }''', + ); + } + + await recompile(fullRestart: true, hasEdits: true); await hotReloadAndHandlePausePost([ (file: mainFile, breakpointMarker: callLogMarker, bp: bp), diff --git a/dwds_test_common/lib/integration/hot_restart_breakpoints.dart b/dwds_test_common/lib/integration/hot_restart_breakpoints.dart index b03ab5f910..5e055d2bb4 100644 --- a/dwds_test_common/lib/integration/hot_restart_breakpoints.dart +++ b/dwds_test_common/lib/integration/hot_restart_breakpoints.dart @@ -23,13 +23,22 @@ void runTests({ final mainFile = project.dartEntryFileName; final callLogMarker = 'callLog'; + Future recompile({ + bool fullRestart = false, + bool hasEdits = false, + }) async { + if (context.usesBuildDaemon) { + if (hasEdits) { + await context.waitForSuccessfulBuild(); + } + } else if (context.usesFrontendServer) { + await context.recompile(fullRestart: fullRestart); + } + } + Future makeEditsAndRecompile(List edits) async { await context.makeEdits(edits); - if (context.usesFrontendServer) { - await context.recompile(fullRestart: true); - } else { - await context.waitForSuccessfulBuild(); - } + await recompile(fullRestart: true, hasEdits: true); } group('when pause_isolates_on_start is true', () { @@ -189,9 +198,7 @@ void runTests({ final breakpointFuture = waitForBreakpoint(); - if (context.usesFrontendServer) { - await context.recompile(fullRestart: false); - } + await recompile(fullRestart: false, hasEdits: false); await hotRestartAndHandlePausePost([ (exists: true, file: mainFile, breakpointMarker: callLogMarker), diff --git a/dwds_test_common/lib/integration/instance.dart b/dwds_test_common/lib/integration/instance.dart index 8276f81e99..a9e95a6fca 100644 --- a/dwds_test_common/lib/integration/instance.dart +++ b/dwds_test_common/lib/integration/instance.dart @@ -23,37 +23,35 @@ void runTypeSystemVerificationTests({ final project = TestProject.testScopes; final context = contextFactory(project, provider); - group('${context.usesFrontendServer ? "frontendServer" : "buildDaemon"} |', () { - - late ChromeAppInspector inspector; - - setUpAll(() async { - setCurrentLogWriter(debug: provider.verbose); - await context.setUp( - testSettings: TestSettings( - verboseCompiler: provider.verbose, - canaryFeatures: canaryFeatures, - ), - ); - final chromeProxyService = context.service; - inspector = chromeProxyService.inspector; - }); - - tearDownAll(() async { - await context.tearDown(); - }); - - final url = 'org-dartlang-app:///example/scopes/main.dart'; - - String libraryName() => - context.usesFrontendServer - ? 'example/scopes/main.dart' - : 'example/scopes/main'; - - String libraryVariableTypeExpression( - String variable, - ) => - ''' + group( + '${context.usesFrontendServer ? "frontendServer" : "buildDaemon"} |', + () { + late ChromeAppInspector inspector; + + setUpAll(() async { + setCurrentLogWriter(debug: provider.verbose); + await context.setUp( + testSettings: TestSettings( + verboseCompiler: provider.verbose, + canaryFeatures: canaryFeatures, + ), + ); + final chromeProxyService = context.service; + inspector = chromeProxyService.inspector; + }); + + tearDownAll(() async { + await context.tearDown(); + }); + + final url = 'org-dartlang-app:///example/scopes/main.dart'; + + String libraryName() => context.usesFrontendServer + ? 'example/scopes/main.dart' + : 'example/scopes/main'; + + String libraryVariableTypeExpression(String variable) => + ''' (function() { var dart = ${globalToolConfiguration.loadStrategy.loadModuleSnippet}('dart_sdk').dart; var libraryName = '${libraryName()}'; @@ -63,17 +61,18 @@ void runTypeSystemVerificationTests({ })(); '''; - group('compiler', () { - setUp(() => setCurrentLogWriter(debug: provider.verbose)); + group('compiler', () { + setUp(() => setCurrentLogWriter(debug: provider.verbose)); - test('uses correct type system', () async { - final remoteObject = await inspector.jsEvaluate( - libraryVariableTypeExpression('libraryPublicFinal'), - ); - expect(remoteObject.json['className'], 'dart_rti.Rti.new'); + test('uses correct type system', () async { + final remoteObject = await inspector.jsEvaluate( + libraryVariableTypeExpression('libraryPublicFinal'), + ); + expect(remoteObject.json['className'], 'dart_rti.Rti.new'); + }); }); - }); - }); + }, + ); } void runTests({ @@ -86,425 +85,429 @@ void runTests({ late ChromeAppInspector inspector; - group('${context.usesFrontendServer ? "frontendServer" : "buildDaemon"} |', () { - setUpAll(() async { - setCurrentLogWriter(debug: provider.verbose); - await context.setUp( - testSettings: TestSettings( - verboseCompiler: provider.verbose, - canaryFeatures: canaryFeatures, - moduleFormat: provider.ddcModuleFormat, - ), - ); - final chromeProxyService = context.service; - inspector = chromeProxyService.inspector; - }); - - tearDownAll(() async { - await context.tearDown(); - }); - - final libraryUri = 'org-dartlang-app:///example/scopes/main.dart'; - - String newInterceptorsExpression(String type) => - 'new (require("dart_sdk")._interceptors.$type).new()'; - - final newDartError = 'new (require("dart_sdk").dart).DartError'; - - /// A reference to the the variable `libraryPublicFinal`, an instance of - /// `MyTestClass`. - Future getLibraryPublicFinalRef() => - inspector.invoke(libraryUri, 'getLibraryPublicFinal'); - - /// A reference to the the variable `libraryPublic`, a List of Strings. - Future getLibraryPublicRef() => - inspector.invoke(libraryUri, 'getLibraryPublic'); - - /// A reference to the variable `map`. - Future getMapRef() => inspector.invoke(libraryUri, 'getMap'); - - /// A reference to the variable `identityMap`. - Future getIdentityMapRef() => - inspector.invoke(libraryUri, 'getIdentityMap'); - - /// A reference to the variable `stream`. - Future getStreamRef() => - inspector.invoke(libraryUri, 'getStream'); - - final unsupportedTestMsg = - 'This test is not supported with the DDC Library ' - "Bundle Format because the dartDevEmbedder doesn't let you access " - 'compiled constructors at runtime.'; - - group('instanceRef', () { - setUp(() => setCurrentLogWriter(debug: provider.verbose)); - - test('for a null', () async { - final remoteObject = await getLibraryPublicFinalRef(); - final nullVariable = await inspector.loadField( - remoteObject, - 'notFinal', + group( + '${context.usesFrontendServer ? "frontendServer" : "buildDaemon"} |', + () { + setUpAll(() async { + setCurrentLogWriter(debug: provider.verbose); + await context.setUp( + testSettings: TestSettings( + verboseCompiler: provider.verbose, + canaryFeatures: canaryFeatures, + moduleFormat: provider.ddcModuleFormat, + ), ); - final ref = await inspector.instanceRefFor(nullVariable); - expect(ref!.valueAsString, 'null'); - expect(ref.kind, InstanceKind.kNull); - final classRef = ref.classRef!; - expect(classRef.name, 'Null'); - expect(classRef.id, 'classes|dart:core|Null'); - expect(inspector.isDisplayableObject(ref), isTrue); + final chromeProxyService = context.service; + inspector = chromeProxyService.inspector; }); - test('for a double', () async { - final remoteObject = await getLibraryPublicFinalRef(); - final count = await inspector.loadField(remoteObject, 'count'); - final ref = await inspector.instanceRefFor(count); - // 'count' is incremented by a periodic timer in the application, so we - // can't expect it to be exactly 0. - expect(double.tryParse(ref!.valueAsString!), greaterThanOrEqualTo(0)); - expect(ref.kind, InstanceKind.kDouble); - final classRef = ref.classRef!; - expect(classRef.name, 'Double'); - expect(classRef.id, 'classes|dart:core|Double'); - expect(inspector.isDisplayableObject(ref), isTrue); + tearDownAll(() async { + await context.tearDown(); }); - test('for an object', () async { - final remoteObject = await getLibraryPublicFinalRef(); - final count = await inspector.loadField(remoteObject, 'myselfField'); - final ref = await inspector.instanceRefFor(count); - expect(ref!.kind, InstanceKind.kPlainInstance); - final classRef = ref.classRef!; - expect(classRef.name, 'MyTestClass'); - expect( - classRef.id, - 'classes|org-dartlang-app:///example/scopes/main.dart' - '|MyTestClass', - ); - expect(inspector.isDisplayableObject(ref), isTrue); - }); + final libraryUri = 'org-dartlang-app:///example/scopes/main.dart'; - test('for a closure', () async { - final remoteObject = await getLibraryPublicFinalRef(); - final properties = await inspector.getProperties( - remoteObject.objectId!, - ); - final closure = properties.firstWhere( - (property) => property.name == 'closure', - ); - final ref = await inspector.instanceRefFor(closure.value!); - final functionName = ref!.closureFunction!.name; - // Older SDKs do not contain function names - if (functionName != 'Closure') { - expect(functionName, 'someFunction'); - } - expect(ref.kind, InstanceKind.kClosure); - expect(inspector.isDisplayableObject(ref), isTrue); - }); + String newInterceptorsExpression(String type) => + 'new (require("dart_sdk")._interceptors.$type).new()'; - test('for a list', () async { - final remoteObject = await getLibraryPublicRef(); - final ref = await inspector.instanceRefFor(remoteObject); - expect(ref!.length, greaterThan(0)); - expect(ref.kind, InstanceKind.kList); - expect(ref.classRef!.name, matchListClassName('String')); - expect(inspector.isDisplayableObject(ref), isTrue); - }); + final newDartError = 'new (require("dart_sdk").dart).DartError'; - test('for map', () async { - final remoteObject = await getMapRef(); - final ref = await inspector.instanceRefFor(remoteObject); - expect(ref!.length, 2); - expect(ref.kind, InstanceKind.kMap); - expect(ref.classRef!.name, 'LinkedMap'); - expect(inspector.isDisplayableObject(ref), isTrue); - }); + /// A reference to the the variable `libraryPublicFinal`, an instance of + /// `MyTestClass`. + Future getLibraryPublicFinalRef() => + inspector.invoke(libraryUri, 'getLibraryPublicFinal'); - test('for an IdentityMap', () async { - final remoteObject = await getIdentityMapRef(); - final ref = await inspector.instanceRefFor(remoteObject); - expect(ref!.length, 2); - expect(ref.kind, InstanceKind.kMap); - expect(ref.classRef!.name, 'IdentityMap'); - expect(inspector.isDisplayableObject(ref), isTrue); - }); + /// A reference to the the variable `libraryPublic`, a List of Strings. + Future getLibraryPublicRef() => + inspector.invoke(libraryUri, 'getLibraryPublic'); - // Regression test for https://github.com/dart-lang/webdev/issues/2446. - test('for a stream', () async { - final remoteObject = await getStreamRef(); - final ref = await inspector.instanceRefFor(remoteObject); - expect(ref!.kind, InstanceKind.kPlainInstance); - final classRef = ref.classRef!; - expect(classRef.name, '_ControllerStream'); - expect(classRef.id, 'classes|dart:async|_ControllerStream'); - expect(inspector.isDisplayableObject(ref), isTrue); - }); + /// A reference to the variable `map`. + Future getMapRef() => + inspector.invoke(libraryUri, 'getMap'); - test( - 'for a Dart error', - () async { - final remoteObject = await inspector.jsEvaluate(newDartError); - final ref = await inspector.instanceRefFor(remoteObject); - expect(ref!.kind, InstanceKind.kPlainInstance); - expect(ref.classRef!.name, 'NativeError'); - expect(inspector.isDisplayableObject(ref), isFalse); - expect(inspector.isNativeJsError(ref), isTrue); - expect(inspector.isNativeJsObject(ref), isFalse); - }, - skip: - provider.ddcModuleFormat == ModuleFormat.ddc && - canaryFeatures == true - ? unsupportedTestMsg - : null, - ); - - test( - 'for a native JavaScript error', - () async { - final remoteObject = await inspector.jsEvaluate( - newInterceptorsExpression('NativeError'), + /// A reference to the variable `identityMap`. + Future getIdentityMapRef() => + inspector.invoke(libraryUri, 'getIdentityMap'); + + /// A reference to the variable `stream`. + Future getStreamRef() => + inspector.invoke(libraryUri, 'getStream'); + + final unsupportedTestMsg = + 'This test is not supported with the DDC Library ' + "Bundle Format because the dartDevEmbedder doesn't let you access " + 'compiled constructors at runtime.'; + + group('instanceRef', () { + setUp(() => setCurrentLogWriter(debug: provider.verbose)); + + test('for a null', () async { + final remoteObject = await getLibraryPublicFinalRef(); + final nullVariable = await inspector.loadField( + remoteObject, + 'notFinal', ); - final ref = await inspector.instanceRefFor(remoteObject); + final ref = await inspector.instanceRefFor(nullVariable); + expect(ref!.valueAsString, 'null'); + expect(ref.kind, InstanceKind.kNull); + final classRef = ref.classRef!; + expect(classRef.name, 'Null'); + expect(classRef.id, 'classes|dart:core|Null'); + expect(inspector.isDisplayableObject(ref), isTrue); + }); + + test('for a double', () async { + final remoteObject = await getLibraryPublicFinalRef(); + final count = await inspector.loadField(remoteObject, 'count'); + final ref = await inspector.instanceRefFor(count); + // 'count' is incremented by a periodic timer in the application, so we + // can't expect it to be exactly 0. + expect(double.tryParse(ref!.valueAsString!), greaterThanOrEqualTo(0)); + expect(ref.kind, InstanceKind.kDouble); + final classRef = ref.classRef!; + expect(classRef.name, 'Double'); + expect(classRef.id, 'classes|dart:core|Double'); + expect(inspector.isDisplayableObject(ref), isTrue); + }); + + test('for an object', () async { + final remoteObject = await getLibraryPublicFinalRef(); + final count = await inspector.loadField(remoteObject, 'myselfField'); + final ref = await inspector.instanceRefFor(count); expect(ref!.kind, InstanceKind.kPlainInstance); - expect(ref.classRef!.name, 'NativeError'); - expect(inspector.isDisplayableObject(ref), isFalse); - expect(inspector.isNativeJsError(ref), isTrue); - expect(inspector.isNativeJsObject(ref), isFalse); - }, - skip: - provider.ddcModuleFormat == ModuleFormat.ddc && - canaryFeatures == true - ? unsupportedTestMsg - : null, - ); - - test( - 'for a native JavaScript type error', - () async { - final remoteObject = await inspector.jsEvaluate( - newInterceptorsExpression('JSNoSuchMethodError'), + final classRef = ref.classRef!; + expect(classRef.name, 'MyTestClass'); + expect( + classRef.id, + 'classes|org-dartlang-app:///example/scopes/main.dart' + '|MyTestClass', ); - final ref = await inspector.instanceRefFor(remoteObject); - expect(ref!.kind, InstanceKind.kPlainInstance); - expect(ref.classRef!.name, 'JSNoSuchMethodError'); - expect(inspector.isDisplayableObject(ref), isFalse); - expect(inspector.isNativeJsError(ref), isTrue); - expect(inspector.isNativeJsObject(ref), isFalse); - }, - skip: - provider.ddcModuleFormat == ModuleFormat.ddc && - canaryFeatures == true - ? unsupportedTestMsg - : null, - ); - - test( - 'for a native JavaScript object', - () async { - final remoteObject = await inspector.jsEvaluate( - newInterceptorsExpression('LegacyJavaScriptObject'), + expect(inspector.isDisplayableObject(ref), isTrue); + }); + + test('for a closure', () async { + final remoteObject = await getLibraryPublicFinalRef(); + final properties = await inspector.getProperties( + remoteObject.objectId!, + ); + final closure = properties.firstWhere( + (property) => property.name == 'closure', ); + final ref = await inspector.instanceRefFor(closure.value!); + final functionName = ref!.closureFunction!.name; + // Older SDKs do not contain function names + if (functionName != 'Closure') { + expect(functionName, 'someFunction'); + } + expect(ref.kind, InstanceKind.kClosure); + expect(inspector.isDisplayableObject(ref), isTrue); + }); + + test('for a list', () async { + final remoteObject = await getLibraryPublicRef(); + final ref = await inspector.instanceRefFor(remoteObject); + expect(ref!.length, greaterThan(0)); + expect(ref.kind, InstanceKind.kList); + expect(ref.classRef!.name, matchListClassName('String')); + expect(inspector.isDisplayableObject(ref), isTrue); + }); + + test('for map', () async { + final remoteObject = await getMapRef(); + final ref = await inspector.instanceRefFor(remoteObject); + expect(ref!.length, 2); + expect(ref.kind, InstanceKind.kMap); + expect(ref.classRef!.name, 'LinkedMap'); + expect(inspector.isDisplayableObject(ref), isTrue); + }); + + test('for an IdentityMap', () async { + final remoteObject = await getIdentityMapRef(); + final ref = await inspector.instanceRefFor(remoteObject); + expect(ref!.length, 2); + expect(ref.kind, InstanceKind.kMap); + expect(ref.classRef!.name, 'IdentityMap'); + expect(inspector.isDisplayableObject(ref), isTrue); + }); + + // Regression test for https://github.com/dart-lang/webdev/issues/2446. + test('for a stream', () async { + final remoteObject = await getStreamRef(); final ref = await inspector.instanceRefFor(remoteObject); expect(ref!.kind, InstanceKind.kPlainInstance); - expect(ref.classRef!.name, 'LegacyJavaScriptObject'); - expect(inspector.isDisplayableObject(ref), isFalse); - expect(inspector.isNativeJsError(ref), isFalse); - expect(inspector.isNativeJsObject(ref), isTrue); - }, - skip: - provider.ddcModuleFormat == ModuleFormat.ddc && - canaryFeatures == true - ? unsupportedTestMsg - : null, - ); - }); - - group('instance', () { - setUp(() => setCurrentLogWriter(debug: provider.verbose)); - test('for an object', () async { - final remoteObject = await getLibraryPublicFinalRef(); - final instance = await inspector.instanceFor(remoteObject); - expect(instance!.kind, InstanceKind.kPlainInstance); - final classRef = instance.classRef!; - expect(classRef, isNotNull); - expect(classRef.name, 'MyTestClass'); - final boundFieldNames = instance.fields! - .map((boundField) => boundField.decl!.name) - .toList(); - expect(boundFieldNames, [ - '_privateField', - 'abstractField', - 'closure', - 'count', - 'message', - 'myselfField', - 'notFinal', - 'tornOff', - 'unchangedCount', - ]); - final fieldNames = instance.fields! - .map((boundField) => boundField.name) - .toList(); - expect(boundFieldNames, fieldNames); - for (final field in instance.fields!) { - expect(field.name, isNotNull); - expect(field.decl!.declaredType, isNotNull); - } - expect(inspector.isDisplayableObject(instance), isTrue); - }); - - test('for closure', () async { - final remoteObject = await getLibraryPublicFinalRef(); - final properties = await inspector.getProperties( - remoteObject.objectId!, - ); - final closure = properties.firstWhere( - (property) => property.name == 'closure', + final classRef = ref.classRef!; + expect(classRef.name, '_ControllerStream'); + expect(classRef.id, 'classes|dart:async|_ControllerStream'); + expect(inspector.isDisplayableObject(ref), isTrue); + }); + + test( + 'for a Dart error', + () async { + final remoteObject = await inspector.jsEvaluate(newDartError); + final ref = await inspector.instanceRefFor(remoteObject); + expect(ref!.kind, InstanceKind.kPlainInstance); + expect(ref.classRef!.name, 'NativeError'); + expect(inspector.isDisplayableObject(ref), isFalse); + expect(inspector.isNativeJsError(ref), isTrue); + expect(inspector.isNativeJsObject(ref), isFalse); + }, + skip: + provider.ddcModuleFormat == ModuleFormat.ddc && + canaryFeatures == true + ? unsupportedTestMsg + : null, ); - final instance = await inspector.instanceFor(closure.value!); - expect(instance!.kind, InstanceKind.kClosure); - expect(instance.classRef!.name, 'Closure'); - expect(inspector.isDisplayableObject(instance), isTrue); - }); - test('for a nested object', () async { - final libraryRemoteObject = await getLibraryPublicFinalRef(); - final fieldRemoteObject = await inspector.loadField( - libraryRemoteObject, - 'myselfField', + test( + 'for a native JavaScript error', + () async { + final remoteObject = await inspector.jsEvaluate( + newInterceptorsExpression('NativeError'), + ); + final ref = await inspector.instanceRefFor(remoteObject); + expect(ref!.kind, InstanceKind.kPlainInstance); + expect(ref.classRef!.name, 'NativeError'); + expect(inspector.isDisplayableObject(ref), isFalse); + expect(inspector.isNativeJsError(ref), isTrue); + expect(inspector.isNativeJsObject(ref), isFalse); + }, + skip: + provider.ddcModuleFormat == ModuleFormat.ddc && + canaryFeatures == true + ? unsupportedTestMsg + : null, ); - final instance = await inspector.instanceFor(fieldRemoteObject); - expect(instance!.kind, InstanceKind.kPlainInstance); - final classRef = instance.classRef!; - expect(classRef, isNotNull); - expect(classRef.name, 'MyTestClass'); - expect(inspector.isDisplayableObject(instance), isTrue); - }); - test('for a list', () async { - final remote = await getLibraryPublicRef(); - final instance = await inspector.instanceFor(remote); - expect(instance!.kind, InstanceKind.kList); - final classRef = instance.classRef!; - expect(classRef, isNotNull); - expect(classRef.name, matchListClassName('String')); - final first = instance.elements![0] as InstanceRef; - expect(first.valueAsString, 'library'); - expect(inspector.isDisplayableObject(instance), isTrue); - }); - - test('for a map', () async { - final remote = await getMapRef(); - final instance = await inspector.instanceFor(remote); - expect(instance!.kind, InstanceKind.kMap); - final classRef = instance.classRef!; - expect(classRef.name, 'LinkedMap'); - final first = instance.associations![0].value as InstanceRef; - expect(first.kind, InstanceKind.kList); - expect(first.length, 3); - final second = instance.associations![1].value as InstanceRef; - expect(second.kind, InstanceKind.kString); - expect(second.valueAsString, 'something'); - expect(inspector.isDisplayableObject(instance), isTrue); - }); - - test('for an identityMap', () async { - final remote = await getIdentityMapRef(); - final instance = await inspector.instanceFor(remote); - expect(instance!.kind, InstanceKind.kMap); - final classRef = instance.classRef!; - expect(classRef.name, 'IdentityMap'); - final first = instance.associations![0].value as InstanceRef; - expect(first.valueAsString, '1'); - expect(inspector.isDisplayableObject(instance), isTrue); - }); + test( + 'for a native JavaScript type error', + () async { + final remoteObject = await inspector.jsEvaluate( + newInterceptorsExpression('JSNoSuchMethodError'), + ); + final ref = await inspector.instanceRefFor(remoteObject); + expect(ref!.kind, InstanceKind.kPlainInstance); + expect(ref.classRef!.name, 'JSNoSuchMethodError'); + expect(inspector.isDisplayableObject(ref), isFalse); + expect(inspector.isNativeJsError(ref), isTrue); + expect(inspector.isNativeJsObject(ref), isFalse); + }, + skip: + provider.ddcModuleFormat == ModuleFormat.ddc && + canaryFeatures == true + ? unsupportedTestMsg + : null, + ); - // Regression test for https://github.com/dart-lang/webdev/issues/2446. - test('for a stream', () async { - final remote = await getStreamRef(); - final instance = await inspector.instanceFor(remote); - expect(instance!.kind, InstanceKind.kPlainInstance); - final classRef = instance.classRef!; - expect(classRef.name, '_ControllerStream'); - expect(inspector.isDisplayableObject(instance), isTrue); + test( + 'for a native JavaScript object', + () async { + final remoteObject = await inspector.jsEvaluate( + newInterceptorsExpression('LegacyJavaScriptObject'), + ); + final ref = await inspector.instanceRefFor(remoteObject); + expect(ref!.kind, InstanceKind.kPlainInstance); + expect(ref.classRef!.name, 'LegacyJavaScriptObject'); + expect(inspector.isDisplayableObject(ref), isFalse); + expect(inspector.isNativeJsError(ref), isFalse); + expect(inspector.isNativeJsObject(ref), isTrue); + }, + skip: + provider.ddcModuleFormat == ModuleFormat.ddc && + canaryFeatures == true + ? unsupportedTestMsg + : null, + ); }); - test( - 'for a Dart error', - () async { - final remoteObject = await inspector.jsEvaluate(newDartError); + group('instance', () { + setUp(() => setCurrentLogWriter(debug: provider.verbose)); + test('for an object', () async { + final remoteObject = await getLibraryPublicFinalRef(); final instance = await inspector.instanceFor(remoteObject); expect(instance!.kind, InstanceKind.kPlainInstance); - expect(instance.classRef!.name, 'NativeError'); - expect(inspector.isDisplayableObject(instance), isFalse); - expect(inspector.isNativeJsError(instance), isTrue); - expect(inspector.isNativeJsObject(instance), isFalse); - }, - skip: - provider.ddcModuleFormat == ModuleFormat.ddc && - canaryFeatures == true - ? unsupportedTestMsg - : null, - ); - - test( - 'for a native JavaScript error', - () async { - final remoteObject = await inspector.jsEvaluate( - newInterceptorsExpression('NativeError'), + final classRef = instance.classRef!; + expect(classRef, isNotNull); + expect(classRef.name, 'MyTestClass'); + final boundFieldNames = instance.fields! + .map((boundField) => boundField.decl!.name) + .toList(); + expect(boundFieldNames, [ + '_privateField', + 'abstractField', + 'closure', + 'count', + 'message', + 'myselfField', + 'notFinal', + 'tornOff', + 'unchangedCount', + ]); + final fieldNames = instance.fields! + .map((boundField) => boundField.name) + .toList(); + expect(boundFieldNames, fieldNames); + for (final field in instance.fields!) { + expect(field.name, isNotNull); + expect(field.decl!.declaredType, isNotNull); + } + expect(inspector.isDisplayableObject(instance), isTrue); + }); + + test('for closure', () async { + final remoteObject = await getLibraryPublicFinalRef(); + final properties = await inspector.getProperties( + remoteObject.objectId!, ); - final instance = await inspector.instanceFor(remoteObject); - expect(instance!.kind, InstanceKind.kPlainInstance); - expect(instance.classRef!.name, 'NativeError'); - expect(inspector.isDisplayableObject(instance), isFalse); - expect(inspector.isNativeJsError(instance), isTrue); - expect(inspector.isNativeJsObject(instance), isFalse); - }, - skip: - provider.ddcModuleFormat == ModuleFormat.ddc && - canaryFeatures == true - ? unsupportedTestMsg - : null, - ); - - test( - 'for a native JavaScript type error', - () async { - final remoteObject = await inspector.jsEvaluate( - newInterceptorsExpression('JSNoSuchMethodError'), + final closure = properties.firstWhere( + (property) => property.name == 'closure', ); - final instance = await inspector.instanceFor(remoteObject); - expect(instance!.kind, InstanceKind.kPlainInstance); - expect(instance.classRef!.name, 'JSNoSuchMethodError'); - expect(inspector.isDisplayableObject(instance), isFalse); - expect(inspector.isNativeJsError(instance), isTrue); - expect(inspector.isNativeJsObject(instance), isFalse); - }, - skip: - provider.ddcModuleFormat == ModuleFormat.ddc && - canaryFeatures == true - ? unsupportedTestMsg - : null, - ); - - test( - 'for a native JavaScript object', - () async { - final remoteObject = await inspector.jsEvaluate( - newInterceptorsExpression('LegacyJavaScriptObject'), + final instance = await inspector.instanceFor(closure.value!); + expect(instance!.kind, InstanceKind.kClosure); + expect(instance.classRef!.name, 'Closure'); + expect(inspector.isDisplayableObject(instance), isTrue); + }); + + test('for a nested object', () async { + final libraryRemoteObject = await getLibraryPublicFinalRef(); + final fieldRemoteObject = await inspector.loadField( + libraryRemoteObject, + 'myselfField', ); - final instance = await inspector.instanceFor(remoteObject); + final instance = await inspector.instanceFor(fieldRemoteObject); + expect(instance!.kind, InstanceKind.kPlainInstance); + final classRef = instance.classRef!; + expect(classRef, isNotNull); + expect(classRef.name, 'MyTestClass'); + expect(inspector.isDisplayableObject(instance), isTrue); + }); + + test('for a list', () async { + final remote = await getLibraryPublicRef(); + final instance = await inspector.instanceFor(remote); + expect(instance!.kind, InstanceKind.kList); + final classRef = instance.classRef!; + expect(classRef, isNotNull); + expect(classRef.name, matchListClassName('String')); + final first = instance.elements![0] as InstanceRef; + expect(first.valueAsString, 'library'); + expect(inspector.isDisplayableObject(instance), isTrue); + }); + + test('for a map', () async { + final remote = await getMapRef(); + final instance = await inspector.instanceFor(remote); + expect(instance!.kind, InstanceKind.kMap); + final classRef = instance.classRef!; + expect(classRef.name, 'LinkedMap'); + final first = instance.associations![0].value as InstanceRef; + expect(first.kind, InstanceKind.kList); + expect(first.length, 3); + final second = instance.associations![1].value as InstanceRef; + expect(second.kind, InstanceKind.kString); + expect(second.valueAsString, 'something'); + expect(inspector.isDisplayableObject(instance), isTrue); + }); + + test('for an identityMap', () async { + final remote = await getIdentityMapRef(); + final instance = await inspector.instanceFor(remote); + expect(instance!.kind, InstanceKind.kMap); + final classRef = instance.classRef!; + expect(classRef.name, 'IdentityMap'); + final first = instance.associations![0].value as InstanceRef; + expect(first.valueAsString, '1'); + expect(inspector.isDisplayableObject(instance), isTrue); + }); + + // Regression test for https://github.com/dart-lang/webdev/issues/2446. + test('for a stream', () async { + final remote = await getStreamRef(); + final instance = await inspector.instanceFor(remote); expect(instance!.kind, InstanceKind.kPlainInstance); - expect(instance.classRef!.name, 'LegacyJavaScriptObject'); - expect(inspector.isDisplayableObject(instance), isFalse); - expect(inspector.isNativeJsError(instance), isFalse); - expect(inspector.isNativeJsObject(instance), isTrue); - }, - skip: - provider.ddcModuleFormat == ModuleFormat.ddc && - canaryFeatures == true - ? unsupportedTestMsg - : null, - ); - }); - }); + final classRef = instance.classRef!; + expect(classRef.name, '_ControllerStream'); + expect(inspector.isDisplayableObject(instance), isTrue); + }); + + test( + 'for a Dart error', + () async { + final remoteObject = await inspector.jsEvaluate(newDartError); + final instance = await inspector.instanceFor(remoteObject); + expect(instance!.kind, InstanceKind.kPlainInstance); + expect(instance.classRef!.name, 'NativeError'); + expect(inspector.isDisplayableObject(instance), isFalse); + expect(inspector.isNativeJsError(instance), isTrue); + expect(inspector.isNativeJsObject(instance), isFalse); + }, + skip: + provider.ddcModuleFormat == ModuleFormat.ddc && + canaryFeatures == true + ? unsupportedTestMsg + : null, + ); + + test( + 'for a native JavaScript error', + () async { + final remoteObject = await inspector.jsEvaluate( + newInterceptorsExpression('NativeError'), + ); + final instance = await inspector.instanceFor(remoteObject); + expect(instance!.kind, InstanceKind.kPlainInstance); + expect(instance.classRef!.name, 'NativeError'); + expect(inspector.isDisplayableObject(instance), isFalse); + expect(inspector.isNativeJsError(instance), isTrue); + expect(inspector.isNativeJsObject(instance), isFalse); + }, + skip: + provider.ddcModuleFormat == ModuleFormat.ddc && + canaryFeatures == true + ? unsupportedTestMsg + : null, + ); + + test( + 'for a native JavaScript type error', + () async { + final remoteObject = await inspector.jsEvaluate( + newInterceptorsExpression('JSNoSuchMethodError'), + ); + final instance = await inspector.instanceFor(remoteObject); + expect(instance!.kind, InstanceKind.kPlainInstance); + expect(instance.classRef!.name, 'JSNoSuchMethodError'); + expect(inspector.isDisplayableObject(instance), isFalse); + expect(inspector.isNativeJsError(instance), isTrue); + expect(inspector.isNativeJsObject(instance), isFalse); + }, + skip: + provider.ddcModuleFormat == ModuleFormat.ddc && + canaryFeatures == true + ? unsupportedTestMsg + : null, + ); + + test( + 'for a native JavaScript object', + () async { + final remoteObject = await inspector.jsEvaluate( + newInterceptorsExpression('LegacyJavaScriptObject'), + ); + final instance = await inspector.instanceFor(remoteObject); + expect(instance!.kind, InstanceKind.kPlainInstance); + expect(instance.classRef!.name, 'LegacyJavaScriptObject'); + expect(inspector.isDisplayableObject(instance), isFalse); + expect(inspector.isNativeJsError(instance), isFalse); + expect(inspector.isNativeJsObject(instance), isTrue); + }, + skip: + provider.ddcModuleFormat == ModuleFormat.ddc && + canaryFeatures == true + ? unsupportedTestMsg + : null, + ); + }); + }, + ); } diff --git a/dwds_test_common/lib/integration/instance_inspection.dart b/dwds_test_common/lib/integration/instance_inspection.dart index 8f9157d8e9..5486bce4c2 100644 --- a/dwds_test_common/lib/integration/instance_inspection.dart +++ b/dwds_test_common/lib/integration/instance_inspection.dart @@ -57,305 +57,308 @@ void runTests({ count: count, ); - group('${context.usesFrontendServer ? "frontendServer" : "buildDaemon"} |', () { - setUpAll(() async { - setCurrentLogWriter(debug: provider.verbose); - await context.setUp( - testSettings: TestSettings( - enableExpressionEvaluation: true, - verboseCompiler: provider.verbose, - canaryFeatures: canaryFeatures, - experiments: ['records'], - moduleFormat: provider.ddcModuleFormat, - ), - ); - service = context.debugConnection.vmService; - - final vm = await service.getVM(); - isolateId = vm.isolates!.first.id!; - final scripts = await service.getScripts(isolateId); - - await service.streamListen('Debug'); - stream = service.onEvent('Debug'); - - mainScript = scripts.scripts!.firstWhere( - (each) => each.uri!.contains('main.dart'), - ); - }); - - tearDownAll(context.tearDown); - - setUp(() => setCurrentLogWriter(debug: provider.verbose)); - tearDown(() async { - // We must resume execution in case a test left the isolate paused, but - // error 106 is expected if the isolate is already running. - try { - await service.resume(isolateId); - } on RPCError catch (e) { - if (e.code != 106) rethrow; - } - }); - - group('Library |', () { - test('classes', () async { - const libraryId = 'org-dartlang-app:///web/main.dart'; - final library = await getObject(libraryId); - - expect( - library, - isA().having((l) => l.classes, 'classes', [ - matchClassRef(name: 'MainClass', libraryId: libraryId), - matchClassRef(name: 'EnclosedClass', libraryId: libraryId), - matchClassRef(name: 'ClassWithMethod', libraryId: libraryId), - matchClassRef(name: 'EnclosingClass', libraryId: libraryId), - ]), + group( + '${context.usesFrontendServer ? "frontendServer" : "buildDaemon"} |', + () { + setUpAll(() async { + setCurrentLogWriter(debug: provider.verbose); + await context.setUp( + testSettings: TestSettings( + enableExpressionEvaluation: true, + verboseCompiler: provider.verbose, + canaryFeatures: canaryFeatures, + experiments: ['records'], + moduleFormat: provider.ddcModuleFormat, + ), ); - }); - }); - - group('Class |', () { - test('name and library', () async { - const libraryId = 'org-dartlang-app:///web/main.dart'; - const className = 'MainClass'; - final cls = await getObject('classes|$libraryId|$className'); - - expect(cls, matchClass(name: className, libraryId: libraryId)); - }); - }); - - group('Object |', () { - test('type and fields', () async { - await onBreakPoint('printFieldMain', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'instance'); + service = context.debugConnection.vmService; - final instanceId = instanceRef.id!; - expect( - await getObject(instanceId), - matchPlainInstance( - libraryId: 'org-dartlang-app:///web/main.dart', - type: 'MainClass', - ), - ); + final vm = await service.getVM(); + isolateId = vm.isolates!.first.id!; + final scripts = await service.getScripts(isolateId); - expect(await getFields(instanceRef), {'_field': 1, 'field': 2}); + await service.streamListen('Debug'); + stream = service.onEvent('Debug'); - // Offsets and counts are ignored for plain object fields. + mainScript = scripts.scripts!.firstWhere( + (each) => each.uri!.contains('main.dart'), + ); + }); - // DevTools calls [VmServiceInterface.getObject] with offset=0 - // and count=0 and expects all fields to be returned. - expect(await getFields(instanceRef, offset: 0, count: 0), { - '_field': 1, - 'field': 2, - }); - expect(await getFields(instanceRef, offset: 0), { - '_field': 1, - 'field': 2, - }); - expect(await getFields(instanceRef, offset: 0, count: 1), { - '_field': 1, - 'field': 2, - }); - expect(await getFields(instanceRef, offset: 1), { - '_field': 1, - 'field': 2, - }); - expect(await getFields(instanceRef, offset: 1, count: 0), { - '_field': 1, - 'field': 2, - }); - expect(await getFields(instanceRef, offset: 1, count: 3), { - '_field': 1, - 'field': 2, - }); - }); + tearDownAll(context.tearDown); + + setUp(() => setCurrentLogWriter(debug: provider.verbose)); + tearDown(() async { + // We must resume execution in case a test left the isolate paused, but + // error 106 is expected if the isolate is already running. + try { + await service.resume(isolateId); + } on RPCError catch (e) { + if (e.code != 106) rethrow; + } }); - test('field access', () async { - await onBreakPoint('printFieldMain', (Event event) async { - final frame = event.topFrame!.index!; - expect( - await getInstance(frame, r'instance.field'), - matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 2), - ); + group('Library |', () { + test('classes', () async { + const libraryId = 'org-dartlang-app:///web/main.dart'; + final library = await getObject(libraryId); expect( - await getInstance(frame, r'instance._field'), - matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 1), + library, + isA().having((l) => l.classes, 'classes', [ + matchClassRef(name: 'MainClass', libraryId: libraryId), + matchClassRef(name: 'EnclosedClass', libraryId: libraryId), + matchClassRef(name: 'ClassWithMethod', libraryId: libraryId), + matchClassRef(name: 'EnclosingClass', libraryId: libraryId), + ]), ); }); }); - }); - - group('List |', () { - test('type and fields', () async { - await onBreakPoint('printList', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'list'); - final instanceId = instanceRef.id!; - expect(await getObject(instanceId), matchListInstance(type: 'int')); + group('Class |', () { + test('name and library', () async { + const libraryId = 'org-dartlang-app:///web/main.dart'; + const className = 'MainClass'; + final cls = await getObject('classes|$libraryId|$className'); - expect(await getFields(instanceRef), {0: 0.0, 1: 1.0, 2: 2.0}); - expect( - await getFields(instanceRef, offset: 1, count: 0), - {}, - ); - expect(await getFields(instanceRef, offset: 0), { - 0: 0.0, - 1: 1.0, - 2: 2.0, - }); - expect(await getFields(instanceRef, offset: 0, count: 1), {0: 0.0}); - expect(await getFields(instanceRef, offset: 1), {0: 1.0, 1: 2.0}); - expect(await getFields(instanceRef, offset: 1, count: 1), {0: 1.0}); - expect(await getFields(instanceRef, offset: 1, count: 3), { - 0: 1.0, - 1: 2.0, - }); - expect( - await getFields(instanceRef, offset: 3, count: 3), - {}, - ); + expect(cls, matchClass(name: className, libraryId: libraryId)); }); }); - test('Element access', () async { - await onBreakPoint('printList', (Event event) async { - final frame = event.topFrame!.index!; - expect( - await getInstance(frame, r'list[0]'), - matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 0), - ); - - expect( - await getInstance(frame, r'list[1]'), - matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 1), - ); + group('Object |', () { + test('type and fields', () async { + await onBreakPoint('printFieldMain', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'instance'); + + final instanceId = instanceRef.id!; + expect( + await getObject(instanceId), + matchPlainInstance( + libraryId: 'org-dartlang-app:///web/main.dart', + type: 'MainClass', + ), + ); + + expect(await getFields(instanceRef), {'_field': 1, 'field': 2}); + + // Offsets and counts are ignored for plain object fields. + + // DevTools calls [VmServiceInterface.getObject] with offset=0 + // and count=0 and expects all fields to be returned. + expect(await getFields(instanceRef, offset: 0, count: 0), { + '_field': 1, + 'field': 2, + }); + expect(await getFields(instanceRef, offset: 0), { + '_field': 1, + 'field': 2, + }); + expect(await getFields(instanceRef, offset: 0, count: 1), { + '_field': 1, + 'field': 2, + }); + expect(await getFields(instanceRef, offset: 1), { + '_field': 1, + 'field': 2, + }); + expect(await getFields(instanceRef, offset: 1, count: 0), { + '_field': 1, + 'field': 2, + }); + expect(await getFields(instanceRef, offset: 1, count: 3), { + '_field': 1, + 'field': 2, + }); + }); + }); - expect( - await getInstance(frame, r'list[2]'), - matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 2), - ); + test('field access', () async { + await onBreakPoint('printFieldMain', (Event event) async { + final frame = event.topFrame!.index!; + expect( + await getInstance(frame, r'instance.field'), + matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 2), + ); + + expect( + await getInstance(frame, r'instance._field'), + matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 1), + ); + }); }); }); - }); - - group('Map |', () { - test('type and fields', () async { - await onBreakPoint('printMap', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'map'); - - final instanceId = instanceRef.id!; - expect( - await getObject(instanceId), - matchMapInstance(type: 'IdentityMap'), - ); - - expect(await getFields(instanceRef), {'a': 1, 'b': 2, 'c': 3}); - expect( - await getFields(instanceRef, offset: 1, count: 0), - {}, - ); - expect(await getFields(instanceRef, offset: 0), { - 'a': 1, - 'b': 2, - 'c': 3, + group('List |', () { + test('type and fields', () async { + await onBreakPoint('printList', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'list'); + + final instanceId = instanceRef.id!; + expect(await getObject(instanceId), matchListInstance(type: 'int')); + + expect(await getFields(instanceRef), {0: 0.0, 1: 1.0, 2: 2.0}); + expect( + await getFields(instanceRef, offset: 1, count: 0), + {}, + ); + expect(await getFields(instanceRef, offset: 0), { + 0: 0.0, + 1: 1.0, + 2: 2.0, + }); + expect(await getFields(instanceRef, offset: 0, count: 1), {0: 0.0}); + expect(await getFields(instanceRef, offset: 1), {0: 1.0, 1: 2.0}); + expect(await getFields(instanceRef, offset: 1, count: 1), {0: 1.0}); + expect(await getFields(instanceRef, offset: 1, count: 3), { + 0: 1.0, + 1: 2.0, + }); + expect( + await getFields(instanceRef, offset: 3, count: 3), + {}, + ); }); - expect(await getFields(instanceRef, offset: 0, count: 1), {'a': 1}); - expect(await getFields(instanceRef, offset: 1), {'b': 2, 'c': 3}); - expect(await getFields(instanceRef, offset: 1, count: 1), {'b': 2}); - expect(await getFields(instanceRef, offset: 1, count: 3), { - 'b': 2, - 'c': 3, + }); + + test('Element access', () async { + await onBreakPoint('printList', (Event event) async { + final frame = event.topFrame!.index!; + expect( + await getInstance(frame, r'list[0]'), + matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 0), + ); + + expect( + await getInstance(frame, r'list[1]'), + matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 1), + ); + + expect( + await getInstance(frame, r'list[2]'), + matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 2), + ); }); - expect( - await getFields(instanceRef, offset: 3, count: 3), - {}, - ); }); }); - test('Element access', () async { - await onBreakPoint('printMap', (Event event) async { - final frame = event.topFrame!.index!; - expect( - await getInstance(frame, r"map['a']"), - matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 1), - ); - - expect( - await getInstance(frame, r"map['b']"), - matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 2), - ); + group('Map |', () { + test('type and fields', () async { + await onBreakPoint('printMap', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'map'); + + final instanceId = instanceRef.id!; + expect( + await getObject(instanceId), + matchMapInstance(type: 'IdentityMap'), + ); + + expect(await getFields(instanceRef), {'a': 1, 'b': 2, 'c': 3}); + + expect( + await getFields(instanceRef, offset: 1, count: 0), + {}, + ); + expect(await getFields(instanceRef, offset: 0), { + 'a': 1, + 'b': 2, + 'c': 3, + }); + expect(await getFields(instanceRef, offset: 0, count: 1), {'a': 1}); + expect(await getFields(instanceRef, offset: 1), {'b': 2, 'c': 3}); + expect(await getFields(instanceRef, offset: 1, count: 1), {'b': 2}); + expect(await getFields(instanceRef, offset: 1, count: 3), { + 'b': 2, + 'c': 3, + }); + expect( + await getFields(instanceRef, offset: 3, count: 3), + {}, + ); + }); + }); - expect( - await getInstance(frame, r"map['c']"), - matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 3), - ); + test('Element access', () async { + await onBreakPoint('printMap', (Event event) async { + final frame = event.topFrame!.index!; + expect( + await getInstance(frame, r"map['a']"), + matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 1), + ); + + expect( + await getInstance(frame, r"map['b']"), + matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 2), + ); + + expect( + await getInstance(frame, r"map['c']"), + matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 3), + ); + }); }); }); - }); - group('Set |', () { - test('type and fields', () async { - await onBreakPoint('printSet', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'mySet'); - - final instanceId = instanceRef.id!; - expect( - await getObject(instanceId), - matchSetInstance(type: 'LinkedSet'), - ); - - expect(await getFields(instanceRef), { - 0: 1.0, - 1: 4.0, - 2: 5.0, - 3: 7.0, - }); - expect(await getFields(instanceRef, offset: 0), { - 0: 1.0, - 1: 4.0, - 2: 5.0, - 3: 7.0, + group('Set |', () { + test('type and fields', () async { + await onBreakPoint('printSet', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'mySet'); + + final instanceId = instanceRef.id!; + expect( + await getObject(instanceId), + matchSetInstance(type: 'LinkedSet'), + ); + + expect(await getFields(instanceRef), { + 0: 1.0, + 1: 4.0, + 2: 5.0, + 3: 7.0, + }); + expect(await getFields(instanceRef, offset: 0), { + 0: 1.0, + 1: 4.0, + 2: 5.0, + 3: 7.0, + }); + expect(await getFields(instanceRef, offset: 1, count: 2), { + 0: 4.0, + 1: 5.0, + }); + expect(await getFields(instanceRef, offset: 2), {0: 5.0, 1: 7.0}); + expect(await getFields(instanceRef, offset: 2, count: 10), { + 0: 5.0, + 1: 7.0, + }); + expect( + await getFields(instanceRef, offset: 1, count: 0), + {}, + ); + expect( + await getFields(instanceRef, offset: 10, count: 2), + {}, + ); }); - expect(await getFields(instanceRef, offset: 1, count: 2), { - 0: 4.0, - 1: 5.0, - }); - expect(await getFields(instanceRef, offset: 2), {0: 5.0, 1: 7.0}); - expect(await getFields(instanceRef, offset: 2, count: 10), { - 0: 5.0, - 1: 7.0, - }); - expect( - await getFields(instanceRef, offset: 1, count: 0), - {}, - ); - expect( - await getFields(instanceRef, offset: 10, count: 2), - {}, - ); }); - }); - test('Element access', () async { - await onBreakPoint('printSet', (Event event) async { - final frame = event.topFrame!.index!; - expect( - await getInstance(frame, r'mySet.first'), - matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 1), - ); - expect( - await getInstance(frame, r'mySet.last'), - matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 7), - ); + test('Element access', () async { + await onBreakPoint('printSet', (Event event) async { + final frame = event.topFrame!.index!; + expect( + await getInstance(frame, r'mySet.first'), + matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 1), + ); + expect( + await getInstance(frame, r'mySet.last'), + matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 7), + ); + }); }); }); - }); - }); + }, + ); } diff --git a/dwds_test_common/lib/integration/patterns_inspection.dart b/dwds_test_common/lib/integration/patterns_inspection.dart index 0219c5d58f..ae992c7884 100644 --- a/dwds_test_common/lib/integration/patterns_inspection.dart +++ b/dwds_test_common/lib/integration/patterns_inspection.dart @@ -52,128 +52,137 @@ void runTests({ Future> getFrameVariables(Frame frame) => testInspector.getFrameVariables(isolateId, frame); - group('${context.usesFrontendServer ? "frontendServer" : "buildDaemon"} |', () { - setUpAll(() async { - setCurrentLogWriter(debug: provider.verbose); - await context.setUp( - testSettings: TestSettings( - enableExpressionEvaluation: true, - verboseCompiler: provider.verbose, - experiments: ['dot-shorthands'], - canaryFeatures: canaryFeatures, - moduleFormat: provider.ddcModuleFormat, - ), - ); - service = context.debugConnection.vmService; - - final vm = await service.getVM(); - isolateId = vm.isolates!.first.id!; - final scripts = await service.getScripts(isolateId); - - await service.streamListen('Debug'); - stream = service.onEvent('Debug'); - - mainScript = scripts.scripts!.firstWhere( - (each) => each.uri!.contains('main.dart'), - ); - }); - - tearDownAll(() async { - await context.tearDown(); - }); - - setUp(() => setCurrentLogWriter(debug: provider.verbose)); - tearDown(() => service.resume(isolateId)); - - test('pattern match case 1', () async { - await onBreakPoint('testPatternCase1', (event) async { - final frame = event.topFrame!; - - expect(await getFrameVariables(frame), { - 'obj': matchListInstance(type: 'Object'), - 'a': matchPrimitiveInstance(kind: InstanceKind.kString, value: 'a'), - 'n': matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 1), + group( + '${context.usesFrontendServer ? "frontendServer" : "buildDaemon"} |', + () { + setUpAll(() async { + setCurrentLogWriter(debug: provider.verbose); + await context.setUp( + testSettings: TestSettings( + enableExpressionEvaluation: true, + verboseCompiler: provider.verbose, + experiments: ['dot-shorthands'], + canaryFeatures: canaryFeatures, + moduleFormat: provider.ddcModuleFormat, + ), + ); + service = context.debugConnection.vmService; + + final vm = await service.getVM(); + isolateId = vm.isolates!.first.id!; + final scripts = await service.getScripts(isolateId); + + await service.streamListen('Debug'); + stream = service.onEvent('Debug'); + + mainScript = scripts.scripts!.firstWhere( + (each) => each.uri!.contains('main.dart'), + ); + }); + + tearDownAll(() async { + await context.tearDown(); + }); + + setUp(() => setCurrentLogWriter(debug: provider.verbose)); + tearDown(() => service.resume(isolateId)); + + test('pattern match case 1', () async { + await onBreakPoint('testPatternCase1', (event) async { + final frame = event.topFrame!; + + expect(await getFrameVariables(frame), { + 'obj': matchListInstance(type: 'Object'), + 'a': matchPrimitiveInstance(kind: InstanceKind.kString, value: 'a'), + 'n': matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 1), + }); }); }); - }); - - test('pattern match case 2', () async { - await onBreakPoint('testPatternCase2', (event) async { - final frame = event.topFrame!; - - expect(await getFrameVariables(frame), { - 'obj': matchListInstance(type: 'Object'), - // Renamed to avoid shadowing variables from previous case. - 'a\$': matchPrimitiveInstance(kind: InstanceKind.kString, value: 'b'), - 'n\$': matchPrimitiveInstance( - kind: InstanceKind.kDouble, - value: 3.14, - ), + + test('pattern match case 2', () async { + await onBreakPoint('testPatternCase2', (event) async { + final frame = event.topFrame!; + + expect(await getFrameVariables(frame), { + 'obj': matchListInstance(type: 'Object'), + // Renamed to avoid shadowing variables from previous case. + 'a\$': matchPrimitiveInstance( + kind: InstanceKind.kString, + value: 'b', + ), + 'n\$': matchPrimitiveInstance( + kind: InstanceKind.kDouble, + value: 3.14, + ), + }); }); }); - }); - test('pattern match default case', () async { - await onBreakPoint('testPatternDefault', (event) async { - final frame = event.topFrame!; - final frameIndex = frame.index!; - final instanceRef = await getInstanceRef(frameIndex, 'obj'); - expect(await getFields(instanceRef), {0: 0.0, 1: 1.0}); + test('pattern match default case', () async { + await onBreakPoint('testPatternDefault', (event) async { + final frame = event.topFrame!; + final frameIndex = frame.index!; + final instanceRef = await getInstanceRef(frameIndex, 'obj'); + expect(await getFields(instanceRef), {0: 0.0, 1: 1.0}); - expect(await getFrameVariables(frame), { - 'obj': matchListInstance(type: 'int'), + expect(await getFrameVariables(frame), { + 'obj': matchListInstance(type: 'int'), + }); }); }); - }); - - test('stepping through pattern match', () async { - await onBreakPoint('callTestPattern1', (Event event) async { - var previousLocation = event.topFrame!.location; - for (final step in [ - // Make sure we step into the callee. - for (var i = 0; i < 4; i++) 'Into', - // Make a few steps inside the callee. - for (var i = 0; i < 4; i++) 'Over', - ]) { - await service.resume(isolateId, step: step); - - event = await stream.firstWhere( - (e) => e.kind == EventKind.kPauseInterrupted, - ); - - if (step == 'Over') { - expect(event.topFrame!.code!.name, 'testPattern'); - } - final location = event.topFrame!.location; - expect(location, isNot(equals(previousLocation))); - previousLocation = location; - } + test('stepping through pattern match', () async { + await onBreakPoint('callTestPattern1', (Event event) async { + var previousLocation = event.topFrame!.location; + for (final step in [ + // Make sure we step into the callee. + for (var i = 0; i < 4; i++) 'Into', + // Make a few steps inside the callee. + for (var i = 0; i < 4; i++) 'Over', + ]) { + await service.resume(isolateId, step: step); + + event = await stream.firstWhere( + (e) => e.kind == EventKind.kPauseInterrupted, + ); + + if (step == 'Over') { + expect(event.topFrame!.code!.name, 'testPattern'); + } + + final location = event.topFrame!.location; + expect(location, isNot(equals(previousLocation))); + previousLocation = location; + } + }); }); - }); - test('before instantiation of pattern-matching variables', () async { - await onBreakPoint('testPattern2Case1', (event) async { - final frame = event.topFrame!; + test('before instantiation of pattern-matching variables', () async { + await onBreakPoint('testPattern2Case1', (event) async { + final frame = event.topFrame!; - expect(await getFrameVariables(frame), { - 'dog': matchPrimitiveInstance(kind: 'String', value: 'Prismo'), + expect(await getFrameVariables(frame), { + 'dog': matchPrimitiveInstance(kind: 'String', value: 'Prismo'), + }); }); }); - }); - - test('after instantiation of pattern-matching variables', () async { - await onBreakPoint('testPattern2Case2', (event) async { - final frame = event.topFrame!; - - final vars = await getFrameVariables(frame); - expect(vars, { - 'dog': matchPrimitiveInstance(kind: 'String', value: 'Prismo'), - 'cats': matchListInstance(type: 'String'), - 'firstCat': matchPrimitiveInstance(kind: 'String', value: 'Garfield'), - 'secondCat': matchPrimitiveInstance(kind: 'String', value: 'Tom'), + + test('after instantiation of pattern-matching variables', () async { + await onBreakPoint('testPattern2Case2', (event) async { + final frame = event.topFrame!; + + final vars = await getFrameVariables(frame); + expect(vars, { + 'dog': matchPrimitiveInstance(kind: 'String', value: 'Prismo'), + 'cats': matchListInstance(type: 'String'), + 'firstCat': matchPrimitiveInstance( + kind: 'String', + value: 'Garfield', + ), + 'secondCat': matchPrimitiveInstance(kind: 'String', value: 'Tom'), + }); }); }); - }); - }); + }, + ); } diff --git a/dwds_test_common/lib/integration/record_inspection.dart b/dwds_test_common/lib/integration/record_inspection.dart index f524ae0ab2..20e33de425 100644 --- a/dwds_test_common/lib/integration/record_inspection.dart +++ b/dwds_test_common/lib/integration/record_inspection.dart @@ -57,528 +57,531 @@ void runTests({ depth: depth, ); - group('${context.usesFrontendServer ? "frontendServer" : "buildDaemon"} |', () { - setUpAll(() async { - setCurrentLogWriter(debug: provider.verbose); - await context.setUp( - testSettings: TestSettings( - enableExpressionEvaluation: true, - verboseCompiler: provider.verbose, - experiments: ['dot-shorthands'], - canaryFeatures: canaryFeatures, - moduleFormat: provider.ddcModuleFormat, - ), - ); - service = context.debugConnection.vmService; - - final vm = await service.getVM(); - isolateId = vm.isolates!.first.id!; - final scripts = await service.getScripts(isolateId); - - await service.streamListen('Debug'); - stream = service.onEvent('Debug'); - - mainScript = scripts.scripts!.firstWhere( - (each) => each.uri!.contains('main.dart'), - ); - }); - - tearDownAll(() async { - await context.tearDown(); - }); - - setUp(() => setCurrentLogWriter(debug: provider.verbose)); - tearDown(() => service.resume(isolateId)); - - test('simple record display', () async { - await onBreakPoint('printSimpleLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - - final instanceRef = await getInstanceRef(frame, 'record'); - final classId = instanceRef.classRef!.id!; - - expect(await getObject(classId), matchRecordClass); - - final stringRef = await getInstanceRef(frame, 'record.toString()'); - final stringRefId = stringRef.id!; - - expect( - await getObject(stringRefId), - matchPrimitiveInstance( - kind: InstanceKind.kString, - value: '(true, 3)', + group( + '${context.usesFrontendServer ? "frontendServer" : "buildDaemon"} |', + () { + setUpAll(() async { + setCurrentLogWriter(debug: provider.verbose); + await context.setUp( + testSettings: TestSettings( + enableExpressionEvaluation: true, + verboseCompiler: provider.verbose, + experiments: ['dot-shorthands'], + canaryFeatures: canaryFeatures, + moduleFormat: provider.ddcModuleFormat, ), ); - }); - }); - - test('simple records', () async { - await onBreakPoint('printSimpleLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record'); - final instanceId = instanceRef.id!; - - expect(instanceRef, matchRecordInstanceRef(length: 2)); - expect(await getObject(instanceId), matchRecordInstance(length: 2)); - - expect(await getFields(instanceRef), {1: true, 2: 3}); - expect(await getFields(instanceRef, offset: 0), {1: true, 2: 3}); - expect(await getFields(instanceRef, offset: 1), {2: 3}); - expect(await getFields(instanceRef, offset: 2), {}); - expect( - await getFields(instanceRef, offset: 0, count: 0), - {}, - ); - expect(await getFields(instanceRef, offset: 0, count: 1), {1: true}); - expect(await getFields(instanceRef, offset: 0, count: 2), { - 1: true, - 2: 3, - }); - expect(await getFields(instanceRef, offset: 0, count: 5), { - 1: true, - 2: 3, - }); - expect( - await getFields(instanceRef, offset: 2, count: 5), - {}, - ); - }); - }); - - test('simple records, field access', () async { - await onBreakPoint('printSimpleLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - expect( - await getInstance(frame, r'record.$1'), - matchPrimitiveInstance(kind: InstanceKind.kBool, value: true), - ); + service = context.debugConnection.vmService; + + final vm = await service.getVM(); + isolateId = vm.isolates!.first.id!; + final scripts = await service.getScripts(isolateId); + + await service.streamListen('Debug'); + stream = service.onEvent('Debug'); - expect( - await getInstance(frame, r'record.$2'), - matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 3), + mainScript = scripts.scripts!.firstWhere( + (each) => each.uri!.contains('main.dart'), ); }); - }); - test('simple records with named fields display', () async { - await onBreakPoint('printSimpleNamedLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - - final instanceRef = await getInstanceRef(frame, 'record'); - final classId = instanceRef.classRef!.id!; + tearDownAll(() async { + await context.tearDown(); + }); - expect(await getObject(classId), matchRecordClass); + setUp(() => setCurrentLogWriter(debug: provider.verbose)); + tearDown(() => service.resume(isolateId)); - final stringRef = await getInstanceRef(frame, 'record.toString()'); - final stringId = stringRef.id!; + test('simple record display', () async { + await onBreakPoint('printSimpleLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; - expect( - await getObject(stringId), - matchPrimitiveInstance( - kind: InstanceKind.kString, - value: '(true, cat: Vasya)', - ), - ); - }); - }); + final instanceRef = await getInstanceRef(frame, 'record'); + final classId = instanceRef.classRef!.id!; - test('simple records with named fields', () async { - await onBreakPoint('printSimpleNamedLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record'); + expect(await getObject(classId), matchRecordClass); - final instanceId = instanceRef.id!; - expect(instanceRef, matchRecordInstanceRef(length: 2)); - expect(await getObject(instanceId), matchRecordInstance(length: 2)); + final stringRef = await getInstanceRef(frame, 'record.toString()'); + final stringRefId = stringRef.id!; - expect(await getFields(instanceRef), {1: true, 'cat': 'Vasya'}); - expect(await getFields(instanceRef, offset: 0), { - 1: true, - 'cat': 'Vasya', + expect( + await getObject(stringRefId), + matchPrimitiveInstance( + kind: InstanceKind.kString, + value: '(true, 3)', + ), + ); }); - expect(await getFields(instanceRef, offset: 1), {'cat': 'Vasya'}); - expect(await getFields(instanceRef, offset: 2), {}); - expect( - await getFields(instanceRef, offset: 0, count: 0), - {}, - ); - expect(await getFields(instanceRef, offset: 0, count: 1), {1: true}); - expect(await getFields(instanceRef, offset: 0, count: 2), { - 1: true, - 'cat': 'Vasya', - }); - expect(await getFields(instanceRef, offset: 0, count: 5), { - 1: true, - 'cat': 'Vasya', + }); + + test('simple records', () async { + await onBreakPoint('printSimpleLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'record'); + final instanceId = instanceRef.id!; + + expect(instanceRef, matchRecordInstanceRef(length: 2)); + expect(await getObject(instanceId), matchRecordInstance(length: 2)); + + expect(await getFields(instanceRef), {1: true, 2: 3}); + expect(await getFields(instanceRef, offset: 0), {1: true, 2: 3}); + expect(await getFields(instanceRef, offset: 1), {2: 3}); + expect(await getFields(instanceRef, offset: 2), {}); + expect( + await getFields(instanceRef, offset: 0, count: 0), + {}, + ); + expect(await getFields(instanceRef, offset: 0, count: 1), {1: true}); + expect(await getFields(instanceRef, offset: 0, count: 2), { + 1: true, + 2: 3, + }); + expect(await getFields(instanceRef, offset: 0, count: 5), { + 1: true, + 2: 3, + }); + expect( + await getFields(instanceRef, offset: 2, count: 5), + {}, + ); }); - expect( - await getFields(instanceRef, offset: 2, count: 5), - {}, - ); }); - }); - - test('simple records with named fields, field access', () async { - await onBreakPoint('printSimpleNamedLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - expect( - await getInstance(frame, r'record.$1'), - matchPrimitiveInstance(kind: InstanceKind.kBool, value: true), - ); - expect( - await getInstance(frame, r'record.cat'), - matchPrimitiveInstance(kind: InstanceKind.kString, value: 'Vasya'), - ); + test('simple records, field access', () async { + await onBreakPoint('printSimpleLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + expect( + await getInstance(frame, r'record.$1'), + matchPrimitiveInstance(kind: InstanceKind.kBool, value: true), + ); + + expect( + await getInstance(frame, r'record.$2'), + matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 3), + ); + }); }); - }); - test('complex records display', () async { - await onBreakPoint('printComplexLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; + test('simple records with named fields display', () async { + await onBreakPoint('printSimpleNamedLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record'); - final classId = instanceRef.classRef!.id!; + final instanceRef = await getInstanceRef(frame, 'record'); + final classId = instanceRef.classRef!.id!; - expect(await getObject(classId), matchRecordClass); + expect(await getObject(classId), matchRecordClass); - final stringRef = await getInstanceRef(frame, 'record.toString()'); - final stringId = stringRef.id!; + final stringRef = await getInstanceRef(frame, 'record.toString()'); + final stringId = stringRef.id!; - expect( - await getObject(stringId), - matchPrimitiveInstance( - kind: InstanceKind.kString, - value: '(true, 3, {a: 1, b: 5})', - ), - ); + expect( + await getObject(stringId), + matchPrimitiveInstance( + kind: InstanceKind.kString, + value: '(true, cat: Vasya)', + ), + ); + }); }); - }); - test('complex records', () async { - await onBreakPoint('printComplexLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record'); - - final instanceId = instanceRef.id!; - expect(instanceRef, matchRecordInstanceRef(length: 3)); - expect(await getObject(instanceId), matchRecordInstance(length: 3)); - - expect(await getFields(instanceRef), { - 1: true, - 2: 3, - 3: {'a': 1, 'b': 5}, - }); - expect(await getFields(instanceRef, offset: 0), { - 1: true, - 2: 3, - 3: {'a': 1, 'b': 5}, - }); - expect(await getFields(instanceRef, offset: 1), { - 2: 3, - 3: {'a': 1, 'b': 5}, - }); - expect(await getFields(instanceRef, offset: 1, count: 1), {2: 3}); - expect(await getFields(instanceRef, offset: 1, count: 2), { - 2: 3, - 3: {'a': 1, 'b': 5}, - }); - expect(await getFields(instanceRef, offset: 2), { - 3: {'a': 1, 'b': 5}, - }); - expect(await getFields(instanceRef, offset: 3), {}); - expect( - await getFields(instanceRef, offset: 0, count: 0), - {}, - ); - expect(await getFields(instanceRef, offset: 0, count: 1), {1: true}); - expect(await getFields(instanceRef, offset: 0, count: 2), { - 1: true, - 2: 3, + test('simple records with named fields', () async { + await onBreakPoint('printSimpleNamedLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'record'); + + final instanceId = instanceRef.id!; + expect(instanceRef, matchRecordInstanceRef(length: 2)); + expect(await getObject(instanceId), matchRecordInstance(length: 2)); + + expect(await getFields(instanceRef), {1: true, 'cat': 'Vasya'}); + expect(await getFields(instanceRef, offset: 0), { + 1: true, + 'cat': 'Vasya', + }); + expect(await getFields(instanceRef, offset: 1), {'cat': 'Vasya'}); + expect(await getFields(instanceRef, offset: 2), {}); + expect( + await getFields(instanceRef, offset: 0, count: 0), + {}, + ); + expect(await getFields(instanceRef, offset: 0, count: 1), {1: true}); + expect(await getFields(instanceRef, offset: 0, count: 2), { + 1: true, + 'cat': 'Vasya', + }); + expect(await getFields(instanceRef, offset: 0, count: 5), { + 1: true, + 'cat': 'Vasya', + }); + expect( + await getFields(instanceRef, offset: 2, count: 5), + {}, + ); }); - expect(await getFields(instanceRef, offset: 0, count: 5), { - 1: true, - 2: 3, - 3: {'a': 1, 'b': 5}, - }); - expect( - await getFields(instanceRef, offset: 3, count: 5), - {}, - ); }); - }); - - test('complex records, field access', () async { - await onBreakPoint('printComplexLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - expect( - await getInstance(frame, r'record.$1'), - matchPrimitiveInstance(kind: InstanceKind.kBool, value: true), - ); - expect( - await getInstance(frame, r'record.$2'), - matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 3), - ); - - final third = await getInstanceRef(frame, r'record.$3'); - expect(third.kind, InstanceKind.kMap); - expect(await getFields(third), {'a': 1, 'b': 5}); + test('simple records with named fields, field access', () async { + await onBreakPoint('printSimpleNamedLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + expect( + await getInstance(frame, r'record.$1'), + matchPrimitiveInstance(kind: InstanceKind.kBool, value: true), + ); + + expect( + await getInstance(frame, r'record.cat'), + matchPrimitiveInstance(kind: InstanceKind.kString, value: 'Vasya'), + ); + }); }); - }); - test('complex records with named fields display', () async { - await onBreakPoint('printComplexNamedLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; + test('complex records display', () async { + await onBreakPoint('printComplexLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record'); - final classId = instanceRef.classRef!.id!; + final instanceRef = await getInstanceRef(frame, 'record'); + final classId = instanceRef.classRef!.id!; - expect(await getObject(classId), matchRecordClass); + expect(await getObject(classId), matchRecordClass); - final stringRef = await getInstanceRef(frame, 'record.toString()'); - final stringId = stringRef.id!; + final stringRef = await getInstanceRef(frame, 'record.toString()'); + final stringId = stringRef.id!; - expect( - await getObject(stringId), - matchPrimitiveInstance( - kind: InstanceKind.kString, - value: '(true, 3, array: {a: 1, b: 5})', - ), - ); + expect( + await getObject(stringId), + matchPrimitiveInstance( + kind: InstanceKind.kString, + value: '(true, 3, {a: 1, b: 5})', + ), + ); + }); }); - }); - - test('complex records with named fields', () async { - await onBreakPoint('printComplexNamedLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record'); - - final instanceId = instanceRef.id!; - expect(instanceRef, matchRecordInstanceRef(length: 3)); - expect(await getObject(instanceId), matchRecordInstance(length: 3)); - expect(await getFields(instanceRef), { - 1: true, - 2: 3, - 'array': {'a': 1, 'b': 5}, + test('complex records', () async { + await onBreakPoint('printComplexLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'record'); + + final instanceId = instanceRef.id!; + expect(instanceRef, matchRecordInstanceRef(length: 3)); + expect(await getObject(instanceId), matchRecordInstance(length: 3)); + + expect(await getFields(instanceRef), { + 1: true, + 2: 3, + 3: {'a': 1, 'b': 5}, + }); + expect(await getFields(instanceRef, offset: 0), { + 1: true, + 2: 3, + 3: {'a': 1, 'b': 5}, + }); + expect(await getFields(instanceRef, offset: 1), { + 2: 3, + 3: {'a': 1, 'b': 5}, + }); + expect(await getFields(instanceRef, offset: 1, count: 1), {2: 3}); + expect(await getFields(instanceRef, offset: 1, count: 2), { + 2: 3, + 3: {'a': 1, 'b': 5}, + }); + expect(await getFields(instanceRef, offset: 2), { + 3: {'a': 1, 'b': 5}, + }); + expect(await getFields(instanceRef, offset: 3), {}); + expect( + await getFields(instanceRef, offset: 0, count: 0), + {}, + ); + expect(await getFields(instanceRef, offset: 0, count: 1), {1: true}); + expect(await getFields(instanceRef, offset: 0, count: 2), { + 1: true, + 2: 3, + }); + expect(await getFields(instanceRef, offset: 0, count: 5), { + 1: true, + 2: 3, + 3: {'a': 1, 'b': 5}, + }); + expect( + await getFields(instanceRef, offset: 3, count: 5), + {}, + ); }); - expect(await getFields(instanceRef, offset: 0), { - 1: true, - 2: 3, - 'array': {'a': 1, 'b': 5}, - }); - expect(await getFields(instanceRef, offset: 1), { - 2: 3, - 'array': {'a': 1, 'b': 5}, - }); - expect(await getFields(instanceRef, offset: 1, count: 1), {2: 3}); - expect(await getFields(instanceRef, offset: 1, count: 2), { - 2: 3, - 'array': {'a': 1, 'b': 5}, - }); - expect(await getFields(instanceRef, offset: 2), { - 'array': {'a': 1, 'b': 5}, - }); - expect(await getFields(instanceRef, offset: 3), {}); - expect( - await getFields(instanceRef, offset: 0, count: 0), - {}, - ); - expect(await getFields(instanceRef, offset: 0, count: 1), {1: true}); - expect(await getFields(instanceRef, offset: 0, count: 2), { - 1: true, - 2: 3, - }); - expect(await getFields(instanceRef, offset: 0, count: 5), { - 1: true, - 2: 3, - 'array': {'a': 1, 'b': 5}, + }); + + test('complex records, field access', () async { + await onBreakPoint('printComplexLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + expect( + await getInstance(frame, r'record.$1'), + matchPrimitiveInstance(kind: InstanceKind.kBool, value: true), + ); + + expect( + await getInstance(frame, r'record.$2'), + matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 3), + ); + + final third = await getInstanceRef(frame, r'record.$3'); + expect(third.kind, InstanceKind.kMap); + expect(await getFields(third), {'a': 1, 'b': 5}); }); - expect( - await getFields(instanceRef, offset: 3, count: 5), - {}, - ); }); - }); - - test('complex records with named fields, field access', () async { - await onBreakPoint('printComplexNamedLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - expect( - await getInstance(frame, r'record.$1'), - matchPrimitiveInstance(kind: InstanceKind.kBool, value: true), - ); - expect( - await getInstance(frame, r'record.$2'), - matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 3), - ); + test('complex records with named fields display', () async { + await onBreakPoint('printComplexNamedLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; - final third = await getInstanceRef(frame, r'record.array'); - expect(third.kind, InstanceKind.kMap); - expect(await getFields(third), {'a': 1, 'b': 5}); - }); - }); + final instanceRef = await getInstanceRef(frame, 'record'); + final classId = instanceRef.classRef!.id!; - test('nested records display', () async { - await onBreakPoint('printNestedLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; + expect(await getObject(classId), matchRecordClass); - final instanceRef = await getInstanceRef(frame, 'record'); - final classId = instanceRef.classRef!.id!; + final stringRef = await getInstanceRef(frame, 'record.toString()'); + final stringId = stringRef.id!; - expect(await getObject(classId), matchRecordClass); + expect( + await getObject(stringId), + matchPrimitiveInstance( + kind: InstanceKind.kString, + value: '(true, 3, array: {a: 1, b: 5})', + ), + ); + }); + }); - final stringRef = await getInstanceRef(frame, 'record.toString()'); - final stringId = stringRef.id!; + test('complex records with named fields', () async { + await onBreakPoint('printComplexNamedLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'record'); + + final instanceId = instanceRef.id!; + expect(instanceRef, matchRecordInstanceRef(length: 3)); + expect(await getObject(instanceId), matchRecordInstance(length: 3)); + + expect(await getFields(instanceRef), { + 1: true, + 2: 3, + 'array': {'a': 1, 'b': 5}, + }); + expect(await getFields(instanceRef, offset: 0), { + 1: true, + 2: 3, + 'array': {'a': 1, 'b': 5}, + }); + expect(await getFields(instanceRef, offset: 1), { + 2: 3, + 'array': {'a': 1, 'b': 5}, + }); + expect(await getFields(instanceRef, offset: 1, count: 1), {2: 3}); + expect(await getFields(instanceRef, offset: 1, count: 2), { + 2: 3, + 'array': {'a': 1, 'b': 5}, + }); + expect(await getFields(instanceRef, offset: 2), { + 'array': {'a': 1, 'b': 5}, + }); + expect(await getFields(instanceRef, offset: 3), {}); + expect( + await getFields(instanceRef, offset: 0, count: 0), + {}, + ); + expect(await getFields(instanceRef, offset: 0, count: 1), {1: true}); + expect(await getFields(instanceRef, offset: 0, count: 2), { + 1: true, + 2: 3, + }); + expect(await getFields(instanceRef, offset: 0, count: 5), { + 1: true, + 2: 3, + 'array': {'a': 1, 'b': 5}, + }); + expect( + await getFields(instanceRef, offset: 3, count: 5), + {}, + ); + }); + }); - expect( - await getObject(stringId), - matchPrimitiveInstance( - kind: InstanceKind.kString, - value: '(true, (false, 5))', - ), - ); + test('complex records with named fields, field access', () async { + await onBreakPoint('printComplexNamedLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + expect( + await getInstance(frame, r'record.$1'), + matchPrimitiveInstance(kind: InstanceKind.kBool, value: true), + ); + + expect( + await getInstance(frame, r'record.$2'), + matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 3), + ); + + final third = await getInstanceRef(frame, r'record.array'); + expect(third.kind, InstanceKind.kMap); + expect(await getFields(third), {'a': 1, 'b': 5}); + }); }); - }); - test('nested records', () async { - await onBreakPoint('printNestedLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record'); + test('nested records display', () async { + await onBreakPoint('printNestedLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; - final instanceId = instanceRef.id!; - expect(instanceRef, matchRecordInstanceRef(length: 2)); - expect(await getObject(instanceId), matchRecordInstance(length: 2)); + final instanceRef = await getInstanceRef(frame, 'record'); + final classId = instanceRef.classRef!.id!; - expect(await getFields(instanceRef), { - 1: true, - 2: {1: false, 2: 5}, - }); - expect(await getFields(instanceRef, offset: 0), { - 1: true, - 2: {1: false, 2: 5}, - }); - expect(await getFields(instanceRef, offset: 1), { - 2: {1: false, 2: 5}, - }); - expect(await getFields(instanceRef, offset: 2), {}); - expect( - await getFields(instanceRef, offset: 0, count: 0), - {}, - ); - expect(await getFields(instanceRef, offset: 0, count: 1), {1: true}); - expect(await getFields(instanceRef, offset: 0, count: 2), { - 1: true, - 2: {1: false, 2: 5}, + expect(await getObject(classId), matchRecordClass); + + final stringRef = await getInstanceRef(frame, 'record.toString()'); + final stringId = stringRef.id!; + + expect( + await getObject(stringId), + matchPrimitiveInstance( + kind: InstanceKind.kString, + value: '(true, (false, 5))', + ), + ); }); - expect(await getFields(instanceRef, offset: 0, count: 5), { - 1: true, - 2: {1: false, 2: 5}, + }); + + test('nested records', () async { + await onBreakPoint('printNestedLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'record'); + + final instanceId = instanceRef.id!; + expect(instanceRef, matchRecordInstanceRef(length: 2)); + expect(await getObject(instanceId), matchRecordInstance(length: 2)); + + expect(await getFields(instanceRef), { + 1: true, + 2: {1: false, 2: 5}, + }); + expect(await getFields(instanceRef, offset: 0), { + 1: true, + 2: {1: false, 2: 5}, + }); + expect(await getFields(instanceRef, offset: 1), { + 2: {1: false, 2: 5}, + }); + expect(await getFields(instanceRef, offset: 2), {}); + expect( + await getFields(instanceRef, offset: 0, count: 0), + {}, + ); + expect(await getFields(instanceRef, offset: 0, count: 1), {1: true}); + expect(await getFields(instanceRef, offset: 0, count: 2), { + 1: true, + 2: {1: false, 2: 5}, + }); + expect(await getFields(instanceRef, offset: 0, count: 5), { + 1: true, + 2: {1: false, 2: 5}, + }); + expect( + await getFields(instanceRef, offset: 2, count: 5), + {}, + ); }); - expect( - await getFields(instanceRef, offset: 2, count: 5), - {}, - ); }); - }); - test('nested records, field access', () async { - await onBreakPoint('printNestedLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, r'record.$2'); + test('nested records, field access', () async { + await onBreakPoint('printNestedLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, r'record.$2'); - final instanceId = instanceRef.id!; - expect(instanceRef, matchRecordInstanceRef(length: 2)); - expect(await getObject(instanceId), matchRecordInstance(length: 2)); + final instanceId = instanceRef.id!; + expect(instanceRef, matchRecordInstanceRef(length: 2)); + expect(await getObject(instanceId), matchRecordInstance(length: 2)); - expect(await getFields(instanceRef), {1: false, 2: 5}); - expect(await getFields(instanceRef, offset: 0), {1: false, 2: 5}); + expect(await getFields(instanceRef), {1: false, 2: 5}); + expect(await getFields(instanceRef, offset: 0), {1: false, 2: 5}); + }); }); - }); - test('nested records with named fields display', () async { - await onBreakPoint('printNestedNamedLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; + test('nested records with named fields display', () async { + await onBreakPoint('printNestedNamedLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record'); - final classId = instanceRef.classRef!.id!; + final instanceRef = await getInstanceRef(frame, 'record'); + final classId = instanceRef.classRef!.id!; - expect(await getObject(classId), matchRecordClass); + expect(await getObject(classId), matchRecordClass); - final stringRef = await getInstanceRef(frame, 'record.toString()'); - final stringId = stringRef.id!; + final stringRef = await getInstanceRef(frame, 'record.toString()'); + final stringId = stringRef.id!; - expect( - await getObject(stringId), - matchPrimitiveInstance( - kind: InstanceKind.kString, - value: '(true, inner: (false, 5))', - ), - ); + expect( + await getObject(stringId), + matchPrimitiveInstance( + kind: InstanceKind.kString, + value: '(true, inner: (false, 5))', + ), + ); + }); }); - }); - - test('nested records with named fields', () async { - await onBreakPoint('printNestedNamedLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record'); - final instanceId = instanceRef.id!; - expect(instanceRef, matchRecordInstanceRef(length: 2)); - expect(await getObject(instanceId), matchRecordInstance(length: 2)); - - expect(await getFields(instanceRef), { - 1: true, - 'inner': {1: false, 2: 5}, - }); - expect(await getFields(instanceRef, offset: 0), { - 1: true, - 'inner': {1: false, 2: 5}, - }); - expect(await getFields(instanceRef, offset: 1), { - 'inner': {1: false, 2: 5}, + test('nested records with named fields', () async { + await onBreakPoint('printNestedNamedLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'record'); + + final instanceId = instanceRef.id!; + expect(instanceRef, matchRecordInstanceRef(length: 2)); + expect(await getObject(instanceId), matchRecordInstance(length: 2)); + + expect(await getFields(instanceRef), { + 1: true, + 'inner': {1: false, 2: 5}, + }); + expect(await getFields(instanceRef, offset: 0), { + 1: true, + 'inner': {1: false, 2: 5}, + }); + expect(await getFields(instanceRef, offset: 1), { + 'inner': {1: false, 2: 5}, + }); + expect(await getFields(instanceRef, offset: 1, count: 1), { + 'inner': {1: false, 2: 5}, + }); + expect(await getFields(instanceRef, offset: 1, count: 2), { + 'inner': {1: false, 2: 5}, + }); + expect(await getFields(instanceRef, offset: 2), {}); + expect( + await getFields(instanceRef, offset: 0, count: 0), + {}, + ); + expect(await getFields(instanceRef, offset: 0, count: 1), {1: true}); + expect(await getFields(instanceRef, offset: 0, count: 2), { + 1: true, + 'inner': {1: false, 2: 5}, + }); + expect(await getFields(instanceRef, offset: 0, count: 5), { + 1: true, + 'inner': {1: false, 2: 5}, + }); + expect( + await getFields(instanceRef, offset: 2, count: 5), + {}, + ); }); - expect(await getFields(instanceRef, offset: 1, count: 1), { - 'inner': {1: false, 2: 5}, - }); - expect(await getFields(instanceRef, offset: 1, count: 2), { - 'inner': {1: false, 2: 5}, - }); - expect(await getFields(instanceRef, offset: 2), {}); - expect( - await getFields(instanceRef, offset: 0, count: 0), - {}, - ); - expect(await getFields(instanceRef, offset: 0, count: 1), {1: true}); - expect(await getFields(instanceRef, offset: 0, count: 2), { - 1: true, - 'inner': {1: false, 2: 5}, - }); - expect(await getFields(instanceRef, offset: 0, count: 5), { - 1: true, - 'inner': {1: false, 2: 5}, - }); - expect( - await getFields(instanceRef, offset: 2, count: 5), - {}, - ); }); - }); - test('nested records with named fields, field access', () async { - await onBreakPoint('printNestedNamedLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, r'record.inner'); + test('nested records with named fields, field access', () async { + await onBreakPoint('printNestedNamedLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, r'record.inner'); - final instanceId = instanceRef.id!; - expect(instanceRef, matchRecordInstanceRef(length: 2)); - expect(await getObject(instanceId), matchRecordInstance(length: 2)); + final instanceId = instanceRef.id!; + expect(instanceRef, matchRecordInstanceRef(length: 2)); + expect(await getObject(instanceId), matchRecordInstance(length: 2)); - expect(await getFields(instanceRef), {1: false, 2: 5}); - expect(await getFields(instanceRef, offset: 0), {1: false, 2: 5}); + expect(await getFields(instanceRef), {1: false, 2: 5}); + expect(await getFields(instanceRef, offset: 0), {1: false, 2: 5}); + }); }); - }); - }); + }, + ); } diff --git a/dwds_test_common/lib/integration/record_type_inspection.dart b/dwds_test_common/lib/integration/record_type_inspection.dart index 3b8ee468f7..b606b62c92 100644 --- a/dwds_test_common/lib/integration/record_type_inspection.dart +++ b/dwds_test_common/lib/integration/record_type_inspection.dart @@ -55,379 +55,394 @@ void runTests({ 'runtimeType': matchTypeClassName, }; - group('${context.usesFrontendServer ? "frontendServer" : "buildDaemon"} |', () { - setUpAll(() async { - setCurrentLogWriter(debug: provider.verbose); - await context.setUp( - testSettings: TestSettings( - enableExpressionEvaluation: true, - verboseCompiler: provider.verbose, - experiments: ['dot-shorthands'], - canaryFeatures: canaryFeatures, - moduleFormat: provider.ddcModuleFormat, - ), - ); - service = context.debugConnection.vmService; - - final vm = await service.getVM(); - isolateId = vm.isolates!.first.id!; - final scripts = await service.getScripts(isolateId); - - await service.streamListen('Debug'); - stream = service.onEvent('Debug'); - - mainScript = scripts.scripts!.firstWhere( - (each) => each.uri!.contains('main.dart'), - ); - }); - - tearDownAll(() async { - await context.tearDown(); - }); - - setUp(() => setCurrentLogWriter(debug: provider.verbose)); - tearDown(() => service.resume(isolateId)); - - test('simple record type', () async { - await onBreakPoint('printSimpleLocalRecord', (event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); - final instanceId = instanceRef.id!; - - expect(instanceRef, matchRecordTypeInstanceRef(length: 2)); - expect(await getObject(instanceId), matchRecordTypeInstance(length: 2)); - - final classId = instanceRef.classRef!.id!; - expect(await getObject(classId), matchRecordTypeClass); - }); - }); - - test('simple record type elements', () async { - await onBreakPoint('printSimpleLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); - final instanceId = instanceRef.id!; - - expect(await getElements(instanceId), [ - matchTypeInstance('bool'), - matchTypeInstance('int'), - ]); - expect(await getDisplayedFields(instanceRef), {1: 'bool', 2: 'int'}); - }); - }); + group( + '${context.usesFrontendServer ? "frontendServer" : "buildDaemon"} |', + () { + setUpAll(() async { + setCurrentLogWriter(debug: provider.verbose); + await context.setUp( + testSettings: TestSettings( + enableExpressionEvaluation: true, + verboseCompiler: provider.verbose, + experiments: ['dot-shorthands'], + canaryFeatures: canaryFeatures, + moduleFormat: provider.ddcModuleFormat, + ), + ); + service = context.debugConnection.vmService; - test('simple record type getters', () async { - await onBreakPoint('printSimpleLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); + final vm = await service.getVM(); + isolateId = vm.isolates!.first.id!; + final scripts = await service.getScripts(isolateId); - expect( - await getDisplayedGetters(instanceRef), - matchDisplayedTypeObjectGetters, + await service.streamListen('Debug'); + stream = service.onEvent('Debug'); + + mainScript = scripts.scripts!.firstWhere( + (each) => each.uri!.contains('main.dart'), ); }); - }); - - test('simple record type display', () async { - await onBreakPoint('printSimpleLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final typeStringRef = await getInstanceRef( - frame, - 'record.runtimeType.toString()', - ); - final typeStringId = typeStringRef.id!; - expect( - await getObject(typeStringId), - matchPrimitiveInstance( - kind: InstanceKind.kString, - value: '(bool, int)', - ), - ); + tearDownAll(() async { + await context.tearDown(); }); - }); - test('complex record type', () async { - await onBreakPoint('printComplexLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); - final instanceId = instanceRef.id!; + setUp(() => setCurrentLogWriter(debug: provider.verbose)); + tearDown(() => service.resume(isolateId)); + + test('simple record type', () async { + await onBreakPoint('printSimpleLocalRecord', (event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); + final instanceId = instanceRef.id!; - expect(instanceRef, matchRecordTypeInstanceRef(length: 3)); - expect(await getObject(instanceId), matchRecordTypeInstance(length: 3)); + expect(instanceRef, matchRecordTypeInstanceRef(length: 2)); + expect( + await getObject(instanceId), + matchRecordTypeInstance(length: 2), + ); - final classId = instanceRef.classRef!.id!; - expect(await getObject(classId), matchRecordTypeClass); + final classId = instanceRef.classRef!.id!; + expect(await getObject(classId), matchRecordTypeClass); + }); }); - }); - - test('complex record type elements', () async { - await onBreakPoint('printComplexLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); - final instanceId = instanceRef.id!; - - expect(await getElements(instanceId), [ - matchTypeInstance('bool'), - matchTypeInstance('int'), - matchTypeInstance('IdentityMap'), - ]); - expect(await getDisplayedFields(instanceRef), { - 1: 'bool', - 2: 'int', - 3: 'IdentityMap', + + test('simple record type elements', () async { + await onBreakPoint('printSimpleLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); + final instanceId = instanceRef.id!; + + expect(await getElements(instanceId), [ + matchTypeInstance('bool'), + matchTypeInstance('int'), + ]); + expect(await getDisplayedFields(instanceRef), {1: 'bool', 2: 'int'}); }); }); - }); - test('complex record type getters', () async { - await onBreakPoint('printComplexLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); + test('simple record type getters', () async { + await onBreakPoint('printSimpleLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); - expect( - await getDisplayedGetters(instanceRef), - matchDisplayedTypeObjectGetters, - ); + expect( + await getDisplayedGetters(instanceRef), + matchDisplayedTypeObjectGetters, + ); + }); }); - }); - - test('complex record type display', () async { - await onBreakPoint('printComplexLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final typeStringRef = await getInstanceRef( - frame, - 'record.runtimeType.toString()', - ); - final typeStringId = typeStringRef.id!; - expect( - await getObject(typeStringId), - matchPrimitiveInstance( - kind: InstanceKind.kString, - value: '(bool, int, IdentityMap)', - ), - ); + test('simple record type display', () async { + await onBreakPoint('printSimpleLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final typeStringRef = await getInstanceRef( + frame, + 'record.runtimeType.toString()', + ); + final typeStringId = typeStringRef.id!; + + expect( + await getObject(typeStringId), + matchPrimitiveInstance( + kind: InstanceKind.kString, + value: '(bool, int)', + ), + ); + }); }); - }); - test('complex record type with named fields ', () async { - await onBreakPoint('printComplexNamedLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); - final instanceId = instanceRef.id!; + test('complex record type', () async { + await onBreakPoint('printComplexLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); + final instanceId = instanceRef.id!; - expect(instanceRef, matchRecordTypeInstanceRef(length: 3)); - expect(await getObject(instanceId), matchRecordTypeInstance(length: 3)); + expect(instanceRef, matchRecordTypeInstanceRef(length: 3)); + expect( + await getObject(instanceId), + matchRecordTypeInstance(length: 3), + ); - final classId = instanceRef.classRef!.id!; - expect(await getObject(classId), matchRecordTypeClass); + final classId = instanceRef.classRef!.id!; + expect(await getObject(classId), matchRecordTypeClass); + }); }); - }); - - test('complex record type with named fields elements', () async { - await onBreakPoint('printComplexNamedLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); - final instanceId = instanceRef.id!; - - expect(await getElements(instanceId), [ - matchTypeInstance('bool'), - matchTypeInstance('int'), - matchTypeInstance('IdentityMap'), - ]); - - expect(await getDisplayedFields(instanceRef), { - 1: 'bool', - 2: 'int', - 'array': 'IdentityMap', + + test('complex record type elements', () async { + await onBreakPoint('printComplexLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); + final instanceId = instanceRef.id!; + + expect(await getElements(instanceId), [ + matchTypeInstance('bool'), + matchTypeInstance('int'), + matchTypeInstance('IdentityMap'), + ]); + expect(await getDisplayedFields(instanceRef), { + 1: 'bool', + 2: 'int', + 3: 'IdentityMap', + }); }); }); - }); - test('complex record type with named fields getters', () async { - await onBreakPoint('printComplexNamedLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); + test('complex record type getters', () async { + await onBreakPoint('printComplexLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); - expect( - await getDisplayedGetters(instanceRef), - matchDisplayedTypeObjectGetters, - ); + expect( + await getDisplayedGetters(instanceRef), + matchDisplayedTypeObjectGetters, + ); + }); }); - }); - - test('complex record type with named fields display', () async { - await onBreakPoint('printComplexNamedLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final typeStringRef = await getInstanceRef( - frame, - 'record.runtimeType.toString()', - ); - final typeStringId = typeStringRef.id!; - expect( - await getObject(typeStringId), - matchPrimitiveInstance( - kind: InstanceKind.kString, - value: '(bool, int, {IdentityMap array})', - ), - ); + test('complex record type display', () async { + await onBreakPoint('printComplexLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final typeStringRef = await getInstanceRef( + frame, + 'record.runtimeType.toString()', + ); + final typeStringId = typeStringRef.id!; + + expect( + await getObject(typeStringId), + matchPrimitiveInstance( + kind: InstanceKind.kString, + value: '(bool, int, IdentityMap)', + ), + ); + }); }); - }); - test('nested record type', () async { - await onBreakPoint('printNestedLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); - final instanceId = instanceRef.id!; + test('complex record type with named fields ', () async { + await onBreakPoint('printComplexNamedLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); + final instanceId = instanceRef.id!; - expect(instanceRef, matchRecordTypeInstanceRef(length: 2)); - expect(await getObject(instanceId), matchRecordTypeInstance(length: 2)); + expect(instanceRef, matchRecordTypeInstanceRef(length: 3)); + expect( + await getObject(instanceId), + matchRecordTypeInstance(length: 3), + ); - final classId = instanceRef.classRef!.id!; - expect(await getObject(classId), matchRecordTypeClass); + final classId = instanceRef.classRef!.id!; + expect(await getObject(classId), matchRecordTypeClass); + }); }); - }); - - test('nested record type elements', () async { - await onBreakPoint('printNestedLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); - final instanceId = instanceRef.id!; - - final elements = await getElements(instanceId); - expect(elements, [ - matchTypeInstance('bool'), - matchRecordTypeInstance(length: 2), - ]); - expect(await getElements(elements[1].id!), [ - matchTypeInstance('bool'), - matchTypeInstance('int'), - ]); - expect(await getDisplayedFields(instanceRef), { - 1: 'bool', - 2: '(bool, int)', + + test('complex record type with named fields elements', () async { + await onBreakPoint('printComplexNamedLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); + final instanceId = instanceRef.id!; + + expect(await getElements(instanceId), [ + matchTypeInstance('bool'), + matchTypeInstance('int'), + matchTypeInstance('IdentityMap'), + ]); + + expect(await getDisplayedFields(instanceRef), { + 1: 'bool', + 2: 'int', + 'array': 'IdentityMap', + }); }); - expect(await getDisplayedFields(elements[1]), {1: 'bool', 2: 'int'}); }); - }); - test('nested record type getters', () async { - await onBreakPoint('printNestedLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); - final elements = await getElements(instanceRef.id!); + test('complex record type with named fields getters', () async { + await onBreakPoint('printComplexNamedLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); - expect( - await getDisplayedGetters(instanceRef), - matchDisplayedTypeObjectGetters, - ); - expect( - await getDisplayedGetters(elements[1]), - matchDisplayedTypeObjectGetters, - ); + expect( + await getDisplayedGetters(instanceRef), + matchDisplayedTypeObjectGetters, + ); + }); }); - }); - - test('nested record type display', () async { - await onBreakPoint('printNestedLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final typeStringRef = await getInstanceRef( - frame, - 'record.runtimeType.toString()', - ); - final typeStringId = typeStringRef.id!; - expect( - await getObject(typeStringId), - matchPrimitiveInstance( - kind: InstanceKind.kString, - value: '(bool, (bool, int))', - ), - ); + test('complex record type with named fields display', () async { + await onBreakPoint('printComplexNamedLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final typeStringRef = await getInstanceRef( + frame, + 'record.runtimeType.toString()', + ); + final typeStringId = typeStringRef.id!; + + expect( + await getObject(typeStringId), + matchPrimitiveInstance( + kind: InstanceKind.kString, + value: '(bool, int, {IdentityMap array})', + ), + ); + }); }); - }); - test('nested record type with named fields', () async { - await onBreakPoint('printNestedNamedLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); - final instanceId = instanceRef.id!; - final instance = await getObject(instanceId); + test('nested record type', () async { + await onBreakPoint('printNestedLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); + final instanceId = instanceRef.id!; - expect(instanceRef, matchRecordTypeInstanceRef(length: 2)); - expect(instance, matchRecordTypeInstance(length: 2)); + expect(instanceRef, matchRecordTypeInstanceRef(length: 2)); + expect( + await getObject(instanceId), + matchRecordTypeInstance(length: 2), + ); - final classId = instanceRef.classRef!.id!; - expect(await getObject(classId), matchRecordTypeClass); - }); - }); - - test('nested record type with named fields elements', () async { - await onBreakPoint('printNestedNamedLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); - final instanceId = instanceRef.id!; - - final elements = await getElements(instanceId); - expect(elements, [ - matchTypeInstance('bool'), - matchRecordTypeInstance(length: 2), - ]); - expect(await getElements(elements[1].id!), [ - matchTypeInstance('bool'), - matchTypeInstance('int'), - ]); - expect(await getDisplayedFields(instanceRef), { - 1: 'bool', - 'inner': '(bool, int)', + final classId = instanceRef.classRef!.id!; + expect(await getObject(classId), matchRecordTypeClass); }); + }); - expect(await getDisplayedFields(elements[1]), {1: 'bool', 2: 'int'}); + test('nested record type elements', () async { + await onBreakPoint('printNestedLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); + final instanceId = instanceRef.id!; + + final elements = await getElements(instanceId); + expect(elements, [ + matchTypeInstance('bool'), + matchRecordTypeInstance(length: 2), + ]); + expect(await getElements(elements[1].id!), [ + matchTypeInstance('bool'), + matchTypeInstance('int'), + ]); + expect(await getDisplayedFields(instanceRef), { + 1: 'bool', + 2: '(bool, int)', + }); + expect(await getDisplayedFields(elements[1]), {1: 'bool', 2: 'int'}); + }); }); - }); - test('nested record type with named fields getters', () async { - await onBreakPoint('printNestedNamedLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); - final elements = await getElements(instanceRef.id!); + test('nested record type getters', () async { + await onBreakPoint('printNestedLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); + final elements = await getElements(instanceRef.id!); + + expect( + await getDisplayedGetters(instanceRef), + matchDisplayedTypeObjectGetters, + ); + expect( + await getDisplayedGetters(elements[1]), + matchDisplayedTypeObjectGetters, + ); + }); + }); - expect( - await getDisplayedGetters(instanceRef), - matchDisplayedTypeObjectGetters, - ); - expect( - await getDisplayedGetters(elements[1]), - matchDisplayedTypeObjectGetters, - ); + test('nested record type display', () async { + await onBreakPoint('printNestedLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final typeStringRef = await getInstanceRef( + frame, + 'record.runtimeType.toString()', + ); + final typeStringId = typeStringRef.id!; + + expect( + await getObject(typeStringId), + matchPrimitiveInstance( + kind: InstanceKind.kString, + value: '(bool, (bool, int))', + ), + ); + }); }); - }); - test('nested record type with named fields display', () async { - await onBreakPoint('printNestedNamedLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); - final instance = await getObject(instanceRef.id!); - final typeClassId = instance.classRef!.id!; + test('nested record type with named fields', () async { + await onBreakPoint('printNestedNamedLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); + final instanceId = instanceRef.id!; + final instance = await getObject(instanceId); - expect(await getObject(typeClassId), matchRecordTypeClass); + expect(instanceRef, matchRecordTypeInstanceRef(length: 2)); + expect(instance, matchRecordTypeInstance(length: 2)); - final typeStringRef = await getInstanceRef( - frame, - 'record.runtimeType.toString()', - ); - final typeStringId = typeStringRef.id!; + final classId = instanceRef.classRef!.id!; + expect(await getObject(classId), matchRecordTypeClass); + }); + }); - expect( - await getObject(typeStringId), - matchPrimitiveInstance( - kind: InstanceKind.kString, - value: '(bool, {(bool, int) inner})', - ), - ); + test('nested record type with named fields elements', () async { + await onBreakPoint('printNestedNamedLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); + final instanceId = instanceRef.id!; + + final elements = await getElements(instanceId); + expect(elements, [ + matchTypeInstance('bool'), + matchRecordTypeInstance(length: 2), + ]); + expect(await getElements(elements[1].id!), [ + matchTypeInstance('bool'), + matchTypeInstance('int'), + ]); + expect(await getDisplayedFields(instanceRef), { + 1: 'bool', + 'inner': '(bool, int)', + }); + + expect(await getDisplayedFields(elements[1]), {1: 'bool', 2: 'int'}); + }); }); - }); - }); + + test('nested record type with named fields getters', () async { + await onBreakPoint('printNestedNamedLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); + final elements = await getElements(instanceRef.id!); + + expect( + await getDisplayedGetters(instanceRef), + matchDisplayedTypeObjectGetters, + ); + expect( + await getDisplayedGetters(elements[1]), + matchDisplayedTypeObjectGetters, + ); + }); + }); + + test('nested record type with named fields display', () async { + await onBreakPoint('printNestedNamedLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); + final instance = await getObject(instanceRef.id!); + final typeClassId = instance.classRef!.id!; + + expect(await getObject(typeClassId), matchRecordTypeClass); + + final typeStringRef = await getInstanceRef( + frame, + 'record.runtimeType.toString()', + ); + final typeStringId = typeStringRef.id!; + + expect( + await getObject(typeStringId), + matchPrimitiveInstance( + kind: InstanceKind.kString, + value: '(bool, {(bool, int) inner})', + ), + ); + }); + }); + }, + ); } diff --git a/dwds_test_common/lib/integration/type_inspection.dart b/dwds_test_common/lib/integration/type_inspection.dart index c206382d2c..86508a43aa 100644 --- a/dwds_test_common/lib/integration/type_inspection.dart +++ b/dwds_test_common/lib/integration/type_inspection.dart @@ -78,268 +78,289 @@ void runTests({ 'runtimeType': matchTypeClassName, }; - group('${context.usesFrontendServer ? "frontendServer" : "buildDaemon"} |', () { - setUpAll(() async { - setCurrentLogWriter(debug: provider.verbose); - await context.setUp( - testSettings: TestSettings( - enableExpressionEvaluation: true, - verboseCompiler: provider.verbose, - experiments: ['dot-shorthands'], - canaryFeatures: canaryFeatures, - moduleFormat: provider.ddcModuleFormat, - ), - ); - service = context.debugConnection.vmService; - - final vm = await service.getVM(); - isolateId = vm.isolates!.first.id!; - final scripts = await service.getScripts(isolateId); - - await service.streamListen('Debug'); - stream = service.onEvent('Debug'); - - mainScript = scripts.scripts!.firstWhere( - (each) => each.uri!.contains('main.dart'), - ); - }); - - tearDownAll(() async { - await context.tearDown(); - }); - - setUp(() => setCurrentLogWriter(debug: provider.verbose)); - tearDown(() => service.resume(isolateId)); - - test('String type', () async { - await onBreakPoint('printSimpleLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, "'1'.runtimeType"); - expect(instanceRef, matchTypeInstanceRef('String')); - - final instanceId = instanceRef.id!; - final instance = await getObject(instanceId); - expect(instance, matchTypeInstance('String')); - - final classId = instanceRef.classRef!.id!; - expect(await getObject(classId), matchTypeClass); - expect(await getFields(instanceRef, depth: 1), matchTypeObjectFields); - expect( - await getDisplayedFields(instanceRef), - matchDisplayedTypeObjectFields, + group( + '${context.usesFrontendServer ? "frontendServer" : "buildDaemon"} |', + () { + setUpAll(() async { + setCurrentLogWriter(debug: provider.verbose); + await context.setUp( + testSettings: TestSettings( + enableExpressionEvaluation: true, + verboseCompiler: provider.verbose, + experiments: ['dot-shorthands'], + canaryFeatures: canaryFeatures, + moduleFormat: provider.ddcModuleFormat, + ), ); - }); - }); + service = context.debugConnection.vmService; + + final vm = await service.getVM(); + isolateId = vm.isolates!.first.id!; + final scripts = await service.getScripts(isolateId); - test('String type getters', () async { - await onBreakPoint('printSimpleLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, "'1'.runtimeType"); + await service.streamListen('Debug'); + stream = service.onEvent('Debug'); - expect( - await getDisplayedGetters(instanceRef), - matchDisplayedTypeObjectGetters, + mainScript = scripts.scripts!.firstWhere( + (each) => each.uri!.contains('main.dart'), ); }); - }); - - test('int type', () async { - await onBreakPoint('printSimpleLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, '1.runtimeType'); - expect(instanceRef, matchTypeInstanceRef('int')); - - final instanceId = instanceRef.id!; - final instance = await getObject(instanceId); - expect(instance, matchTypeInstance('int')); - - final classId = instanceRef.classRef!.id!; - expect(await getObject(classId), matchTypeClass); - expect(await getFields(instanceRef, depth: 1), matchTypeObjectFields); - expect( - await getDisplayedFields(instanceRef), - matchDisplayedTypeObjectFields, - ); + + tearDownAll(() async { + await context.tearDown(); }); - }); - test('int type getters', () async { - await onBreakPoint('printSimpleLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, '1.runtimeType'); + setUp(() => setCurrentLogWriter(debug: provider.verbose)); + tearDown(() => service.resume(isolateId)); + + test('String type', () async { + await onBreakPoint('printSimpleLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, "'1'.runtimeType"); + expect(instanceRef, matchTypeInstanceRef('String')); + + final instanceId = instanceRef.id!; + final instance = await getObject(instanceId); + expect(instance, matchTypeInstance('String')); + + final classId = instanceRef.classRef!.id!; + expect(await getObject(classId), matchTypeClass); + expect(await getFields(instanceRef, depth: 1), matchTypeObjectFields); + expect( + await getDisplayedFields(instanceRef), + matchDisplayedTypeObjectFields, + ); + }); + }); - expect( - await getDisplayedGetters(instanceRef), - matchDisplayedTypeObjectGetters, - ); + test('String type getters', () async { + await onBreakPoint('printSimpleLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, "'1'.runtimeType"); + + expect( + await getDisplayedGetters(instanceRef), + matchDisplayedTypeObjectGetters, + ); + }); }); - }); - - test('list type', () async { - await onBreakPoint('printSimpleLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, '[].runtimeType'); - expect(instanceRef, matchTypeInstanceRef('List')); - - final instanceId = instanceRef.id!; - final instance = await getObject(instanceId); - expect(instance, matchTypeInstance('List')); - - final classId = instanceRef.classRef!.id!; - expect(await getObject(classId), matchTypeClass); - expect(await getFields(instanceRef, depth: 1), matchTypeObjectFields); - expect( - await getDisplayedFields(instanceRef), - matchDisplayedTypeObjectFields, - ); - expect( - await getDisplayedGetters(instanceRef), - matchDisplayedTypeObjectGetters, - ); + + test('int type', () async { + await onBreakPoint('printSimpleLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, '1.runtimeType'); + expect(instanceRef, matchTypeInstanceRef('int')); + + final instanceId = instanceRef.id!; + final instance = await getObject(instanceId); + expect(instance, matchTypeInstance('int')); + + final classId = instanceRef.classRef!.id!; + expect(await getObject(classId), matchTypeClass); + expect(await getFields(instanceRef, depth: 1), matchTypeObjectFields); + expect( + await getDisplayedFields(instanceRef), + matchDisplayedTypeObjectFields, + ); + }); }); - }); - - test('map type', () async { - await onBreakPoint('printSimpleLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef( - frame, - '{}.runtimeType', - ); - expect(instanceRef, matchTypeInstanceRef('IdentityMap')); - - final instanceId = instanceRef.id!; - final instance = await getObject(instanceId); - expect(instance, matchTypeInstance('IdentityMap')); - - final classId = instanceRef.classRef!.id!; - expect(await getObject(classId), matchTypeClass); - expect(await getFields(instanceRef, depth: 1), matchTypeObjectFields); - expect( - await getDisplayedFields(instanceRef), - matchDisplayedTypeObjectFields, - ); + + test('int type getters', () async { + await onBreakPoint('printSimpleLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, '1.runtimeType'); + + expect( + await getDisplayedGetters(instanceRef), + matchDisplayedTypeObjectGetters, + ); + }); }); - }); - - test('map type getters', () async { - await onBreakPoint('printSimpleLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef( - frame, - '{}.runtimeType', - ); - expect( - await getDisplayedGetters(instanceRef), - matchDisplayedTypeObjectGetters, - ); + test('list type', () async { + await onBreakPoint('printSimpleLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef( + frame, + '[].runtimeType', + ); + expect(instanceRef, matchTypeInstanceRef('List')); + + final instanceId = instanceRef.id!; + final instance = await getObject(instanceId); + expect(instance, matchTypeInstance('List')); + + final classId = instanceRef.classRef!.id!; + expect(await getObject(classId), matchTypeClass); + expect(await getFields(instanceRef, depth: 1), matchTypeObjectFields); + expect( + await getDisplayedFields(instanceRef), + matchDisplayedTypeObjectFields, + ); + expect( + await getDisplayedGetters(instanceRef), + matchDisplayedTypeObjectGetters, + ); + }); }); - }); - - test('set type', () async { - await onBreakPoint('printSimpleLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, '{}.runtimeType'); - expect(instanceRef, matchTypeInstanceRef('IdentitySet')); - - final instanceId = instanceRef.id!; - final instance = await getObject(instanceId); - expect(instance, matchTypeInstance('IdentitySet')); - - final classId = instanceRef.classRef!.id!; - expect(await getObject(classId), matchTypeClass); - expect(await getFields(instanceRef, depth: 1), matchTypeObjectFields); - expect( - await getDisplayedFields(instanceRef), - matchDisplayedTypeObjectFields, - ); + + test('map type', () async { + await onBreakPoint('printSimpleLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef( + frame, + '{}.runtimeType', + ); + expect(instanceRef, matchTypeInstanceRef('IdentityMap')); + + final instanceId = instanceRef.id!; + final instance = await getObject(instanceId); + expect(instance, matchTypeInstance('IdentityMap')); + + final classId = instanceRef.classRef!.id!; + expect(await getObject(classId), matchTypeClass); + expect(await getFields(instanceRef, depth: 1), matchTypeObjectFields); + expect( + await getDisplayedFields(instanceRef), + matchDisplayedTypeObjectFields, + ); + }); }); - }); - test('set type getters', () async { - await onBreakPoint('printSimpleLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, '{}.runtimeType'); + test('map type getters', () async { + await onBreakPoint('printSimpleLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef( + frame, + '{}.runtimeType', + ); + + expect( + await getDisplayedGetters(instanceRef), + matchDisplayedTypeObjectGetters, + ); + }); + }); - expect( - await getDisplayedGetters(instanceRef), - matchDisplayedTypeObjectGetters, - ); + test('set type', () async { + await onBreakPoint('printSimpleLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef( + frame, + '{}.runtimeType', + ); + expect(instanceRef, matchTypeInstanceRef('IdentitySet')); + + final instanceId = instanceRef.id!; + final instance = await getObject(instanceId); + expect(instance, matchTypeInstance('IdentitySet')); + + final classId = instanceRef.classRef!.id!; + expect(await getObject(classId), matchTypeClass); + expect(await getFields(instanceRef, depth: 1), matchTypeObjectFields); + expect( + await getDisplayedFields(instanceRef), + matchDisplayedTypeObjectFields, + ); + }); }); - }); - - test('record type', () async { - await onBreakPoint('printSimpleLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, "(0,'a').runtimeType"); - expect(instanceRef, matchRecordTypeInstanceRef(length: 2)); - - final instanceId = instanceRef.id!; - final instance = await getObject(instanceId); - expect(instance, matchRecordTypeInstance(length: 2)); - expect(await getElements(instanceId), [ - matchTypeInstance('int'), - matchTypeInstance('String'), - ]); - - final classId = instanceRef.classRef!.id!; - expect(await getObject(classId), matchRecordTypeClass); - expect(await getFields(instanceRef, depth: 2), { - 1: matchTypeObjectFields, - 2: matchTypeObjectFields, + + test('set type getters', () async { + await onBreakPoint('printSimpleLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef( + frame, + '{}.runtimeType', + ); + + expect( + await getDisplayedGetters(instanceRef), + matchDisplayedTypeObjectGetters, + ); }); - expect(await getDisplayedFields(instanceRef), {1: 'int', 2: 'String'}); }); - }); - test('record type getters', () async { - await onBreakPoint('printSimpleLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, "(0,'a').runtimeType"); + test('record type', () async { + await onBreakPoint('printSimpleLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef( + frame, + "(0,'a').runtimeType", + ); + expect(instanceRef, matchRecordTypeInstanceRef(length: 2)); + + final instanceId = instanceRef.id!; + final instance = await getObject(instanceId); + expect(instance, matchRecordTypeInstance(length: 2)); + expect(await getElements(instanceId), [ + matchTypeInstance('int'), + matchTypeInstance('String'), + ]); + + final classId = instanceRef.classRef!.id!; + expect(await getObject(classId), matchRecordTypeClass); + expect(await getFields(instanceRef, depth: 2), { + 1: matchTypeObjectFields, + 2: matchTypeObjectFields, + }); + expect(await getDisplayedFields(instanceRef), { + 1: 'int', + 2: 'String', + }); + }); + }); - expect( - await getDisplayedGetters(instanceRef), - matchDisplayedTypeObjectGetters, - ); + test('record type getters', () async { + await onBreakPoint('printSimpleLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef( + frame, + "(0,'a').runtimeType", + ); + + expect( + await getDisplayedGetters(instanceRef), + matchDisplayedTypeObjectGetters, + ); + }); }); - }); - - test('class type', () async { - await onBreakPoint('printSimpleLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef( - frame, - "Uri.file('').runtimeType", - ); - expect(instanceRef, matchTypeInstanceRef('_Uri')); - - final instanceId = instanceRef.id!; - final instance = await getObject(instanceId); - expect(instance, matchTypeInstance('_Uri')); - final classId = instanceRef.classRef!.id!; - expect(await getObject(classId), matchTypeClass); - expect(await getFields(instanceRef, depth: 1), matchTypeObjectFields); - expect( - await getDisplayedFields(instanceRef), - matchDisplayedTypeObjectFields, - ); + + test('class type', () async { + await onBreakPoint('printSimpleLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef( + frame, + "Uri.file('').runtimeType", + ); + expect(instanceRef, matchTypeInstanceRef('_Uri')); + + final instanceId = instanceRef.id!; + final instance = await getObject(instanceId); + expect(instance, matchTypeInstance('_Uri')); + final classId = instanceRef.classRef!.id!; + expect(await getObject(classId), matchTypeClass); + expect(await getFields(instanceRef, depth: 1), matchTypeObjectFields); + expect( + await getDisplayedFields(instanceRef), + matchDisplayedTypeObjectFields, + ); + }); }); - }); - - test('class type getters', () async { - await onBreakPoint('printSimpleLocalRecord', (Event event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef( - frame, - "Uri.file('').runtimeType", - ); - expect( - await getDisplayedGetters(instanceRef), - matchDisplayedTypeObjectGetters, - ); + test('class type getters', () async { + await onBreakPoint('printSimpleLocalRecord', (Event event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef( + frame, + "Uri.file('').runtimeType", + ); + + expect( + await getDisplayedGetters(instanceRef), + matchDisplayedTypeObjectGetters, + ); + }); }); - }); - }); + }, + ); } diff --git a/webdev/lib/src/serve/webdev_server.dart b/webdev/lib/src/serve/webdev_server.dart index efeff0eb78..4c680bf591 100644 --- a/webdev/lib/src/serve/webdev_server.dart +++ b/webdev/lib/src/serve/webdev_server.dart @@ -558,31 +558,21 @@ Future> _sendRequestToFes( final compileResult = await _sendFesRawRequest(port, request); if (compileResult is! Map) { return { - 'result': + 'errorMessage': 'Unexpected response format from FES. ' 'Expected a Map but got: $compileResult', - 'isError': true, + 'errorCount': 1, }; } - final error = compileResult['error'] as String?; - final errorCount = compileResult['errorCount'] as int?; - final errorMessage = compileResult['errorMessage'] as String?; - if (error != null || (errorCount != null && errorCount > 0)) { - return { - 'result': 'FES error: ${error ?? errorMessage ?? 'Unknown error'}', - 'isError': true, - }; - } + final compileResultMap = compileResult as Map; - final expressionData = compileResult['expressionData'] as String?; - if (expressionData == null) { - return { - 'result': 'Missing expressionData in FES compile result', - 'isError': true, - }; + // Ensure 'errorMessage' is populated if 'error' is present, + // to satisfy DaemonExpressionCompiler. + final error = compileResultMap['error'] as String?; + if (error != null && compileResultMap['errorMessage'] == null) { + compileResultMap['errorMessage'] = error; } - final decodedResult = utf8.decode(base64.decode(expressionData)); - return {'result': decodedResult, 'isError': false}; + return compileResultMap; } diff --git a/webdev/test/asset_handler_amd_test.dart b/webdev/test/asset_handler_amd_test.dart index 3dc505ee91..2e8b2dd3de 100644 --- a/webdev/test/asset_handler_amd_test.dart +++ b/webdev/test/asset_handler_amd_test.dart @@ -11,15 +11,12 @@ import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; import 'helpers/context.dart'; + void main() { final provider = TestSdkConfigurationProvider( ddcModuleFormat: ModuleFormat.amd, ); tearDownAll(provider.dispose); - testAll( - provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), - ); + testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); } - diff --git a/webdev/test/asset_handler_ddc_library_bundle_test.dart b/webdev/test/asset_handler_ddc_library_bundle_test.dart index 2a13f79f87..aaa97ad92a 100644 --- a/webdev/test/asset_handler_ddc_library_bundle_test.dart +++ b/webdev/test/asset_handler_ddc_library_bundle_test.dart @@ -22,5 +22,5 @@ void main() { ); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); } diff --git a/webdev/test/breakpoint_amd_test.dart b/webdev/test/breakpoint_amd_test.dart index 79a6f3488c..05459f471d 100644 --- a/webdev/test/breakpoint_amd_test.dart +++ b/webdev/test/breakpoint_amd_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/breakpoint.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; @@ -26,7 +26,7 @@ void main() { group('Build Daemon |', () { testBreakpoint( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + contextFactory: BuildDaemonTestContext.new, ); }); } diff --git a/webdev/test/breakpoint_ddc_library_bundle_test.dart b/webdev/test/breakpoint_ddc_library_bundle_test.dart index 7e874c90a9..0928391b7f 100644 --- a/webdev/test/breakpoint_ddc_library_bundle_test.dart +++ b/webdev/test/breakpoint_ddc_library_bundle_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/breakpoint.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; @@ -27,14 +27,14 @@ void main() { group('Build Daemon |', () { testBreakpoint( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + contextFactory: BuildDaemonTestContext.new, ); }); group('Build Daemon and Frontend Server |', () { testBreakpoint( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + contextFactory: BuildDaemonAndFrontendServerTestContext.new, ); }); } diff --git a/webdev/test/callstack_amd_test.dart b/webdev/test/callstack_amd_test.dart index f6a8033c77..6cbed4ed29 100644 --- a/webdev/test/callstack_amd_test.dart +++ b/webdev/test/callstack_amd_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/callstack.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; @@ -26,7 +26,7 @@ void main() { group('Build Daemon |', () { testCallStack( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + contextFactory: BuildDaemonTestContext.new, ); }); } diff --git a/webdev/test/callstack_ddc_library_bundle_test.dart b/webdev/test/callstack_ddc_library_bundle_test.dart index fe74be82b7..ec6d176fc0 100644 --- a/webdev/test/callstack_ddc_library_bundle_test.dart +++ b/webdev/test/callstack_ddc_library_bundle_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/callstack.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; @@ -27,14 +27,14 @@ void main() { group('Build Daemon |', () { testCallStack( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + contextFactory: BuildDaemonTestContext.new, ); }); group('Build Daemon and Frontend Server |', () { testCallStack( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + contextFactory: BuildDaemonAndFrontendServerTestContext.new, ); }); } diff --git a/webdev/test/chrome_proxy_service_amd_test.dart b/webdev/test/chrome_proxy_service_amd_test.dart index 878c445157..f2f05b0fe0 100644 --- a/webdev/test/chrome_proxy_service_amd_test.dart +++ b/webdev/test/chrome_proxy_service_amd_test.dart @@ -8,19 +8,18 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/chrome_proxy_service.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; + +import 'helpers/context.dart'; void main() { // Enable verbose logging for debugging. const debug = false; final canaryFeatures = false; final moduleFormat = ModuleFormat.amd; - final provider = TestSdkConfigurationProvider( verbose: debug, @@ -34,7 +33,7 @@ void main() { runTests( provider: provider, moduleFormat: moduleFormat, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + contextFactory: BuildDaemonTestContext.new, canaryFeatures: canaryFeatures, ); }); diff --git a/webdev/test/chrome_proxy_service_ddc_library_bundle_test.dart b/webdev/test/chrome_proxy_service_ddc_library_bundle_test.dart index fd07b5324f..1c2a83b070 100644 --- a/webdev/test/chrome_proxy_service_ddc_library_bundle_test.dart +++ b/webdev/test/chrome_proxy_service_ddc_library_bundle_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/chrome_proxy_service.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; @@ -26,7 +26,7 @@ void main() { canaryFeatures: canaryFeatures, ddcModuleFormat: moduleFormat, ); - final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final contextFactory = BuildDaemonTestContext.new; tearDownAll(provider.dispose); runTests( @@ -43,7 +43,7 @@ void main() { canaryFeatures: canaryFeatures, ddcModuleFormat: moduleFormat, ); - final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + final contextFactory = BuildDaemonAndFrontendServerTestContext.new; tearDownAll(provider.dispose); runTests( diff --git a/webdev/test/circular_evaluate_amd_test.dart b/webdev/test/circular_evaluate_amd_test.dart index cd161e2337..b34dffbe0b 100644 --- a/webdev/test/circular_evaluate_amd_test.dart +++ b/webdev/test/circular_evaluate_amd_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/evaluate_circular.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() async { // Enable verbose logging for debugging. const debug = false; @@ -25,6 +25,6 @@ void main() async { tearDownAll(provider.dispose); group('Build Daemon |', () { - testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); }); } diff --git a/webdev/test/circular_evaluate_ddc_library_bundle_test.dart b/webdev/test/circular_evaluate_ddc_library_bundle_test.dart index d98a047cb4..92b759371c 100644 --- a/webdev/test/circular_evaluate_ddc_library_bundle_test.dart +++ b/webdev/test/circular_evaluate_ddc_library_bundle_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/evaluate_circular.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() async { // Enable verbose logging for debugging. const debug = false; @@ -26,13 +26,13 @@ void main() async { tearDownAll(provider.dispose); group('Build Daemon |', () { - testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); }); group('Build Daemon and Frontend Server |', () { testAll( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + contextFactory: BuildDaemonAndFrontendServerTestContext.new, ); }); } diff --git a/webdev/test/class_inspection_amd_test.dart b/webdev/test/class_inspection_amd_test.dart index 0ebd77c64c..2c99a5c9e8 100644 --- a/webdev/test/class_inspection_amd_test.dart +++ b/webdev/test/class_inspection_amd_test.dart @@ -8,19 +8,19 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/class_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; group('canary: false | Build Daemon |', () { final canaryFeatures = false; - final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final contextFactory = BuildDaemonTestContext.new; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -37,7 +37,7 @@ void main() { group('canary: true | Build Daemon |', () { final canaryFeatures = true; - final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final contextFactory = BuildDaemonTestContext.new; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, diff --git a/webdev/test/class_inspection_ddc_library_bundle_test.dart b/webdev/test/class_inspection_ddc_library_bundle_test.dart index 8760bd664f..a5bd0084b2 100644 --- a/webdev/test/class_inspection_ddc_library_bundle_test.dart +++ b/webdev/test/class_inspection_ddc_library_bundle_test.dart @@ -8,19 +8,19 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/class_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; group('canary: true | Build Daemon |', () { final canaryFeatures = true; - final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final contextFactory = BuildDaemonTestContext.new; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -37,7 +37,7 @@ void main() { group('canary: true | Build Daemon and Frontend Server |', () { final canaryFeatures = true; - final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + final contextFactory = BuildDaemonAndFrontendServerTestContext.new; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, diff --git a/webdev/test/dart_uri_file_uri_amd_test.dart b/webdev/test/dart_uri_file_uri_amd_test.dart index 57db580682..c8815bcd64 100644 --- a/webdev/test/dart_uri_file_uri_amd_test.dart +++ b/webdev/test/dart_uri_file_uri_amd_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/dart_uri_file_uri.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; @@ -24,6 +24,6 @@ void main() { tearDownAll(provider.dispose); group('Build Daemon |', () { - runTests(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + runTests(provider: provider, contextFactory: BuildDaemonTestContext.new); }); } diff --git a/webdev/test/dart_uri_file_uri_ddc_library_bundle_test.dart b/webdev/test/dart_uri_file_uri_ddc_library_bundle_test.dart index 23c775f0b7..ba8882a27f 100644 --- a/webdev/test/dart_uri_file_uri_ddc_library_bundle_test.dart +++ b/webdev/test/dart_uri_file_uri_ddc_library_bundle_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/dart_uri_file_uri.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; @@ -25,13 +25,13 @@ void main() { tearDownAll(provider.dispose); group('Build Daemon |', () { - runTests(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + runTests(provider: provider, contextFactory: BuildDaemonTestContext.new); }); group('Build Daemon and Frontend Server |', () { runTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + contextFactory: BuildDaemonAndFrontendServerTestContext.new, ); }); } diff --git a/webdev/test/dds_port_amd_test.dart b/webdev/test/dds_port_amd_test.dart index 56b925e320..7d3b381f14 100644 --- a/webdev/test/dds_port_amd_test.dart +++ b/webdev/test/dds_port_amd_test.dart @@ -15,5 +15,5 @@ void main() { final provider = TestSdkConfigurationProvider(); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); } diff --git a/webdev/test/dds_port_ddc_library_bundle_test.dart b/webdev/test/dds_port_ddc_library_bundle_test.dart index 5e1f852ee3..77a8e025d5 100644 --- a/webdev/test/dds_port_ddc_library_bundle_test.dart +++ b/webdev/test/dds_port_ddc_library_bundle_test.dart @@ -24,5 +24,5 @@ void main() { ); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); } diff --git a/webdev/test/dot_shorthands_amd_test.dart b/webdev/test/dot_shorthands_amd_test.dart index d35ffb1d78..3ff3c0057b 100644 --- a/webdev/test/dot_shorthands_amd_test.dart +++ b/webdev/test/dot_shorthands_amd_test.dart @@ -8,19 +8,19 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/dot_shorthands.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; group('canary: false | Build Daemon |', () { final canaryFeatures = false; - final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final contextFactory = BuildDaemonTestContext.new; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -37,7 +37,7 @@ void main() { group('canary: true | Build Daemon |', () { final canaryFeatures = true; - final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final contextFactory = BuildDaemonTestContext.new; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, diff --git a/webdev/test/dot_shorthands_ddc_library_bundle_test.dart b/webdev/test/dot_shorthands_ddc_library_bundle_test.dart index 2edd0b0857..a6427d37b0 100644 --- a/webdev/test/dot_shorthands_ddc_library_bundle_test.dart +++ b/webdev/test/dot_shorthands_ddc_library_bundle_test.dart @@ -8,19 +8,19 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/dot_shorthands.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; group('canary: true | Build Daemon |', () { final canaryFeatures = true; - final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final contextFactory = BuildDaemonTestContext.new; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -37,7 +37,7 @@ void main() { group('canary: true | Build Daemon and Frontend Server |', () { final canaryFeatures = true; - final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + final contextFactory = BuildDaemonAndFrontendServerTestContext.new; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, diff --git a/webdev/test/evaluate_amd_test.dart b/webdev/test/evaluate_amd_test.dart index 75cb4131b8..d5265a8f71 100644 --- a/webdev/test/evaluate_amd_test.dart +++ b/webdev/test/evaluate_amd_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/evaluate.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() async { // Enable verbose logging for debugging. const debug = false; @@ -25,6 +25,6 @@ void main() async { tearDownAll(provider.dispose); group('Build Daemon |', () { - testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); }); } diff --git a/webdev/test/evaluate_ddc_library_bundle_test.dart b/webdev/test/evaluate_ddc_library_bundle_test.dart index 42fef30160..250e16edf2 100644 --- a/webdev/test/evaluate_ddc_library_bundle_test.dart +++ b/webdev/test/evaluate_ddc_library_bundle_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/evaluate.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() async { // Enable verbose logging for debugging. const debug = false; @@ -27,13 +27,13 @@ void main() async { tearDownAll(provider.dispose); group('Build Daemon |', () { - testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); }); group('Build Daemon and Frontend Server |', () { testAll( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + contextFactory: BuildDaemonAndFrontendServerTestContext.new, ); }); }); diff --git a/webdev/test/events_amd_test.dart b/webdev/test/events_amd_test.dart index 122b9582d1..b8a73eeed6 100644 --- a/webdev/test/events_amd_test.dart +++ b/webdev/test/events_amd_test.dart @@ -5,12 +5,12 @@ @Timeout(Duration(minutes: 2)) library; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/events.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { final provider = TestSdkConfigurationProvider(); tearDownAll(provider.dispose); @@ -18,7 +18,7 @@ void main() { group('Build Daemon', () { testWithDwds( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + contextFactory: BuildDaemonTestContext.new, ); }); } diff --git a/webdev/test/events_ddc_library_bundle_test.dart b/webdev/test/events_ddc_library_bundle_test.dart index 84be064bd0..063836374d 100644 --- a/webdev/test/events_ddc_library_bundle_test.dart +++ b/webdev/test/events_ddc_library_bundle_test.dart @@ -6,12 +6,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/events.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; @@ -26,7 +26,7 @@ void main() { group('Build Daemon', () { testWithDwds( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + contextFactory: BuildDaemonTestContext.new, ); }); } diff --git a/webdev/test/helpers/context.dart b/webdev/test/helpers/context.dart index ef3a65922b..abcccb2ea2 100644 --- a/webdev/test/helpers/context.dart +++ b/webdev/test/helpers/context.dart @@ -3,7 +3,6 @@ import 'dart:convert'; import 'dart:io'; import 'dart:typed_data'; -import 'package:build_daemon/client.dart'; import 'package:build_daemon/data/build_status.dart' as daemon; import 'package:build_daemon/data/build_target.dart'; import 'package:dwds/asset_reader.dart'; @@ -17,8 +16,8 @@ import 'package:dwds/src/services/expression_compiler_service.dart'; import 'package:dwds/src/utilities/web_path_translator.dart'; import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/fixtures/utilities.dart'; -import 'package:dwds_test_common/utilities.dart'; import 'package:dwds_test_common/frontend_server_common/devfs.dart'; +import 'package:dwds_test_common/utilities.dart'; import 'package:file/local.dart'; import 'package:logging/logging.dart' as logging; import 'package:path/path.dart' as p; @@ -27,12 +26,7 @@ import 'package:shelf/shelf.dart'; import 'package:shelf_proxy/shelf_proxy.dart'; class BuildDaemonTestContext extends TestContext { - final _logger = logging.Logger('BuildDaemonTestContext'); - - BuildDaemonTestContext( - super.project, - super.sdkConfigurationProvider, - ); + BuildDaemonTestContext(super.project, super.sdkConfigurationProvider); @override bool get usesFrontendServer => false; @@ -98,9 +92,7 @@ class BuildDaemonTestContext extends TestContext { await waitForSuccessfulBuild(); - final assetServerPort = daemonPort( - project.absolutePackageDirectory, - ); + final assetServerPort = daemonPort(project.absolutePackageDirectory); assetHandler = switch (( testSettings.moduleFormat, buildSettings.canaryFeatures, @@ -122,6 +114,8 @@ class BuildDaemonTestContext extends TestContext { sdkConfigurationProvider: sdkConfigurationProvider, ); expressionCompiler = ddcService; + } else { + expressionCompiler = null; } loadStrategy = switch (( @@ -129,20 +123,20 @@ class BuildDaemonTestContext extends TestContext { buildSettings.canaryFeatures, )) { (ModuleFormat.ddc, true) => BuildRunnerDdcLibraryBundleStrategyProvider( - testSettings.reloadConfiguration, - assetReader, - buildSettings, - reloadedSourcesUri: reloadedSourcesUri, - ).strategy, + testSettings.reloadConfiguration, + assetReader, + buildSettings, + reloadedSourcesUri: reloadedSourcesUri, + ).strategy, (ModuleFormat.ddc, false) => throw Exception( - 'Unsupported DDC configuration: build daemon + canary (false) ' - '+ DDC module format ${testSettings.moduleFormat.name}.', - ), + 'Unsupported DDC configuration: build daemon + canary (false) ' + '+ DDC module format ${testSettings.moduleFormat.name}.', + ), _ => BuildRunnerRequireStrategyProvider( - testSettings.reloadConfiguration, - assetReader, - buildSettings, - ).strategy, + testSettings.reloadConfiguration, + assetReader, + buildSettings, + ).strategy, }; buildResults = daemonClient.buildResults.map((results) { @@ -176,6 +170,7 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { bool get usesBuildDaemon => true; @override bool get usesDdcModulesOnly => true; + /// Forwards expression compilation requests to the persistent Frontend Server /// process via socket. Future> _compileExpressionWithDaemon( @@ -206,6 +201,7 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { await socket.close(); } } + @override Future modeSetUp({ required TestSettings testSettings, @@ -267,16 +263,13 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { ), ); final packagesFile = File( - p.join( - testScratchSpaceDir.path, - '.dart_tool', - 'package_config.json', - ), + p.join(testScratchSpaceDir.path, '.dart_tool', 'package_config.json'), ); packagesFile.parent.createSync(recursive: true); - final originalJson = jsonDecode(sourcePackagesFile.readAsStringSync()) - as Map; + final originalJson = + jsonDecode(sourcePackagesFile.readAsStringSync()) + as Map; final packagesList = originalJson['packages'] as List; for (final package in packagesList) { final packageMap = package as Map; @@ -298,26 +291,23 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { '.dart_tool', 'fes_manager.snapshot', ); - - final buildWebCompilers = packagesList.firstWhere( - (pkg) => (pkg as Map)['name'] == 'build_web_compilers', - orElse: () => null, - ) as Map?; + + final buildWebCompilers = + packagesList.firstWhere( + (pkg) => (pkg as Map)['name'] == 'build_web_compilers', + orElse: () => null, + ) + as Map?; String fesManagerPath; if (buildWebCompilers != null) { - final pkgRootUri = Uri.parse( - buildWebCompilers['rootUri'] as String, - ); + final pkgRootUri = Uri.parse(buildWebCompilers['rootUri'] as String); fesManagerPath = p.join( pkgRootUri.toFilePath(), 'bin', 'fes_manager.dart', ); } else { - final localBuildRepoDir = p.join( - p.dirname(projectRootDir), - 'build', - ); + final localBuildRepoDir = p.join(p.dirname(projectRootDir), 'build'); fesManagerPath = p.join( localBuildRepoDir, 'builder_pkgs', @@ -359,14 +349,14 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { .transform(utf8.decoder) .transform(const LineSplitter()) .listen((line) { - _logger.info('FES Manager STDOUT: $line'); - }); + _logger.info('FES Manager STDOUT: $line'); + }); fesProcess!.stderr .transform(utf8.decoder) .transform(const LineSplitter()) .listen((line) { - _logger.warning('FES Manager STDERR: $line'); - }); + _logger.warning('FES Manager STDERR: $line'); + }); final configFile = _fesManagerConfigFile(this); while (!await configFile.exists()) { @@ -430,11 +420,12 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { await buildFuture; - final assetServerPort = daemonPort( - project.absolutePackageDirectory, + final assetServerPort = daemonPort(project.absolutePackageDirectory); + assetHandler = _createBuildRunnerDdcLibraryBundleAssetHandler( + this, + assetServerPort, ); - assetHandler = _createBuildRunnerDdcLibraryBundleAssetHandler(this, assetServerPort); - + // Using standard constructor if fromHandler is not available or if it's simpler. // In "theirs" they used ProxyServerAssetReader.fromHandler(_assetHandler!); // Let's check if ProxyServerAssetReader has fromHandler in this branch. @@ -449,6 +440,8 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { expressionCompiler = DaemonExpressionCompiler( _compileExpressionWithDaemon, ); + } else { + expressionCompiler = null; } frontendServerFileSystem = const LocalFileSystem(); final packageUriMapper = await BuildRunnerPathResolver.create( @@ -479,11 +472,11 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { reloadedSourcesUri: reloadedSourcesUri, ).strategy, _ => throw Exception( - 'Unsupported DDC module format when compiling with Frontend ' - 'Server + build_runner ${testSettings.moduleFormat.name}.', - ), + 'Unsupported DDC module format when compiling with Frontend ' + 'Server + build_runner ${testSettings.moduleFormat.name}.', + ), }; - + // Map build results. buildResults = testSettings.enableExpressionEvaluation ? const Stream.empty() @@ -505,13 +498,13 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { } File _fesManagerConfigFile(TestContext context) => File( - p.join( - context.project.absolutePackageDirectory, - '.dart_tool', - 'build', - 'fes_manager_config', - ), - ); + p.join( + context.project.absolutePackageDirectory, + '.dart_tool', + 'build', + 'fes_manager_config', + ), +); Handler _createBuildRunnerDdcLibraryBundleAssetHandler( TestContext context, @@ -632,8 +625,7 @@ Handler _createBuildRunnerDdcLibraryBundleAssetHandler( final configFile = _fesManagerConfigFile(context); if (await configFile.exists()) { try { - final configJson = - jsonDecode(await configFile.readAsString()) as Map; + final configJson = jsonDecode(await configFile.readAsString()) as Map; final port = configJson['port'] as int?; if (port != null) { final socket = await Socket.connect( @@ -641,9 +633,7 @@ Handler _createBuildRunnerDdcLibraryBundleAssetHandler( port, ); try { - socket.writeln( - jsonEncode({'instruction': 'MERGE_ALL_METADATA'}), - ); + socket.writeln(jsonEncode({'instruction': 'MERGE_ALL_METADATA'})); final responseStr = await socket .cast>() .transform(utf8.decoder) diff --git a/webdev/test/hot_reload_breakpoints_ddc_library_bundle_test.dart b/webdev/test/hot_reload_breakpoints_ddc_library_bundle_test.dart index 9249273422..bec016b2f9 100644 --- a/webdev/test/hot_reload_breakpoints_ddc_library_bundle_test.dart +++ b/webdev/test/hot_reload_breakpoints_ddc_library_bundle_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/hot_reload_breakpoints.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; @@ -28,7 +28,7 @@ void main() { group('Build Daemon and Frontend Server', () { runTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + contextFactory: BuildDaemonAndFrontendServerTestContext.new, ); }); } diff --git a/webdev/test/hot_reload_ddc_library_bundle_test.dart b/webdev/test/hot_reload_ddc_library_bundle_test.dart index 97f857d921..da1c2a0dce 100644 --- a/webdev/test/hot_reload_ddc_library_bundle_test.dart +++ b/webdev/test/hot_reload_ddc_library_bundle_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/hot_reload.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; @@ -28,7 +28,7 @@ void main() { group('Build Daemon and Frontend Server', () { runTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + contextFactory: BuildDaemonAndFrontendServerTestContext.new, ); }); } diff --git a/webdev/test/hot_restart_amd_test.dart b/webdev/test/hot_restart_amd_test.dart index 1b7669d28b..546d00977b 100644 --- a/webdev/test/hot_restart_amd_test.dart +++ b/webdev/test/hot_restart_amd_test.dart @@ -8,19 +8,18 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/hot_restart.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; + +import 'helpers/context.dart'; void main() { // Enable verbose logging for debugging. const debug = false; final canaryFeatures = false; final moduleFormat = ModuleFormat.amd; - final provider = TestSdkConfigurationProvider( verbose: debug, @@ -31,7 +30,7 @@ void main() { runTests( provider: provider, moduleFormat: moduleFormat, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + contextFactory: BuildDaemonTestContext.new, canaryFeatures: canaryFeatures, ); } diff --git a/webdev/test/hot_restart_breakpoints_ddc_library_bundle_test.dart b/webdev/test/hot_restart_breakpoints_ddc_library_bundle_test.dart index f81ed09c45..5d2fe05126 100644 --- a/webdev/test/hot_restart_breakpoints_ddc_library_bundle_test.dart +++ b/webdev/test/hot_restart_breakpoints_ddc_library_bundle_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/hot_restart_breakpoints.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; @@ -26,13 +26,13 @@ void main() { tearDownAll(provider.dispose); group('Build Daemon', () { - runTests(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + runTests(provider: provider, contextFactory: BuildDaemonTestContext.new); }); group('Build Daemon and Frontend Server', () { runTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + contextFactory: BuildDaemonAndFrontendServerTestContext.new, ); }); } diff --git a/webdev/test/hot_restart_correctness_amd_test.dart b/webdev/test/hot_restart_correctness_amd_test.dart index 20752233f9..b25d999444 100644 --- a/webdev/test/hot_restart_correctness_amd_test.dart +++ b/webdev/test/hot_restart_correctness_amd_test.dart @@ -8,19 +8,18 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; + import 'package:dwds_test_common/integration/hot_restart_correctness.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; -import 'fixtures/frontend_server_context.dart'; -import '../../../webdev/test/helpers/context.dart'; + +import 'helpers/context.dart'; void main() { // Enable verbose logging for debugging. const debug = false; final canaryFeatures = false; final moduleFormat = ModuleFormat.amd; - final provider = TestSdkConfigurationProvider( verbose: debug, @@ -31,7 +30,7 @@ void main() { runTests( provider: provider, moduleFormat: moduleFormat, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + contextFactory: BuildDaemonTestContext.new, canaryFeatures: canaryFeatures, ); } diff --git a/webdev/test/hot_restart_correctness_ddc_library_bundle_test.dart b/webdev/test/hot_restart_correctness_ddc_library_bundle_test.dart index f16f780989..b4c2fc2368 100644 --- a/webdev/test/hot_restart_correctness_ddc_library_bundle_test.dart +++ b/webdev/test/hot_restart_correctness_ddc_library_bundle_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/hot_restart_correctness.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; @@ -26,7 +26,7 @@ void main() { canaryFeatures: canaryFeatures, ddcModuleFormat: moduleFormat, ); - final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final contextFactory = BuildDaemonTestContext.new; runTests( provider: provider, moduleFormat: moduleFormat, @@ -41,7 +41,7 @@ void main() { canaryFeatures: canaryFeatures, ddcModuleFormat: moduleFormat, ); - final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + final contextFactory = BuildDaemonAndFrontendServerTestContext.new; runTests( provider: provider, moduleFormat: moduleFormat, diff --git a/webdev/test/hot_restart_ddc_library_bundle_test.dart b/webdev/test/hot_restart_ddc_library_bundle_test.dart index fd8eb00f12..e12ad821fb 100644 --- a/webdev/test/hot_restart_ddc_library_bundle_test.dart +++ b/webdev/test/hot_restart_ddc_library_bundle_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/hot_restart.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; @@ -21,7 +21,7 @@ void main() { final moduleFormat = ModuleFormat.ddc; group('canary: $canaryFeatures | Build Daemon |', () { - final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final contextFactory = BuildDaemonTestContext.new; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -37,7 +37,7 @@ void main() { }); group('canary: $canaryFeatures | Build Daemon and Frontend Server |', () { - final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + final contextFactory = BuildDaemonAndFrontendServerTestContext.new; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, diff --git a/webdev/test/inspector_amd_test.dart b/webdev/test/inspector_amd_test.dart index 86030bddd2..368e26e58f 100644 --- a/webdev/test/inspector_amd_test.dart +++ b/webdev/test/inspector_amd_test.dart @@ -24,6 +24,6 @@ void main() { tearDownAll(provider.dispose); group('Build Daemon |', () { - runTests(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + runTests(provider: provider, contextFactory: BuildDaemonTestContext.new); }); } diff --git a/webdev/test/inspector_ddc_library_bundle_test.dart b/webdev/test/inspector_ddc_library_bundle_test.dart index 4c67eecb0f..bb90c93f1c 100644 --- a/webdev/test/inspector_ddc_library_bundle_test.dart +++ b/webdev/test/inspector_ddc_library_bundle_test.dart @@ -25,13 +25,13 @@ void main() { tearDownAll(provider.dispose); group('Build Daemon |', () { - runTests(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + runTests(provider: provider, contextFactory: BuildDaemonTestContext.new); }); group('Build Daemon and Frontend Server |', () { runTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider), + contextFactory: BuildDaemonAndFrontendServerTestContext.new, ); }); } diff --git a/webdev/test/instance_amd_test.dart b/webdev/test/instance_amd_test.dart index 3ccfb3a607..0115d4ed9f 100644 --- a/webdev/test/instance_amd_test.dart +++ b/webdev/test/instance_amd_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/instance.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; @@ -20,7 +20,7 @@ void main() { group('canary: false | Build Daemon |', () { final canaryFeatures = false; - final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final contextFactory = BuildDaemonTestContext.new; final provider = TestSdkConfigurationProvider( canaryFeatures: canaryFeatures, verbose: debug, @@ -43,7 +43,7 @@ void main() { group('canary: true | Build Daemon |', () { final canaryFeatures = true; - final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final contextFactory = BuildDaemonTestContext.new; final provider = TestSdkConfigurationProvider( canaryFeatures: canaryFeatures, verbose: debug, diff --git a/webdev/test/instance_ddc_library_bundle_test.dart b/webdev/test/instance_ddc_library_bundle_test.dart index 0481dbeaca..1338d6bdf4 100644 --- a/webdev/test/instance_ddc_library_bundle_test.dart +++ b/webdev/test/instance_ddc_library_bundle_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/instance.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; @@ -20,7 +20,7 @@ void main() { final moduleFormat = ModuleFormat.ddc; group('canary: true | Build Daemon |', () { - final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final contextFactory = BuildDaemonTestContext.new; final provider = TestSdkConfigurationProvider( canaryFeatures: canaryFeatures, verbose: debug, @@ -36,7 +36,7 @@ void main() { }); group('canary: true | Build Daemon and Frontend Server |', () { - final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + final contextFactory = BuildDaemonAndFrontendServerTestContext.new; final provider = TestSdkConfigurationProvider( canaryFeatures: canaryFeatures, verbose: debug, diff --git a/webdev/test/instance_inspection_amd_test.dart b/webdev/test/instance_inspection_amd_test.dart index 6c902de4b5..337aaee39e 100644 --- a/webdev/test/instance_inspection_amd_test.dart +++ b/webdev/test/instance_inspection_amd_test.dart @@ -8,19 +8,19 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/instance_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; group('canary: false | Build Daemon |', () { final canaryFeatures = false; - final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final contextFactory = BuildDaemonTestContext.new; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -37,7 +37,7 @@ void main() { group('canary: true | Build Daemon |', () { final canaryFeatures = true; - final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final contextFactory = BuildDaemonTestContext.new; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, diff --git a/webdev/test/instance_inspection_ddc_library_bundle_test.dart b/webdev/test/instance_inspection_ddc_library_bundle_test.dart index 955f050bb2..c4974e6d28 100644 --- a/webdev/test/instance_inspection_ddc_library_bundle_test.dart +++ b/webdev/test/instance_inspection_ddc_library_bundle_test.dart @@ -8,19 +8,19 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/instance_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; group('canary: true | Build Daemon |', () { final canaryFeatures = true; - final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final contextFactory = BuildDaemonTestContext.new; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -37,7 +37,7 @@ void main() { group('canary: true | Build Daemon and Frontend Server |', () { final canaryFeatures = true; - final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + final contextFactory = BuildDaemonAndFrontendServerTestContext.new; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, diff --git a/webdev/test/listviews_amd_test.dart b/webdev/test/listviews_amd_test.dart index a51eef7ba0..a07314c21c 100644 --- a/webdev/test/listviews_amd_test.dart +++ b/webdev/test/listviews_amd_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/listviews.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; @@ -24,6 +24,6 @@ void main() { tearDownAll(provider.dispose); group('Build Daemon |', () { - runTests(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + runTests(provider: provider, contextFactory: BuildDaemonTestContext.new); }); } diff --git a/webdev/test/listviews_ddc_library_bundle_test.dart b/webdev/test/listviews_ddc_library_bundle_test.dart index eaca4982db..a2cae1e73e 100644 --- a/webdev/test/listviews_ddc_library_bundle_test.dart +++ b/webdev/test/listviews_ddc_library_bundle_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/listviews.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; @@ -25,13 +25,13 @@ void main() { tearDownAll(provider.dispose); group('Build Daemon |', () { - runTests(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + runTests(provider: provider, contextFactory: BuildDaemonTestContext.new); }); group('Build Daemon and Frontend Server |', () { runTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + contextFactory: BuildDaemonAndFrontendServerTestContext.new, ); }); } diff --git a/webdev/test/load_strategy_amd_test.dart b/webdev/test/load_strategy_amd_test.dart index a5cf8908f8..3d40e356ca 100644 --- a/webdev/test/load_strategy_amd_test.dart +++ b/webdev/test/load_strategy_amd_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/load_strategy.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; @@ -26,7 +26,7 @@ void main() { group('Build Daemon |', () { runDependentTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + contextFactory: BuildDaemonTestContext.new, ); }); } diff --git a/webdev/test/load_strategy_ddc_library_bundle_test.dart b/webdev/test/load_strategy_ddc_library_bundle_test.dart index 91bdc66fc0..e060b29d03 100644 --- a/webdev/test/load_strategy_ddc_library_bundle_test.dart +++ b/webdev/test/load_strategy_ddc_library_bundle_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/load_strategy.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; @@ -27,14 +27,14 @@ void main() { group('Build Daemon |', () { runDependentTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + contextFactory: BuildDaemonTestContext.new, ); }); group('Build Daemon and Frontend Server |', () { runDependentTests( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + contextFactory: BuildDaemonAndFrontendServerTestContext.new, ); }); } diff --git a/webdev/test/parts_evaluate_amd_test.dart b/webdev/test/parts_evaluate_amd_test.dart index b9bfb0175f..30f521c24b 100644 --- a/webdev/test/parts_evaluate_amd_test.dart +++ b/webdev/test/parts_evaluate_amd_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/evaluate_parts.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() async { // Enable verbose logging for debugging. const debug = false; @@ -25,6 +25,6 @@ void main() async { tearDownAll(provider.dispose); group('Build Daemon |', () { - testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); }); } diff --git a/webdev/test/parts_evaluate_ddc_library_bundle_test.dart b/webdev/test/parts_evaluate_ddc_library_bundle_test.dart index 375a5751fd..a85732d113 100644 --- a/webdev/test/parts_evaluate_ddc_library_bundle_test.dart +++ b/webdev/test/parts_evaluate_ddc_library_bundle_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/evaluate_parts.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() async { // Enable verbose logging for debugging. const debug = false; @@ -26,13 +26,13 @@ void main() async { tearDownAll(provider.dispose); group('Build Daemon |', () { - testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); }); group('Build Daemon and Frontend Server |', () { testAll( provider: provider, - contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + contextFactory: BuildDaemonAndFrontendServerTestContext.new, ); }); } diff --git a/webdev/test/patterns_inspection_amd_test.dart b/webdev/test/patterns_inspection_amd_test.dart index 2d024d7041..66ca95e015 100644 --- a/webdev/test/patterns_inspection_amd_test.dart +++ b/webdev/test/patterns_inspection_amd_test.dart @@ -8,19 +8,19 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/patterns_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; group('canary: false | Build Daemon |', () { final canaryFeatures = false; - final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final contextFactory = BuildDaemonTestContext.new; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -37,7 +37,7 @@ void main() { group('canary: true | Build Daemon |', () { final canaryFeatures = true; - final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final contextFactory = BuildDaemonTestContext.new; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, diff --git a/webdev/test/patterns_inspection_ddc_library_bundle_test.dart b/webdev/test/patterns_inspection_ddc_library_bundle_test.dart index 2208b0baf6..74fc033ae5 100644 --- a/webdev/test/patterns_inspection_ddc_library_bundle_test.dart +++ b/webdev/test/patterns_inspection_ddc_library_bundle_test.dart @@ -8,19 +8,19 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/patterns_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; group('canary: true | Build Daemon |', () { final canaryFeatures = true; - final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final contextFactory = BuildDaemonTestContext.new; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -37,7 +37,7 @@ void main() { group('canary: true | Build Daemon and Frontend Server |', () { final canaryFeatures = true; - final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + final contextFactory = BuildDaemonAndFrontendServerTestContext.new; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, diff --git a/webdev/test/proxy_server_asset_reader_amd_test.dart b/webdev/test/proxy_server_asset_reader_amd_test.dart index 8cd3045214..5005fdf085 100644 --- a/webdev/test/proxy_server_asset_reader_amd_test.dart +++ b/webdev/test/proxy_server_asset_reader_amd_test.dart @@ -17,5 +17,5 @@ void main() { ); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); } diff --git a/webdev/test/proxy_server_asset_reader_ddc_library_bundle_test.dart b/webdev/test/proxy_server_asset_reader_ddc_library_bundle_test.dart index 910be3db2c..43d7b398dc 100644 --- a/webdev/test/proxy_server_asset_reader_ddc_library_bundle_test.dart +++ b/webdev/test/proxy_server_asset_reader_ddc_library_bundle_test.dart @@ -18,5 +18,5 @@ void main() { ); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); } diff --git a/webdev/test/record_inspection_amd_test.dart b/webdev/test/record_inspection_amd_test.dart index 3bc9209aeb..c34e24f437 100644 --- a/webdev/test/record_inspection_amd_test.dart +++ b/webdev/test/record_inspection_amd_test.dart @@ -8,19 +8,19 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/record_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; group('canary: false | Build Daemon |', () { final canaryFeatures = false; - final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final contextFactory = BuildDaemonTestContext.new; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -37,7 +37,7 @@ void main() { group('canary: true | Build Daemon |', () { final canaryFeatures = true; - final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final contextFactory = BuildDaemonTestContext.new; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, diff --git a/webdev/test/record_inspection_ddc_library_bundle_test.dart b/webdev/test/record_inspection_ddc_library_bundle_test.dart index 2e9e380e30..ee9db9fb19 100644 --- a/webdev/test/record_inspection_ddc_library_bundle_test.dart +++ b/webdev/test/record_inspection_ddc_library_bundle_test.dart @@ -8,19 +8,19 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/record_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; final canaryFeatures = true; group('canary: true | Build Daemon |', () { - final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final contextFactory = BuildDaemonTestContext.new; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -35,7 +35,7 @@ void main() { }); group('canary: true | Build Daemon and Frontend Server |', () { - final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + final contextFactory = BuildDaemonAndFrontendServerTestContext.new; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, diff --git a/webdev/test/record_type_inspection_amd_test.dart b/webdev/test/record_type_inspection_amd_test.dart index 6ecbf04fd1..2c6197e56c 100644 --- a/webdev/test/record_type_inspection_amd_test.dart +++ b/webdev/test/record_type_inspection_amd_test.dart @@ -8,19 +8,19 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/record_type_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; group('canary: false | Build Daemon |', () { final canaryFeatures = false; - final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final contextFactory = BuildDaemonTestContext.new; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -37,7 +37,7 @@ void main() { group('canary: true | Build Daemon |', () { final canaryFeatures = true; - final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final contextFactory = BuildDaemonTestContext.new; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, diff --git a/webdev/test/record_type_inspection_ddc_library_bundle_test.dart b/webdev/test/record_type_inspection_ddc_library_bundle_test.dart index dd0a2a1cfd..0935a060a6 100644 --- a/webdev/test/record_type_inspection_ddc_library_bundle_test.dart +++ b/webdev/test/record_type_inspection_ddc_library_bundle_test.dart @@ -8,19 +8,19 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/record_type_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; group('canary: true | Build Daemon |', () { final canaryFeatures = true; - final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final contextFactory = BuildDaemonTestContext.new; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -37,7 +37,7 @@ void main() { group('canary: true | Build Daemon and Frontend Server |', () { final canaryFeatures = true; - final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + final contextFactory = BuildDaemonAndFrontendServerTestContext.new; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, diff --git a/webdev/test/type_inspection_amd_test.dart b/webdev/test/type_inspection_amd_test.dart index c3fb8012fd..d01152cb94 100644 --- a/webdev/test/type_inspection_amd_test.dart +++ b/webdev/test/type_inspection_amd_test.dart @@ -8,19 +8,19 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/type_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; group('canary: false | Build Daemon |', () { final canaryFeatures = false; - final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final contextFactory = BuildDaemonTestContext.new; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -37,7 +37,7 @@ void main() { group('canary: true | Build Daemon |', () { final canaryFeatures = true; - final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final contextFactory = BuildDaemonTestContext.new; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, diff --git a/webdev/test/type_inspection_ddc_library_bundle_test.dart b/webdev/test/type_inspection_ddc_library_bundle_test.dart index b4c443e448..3b81f349dc 100644 --- a/webdev/test/type_inspection_ddc_library_bundle_test.dart +++ b/webdev/test/type_inspection_ddc_library_bundle_test.dart @@ -8,19 +8,19 @@ library; import 'package:dwds/expression_compiler.dart'; -import 'package:dwds_test_common/fixtures/context.dart'; -import 'helpers/context.dart'; import 'package:dwds_test_common/integration/type_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; +import 'helpers/context.dart'; + void main() { // Enable verbose logging for debugging. const debug = false; group('canary: true | Build Daemon |', () { final canaryFeatures = true; - final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final contextFactory = BuildDaemonTestContext.new; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -37,7 +37,7 @@ void main() { group('canary: true | Build Daemon and Frontend Server |', () { final canaryFeatures = true; - final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + final contextFactory = BuildDaemonAndFrontendServerTestContext.new; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, From d5a0d92c6bf6f9e7cf87f5aafd2510b53f0053d3 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 13 Aug 2026 18:20:23 -0700 Subject: [PATCH 104/134] resolving analysis errors --- .../lib/integration/dot_shorthands.dart | 206 +++++++++--------- .../lib/integration/instance.dart | 4 +- 2 files changed, 104 insertions(+), 106 deletions(-) diff --git a/dwds_test_common/lib/integration/dot_shorthands.dart b/dwds_test_common/lib/integration/dot_shorthands.dart index e60b5e6765..68ae6c0c3a 100644 --- a/dwds_test_common/lib/integration/dot_shorthands.dart +++ b/dwds_test_common/lib/integration/dot_shorthands.dart @@ -39,113 +39,111 @@ void runTests({ Future getInstanceRef(int frame, String expression) => testInspector.getInstanceRef(isolateId, frame, expression); - group( - '${context.usesFrontendServer ? "frontendServer" : "buildDaemon"} | dot shorthands:', - () { - setUp(() async { - setCurrentLogWriter(debug: provider.verbose); - await context.setUp( - testSettings: TestSettings( - enableExpressionEvaluation: true, - verboseCompiler: provider.verbose, - experiments: ['dot-shorthands'], - canaryFeatures: canaryFeatures, - moduleFormat: provider.ddcModuleFormat, - ), - ); - service = context.debugConnection.vmService; - - final vm = await service.getVM(); - isolateId = vm.isolates!.first.id!; - final scripts = await service.getScripts(isolateId); - - await service.streamListen(EventStreams.kDebug); - stream = service.onDebugEvent; - - mainScript = scripts.scripts!.firstWhere( - (each) => each.uri!.contains('main.dart'), - ); + group('${context.usesFrontendServer ? "frontendServer" : "buildDaemon"} | ' + 'dot shorthands:', () { + setUp(() async { + setCurrentLogWriter(debug: provider.verbose); + await context.setUp( + testSettings: TestSettings( + enableExpressionEvaluation: true, + verboseCompiler: provider.verbose, + experiments: ['dot-shorthands'], + canaryFeatures: canaryFeatures, + moduleFormat: provider.ddcModuleFormat, + ), + ); + service = context.debugConnection.vmService; + + final vm = await service.getVM(); + isolateId = vm.isolates!.first.id!; + final scripts = await service.getScripts(isolateId); + + await service.streamListen(EventStreams.kDebug); + stream = service.onDebugEvent; + + mainScript = scripts.scripts!.firstWhere( + (each) => each.uri!.contains('main.dart'), + ); + }); + + tearDown(() async { + await context.tearDown(); + }); + + test('expression evaluation', () async { + final bp = onBreakpoint('testDotShorthands', (Event event) async { + final frame = event.topFrame!.index!; + + var instanceRef = await getInstanceRef(frame, '(c = .two).value'); + expect(instanceRef.valueAsString, '2'); + + instanceRef = await getInstanceRef(frame, '(c = .three).value'); + expect(instanceRef.valueAsString, '3'); + + instanceRef = await getInstanceRef(frame, '(c = .four()).value'); + expect(instanceRef.valueAsString, '4'); + + await service.resume(isolateId); }); - - tearDown(() async { - await context.tearDown(); - }); - - test('expression evaluation', () async { - final bp = onBreakpoint('testDotShorthands', (Event event) async { - final frame = event.topFrame!.index!; - - var instanceRef = await getInstanceRef(frame, '(c = .two).value'); - expect(instanceRef.valueAsString, '2'); - - instanceRef = await getInstanceRef(frame, '(c = .three).value'); - expect(instanceRef.valueAsString, '3'); - - instanceRef = await getInstanceRef(frame, '(c = .four()).value'); - expect(instanceRef.valueAsString, '4'); - - await service.resume(isolateId); - }); - final isolate = await service.getIsolate(isolateId); - await service.evaluate( + final isolate = await service.getIsolate(isolateId); + await service.evaluate( + isolateId, + isolate.rootLib!.id!, + 'testDotShorthands()', + ); + await bp; + }); + + test('single-stepping', () async { + final bp = onBreakpoint('testDotShorthands', (Event event) async { + final scriptBasename = basename(mainScript.uri!); + + const lineA = 9; + const lineB = 11; + const lineC = 12; + const lineD = 13; + const lineE = 20; + const lineF = 22; + const lineG = 24; + const lineH = 25; + + final expected = [ + '$scriptBasename:$lineE:3', // on 'c' + '$scriptBasename:$lineB:15', // on 'C' + '$scriptBasename:$lineA:10', // on 'v' of 'value' + '$scriptBasename:$lineA:16', // on ';' + '$scriptBasename:$lineB:20', // on '2' + '$scriptBasename:$lineF:3', // on 'c' + '$scriptBasename:$lineC:25', // on 'C' + '$scriptBasename:$lineA:10', // on 'v' of 'value' + '$scriptBasename:$lineA:16', // on ';' + '$scriptBasename:$lineC:27', // on '3' + '$scriptBasename:$lineG:3', // on 'c' + '$scriptBasename:$lineD:22', // on 'C' + '$scriptBasename:$lineA:10', // on 'v' of 'value' + '$scriptBasename:$lineA:16', // on ';' + '$scriptBasename:$lineD:24', // on '4' + '$scriptBasename:$lineH:3', // on 'p' of 'print' + ]; + + final stops = []; + await testInspector.runStepIntoThroughProgramRecordingStops( isolateId, - isolate.rootLib!.id!, - 'testDotShorthands()', + stops, + expected.length, ); - await bp; - }); - test('single-stepping', () async { - final bp = onBreakpoint('testDotShorthands', (Event event) async { - final scriptBasename = basename(mainScript.uri!); - - const lineA = 9; - const lineB = 11; - const lineC = 12; - const lineD = 13; - const lineE = 20; - const lineF = 22; - const lineG = 24; - const lineH = 25; - - final expected = [ - '$scriptBasename:$lineE:3', // on 'c' - '$scriptBasename:$lineB:15', // on 'C' - '$scriptBasename:$lineA:10', // on 'v' of 'value' - '$scriptBasename:$lineA:16', // on ';' - '$scriptBasename:$lineB:20', // on '2' - '$scriptBasename:$lineF:3', // on 'c' - '$scriptBasename:$lineC:25', // on 'C' - '$scriptBasename:$lineA:10', // on 'v' of 'value' - '$scriptBasename:$lineA:16', // on ';' - '$scriptBasename:$lineC:27', // on '3' - '$scriptBasename:$lineG:3', // on 'c' - '$scriptBasename:$lineD:22', // on 'C' - '$scriptBasename:$lineA:10', // on 'v' of 'value' - '$scriptBasename:$lineA:16', // on ';' - '$scriptBasename:$lineD:24', // on '4' - '$scriptBasename:$lineH:3', // on 'p' of 'print' - ]; - - final stops = []; - await testInspector.runStepIntoThroughProgramRecordingStops( - isolateId, - stops, - expected.length, - ); - - expect(stops, expected); - - await service.resume(isolateId); - }); - final isolate = await service.getIsolate(isolateId); - await service.evaluate( - isolateId, - isolate.rootLib!.id!, - 'testDotShorthands()', - ); - await bp; + expect(stops, expected); + + await service.resume(isolateId); }); - }, - ); + final isolate = await service.getIsolate(isolateId); + await service.evaluate( + isolateId, + isolate.rootLib!.id!, + 'testDotShorthands()', + ); + await bp; + }); + }); } diff --git a/dwds_test_common/lib/integration/instance.dart b/dwds_test_common/lib/integration/instance.dart index a9e95a6fca..2c11a384ee 100644 --- a/dwds_test_common/lib/integration/instance.dart +++ b/dwds_test_common/lib/integration/instance.dart @@ -160,8 +160,8 @@ void runTests({ final remoteObject = await getLibraryPublicFinalRef(); final count = await inspector.loadField(remoteObject, 'count'); final ref = await inspector.instanceRefFor(count); - // 'count' is incremented by a periodic timer in the application, so we - // can't expect it to be exactly 0. + // 'count' is incremented by a periodic timer in the application, so + // we can't expect it to be exactly 0. expect(double.tryParse(ref!.valueAsString!), greaterThanOrEqualTo(0)); expect(ref.kind, InstanceKind.kDouble); final classRef = ref.classRef!; From b93c9f99a4a55b8068a6bd7ee79a60d556a71250 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Mon, 10 Aug 2026 17:51:23 -0700 Subject: [PATCH 105/134] Webdev CLI Integration & Spanning Tests --- .../fixtures/_experiment/pubspec.yaml | 2 +- dwds_test_common/fixtures/_test/pubspec.yaml | 2 +- .../fixtures/_test_circular1/pubspec.yaml | 2 +- .../fixtures/_test_circular2/pubspec.yaml | 2 +- .../_test_dot_shorthands/pubspec.yaml | 2 +- .../fixtures/_test_hot_reload/pubspec.yaml | 2 +- .../_test_hot_reload_breakpoints/pubspec.yaml | 2 +- .../fixtures/_test_hot_restart1/pubspec.yaml | 2 +- .../fixtures/_test_hot_restart2/pubspec.yaml | 2 +- .../pubspec.yaml | 2 +- .../fixtures/_test_package/pubspec.yaml | 2 +- .../fixtures/_test_parts/pubspec.yaml | 2 +- .../fixtures/_webdev_smoke/pubspec.yaml | 2 +- webdev/CHANGELOG.md | 8 +- webdev/lib/src/daemon/app_domain.dart | 18 +- webdev/lib/src/pubspec.dart | 2 +- webdev/lib/src/serve/dev_workflow.dart | 62 ++++- webdev/lib/src/serve/server_manager.dart | 8 +- webdev/lib/src/serve/webdev_server.dart | 215 +++++++++++++++--- webdev/lib/src/util.dart | 4 +- webdev/lib/src/version.dart | 2 +- webdev/pubspec.yaml | 2 +- webdev/test/daemon/app_domain_common.dart | 23 +- .../app_domain_ddc_library_bundle_test.dart | 26 ++- ...daemon_domain_ddc_library_bundle_test.dart | 26 ++- webdev/test/daemon/launch_app_common.dart | 7 + .../launch_app_ddc_library_bundle_test.dart | 26 ++- webdev/test/e2e_common.dart | 37 ++- webdev/test/e2e_ddc_library_bundle_test.dart | 26 ++- webdev/test/integration_common.dart | 2 +- .../integration_ddc_library_bundle_test.dart | 26 ++- webdev/test/tls_common.dart | 30 +-- webdev/test/tls_ddc_library_bundle_test.dart | 26 ++- 33 files changed, 444 insertions(+), 158 deletions(-) diff --git a/dwds_test_common/fixtures/_experiment/pubspec.yaml b/dwds_test_common/fixtures/_experiment/pubspec.yaml index b1064110b2..a471297711 100644 --- a/dwds_test_common/fixtures/_experiment/pubspec.yaml +++ b/dwds_test_common/fixtures/_experiment/pubspec.yaml @@ -13,4 +13,4 @@ dependencies: dev_dependencies: build_daemon: ^4.1.4 build_runner: ^2.16.0 - build_web_compilers: ^4.4.12 + build_web_compilers: ^4.8.9 diff --git a/dwds_test_common/fixtures/_test/pubspec.yaml b/dwds_test_common/fixtures/_test/pubspec.yaml index 3e86a35057..4e2fa3ec83 100644 --- a/dwds_test_common/fixtures/_test/pubspec.yaml +++ b/dwds_test_common/fixtures/_test/pubspec.yaml @@ -13,5 +13,5 @@ dependencies: dev_dependencies: build_daemon: ^4.1.4 build_runner: ^2.16.0 - build_web_compilers: ^4.8.1 + build_web_compilers: ^4.8.9 diff --git a/dwds_test_common/fixtures/_test_circular1/pubspec.yaml b/dwds_test_common/fixtures/_test_circular1/pubspec.yaml index b81da7fd68..b85726d8f4 100644 --- a/dwds_test_common/fixtures/_test_circular1/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_circular1/pubspec.yaml @@ -15,4 +15,4 @@ dependencies: dev_dependencies: build_daemon: ^4.1.4 build_runner: ^2.16.0 - build_web_compilers: ^4.4.12 + build_web_compilers: ^4.8.9 diff --git a/dwds_test_common/fixtures/_test_circular2/pubspec.yaml b/dwds_test_common/fixtures/_test_circular2/pubspec.yaml index e814478484..6108e4275c 100644 --- a/dwds_test_common/fixtures/_test_circular2/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_circular2/pubspec.yaml @@ -13,4 +13,4 @@ dependencies: dev_dependencies: build_daemon: ^4.1.4 build_runner: ^2.16.0 - build_web_compilers: ^4.4.12 + build_web_compilers: ^4.8.9 diff --git a/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml b/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml index bbc2e8bb54..8c214d2a45 100644 --- a/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_dot_shorthands/pubspec.yaml @@ -9,4 +9,4 @@ environment: dev_dependencies: build_daemon: ^4.1.4 build_runner: ^2.16.0 - build_web_compilers: ^4.4.12 + build_web_compilers: ^4.8.9 diff --git a/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml b/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml index 6dc814abea..9693eb2f98 100644 --- a/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_reload/pubspec.yaml @@ -9,4 +9,4 @@ environment: dev_dependencies: build_daemon: ^4.1.4 build_runner: ^2.16.0 - build_web_compilers: ^4.8.1 + build_web_compilers: ^4.8.9 diff --git a/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml b/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml index 916f64976a..bac3ee9f06 100644 --- a/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_reload_breakpoints/pubspec.yaml @@ -9,4 +9,4 @@ environment: dev_dependencies: build_daemon: ^4.1.4 build_runner: ^2.16.0 - build_web_compilers: ^4.8.1 + build_web_compilers: ^4.8.9 diff --git a/dwds_test_common/fixtures/_test_hot_restart1/pubspec.yaml b/dwds_test_common/fixtures/_test_hot_restart1/pubspec.yaml index 9acf0a4555..72fdaa2711 100644 --- a/dwds_test_common/fixtures/_test_hot_restart1/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_restart1/pubspec.yaml @@ -13,4 +13,4 @@ dependencies: dev_dependencies: build_daemon: ^4.1.4 build_runner: ^2.16.0 - build_web_compilers: ^4.4.12 + build_web_compilers: ^4.6.0 diff --git a/dwds_test_common/fixtures/_test_hot_restart2/pubspec.yaml b/dwds_test_common/fixtures/_test_hot_restart2/pubspec.yaml index 1027a22740..eb2eef0d53 100644 --- a/dwds_test_common/fixtures/_test_hot_restart2/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_restart2/pubspec.yaml @@ -15,4 +15,4 @@ dependencies: dev_dependencies: build_daemon: ^4.1.4 build_runner: ^2.16.0 - build_web_compilers: ^4.8.1 + build_web_compilers: ^4.8.9 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 8bbeb523ef..4bbedce520 100644 --- a/dwds_test_common/fixtures/_test_hot_restart_breakpoints/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_hot_restart_breakpoints/pubspec.yaml @@ -9,5 +9,5 @@ environment: dev_dependencies: build_daemon: ^4.1.4 build_runner: ^2.16.0 - build_web_compilers: ^4.8.1 + build_web_compilers: ^4.8.9 diff --git a/dwds_test_common/fixtures/_test_package/pubspec.yaml b/dwds_test_common/fixtures/_test_package/pubspec.yaml index 97258123ea..b0825d3c5f 100644 --- a/dwds_test_common/fixtures/_test_package/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_package/pubspec.yaml @@ -13,4 +13,4 @@ dependencies: dev_dependencies: build_daemon: ^4.1.4 build_runner: ^2.16.0 - build_web_compilers: ^4.4.12 \ No newline at end of file + build_web_compilers: ^4.8.9 diff --git a/dwds_test_common/fixtures/_test_parts/pubspec.yaml b/dwds_test_common/fixtures/_test_parts/pubspec.yaml index c3129bf5ef..76ee24b689 100644 --- a/dwds_test_common/fixtures/_test_parts/pubspec.yaml +++ b/dwds_test_common/fixtures/_test_parts/pubspec.yaml @@ -13,4 +13,4 @@ dependencies: dev_dependencies: build_daemon: ^4.1.4 build_runner: ^2.16.0 - build_web_compilers: ^4.4.12 + build_web_compilers: ^4.8.9 diff --git a/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml b/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml index f9bf432554..31bfa45baa 100644 --- a/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml +++ b/dwds_test_common/fixtures/_webdev_smoke/pubspec.yaml @@ -9,4 +9,4 @@ environment: dev_dependencies: build_daemon: ^4.1.4 build_runner: ^2.16.0 - build_web_compilers: ^4.4.12 + build_web_compilers: ^4.8.9 diff --git a/webdev/CHANGELOG.md b/webdev/CHANGELOG.md index 792eb60b33..3c99521a47 100644 --- a/webdev/CHANGELOG.md +++ b/webdev/CHANGELOG.md @@ -1,4 +1,10 @@ -## 4.1.0-wip +## 4.1.0 +- Enable hot reload support in Frontend Server + Build Daemon mode. +- Support expression evaluation in Frontend Server + Build Daemon mode via DaemonExpressionCompiler. +- Bump `build_web_compilers` constraint to `^4.8.8`. +- Bump `dwds` constraint to `^28.0.0`. + +## Unreleased - Internal test infrastructure refactoring: Move common test files to `dwds_test_common`. diff --git a/webdev/lib/src/daemon/app_domain.dart b/webdev/lib/src/daemon/app_domain.dart index eea0bee5cd..8fbbf817ac 100644 --- a/webdev/lib/src/daemon/app_domain.dart +++ b/webdev/lib/src/daemon/app_domain.dart @@ -176,7 +176,23 @@ class AppDomain extends Domain { } final fullRestart = getBoolArg(args, 'fullRestart') ?? false; if (!fullRestart) { - return {'code': 1, 'message': 'hot reload not yet supported by webdev'}; + try { + final vm = await appState.vmService!.getVM(); + final isolateId = vm.isolates!.first.id!; + final report = await appState.vmService!.reloadSources(isolateId); + + if (report.success!) { + return {'code': 0, 'message': 'Hot reload successful'}; + } else { + return { + 'code': 1, + 'message': 'Hot reload failed', + 'notices': report.toJson()['notices'], + }; + } + } catch (e) { + return {'code': 1, 'message': 'Hot reload failed: $e'}; + } } // TODO(grouma) - Support pauseAfterRestart. // var pauseAfterRestart = getBoolArg(args, 'pause') ?? false; diff --git a/webdev/lib/src/pubspec.dart b/webdev/lib/src/pubspec.dart index b82d111bb5..c2bc6ec53d 100644 --- a/webdev/lib/src/pubspec.dart +++ b/webdev/lib/src/pubspec.dart @@ -188,7 +188,7 @@ Future> _validateBuildDaemonVersion( } final buildRunnerConstraint = VersionConstraint.parse('^2.4.0'); -final buildWebCompilersConstraint = VersionConstraint.parse('^4.4.12'); +final buildWebCompilersConstraint = VersionConstraint.parse('^4.8.9'); // Note the minimum versions should never be dev versions as users will not // get them by default. diff --git a/webdev/lib/src/serve/dev_workflow.dart b/webdev/lib/src/serve/dev_workflow.dart index 17542e592f..198f21e87a 100644 --- a/webdev/lib/src/serve/dev_workflow.dart +++ b/webdev/lib/src/serve/dev_workflow.dart @@ -15,6 +15,7 @@ import 'package:path/path.dart' as p; import '../command/configuration.dart'; import '../daemon_client.dart'; import '../logging.dart'; +import '../util.dart'; import 'chrome.dart'; import 'server_manager.dart'; import 'webdev_server.dart'; @@ -108,10 +109,7 @@ Future _startServerManager( ); } logWriter(logging.Level.INFO, 'Starting resource servers...'); - final serverManager = await ServerManager.start( - serverOptions, - client.buildResults, - ); + final serverManager = await ServerManager.start(serverOptions, client); for (final server in serverManager.servers) { logWriter( @@ -179,13 +177,19 @@ class DevWorkflow { final _doneCompleter = Completer(); final BuildDaemonClient _client; final Chrome? _chrome; + final Process? _fesProcess; final ServerManager serverManager; StreamSubscription? _resultsSub; final _wrapWidth = stdout.hasTerminal ? stdout.terminalColumns - 8 : 72; - DevWorkflow._(this._client, this._chrome, this.serverManager) { + DevWorkflow._( + this._client, + this._chrome, + this.serverManager, + this._fesProcess, + ) { _resultsSub = _client.buildResults.listen((data) { if (data.results.any( (result) => @@ -206,13 +210,56 @@ class DevWorkflow { Future get done => _doneCompleter.future; + static Future _startFesManager(String workingDirectory) async { + final sdkDir = p.dirname(p.dirname(dartPath)); + final packagesFile = p.join( + workingDirectory, + '.dart_tool', + 'package_config.json', + ); + + final args = [ + 'run', + 'build_web_compilers:fes_manager', + sdkDir, + p.toUri(workingDirectory).toString(), + p.toUri(packagesFile).toString(), + ]; + + return await Process.start( + dartPath, + args, + workingDirectory: workingDirectory, + ); + } + + static Future _waitForFile(File file) async { + while (!await file.exists()) { + await Future.delayed(const Duration(milliseconds: 100)); + } + } + static Future start( Configuration configuration, List buildOptions, Map targetPorts, ) async { final workingDirectory = Directory.current.path; - final client = await _startBuildDaemon(workingDirectory, buildOptions); + + Process? fesProcess; + if (configuration.webHotReload) { + logWriter(logging.Level.INFO, 'Starting Frontend Server Manager...'); + final configFile = File( + p.join(workingDirectory, '.dart_tool', 'build', 'fes_manager_config'), + ); + if (await configFile.exists()) { + await configFile.delete(); + } + fesProcess = await _startFesManager(workingDirectory); + await _waitForFile(configFile); + } + + final client = await _startBuildDaemon(workingDirectory, [...buildOptions]); logWriter(logging.Level.INFO, 'Registering build targets...'); _registerBuildTargets(client, configuration, targetPorts); logWriter(logging.Level.INFO, 'Starting initial build...'); @@ -224,7 +271,7 @@ class DevWorkflow { client, ); final chrome = await _startChrome(configuration, serverManager, client); - return DevWorkflow._(client, chrome, serverManager); + return DevWorkflow._(client, chrome, serverManager, fesProcess); } Future shutDown() async { @@ -232,6 +279,7 @@ class DevWorkflow { await _chrome?.close(); await _client.close(); await serverManager.stop(); + _fesProcess?.kill(); if (!_doneCompleter.isCompleted) _doneCompleter.complete(); } } diff --git a/webdev/lib/src/serve/server_manager.dart b/webdev/lib/src/serve/server_manager.dart index 39e237dbd6..cd708c3d6f 100644 --- a/webdev/lib/src/serve/server_manager.dart +++ b/webdev/lib/src/serve/server_manager.dart @@ -4,7 +4,7 @@ import 'dart:async'; -import 'package:build_daemon/data/build_status.dart'; +import 'package:build_daemon/client.dart'; import 'webdev_server.dart'; @@ -16,11 +16,13 @@ class ServerManager { static Future start( Set serverOptions, - Stream buildResults, + BuildDaemonClient client, ) async { final servers = {}; for (final options in serverOptions) { - servers.add(await WebDevServer.start(options, buildResults)); + servers.add( + await WebDevServer.start(options, client.buildResults, client), + ); } return ServerManager._(servers); } diff --git a/webdev/lib/src/serve/webdev_server.dart b/webdev/lib/src/serve/webdev_server.dart index 309a4adcdd..efeff0eb78 100644 --- a/webdev/lib/src/serve/webdev_server.dart +++ b/webdev/lib/src/serve/webdev_server.dart @@ -6,6 +6,7 @@ import 'dart:async'; import 'dart:convert'; import 'dart:io'; +import 'package:build_daemon/client.dart'; import 'package:build_daemon/data/build_status.dart' as daemon; import 'package:dwds/data/build_result.dart'; import 'package:dwds/dwds.dart'; @@ -15,7 +16,6 @@ import 'package:http/io_client.dart'; import 'package:http_multi_server/http_multi_server.dart'; import 'package:logging/logging.dart'; import 'package:path/path.dart' as p; - import 'package:shelf/shelf.dart'; import 'package:shelf_proxy/shelf_proxy.dart'; @@ -85,7 +85,7 @@ class WebDevServer { /// Can be null if client.js injection is disabled. final Dwds? dwds; - final ExpressionCompilerService? ddcService; + final ExpressionCompiler? ddcService; final String target; @@ -123,7 +123,10 @@ class WebDevServer { Future stop() async { await dwds?.stop(); - await ddcService?.stop(); + final service = ddcService; + if (service is ExpressionCompilerService) { + await service.stop(); + } await _server.close(force: true); _client.close(); } @@ -131,6 +134,7 @@ class WebDevServer { static Future start( ServerOptions options, Stream buildResults, + BuildDaemonClient daemonClient, ) async { final basePath = ''; var pipeline = const Pipeline(); @@ -168,19 +172,22 @@ class WebDevServer { // Only provide relevant build results final filteredBuildResults = buildResults.asyncMap((results) { + // Clear reloaded sources for the new build results. + reloadedSources.clear(); if (options.configuration.usesDdcLibraryBundle) { - // Clear reloaded sources for the new build results. - reloadedSources.clear(); - results.changedAssets?.forEach((uri) { - if (uri.path.endsWith(jsLibraryBundleExtension)) { - final reloadedSource = { - 'src': ddcUriToSourceUrl(basePath, options.target, uri), - 'module': ddcUriToLibraryId(uri), - 'libraries': [ddcUriToLibraryId(uri)], - }; - reloadedSources.add(reloadedSource); + final changedAssets = results.changedAssets; + if (changedAssets != null) { + for (final uri in changedAssets) { + if (uri.path.endsWith(jsLibraryBundleExtension)) { + final reloadedSource = { + 'src': ddcUriToSourceUrl(basePath, options.target, uri), + 'module': ddcUriToLibraryId(uri), + 'libraries': [ddcUriToLibraryId(uri)], + }; + reloadedSources.add(reloadedSource); + } } - }); + } } final result = results.results.firstWhere( (result) => result.target == options.target, @@ -211,35 +218,56 @@ class WebDevServer { ); Dwds? dwds; - ExpressionCompilerService? ddcService; + ExpressionCompiler? ddcService; if (options.configuration.enableInjectedClient) { final assetReader = ProxyServerAssetReader( options.daemonPort, root: options.target, ); + // Read the entrypoint metadata generated by build_web_compilers if + // available. This avoids having to hard code 'main.dart' and allows us + // to initialize the frontend server if the build is fully cached. + String? canonicalUri; + if (options.configuration.webHotReload && + !options.configuration.release) { + final entrypointJsonStr = await assetReader.dartSourceContents( + '.web.entrypoint.json', + ); + if (entrypointJsonStr != null) { + try { + final json = jsonDecode(entrypointJsonStr) as Map; + canonicalUri = json['canonicalUri'] as String?; + } catch (e) { + _logger.warning('Failed to parse .web.entrypoint.json', e); + } + } + } + // TODO(https://github.com/flutter/devtools/issues/5350): Figure out how // to determine the build settings from the build. // Can we save build metadata in build_web_compilers and and read it in // the load strategy? final buildSettings = BuildSettings( appEntrypoint: Uri.parse( - '$multiRootScheme:///${options.target}/main.dart', + canonicalUri ?? '$multiRootScheme:///${options.target}/main.dart', ), canaryFeatures: options.configuration.canaryFeatures, isFlutterApp: false, experiments: options.configuration.experiments, + useDebuggerModuleNames: false, ); final LoadStrategy loadStrategy; - if (options.configuration.webHotReload) { - final frontendServerFileSystem = LocalFileSystem(); - final packageUriMapper = await PackageUriMapper.create( + if (options.configuration.webHotReload && + !options.configuration.release) { + final frontendServerFileSystem = const LocalFileSystem(); + final packageUriMapper = await BuildRunnerPathResolver.create( frontendServerFileSystem, findPackageConfigUri()!, useDebuggerModuleNames: false, ); - loadStrategy = FrontendServerDdcLibraryBundleStrategyProvider( + loadStrategy = FrontendServerBuildDaemonStrategyProvider( options.configuration.reload, assetReader, packageUriMapper, @@ -249,23 +277,21 @@ class WebDevServer { reloadedSourcesUri: Uri.parse('$basePath/$reloadedSourcesFileName'), injectScriptLoad: false, ).strategy; + } else if (options.configuration.moduleFormat == 'ddc') { + loadStrategy = BuildRunnerDdcLibraryBundleStrategyProvider( + options.configuration.reload, + assetReader, + buildSettings, + packageConfigPath: findPackageConfigFilePath(), + reloadedSourcesUri: Uri.parse('$basePath/$reloadedSourcesFileName'), + ).strategy; } else { - if (options.configuration.moduleFormat == 'ddc') { - loadStrategy = BuildRunnerDdcLibraryBundleStrategyProvider( - options.configuration.reload, - assetReader, - buildSettings, - packageConfigPath: findPackageConfigFilePath(), - reloadedSourcesUri: Uri.parse('$basePath/$reloadedSourcesFileName'), - ).strategy; - } else { - loadStrategy = BuildRunnerRequireStrategyProvider( - options.configuration.reload, - assetReader, - buildSettings, - packageConfigPath: findPackageConfigFilePath(), - ).strategy; - } + loadStrategy = BuildRunnerRequireStrategyProvider( + options.configuration.reload, + assetReader, + buildSettings, + packageConfigPath: findPackageConfigFilePath(), + ).strategy; } // Check that we're running from a compiled binary (like webdev.exe) and not @@ -290,7 +316,53 @@ class WebDevServer { } if (options.configuration.enableExpressionEvaluation) { - if (isAotMode && !useAotDdc) { + if (options.configuration.webHotReload && + !options.configuration.release) { + // Use the daemon expression compiler when web hot reload is enabled + // to reuse the Frontend Server's in-memory state. + var cachedFesPort = await _readFesPort(); + // Pre-initialize the Frontend Server if a port and canonical URI + // are found. Required for cached builds. + if (cachedFesPort != null && canonicalUri != null) { + _logger.info( + 'Early initializing Frontend Server with $canonicalUri', + ); + try { + final responseStr = await _sendFesRawRequest(cachedFesPort, { + 'instruction': 'COMPILE', + 'entrypoint': canonicalUri, + }); + _logger.fine('Early initialization response: $responseStr'); + } catch (e) { + _logger.warning('Failed to early initialize FES', e); + } + } + + ddcService = DaemonExpressionCompiler((request) async { + if (cachedFesPort != null) { + try { + return await _sendRequestToFes(cachedFesPort!, request); + } catch (e) { + _logger.warning( + 'Failed to connect to FES at $cachedFesPort, re-reading config file', + e, + ); + cachedFesPort = null; + } + } + + final port = await _readFesPort(); + if (port != null) { + cachedFesPort = port; + return await _sendRequestToFes(port, request); + } + return { + 'result': + 'InternalError: Failed to connect to Frontend Server worker.', + 'isError': true, + }; + }); + } else if (isAotMode && !useAotDdc) { _logger.warning( 'Expression evaluation will be disabled in AOT mode because ' 'dartdevc_aot.dart.snapshot was not found in the SDK.', @@ -445,3 +517,72 @@ String ddcUriToLibraryId(Uri uri) { ); return '$prefix.dart'; } + +Future _readFesPort() async { + try { + final file = File(p.join('.dart_tool', 'build', 'fes_manager_config')); + if (await file.exists()) { + final content = await file.readAsString(); + final json = jsonDecode(content) as Map; + return json['port'] as int?; + } + } catch (e) { + _logger.warning('Failed to read FES config', e); + } + return null; +} + +Future _sendFesRawRequest( + int port, + Map request, +) async { + final socket = await Socket.connect(InternetAddress.loopbackIPv4, port); + try { + socket.writeln(jsonEncode(request)); + await socket.flush(); + final responseStr = await socket + .cast>() + .transform(utf8.decoder) + .transform(const LineSplitter()) + .first; + return jsonDecode(responseStr); + } finally { + await socket.close(); + } +} + +Future> _sendRequestToFes( + int port, + Map request, +) async { + final compileResult = await _sendFesRawRequest(port, request); + if (compileResult is! Map) { + return { + 'result': + 'Unexpected response format from FES. ' + 'Expected a Map but got: $compileResult', + 'isError': true, + }; + } + + final error = compileResult['error'] as String?; + final errorCount = compileResult['errorCount'] as int?; + final errorMessage = compileResult['errorMessage'] as String?; + if (error != null || (errorCount != null && errorCount > 0)) { + return { + 'result': 'FES error: ${error ?? errorMessage ?? 'Unknown error'}', + 'isError': true, + }; + } + + final expressionData = compileResult['expressionData'] as String?; + if (expressionData == null) { + return { + 'result': 'Missing expressionData in FES compile result', + 'isError': true, + }; + } + + final decodedResult = utf8.decode(base64.decode(expressionData)); + return {'result': decodedResult, 'isError': false}; +} diff --git a/webdev/lib/src/util.dart b/webdev/lib/src/util.dart index 47033d5469..e241fbe69a 100644 --- a/webdev/lib/src/util.dart +++ b/webdev/lib/src/util.dart @@ -30,12 +30,12 @@ void serveHttpRequests( final String _sdkDir = (() { // The Dart executable is in "/path/to/sdk/bin/dart", so two levels up is // "/path/to/sdk". - final String dartExecutable = Platform.isWindows + final dartExecutable = Platform.isWindows // Use 'where.exe' to support powershell as well ? (Process.runSync('where.exe', ['dart.exe']).stdout as String) .split(RegExp('(\r\n|\r|\n)')) .first - : Process.runSync('which', ['dart']).stdout; + : (Process.runSync('which', ['dart']).stdout as String).trim(); final aboveExecutable = p.dirname(p.dirname(dartExecutable)); assert(FileSystemEntity.isFileSync(p.join(aboveExecutable, 'version'))); return aboveExecutable; diff --git a/webdev/lib/src/version.dart b/webdev/lib/src/version.dart index 78c01d1a64..2384f91ac4 100644 --- a/webdev/lib/src/version.dart +++ b/webdev/lib/src/version.dart @@ -1,2 +1,2 @@ // Generated code. Do not modify. -const packageVersion = '4.1.0-wip'; +const packageVersion = '4.1.0'; diff --git a/webdev/pubspec.yaml b/webdev/pubspec.yaml index 390aca6293..140d635205 100644 --- a/webdev/pubspec.yaml +++ b/webdev/pubspec.yaml @@ -1,6 +1,6 @@ name: webdev # Every time this changes you need to run `dart run build_runner build`. -version: 4.1.0-wip +version: 4.1.0 # We should not depend on a dev SDK before publishing. # publish_to: none description: >- diff --git a/webdev/test/daemon/app_domain_common.dart b/webdev/test/daemon/app_domain_common.dart index a6009ad55c..92b38a3bde 100644 --- a/webdev/test/daemon/app_domain_common.dart +++ b/webdev/test/daemon/app_domain_common.dart @@ -114,14 +114,21 @@ void appDomainTests({required TestRunner testRunner}) { '[{"method":"app.restart","id":0,' '"params" : { "appId" : "$appId", "fullRestart" : false}}]'; webdev.stdin.add(utf8.encode('$extensionCall\n')); - await expectLater( - webdev.stdout, - emitsThrough( - startsWith( - '[{"id":0,"result":{"code":1,"message":"hot reload not yet supported', - ), - ), - ); + + var success = false; + while (await webdev.stdout.hasNext) { + final line = await webdev.stdout.next; + if (line.startsWith('[{"id":0,')) { + final unwrapped = line.substring(1, line.length - 1); + final response = json.decode(unwrapped) as Map; + final result = response['result'] as Map; + expect(result['code'], equals(0)); + expect(result['message'], equals('Hot reload successful')); + success = true; + break; + } + } + expect(success, isTrue); await exitWebdev(webdev); }, timeout: const Timeout(Duration(minutes: 2))); diff --git a/webdev/test/daemon/app_domain_ddc_library_bundle_test.dart b/webdev/test/daemon/app_domain_ddc_library_bundle_test.dart index 1f6fa8b3e7..ab58ec869b 100644 --- a/webdev/test/daemon/app_domain_ddc_library_bundle_test.dart +++ b/webdev/test/daemon/app_domain_ddc_library_bundle_test.dart @@ -12,11 +12,23 @@ import '../test_utils.dart'; import 'app_domain_common.dart'; void main() { - appDomainTests( - testRunner: TestRunner( - canaryFeatures: true, - webHotReload: false, - ddcModuleFormat: ModuleFormat.ddc, - ), - ); + group('Build Daemon', () { + appDomainTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: false, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); + + group('Build Daemon and Frontend Server', () { + appDomainTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: true, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); } diff --git a/webdev/test/daemon/daemon_domain_ddc_library_bundle_test.dart b/webdev/test/daemon/daemon_domain_ddc_library_bundle_test.dart index 30c04fb792..cad0ebcab1 100644 --- a/webdev/test/daemon/daemon_domain_ddc_library_bundle_test.dart +++ b/webdev/test/daemon/daemon_domain_ddc_library_bundle_test.dart @@ -12,11 +12,23 @@ import '../test_utils.dart'; import 'daemon_domain_common.dart'; void main() { - daemonDomainTests( - testRunner: TestRunner( - canaryFeatures: true, - webHotReload: false, - ddcModuleFormat: ModuleFormat.ddc, - ), - ); + group('Build Daemon', () { + daemonDomainTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: false, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); + + group('Build Daemon and Frontend Server', () { + daemonDomainTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: true, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); } diff --git a/webdev/test/daemon/launch_app_common.dart b/webdev/test/daemon/launch_app_common.dart index d0319a9546..43b68556b0 100644 --- a/webdev/test/daemon/launch_app_common.dart +++ b/webdev/test/daemon/launch_app_common.dart @@ -5,6 +5,8 @@ @Timeout(Duration(minutes: 2)) library; +import 'dart:io'; +import 'package:path/path.dart' as p; import 'package:test/test.dart'; import '../test_utils.dart'; @@ -16,6 +18,11 @@ void launchAppTests({required TestRunner testRunner}) { setUpAll(() async { await testRunner.setUpAll(); exampleDirectory = await testRunner.prepareWorkspace(); + // Delete 'main.dart' to ensure only one entrypoint exists. + final mainDart = File(p.join(exampleDirectory, 'web', 'main.dart')); + if (mainDart.existsSync()) { + mainDart.deleteSync(); + } }); tearDownAll(testRunner.tearDownAll); diff --git a/webdev/test/daemon/launch_app_ddc_library_bundle_test.dart b/webdev/test/daemon/launch_app_ddc_library_bundle_test.dart index d9746fe977..baac246471 100644 --- a/webdev/test/daemon/launch_app_ddc_library_bundle_test.dart +++ b/webdev/test/daemon/launch_app_ddc_library_bundle_test.dart @@ -12,11 +12,23 @@ import '../test_utils.dart'; import 'launch_app_common.dart'; void main() { - launchAppTests( - testRunner: TestRunner( - canaryFeatures: true, - webHotReload: false, - ddcModuleFormat: ModuleFormat.ddc, - ), - ); + group('Build Daemon', () { + launchAppTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: false, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); + + group('Build Daemon and Frontend Server', () { + launchAppTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: true, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); } diff --git a/webdev/test/e2e_common.dart b/webdev/test/e2e_common.dart index 9080a1ae13..b7c2205a53 100644 --- a/webdev/test/e2e_common.dart +++ b/webdev/test/e2e_common.dart @@ -14,13 +14,11 @@ import 'package:path/path.dart' as p; import 'package:pub_semver/pub_semver.dart'; import 'package:test/test.dart'; import 'package:test_descriptor/test_descriptor.dart' as d; -import 'package:test_process/test_process.dart'; import 'package:vm_service/vm_service.dart'; import 'package:vm_service/vm_service_io.dart'; import 'package:webdev/src/logging.dart'; import 'package:webdev/src/pubspec.dart'; import 'package:webdev/src/serve/utils.dart'; -import 'package:webdev/src/util.dart'; import 'package:yaml/yaml.dart'; import 'daemon/utils.dart'; @@ -44,23 +42,20 @@ void e2eTests({required TestRunner testRunner}) { setUpAll(() async { configureLogWriter(debug); await testRunner.setUpAll(); - exampleDirectory = p.absolute( - p.join(p.current, '..', 'dwds_test_common', 'fixtures', '_webdev_smoke'), - ); - - final process = await TestProcess.start( - dartPath, - ['pub', 'upgrade'], - workingDirectory: exampleDirectory, - environment: getPubEnvironment(), - ); - - await process.shouldExit(0); - - await d - .file('.dart_tool/package_config.json', isNotEmpty) - .validate(exampleDirectory); - await d.file('pubspec.lock', isNotEmpty).validate(exampleDirectory); + exampleDirectory = await testRunner.prepareWorkspace(); + // Delete files other than main.dart and index.html to ensure a single + // entrypoint exists. + final webDir = Directory(p.join(exampleDirectory, 'web')); + if (await webDir.exists()) { + await for (final entity in webDir.list()) { + if (entity is File) { + final name = p.basename(entity.path); + if (name != 'main.dart' && name != 'index.html') { + await entity.delete(); + } + } + } + } }); tearDownAll(testRunner.tearDownAll); @@ -217,10 +212,10 @@ void e2eTests({required TestRunner testRunner}) { final hostUrl = 'http://localhost:$openPort'; - // Wait for the initial build to finish. + // Wait for the server to be ready for connections. await expectLater( process.stdout, - emitsThrough(contains('Built with build_runner')), + emitsThrough(contains('Serving `web` on')), ); final client = HttpClient(); diff --git a/webdev/test/e2e_ddc_library_bundle_test.dart b/webdev/test/e2e_ddc_library_bundle_test.dart index 6a685854c2..ab0788892b 100644 --- a/webdev/test/e2e_ddc_library_bundle_test.dart +++ b/webdev/test/e2e_ddc_library_bundle_test.dart @@ -12,11 +12,23 @@ import 'e2e_common.dart'; import 'test_utils.dart'; void main() { - e2eTests( - testRunner: TestRunner( - canaryFeatures: true, - webHotReload: false, - ddcModuleFormat: ModuleFormat.ddc, - ), - ); + group('Build Daemon', () { + e2eTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: false, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); + + group('Build Daemon and Frontend Server', () { + e2eTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: true, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); } diff --git a/webdev/test/integration_common.dart b/webdev/test/integration_common.dart index 629a2d1fc1..c04c930f7e 100644 --- a/webdev/test/integration_common.dart +++ b/webdev/test/integration_common.dart @@ -296,7 +296,7 @@ dependencies: } const _supportedBuildRunnerVersion = '2.4.0'; -const _supportedWebCompilersVersion = '4.4.12'; +const _supportedWebCompilersVersion = '4.8.9'; const _supportedBuildDaemonVersion = '4.0.0'; String _pubspecYaml = ''' diff --git a/webdev/test/integration_ddc_library_bundle_test.dart b/webdev/test/integration_ddc_library_bundle_test.dart index 43870d02b4..e35e5ba8a2 100644 --- a/webdev/test/integration_ddc_library_bundle_test.dart +++ b/webdev/test/integration_ddc_library_bundle_test.dart @@ -12,11 +12,23 @@ import 'integration_common.dart'; import 'test_utils.dart'; void main() { - integrationTests( - testRunner: TestRunner( - canaryFeatures: true, - webHotReload: false, - ddcModuleFormat: ModuleFormat.ddc, - ), - ); + group('Build Daemon', () { + integrationTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: false, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); + + group('Build Daemon and Frontend Server', () { + integrationTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: true, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); } diff --git a/webdev/test/tls_common.dart b/webdev/test/tls_common.dart index 6984ae6507..939d6d3f6b 100644 --- a/webdev/test/tls_common.dart +++ b/webdev/test/tls_common.dart @@ -9,7 +9,6 @@ import 'package:logging/logging.dart'; import 'package:path/path.dart' as p; import 'package:test/test.dart'; import 'package:test_descriptor/test_descriptor.dart' as d; -import 'package:test_process/test_process.dart'; import 'package:webdev/src/logging.dart'; import 'package:webdev/src/serve/utils.dart'; @@ -26,24 +25,15 @@ void tlsTests({required TestRunner testRunner}) { setUpAll(() async { configureLogWriter(debug); await testRunner.setUpAll(); - exampleDirectory = p.absolute( - p.join( - p.current, - '..', - 'dwds_test_common', - 'fixtures', - '_webdev_smoke', - ), - ); + exampleDirectory = await testRunner.prepareWorkspace(); - final process = await TestProcess.start( - 'dart', - ['pub', 'upgrade'], - workingDirectory: exampleDirectory, - environment: getPubEnvironment(), + // Delete 'scopes_main.dart' to ensure only one entrypoint exists. + final scopesMainDart = File( + p.join(exampleDirectory, 'web', 'scopes_main.dart'), ); - - await process.shouldExit(0); + if (scopesMainDart.existsSync()) { + scopesMainDart.deleteSync(); + } await d .file('.dart_tool/package_config.json', isNotEmpty) @@ -65,9 +55,10 @@ void tlsTests({required TestRunner testRunner}) { args, workingDirectory: exampleDirectory, ); + // Wait for the server to be ready for connections. await expectLater( process.stdout, - emitsThrough(contains('Built with build_runner')), + emitsThrough(contains('Serving `web` on')), ); final client = HttpClient() @@ -101,9 +92,10 @@ void tlsTests({required TestRunner testRunner}) { args, workingDirectory: exampleDirectory, ); + // Wait for the server to be ready for connections. await expectLater( process.stdout, - emitsThrough(contains('Built with build_runner')), + emitsThrough(contains('Serving `web` on')), ); final interfaces = await NetworkInterface.list( diff --git a/webdev/test/tls_ddc_library_bundle_test.dart b/webdev/test/tls_ddc_library_bundle_test.dart index 7c83b42c25..a0dc36d591 100644 --- a/webdev/test/tls_ddc_library_bundle_test.dart +++ b/webdev/test/tls_ddc_library_bundle_test.dart @@ -12,11 +12,23 @@ import 'test_utils.dart'; import 'tls_common.dart'; void main() { - tlsTests( - testRunner: TestRunner( - canaryFeatures: true, - webHotReload: false, - ddcModuleFormat: ModuleFormat.ddc, - ), - ); + group('Build Daemon', () { + tlsTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: false, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); + + group('Build Daemon and Frontend Server', () { + tlsTests( + testRunner: TestRunner( + canaryFeatures: true, + webHotReload: true, + ddcModuleFormat: ModuleFormat.ddc, + ), + ); + }); } From a7445076aa7a0385a453cbf65a7c9b6309f5bd5e Mon Sep 17 00:00:00 2001 From: MarkZ Date: Tue, 11 Aug 2026 10:57:30 -0700 Subject: [PATCH 106/134] Temp commit of fixes to match expression_eval_dwds --- dwds/CHANGELOG.md | 10 +- .../breakpoint_ddc_library_bundle_test.dart | 7 + .../callstack_ddc_library_bundle_test.dart | 7 + ...proxy_service_ddc_library_bundle_test.dart | 17 + ...ular_evaluate_ddc_library_bundle_test.dart | 7 + dwds/test/integration/dart_uri_test.dart | 4 +- .../evaluate_ddc_library_bundle_test.dart | 7 + ...d_breakpoints_ddc_library_bundle_test.dart | 7 + .../hot_reload_ddc_library_bundle_test.dart | 7 + ...t_breakpoints_ddc_library_bundle_test.dart | 7 + ...t_correctness_ddc_library_bundle_test.dart | 15 + .../hot_restart_ddc_library_bundle_test.dart | 15 + ...ss_inspection_ddc_library_bundle_test.dart | 17 + ...ot_shorthands_ddc_library_bundle_test.dart | 17 + .../instance_ddc_library_bundle_test.dart | 16 + ...ce_inspection_ddc_library_bundle_test.dart | 34 ++ ...ns_inspection_ddc_library_bundle_test.dart | 17 + ...rd_inspection_ddc_library_bundle_test.dart | 15 + ...pe_inspection_ddc_library_bundle_test.dart | 15 + ...pe_inspection_ddc_library_bundle_test.dart | 17 + .../integration/package_uri_mapper_test.dart | 22 +- ...arts_evaluate_ddc_library_bundle_test.dart | 7 + .../utilities/web_path_translator_test.dart | 308 ++++++++++++++++++ dwds_test_common/pubspec.yaml | 31 +- example/.vscode/launch.json | 14 + example/pubspec.yaml | 2 +- .../lib/src/frontend_server_client.dart | 4 +- webdev/README.md | 2 +- 28 files changed, 615 insertions(+), 33 deletions(-) create mode 100644 dwds/test/utilities/web_path_translator_test.dart create mode 100644 example/.vscode/launch.json diff --git a/dwds/CHANGELOG.md b/dwds/CHANGELOG.md index a68e5fe574..98538ff49a 100644 --- a/dwds/CHANGELOG.md +++ b/dwds/CHANGELOG.md @@ -1,8 +1,10 @@ ## 28.0.0 - -- Support expression evaluation in Frontend Server + Build Daemon mode via `DaemonExpressionCompiler`. -- Add `WebPathTranslator` to support path translation between Frontend Server and Build Daemon. -- Replace `PackageUriMapper` with `PathResolver` strategy. +- **Breaking Change**: Removed `PackageUriMapper` in favor of **`PathResolver`** - with `BuildRunnerPathResolver`, `FrontendServerPathResolver`, and `FlutterPathResolver` impls. +- **Breaking Change**: **`LoadStrategy`** implementors must now implement the **`assetScheme`** getter. +- Introduce **`AssetScheme`** to generalize asset naming schemes. +- Add support for Frontend Server + Build Daemon configuration with hot reload via **`FrontendServerBuildDaemonStrategyProvider`**. +- Expose **`DaemonExpressionCompiler`** for handling expression compilation directly via `build_daemon`. +- **`BuildSettings`** now supports **`useDebuggerModuleNames`** to distinguish between debugger-friendly paths and raw server paths. ## 27.1.3-wip diff --git a/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart b/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart index 2089b17629..502f71dce7 100644 --- a/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart +++ b/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart @@ -32,6 +32,13 @@ void main() { ); }); + group('Build Daemon and Frontend Server |', () { + testBreakpoint( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); + group('Frontend Server |', () { testBreakpoint( provider: provider, diff --git a/dwds/test/integration/callstack_ddc_library_bundle_test.dart b/dwds/test/integration/callstack_ddc_library_bundle_test.dart index 3108333576..f61be41021 100644 --- a/dwds/test/integration/callstack_ddc_library_bundle_test.dart +++ b/dwds/test/integration/callstack_ddc_library_bundle_test.dart @@ -32,6 +32,13 @@ void main() { ); }); + group('Build Daemon and Frontend Server |', () { + testCallStack( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); + group('Frontend Server |', () { testCallStack( provider: provider, diff --git a/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart b/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart index 12bcae9019..9463d981e9 100644 --- a/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart +++ b/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart @@ -53,4 +53,21 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: $canaryFeatures | Build Daemon and Frontend Server |', () { + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: moduleFormat, + ); + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + tearDownAll(provider.dispose); + + runTests( + provider: provider, + moduleFormat: moduleFormat, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } diff --git a/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart b/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart index 15da23b842..c1ef97afa7 100644 --- a/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart +++ b/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart @@ -33,6 +33,13 @@ void main() async { testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); }); + group('Build Daemon and Frontend Server |', () { + testAll( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); + group('Frontend Server |', () { group('Context with circular dependencies |', () { for (final indexBaseMode in IndexBaseMode.values) { diff --git a/dwds/test/integration/dart_uri_test.dart b/dwds/test/integration/dart_uri_test.dart index d436181ea2..f8e66ad84b 100644 --- a/dwds/test/integration/dart_uri_test.dart +++ b/dwds/test/integration/dart_uri_test.dart @@ -60,12 +60,12 @@ void main() { test('parses org-dartlang-app paths', () { final uri = DartUri('org-dartlang-app:///blah/main.dart'); - expect(uri.serverPath, '/blah/main.dart'); + expect(uri.serverPath, 'blah/main.dart'); }); test('parses google3 paths', () { final uri = DartUri('google3:///blah/main.dart'); - expect(uri.serverPath, '/blah/main.dart'); + expect(uri.serverPath, 'blah/main.dart'); }); test('parses packages paths', () { diff --git a/dwds/test/integration/evaluate_ddc_library_bundle_test.dart b/dwds/test/integration/evaluate_ddc_library_bundle_test.dart index 5f16194199..9f90f54b8b 100644 --- a/dwds/test/integration/evaluate_ddc_library_bundle_test.dart +++ b/dwds/test/integration/evaluate_ddc_library_bundle_test.dart @@ -34,6 +34,13 @@ void main() async { testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); }); + group('Build Daemon and Frontend Server |', () { + testAll( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); + group('Frontend Server |', () { for (final useDebuggerModuleNames in [false, true]) { group('Debugger module names: $useDebuggerModuleNames |', () { diff --git a/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart b/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart index 7e216b1dac..9444b8f6ab 100644 --- a/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart +++ b/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart @@ -28,4 +28,11 @@ void main() { group('Frontend Server', () { runTests(provider: provider, contextFactory: FrontendServerTestContext.new); }); + + group('Build Daemon and Frontend Server', () { + runTests( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); } diff --git a/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart b/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart index 5ca286c4f5..1defbc9904 100644 --- a/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart +++ b/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart @@ -28,4 +28,11 @@ void main() { group('Frontend Server', () { runTests(provider: provider, contextFactory: FrontendServerTestContext.new); }); + + group('Build Daemon and Frontend Server', () { + runTests( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); } 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 fb958c3036..496a9c00dc 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 @@ -33,4 +33,11 @@ void main() { group('Build Daemon', () { runTests(provider: provider, contextFactory: BuildDaemonTestContext.new); }); + + group('Build Daemon and Frontend Server', () { + runTests( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); } 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 36fac6de31..159a1ebef7 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 @@ -49,4 +49,19 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: $canaryFeatures | Build Daemon and Frontend Server |', () { + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: moduleFormat, + ); + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + runTests( + provider: provider, + moduleFormat: moduleFormat, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } 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 99e6b76de0..9efe3d9ba2 100644 --- a/dwds/test/integration/hot_restart_ddc_library_bundle_test.dart +++ b/dwds/test/integration/hot_restart_ddc_library_bundle_test.dart @@ -49,4 +49,19 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: $canaryFeatures | Build Daemon and Frontend Server |', () { + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: moduleFormat, + ); + runTests( + provider: provider, + moduleFormat: moduleFormat, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } diff --git a/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart index 77154b36bc..e9dfffb608 100644 --- a/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart @@ -52,4 +52,21 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } diff --git a/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart b/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart index 56022c637e..97dec358d2 100644 --- a/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart @@ -52,4 +52,21 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } diff --git a/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart b/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart index 6920aa209c..a9b4db3218 100644 --- a/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart @@ -49,4 +49,20 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + canaryFeatures: canaryFeatures, + verbose: debug, + ddcModuleFormat: moduleFormat, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } diff --git a/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart index cfef8deac5..2bfaf670d3 100644 --- a/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart @@ -34,4 +34,38 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemon; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } diff --git a/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart index d2d676e876..a89bf85921 100644 --- a/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart @@ -52,4 +52,21 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } diff --git a/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart index 4f6154e41c..78b8f48191 100644 --- a/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart @@ -47,4 +47,19 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } diff --git a/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart index 17bf74bd14..72f7008d21 100644 --- a/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart @@ -47,4 +47,19 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } diff --git a/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart index 167ff6d95d..c77899aad4 100644 --- a/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart @@ -52,4 +52,21 @@ void main() { canaryFeatures: canaryFeatures, ); }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); + }); } diff --git a/dwds/test/integration/package_uri_mapper_test.dart b/dwds/test/integration/package_uri_mapper_test.dart index f362797497..f104ae1c47 100644 --- a/dwds/test/integration/package_uri_mapper_test.dart +++ b/dwds/test/integration/package_uri_mapper_test.dart @@ -33,7 +33,7 @@ void main() { final resolvedPath = '${project.packageDirectory}/lib/test_library.dart'; - late final BuildRunnerPathResolver pathResolver; + late final PathResolver packageUriMapper; setUpAll(() async { await project.setUp(); // Note: Run `dart pub upgrade` before the test cases to fix @@ -51,25 +51,31 @@ void main() { ), ); - pathResolver = await BuildRunnerPathResolver.create( - fileSystem, - packageConfigFile, - useDebuggerModuleNames: useDebuggerModuleNames, - ); + packageUriMapper = useDebuggerModuleNames + ? await FrontendServerPathResolver.create( + fileSystem, + packageConfigFile, + useDebuggerModuleNames: useDebuggerModuleNames, + ) + : await BuildRunnerPathResolver.create( + fileSystem, + packageConfigFile, + useDebuggerModuleNames: useDebuggerModuleNames, + ); }); tearDownAll(project.tearDown); test('Can convert package urls to server paths', () { expect( - pathResolver.appUriToServerPath(packageUri.toString()), + packageUriMapper.appUriToServerPath(packageUri.toString()), serverPath, ); }); test('Can convert server paths to file paths', () { expect( - pathResolver.serverPathToResolvedUri(serverPath), + packageUriMapper.serverPathToResolvedUri(serverPath), isA() .having((uri) => uri.scheme, 'scheme', 'file') .having((uri) => uri.path, 'path', endsWith(resolvedPath)), diff --git a/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart b/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart index 6a98eb68ca..ee7ea55d20 100644 --- a/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart +++ b/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart @@ -33,6 +33,13 @@ void main() async { testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); }); + group('Build Daemon and Frontend Server |', () { + testAll( + provider: provider, + compilationMode: CompilationMode.buildDaemonAndFrontendServer, + ); + }); + group('Frontend Server |', () { group('Context with parts |', () { for (final indexBaseMode in IndexBaseMode.values) { diff --git a/dwds/test/utilities/web_path_translator_test.dart b/dwds/test/utilities/web_path_translator_test.dart new file mode 100644 index 0000000000..cb6434e916 --- /dev/null +++ b/dwds/test/utilities/web_path_translator_test.dart @@ -0,0 +1,308 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:dwds/src/loaders/asset_scheme.dart'; +import 'package:dwds/src/utilities/web_path_translator.dart'; +import 'package:test/test.dart'; + +const fesAssetScheme = FrontendServerAssetScheme(); +const buildAssetScheme = BuildRunnerAssetScheme(); + +void main() { + group('WebPathTranslator', () { + group('addLibSegment', () { + test('adds lib/ to packages paths', () { + // Checks: packages/foo/bar.dart -> packages/foo/lib/bar.dart + expect( + WebPathTranslator.addLibSegment('packages/foo/bar.dart'), + 'packages/foo/lib/bar.dart', + ); + }); + + test('is no-op if lib/ is already present', () { + // Checks: packages/foo/lib/bar.dart -> packages/foo/lib/bar.dart + expect( + WebPathTranslator.addLibSegment('packages/foo/lib/bar.dart'), + 'packages/foo/lib/bar.dart', + ); + }); + + test('is no-op for non-packages paths', () { + // Checks: web/main.dart -> web/main.dart + expect( + WebPathTranslator.addLibSegment('web/main.dart'), + 'web/main.dart', + ); + }); + }); + + group('removeLibSegment', () { + test('removes lib/ from packages paths', () { + // Checks: packages/foo/lib/bar.dart -> packages/foo/bar.dart + expect( + WebPathTranslator.removeLibSegment('packages/foo/lib/bar.dart'), + 'packages/foo/bar.dart', + ); + }); + + test('is no-op if lib/ is not present', () { + // Checks: packages/foo/bar.dart -> packages/foo/bar.dart + expect( + WebPathTranslator.removeLibSegment('packages/foo/bar.dart'), + 'packages/foo/bar.dart', + ); + }); + + test('is no-op for non-packages paths', () { + // Checks: web/main.dart -> web/main.dart + expect( + WebPathTranslator.removeLibSegment('web/main.dart'), + 'web/main.dart', + ); + }); + }); + + group('packagePathToPackageUri', () { + test('converts packages/ paths with lib to package: URIs', () { + expect( + WebPathTranslator.packagePathToPackageUri( + 'packages/foo/lib/bar.dart', + ), + 'package:foo/bar.dart', + ); + }); + + test('converts packages/ paths without lib to package: URIs', () { + expect( + WebPathTranslator.packagePathToPackageUri('packages/foo/bar.dart'), + 'package:foo/bar.dart', + ); + }); + + test('returns null for non-package paths', () { + expect( + WebPathTranslator.packagePathToPackageUri('web/main.dart'), + isNull, + ); + }); + }); + + group('translateLibPathToPackagePath', () { + test('translates lib/ paths to packages/ paths', () { + // Checks: lib/foo.dart -> packages/my_package/foo.dart + expect( + WebPathTranslator.translateLibPathToPackagePath( + 'lib/foo.dart', + 'my_package', + ), + 'packages/my_package/foo.dart', + ); + }); + + test('translates lib/src/ paths to packages/ paths', () { + // Checks: lib/src/foo.dart -> packages/my_package/src/foo.dart + expect( + WebPathTranslator.translateLibPathToPackagePath( + 'lib/src/foo.dart', + 'my_package', + ), + 'packages/my_package/src/foo.dart', + ); + }); + + test('is no-op for non-lib paths', () { + // Checks: web/main.dart -> web/main.dart + expect( + WebPathTranslator.translateLibPathToPackagePath( + 'web/main.dart', + 'my_package', + ), + 'web/main.dart', + ); + }); + + test( + 'throws StateError if rootPackageName is null or empty for lib/ path', + () { + // Checks: lib/foo.dart (with null package) -> StateError + expect( + () => WebPathTranslator.translateLibPathToPackagePath( + 'lib/foo.dart', + null, + ), + throwsStateError, + ); + // Checks: lib/foo.dart (with empty package) -> StateError + expect( + () => WebPathTranslator.translateLibPathToPackagePath( + 'lib/foo.dart', + '', + ), + throwsStateError, + ); + }, + ); + }); + + group('translatePackagePath', () { + test('removes lib/ segment when translating FES to BuildRunner', () { + expect( + WebPathTranslator.translatePackagePath( + 'packages/foo/lib/bar.dart', + from: fesAssetScheme, + to: buildAssetScheme, + ), + 'packages/foo/bar.dart', + ); + }); + + test('adds lib/ segment when translating BuildRunner to FES', () { + expect( + WebPathTranslator.translatePackagePath( + 'packages/foo/bar.dart', + from: buildAssetScheme, + to: fesAssetScheme, + ), + 'packages/foo/lib/bar.dart', + ); + }); + + test('is no-op when schemes are identical', () { + expect( + WebPathTranslator.translatePackagePath( + 'packages/foo/lib/bar.dart', + from: fesAssetScheme, + to: fesAssetScheme, + ), + 'packages/foo/lib/bar.dart', + ); + }); + }); + + group('translateModuleExtension', () { + test( + 'translates .dart.lib to .ddc (frontendServerOnly to buildRunner)', + () { + // Checks: main.dart.lib -> main.ddc + expect( + WebPathTranslator.translateModuleExtension( + 'main.dart.lib', + from: fesAssetScheme, + to: buildAssetScheme, + ), + 'main.ddc', + ); + // Checks: main.dart.lib.js -> main.ddc.js + expect( + WebPathTranslator.translateModuleExtension( + 'main.dart.lib.js', + from: fesAssetScheme, + to: buildAssetScheme, + ), + 'main.ddc.js', + ); + }, + ); + + test( + 'translates .ddc to .dart.lib (buildRunner to frontendServerOnly)', + () { + // Checks: main.ddc -> main.dart.lib + expect( + WebPathTranslator.translateModuleExtension( + 'main.ddc', + from: buildAssetScheme, + to: fesAssetScheme, + ), + 'main.dart.lib', + ); + // Checks: main.ddc.js -> main.dart.lib.js + expect( + WebPathTranslator.translateModuleExtension( + 'main.ddc.js', + from: buildAssetScheme, + to: fesAssetScheme, + ), + 'main.dart.lib.js', + ); + }, + ); + + test('is no-op if from and to are the same', () { + // Checks: main.dart.lib -> main.dart.lib + expect( + WebPathTranslator.translateModuleExtension( + 'main.dart.lib', + from: fesAssetScheme, + to: fesAssetScheme, + ), + 'main.dart.lib', + ); + }); + }); + + group('translateFesToBuildRunnerPath', () { + test('translates .dart.lib to .ddc', () { + // Checks: main.dart.lib -> main.ddc + expect( + WebPathTranslator.translateFesToBuildRunnerPath('main.dart.lib'), + 'main.ddc', + ); + // Checks: main.dart.lib.js -> main.ddc.js + expect( + WebPathTranslator.translateFesToBuildRunnerPath('main.dart.lib.js'), + 'main.ddc.js', + ); + }); + }); + + group('reconstructAppScheme', () { + test('is no-op if org-dartlang-app scheme is already present', () { + // Checks: org-dartlang-app:///web/main.dart -> org-dartlang-app:///web/main.dart + expect( + WebPathTranslator.reconstructAppScheme( + 'org-dartlang-app:///web/main.dart', + '/', + ), + 'org-dartlang-app:///web/main.dart', + ); + }); + + test('reconstructs scheme for default web dirs', () { + // Checks: web/main.dart -> org-dartlang-app:///web/main.dart + expect( + WebPathTranslator.reconstructAppScheme('web/main.dart', '/'), + 'org-dartlang-app:///web/main.dart', + ); + // Checks: /test/foo_test.dart -> org-dartlang-app:///test/foo_test.dart + expect( + WebPathTranslator.reconstructAppScheme('/test/foo_test.dart', '/'), + 'org-dartlang-app:///test/foo_test.dart', + ); + }); + + test('reconstructs scheme for package paths', () { + // Checks: /lib/src/library.dart -> org-dartlang-app:///packages/my_package/src/library.dart + expect( + WebPathTranslator.reconstructAppScheme( + '/lib/src/library.dart', + '/packages/my_package/subdir/main.ddc.js', + ), + 'org-dartlang-app:///packages/my_package/src/library.dart', + ); + }); + + test('handles package paths without leading slash', () { + // Checks: lib/src/library.dart -> org-dartlang-app:///packages/my_package/src/library.dart + expect( + WebPathTranslator.reconstructAppScheme( + 'lib/src/library.dart', + '/packages/my_package/subdir/main.ddc.js', + ), + 'org-dartlang-app:///packages/my_package/src/library.dart', + ); + }); + }); + }); +} diff --git a/dwds_test_common/pubspec.yaml b/dwds_test_common/pubspec.yaml index 187e8aa12e..0dbc66d318 100644 --- a/dwds_test_common/pubspec.yaml +++ b/dwds_test_common/pubspec.yaml @@ -6,25 +6,26 @@ environment: sdk: ^3.12.0-0 dependencies: - build_daemon: any - dds: any - dwds: any - file: any + build_daemon: ^4.1.4 + dds: ^5.3.0 + dwds: + path: ../dwds + file: ">=6.0.0 <8.0.0" http: any - io: any - logging: any - mime: any - package_config: any - path: any - pub_semver: any - shelf: any + io: ^1.0.5 + logging: ^1.0.1 + mime: ^2.0.0 + package_config: '>=2.0.2 <4.0.0' + path: ^1.8.1 + pub_semver: ^2.1.1 + shelf: ^1.3.0 shelf_proxy: any - test: any - vm_service: any + test: ^1.21.1 + vm_service: ">=14.2.4 <16.0.0" vm_service_interface: any webdriver: any - webkit_inspection_protocol: any - yaml: any + webkit_inspection_protocol: ^1.0.1 + yaml: ^3.1.3 dev_dependencies: dart_flutter_team_lints: ^3.5.2 diff --git a/example/.vscode/launch.json b/example/.vscode/launch.json new file mode 100644 index 0000000000..b26a16f148 --- /dev/null +++ b/example/.vscode/launch.json @@ -0,0 +1,14 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Dart Web (Hot Reload)", + "type": "dart", + "request": "launch", + "program": "web/main.dart", // entrypoint + "args": [ + "--web-hot-reload", + ] + } + ] +} \ No newline at end of file diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 8e62594da2..2c02706e64 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -8,4 +8,4 @@ environment: dev_dependencies: build_runner: ^2.16.0 - build_web_compilers: ^4.4.12 + build_web_compilers: ^4.8.9 diff --git a/frontend_server_client/lib/src/frontend_server_client.dart b/frontend_server_client/lib/src/frontend_server_client.dart index 389f5e5c16..a29931824c 100644 --- a/frontend_server_client/lib/src/frontend_server_client.dart +++ b/frontend_server_client/lib/src/frontend_server_client.dart @@ -75,9 +75,10 @@ class FrontendServerClient { List additionalSources = const [], String? nativeAssets, }) async { + final sdk = sdkRoot ?? sdkDir; final commonArguments = [ '--sdk-root', - sdkRoot ?? sdkDir, + sdk, '--platform=$platformKernel', '--target=$target', if (target == 'dartdevc') @@ -100,7 +101,6 @@ class FrontendServerClient { if (nativeAssets != null) ...['--native-assets', nativeAssets], ]; - final sdk = sdkRoot ?? sdkDir; final dartExecutable = p.join( sdk, 'bin', diff --git a/webdev/README.md b/webdev/README.md index ba81d1d0f9..110ce827d7 100644 --- a/webdev/README.md +++ b/webdev/README.md @@ -12,7 +12,7 @@ similar to: --- dev_dependencies: build_runner: ^2.4.0 - build_web_compilers: ^4.4.12 + build_web_compilers: ^4.8.9 ``` ## Installation From a12599a9832ea784027527bf208e4018e84e7b94 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Wed, 12 Aug 2026 13:53:18 -0700 Subject: [PATCH 107/134] moving tests to webdev --- dwds/lib/src/handlers/injected_client_js.dart | 2238 ++++++----------- .../test/integration/breakpoint_amd_test.dart | 13 +- .../breakpoint_ddc_library_bundle_test.dart | 20 +- dwds/test/integration/callstack_amd_test.dart | 13 +- .../callstack_ddc_library_bundle_test.dart | 20 +- ...proxy_service_ddc_library_bundle_test.dart | 41 +- .../circular_evaluate_amd_test.dart | 10 +- ...ular_evaluate_ddc_library_bundle_test.dart | 17 +- .../dart_uri_file_uri_amd_test.dart | 13 +- ..._uri_file_uri_ddc_library_bundle_test.dart | 16 +- .../integration/debug_service_amd_test.dart | 4 +- ...debug_service_ddc_library_bundle_test.dart | 4 +- dwds/test/integration/devtools_amd_test.dart | 4 +- .../devtools_ddc_library_bundle_test.dart | 4 +- dwds/test/integration/evaluate_amd_test.dart | 10 +- .../evaluate_ddc_library_bundle_test.dart | 17 +- dwds/test/integration/events_amd_test.dart | 9 +- .../events_ddc_library_bundle_test.dart | 13 +- .../expression_compiler_service_amd_test.dart | 4 +- ...piler_service_ddc_library_bundle_test.dart | 4 +- ...d_breakpoints_ddc_library_bundle_test.dart | 7 - .../hot_reload_ddc_library_bundle_test.dart | 7 - ...t_breakpoints_ddc_library_bundle_test.dart | 14 +- ...t_correctness_ddc_library_bundle_test.dart | 37 +- .../hot_restart_ddc_library_bundle_test.dart | 36 +- .../instances/class_inspection_amd_test.dart | 48 +- ...ss_inspection_ddc_library_bundle_test.dart | 44 +- .../instances/dot_shorthands_amd_test.dart | 48 +- ...ot_shorthands_ddc_library_bundle_test.dart | 44 +- .../instances/instance_amd_test.dart | 64 +- .../instance_ddc_library_bundle_test.dart | 40 +- .../instance_inspection_amd_test.dart | 48 +- ...ce_inspection_ddc_library_bundle_test.dart | 34 - .../patterns_inspection_amd_test.dart | 48 +- ...ns_inspection_ddc_library_bundle_test.dart | 44 +- .../instances/record_inspection_amd_test.dart | 48 +- ...rd_inspection_ddc_library_bundle_test.dart | 38 +- .../record_type_inspection_amd_test.dart | 48 +- ...pe_inspection_ddc_library_bundle_test.dart | 38 +- .../instances/type_inspection_amd_test.dart | 48 +- ...pe_inspection_ddc_library_bundle_test.dart | 44 +- dwds/test/integration/listviews_amd_test.dart | 13 +- .../listviews_ddc_library_bundle_test.dart | 16 +- .../integration/load_strategy_amd_test.dart | 13 +- ...load_strategy_ddc_library_bundle_test.dart | 20 +- .../integration/parts_evaluate_amd_test.dart | 10 +- ...arts_evaluate_ddc_library_bundle_test.dart | 17 +- dwds/test/integration/refresh_amd_test.dart | 4 +- .../refresh_ddc_library_bundle_test.dart | 4 +- .../integration/run_request_amd_test.dart | 4 +- .../run_request_ddc_library_bundle_test.dart | 4 +- .../test/integration/screenshot_amd_test.dart | 4 +- .../screenshot_ddc_library_bundle_test.dart | 4 +- .../integration/variable_scope_amd_test.dart | 4 +- ...ariable_scope_ddc_library_bundle_test.dart | 4 +- webdev/test/breakpoint_amd_test.dart | 32 + .../breakpoint_ddc_library_bundle_test.dart | 40 + webdev/test/callstack_amd_test.dart | 32 + .../callstack_ddc_library_bundle_test.dart | 40 + .../test}/chrome_proxy_service_amd_test.dart | 0 ...proxy_service_ddc_library_bundle_test.dart | 56 + webdev/test/circular_evaluate_amd_test.dart | 30 + ...ular_evaluate_ddc_library_bundle_test.dart | 38 + webdev/test/class_inspection_amd_test.dart | 54 + ...ss_inspection_ddc_library_bundle_test.dart | 54 + webdev/test/dart_uri_file_uri_amd_test.dart | 29 + ..._uri_file_uri_ddc_library_bundle_test.dart | 37 + webdev/test/dot_shorthands_amd_test.dart | 54 + ...ot_shorthands_ddc_library_bundle_test.dart | 54 + webdev/test/evaluate_amd_test.dart | 33 + .../evaluate_ddc_library_bundle_test.dart | 43 + webdev/test/events_amd_test.dart | 24 + .../test/events_ddc_library_bundle_test.dart | 32 + ...d_breakpoints_ddc_library_bundle_test.dart | 34 + .../hot_reload_ddc_library_bundle_test.dart | 34 + .../test}/hot_restart_amd_test.dart | 0 ...t_breakpoints_ddc_library_bundle_test.dart | 38 + .../hot_restart_correctness_amd_test.dart | 0 ...t_correctness_ddc_library_bundle_test.dart | 52 + .../hot_restart_ddc_library_bundle_test.dart | 53 + webdev/test/instance_amd_test.dart | 66 + .../instance_ddc_library_bundle_test.dart | 53 + webdev/test/instance_inspection_amd_test.dart | 54 + ...ce_inspection_ddc_library_bundle_test.dart | 54 + webdev/test/listviews_amd_test.dart | 29 + .../listviews_ddc_library_bundle_test.dart | 37 + webdev/test/load_strategy_amd_test.dart | 32 + ...load_strategy_ddc_library_bundle_test.dart | 40 + webdev/test/parts_evaluate_amd_test.dart | 30 + ...arts_evaluate_ddc_library_bundle_test.dart | 38 + webdev/test/patterns_inspection_amd_test.dart | 54 + ...ns_inspection_ddc_library_bundle_test.dart | 54 + webdev/test/record_inspection_amd_test.dart | 54 + ...rd_inspection_ddc_library_bundle_test.dart | 51 + .../test/record_type_inspection_amd_test.dart | 54 + ...pe_inspection_ddc_library_bundle_test.dart | 54 + webdev/test/type_inspection_amd_test.dart | 54 + ...pe_inspection_ddc_library_bundle_test.dart | 54 + 98 files changed, 2763 insertions(+), 2414 deletions(-) create mode 100644 webdev/test/breakpoint_amd_test.dart create mode 100644 webdev/test/breakpoint_ddc_library_bundle_test.dart create mode 100644 webdev/test/callstack_amd_test.dart create mode 100644 webdev/test/callstack_ddc_library_bundle_test.dart rename {dwds/test/integration => webdev/test}/chrome_proxy_service_amd_test.dart (100%) create mode 100644 webdev/test/chrome_proxy_service_ddc_library_bundle_test.dart create mode 100644 webdev/test/circular_evaluate_amd_test.dart create mode 100644 webdev/test/circular_evaluate_ddc_library_bundle_test.dart create mode 100644 webdev/test/class_inspection_amd_test.dart create mode 100644 webdev/test/class_inspection_ddc_library_bundle_test.dart create mode 100644 webdev/test/dart_uri_file_uri_amd_test.dart create mode 100644 webdev/test/dart_uri_file_uri_ddc_library_bundle_test.dart create mode 100644 webdev/test/dot_shorthands_amd_test.dart create mode 100644 webdev/test/dot_shorthands_ddc_library_bundle_test.dart create mode 100644 webdev/test/evaluate_amd_test.dart create mode 100644 webdev/test/evaluate_ddc_library_bundle_test.dart create mode 100644 webdev/test/events_amd_test.dart create mode 100644 webdev/test/events_ddc_library_bundle_test.dart create mode 100644 webdev/test/hot_reload_breakpoints_ddc_library_bundle_test.dart create mode 100644 webdev/test/hot_reload_ddc_library_bundle_test.dart rename {dwds/test/integration => webdev/test}/hot_restart_amd_test.dart (100%) create mode 100644 webdev/test/hot_restart_breakpoints_ddc_library_bundle_test.dart rename {dwds/test/integration => webdev/test}/hot_restart_correctness_amd_test.dart (100%) create mode 100644 webdev/test/hot_restart_correctness_ddc_library_bundle_test.dart create mode 100644 webdev/test/hot_restart_ddc_library_bundle_test.dart create mode 100644 webdev/test/instance_amd_test.dart create mode 100644 webdev/test/instance_ddc_library_bundle_test.dart create mode 100644 webdev/test/instance_inspection_amd_test.dart create mode 100644 webdev/test/instance_inspection_ddc_library_bundle_test.dart create mode 100644 webdev/test/listviews_amd_test.dart create mode 100644 webdev/test/listviews_ddc_library_bundle_test.dart create mode 100644 webdev/test/load_strategy_amd_test.dart create mode 100644 webdev/test/load_strategy_ddc_library_bundle_test.dart create mode 100644 webdev/test/parts_evaluate_amd_test.dart create mode 100644 webdev/test/parts_evaluate_ddc_library_bundle_test.dart create mode 100644 webdev/test/patterns_inspection_amd_test.dart create mode 100644 webdev/test/patterns_inspection_ddc_library_bundle_test.dart create mode 100644 webdev/test/record_inspection_amd_test.dart create mode 100644 webdev/test/record_inspection_ddc_library_bundle_test.dart create mode 100644 webdev/test/record_type_inspection_amd_test.dart create mode 100644 webdev/test/record_type_inspection_ddc_library_bundle_test.dart create mode 100644 webdev/test/type_inspection_amd_test.dart create mode 100644 webdev/test/type_inspection_ddc_library_bundle_test.dart diff --git a/dwds/lib/src/handlers/injected_client_js.dart b/dwds/lib/src/handlers/injected_client_js.dart index 93c9b319b6..06635d89ca 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.14.0-edge.30b941a500c61ffb45fe23e49ae0576eada8d371.\n" +const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-values), the Dart to JavaScript compiler version: 3.14.0-edge.49708da8bbb61fcaf57229ecfad88ee2db967f44.\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" @@ -3830,15 +3830,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return A._TimerImpl\$(milliseconds < 0 ? 0 : milliseconds, callback);\n" " },\n" " _TimerImpl\$(milliseconds, callback) {\n" -" var t1 = new A._TimerImpl(true);\n" +" var t1 = new A._TimerImpl();\n" " t1._TimerImpl\$2(milliseconds, callback);\n" " return t1;\n" " },\n" -" _TimerImpl\$periodic(milliseconds, callback) {\n" -" var t1 = new A._TimerImpl(false);\n" -" t1._TimerImpl\$periodic\$2(milliseconds, callback);\n" -" return t1;\n" -" },\n" " _makeAsyncAwaitCompleter(\$T) {\n" " return new A._AsyncAwaitCompleter(new A._Future(\$.Zone__current, \$T._eval\$1(\"_Future<0>\")), \$T._eval\$1(\"_AsyncAwaitCompleter<0>\"));\n" " },\n" @@ -3876,91 +3871,20 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " _wrapJsFunctionForAsync(\$function) {\n" " var \$protected = function(fn, ERROR) {\n" -" return function(errorCode, result) {\n" -" while (true) {\n" -" try {\n" -" fn(errorCode, result);\n" -" break;\n" -" } catch (error) {\n" -" result = error;\n" -" errorCode = ERROR;\n" +" return function(errorCode, result) {\n" +" while (true) {\n" +" try {\n" +" fn(errorCode, result);\n" +" break;\n" +" } catch (error) {\n" +" result = error;\n" +" errorCode = ERROR;\n" +" }\n" " }\n" -" }\n" -" };\n" -" }(\$function, 1);\n" -" return \$.Zone__current.registerBinaryCallback\$3\$1(new A._wrapJsFunctionForAsync_closure(\$protected), type\$.void, type\$.int, type\$.dynamic);\n" -" },\n" -" _asyncStarHelper(object, bodyFunctionOrErrorCode, controller) {\n" -" var t1, t2, t3,\n" -" _s10_ = \"controller\";\n" -" if (bodyFunctionOrErrorCode === 0) {\n" -" t1 = controller.cancelationFuture;\n" -" if (t1 != null)\n" -" t1._completeWithValue\$1(null);\n" -" else {\n" -" t1 = controller.___AsyncStarStreamController_controller_A;\n" -" t1 === \$ && A.throwLateFieldNI(_s10_);\n" -" t1.close\$0();\n" -" }\n" -" return;\n" -" } else if (bodyFunctionOrErrorCode === 1) {\n" -" t1 = controller.cancelationFuture;\n" -" if (t1 != null) {\n" -" t2 = A.unwrapException(object);\n" -" t3 = A.getTraceFromException(object);\n" -" t1._completeErrorObject\$1(new A.AsyncError(t2, t3));\n" -" } else {\n" -" t1 = A.unwrapException(object);\n" -" t2 = A.getTraceFromException(object);\n" -" t3 = controller.___AsyncStarStreamController_controller_A;\n" -" t3 === \$ && A.throwLateFieldNI(_s10_);\n" -" t3.addError\$2(t1, t2);\n" -" controller.___AsyncStarStreamController_controller_A.close\$0();\n" -" }\n" -" return;\n" -" }\n" -" type\$.void_Function_int_dynamic._as(bodyFunctionOrErrorCode);\n" -" if (object instanceof A._IterationMarker) {\n" -" if (controller.cancelationFuture != null) {\n" -" bodyFunctionOrErrorCode.call\$2(2, null);\n" -" return;\n" -" }\n" -" t1 = object.state;\n" -" if (t1 === 0) {\n" -" t1 = object.value;\n" -" t2 = controller.___AsyncStarStreamController_controller_A;\n" -" t2 === \$ && A.throwLateFieldNI(_s10_);\n" -" t2.add\$1(0, controller.\$ti._precomputed1._as(t1));\n" -" A.scheduleMicrotask(new A._asyncStarHelper_closure(controller, bodyFunctionOrErrorCode));\n" -" return;\n" -" } else if (t1 === 1) {\n" -" t1 = controller.\$ti._eval\$1(\"Stream<1>\")._as(type\$.Stream_dynamic._as(object.value));\n" -" t2 = controller.___AsyncStarStreamController_controller_A;\n" -" t2 === \$ && A.throwLateFieldNI(_s10_);\n" -" t2.addStream\$2\$cancelOnError(t1, false).then\$1\$1(new A._asyncStarHelper_closure0(controller, bodyFunctionOrErrorCode), type\$.Null);\n" -" return;\n" -" }\n" -" }\n" -" A._awaitOnObject(object, bodyFunctionOrErrorCode);\n" -" },\n" -" _streamOfController(controller) {\n" -" var t1 = controller.___AsyncStarStreamController_controller_A;\n" -" t1 === \$ && A.throwLateFieldNI(\"controller\");\n" -" return new A._ControllerStream(t1, A._instanceType(t1)._eval\$1(\"_ControllerStream<1>\"));\n" -" },\n" -" _AsyncStarStreamController\$(body, \$T) {\n" -" var t1 = new A._AsyncStarStreamController(\$T._eval\$1(\"_AsyncStarStreamController<0>\"));\n" -" t1._AsyncStarStreamController\$1(body, \$T);\n" -" return t1;\n" -" },\n" -" _makeAsyncStarStreamController(body, \$T) {\n" -" return A._AsyncStarStreamController\$(body, \$T);\n" -" },\n" -" _IterationMarker_yieldStar(values) {\n" -" return new A._IterationMarker(values, 1);\n" -" },\n" -" _IterationMarker_yieldSingle(value) {\n" -" return new A._IterationMarker(value, 0);\n" +" };\n" +" }(\$function, 1),\n" +" t1 = \$.Zone__current;\n" +" return t1._registerBinaryCallbackZoned\$3\$2(t1, type\$.void_Function_int_dynamic._as(new A._wrapJsFunctionForAsync_closure(\$protected)), type\$.void, type\$.int, type\$.dynamic);\n" " },\n" " AsyncError_defaultStackTrace(error) {\n" " var stackTrace;\n" @@ -4016,9 +3940,9 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _interceptError(error, stackTrace) {\n" " var replacement, t1, t2,\n" " zone = \$.Zone__current;\n" -" if (zone === B.C__RootZone)\n" +" if (zone === B.Zone_jYP)\n" " return null;\n" -" replacement = zone.errorCallback\$2(error, stackTrace);\n" +" replacement = zone._errorCallbackZoned\$3(zone, error, stackTrace);\n" " if (replacement == null)\n" " return null;\n" " t1 = replacement.error;\n" @@ -4029,7 +3953,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " _interceptUserError(error, stackTrace) {\n" " var replacement;\n" -" if (\$.Zone__current !== B.C__RootZone) {\n" +" if (\$.Zone__current !== B.Zone_jYP) {\n" " replacement = A._interceptError(error, stackTrace);\n" " if (replacement != null)\n" " return replacement;\n" @@ -4055,7 +3979,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return t1;\n" " },\n" " _Future__chainCoreFuture(source, target, sync) {\n" -" var t2, t3, ignoreError, listeners, _box_0 = {},\n" +" var t2, t3, ignoreError, listeners, targetZone, _box_0 = {},\n" " t1 = _box_0.source = source;\n" " for (t2 = type\$._Future_dynamic; t3 = t1._state, (t3 & 4) !== 0; t1 = source) {\n" " source = t2._as(t1._resultOrListeners);\n" @@ -4089,7 +4013,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return;\n" " }\n" " target._state ^= 2;\n" -" target._zone.scheduleMicrotask\$1(new A._Future__chainCoreFuture_closure(_box_0, target));\n" +" targetZone = target._zone;\n" +" targetZone._scheduleMicrotaskZoned\$2(targetZone, new A._Future__chainCoreFuture_closure(_box_0, target));\n" " },\n" " _Future__propagateToListeners(source, listeners) {\n" " var t2, t3, _box_0, t4, t5, hasError, asyncError, nextListener, nextListener0, sourceResult, t6, zone, oldZone, result, current, _box_1 = {},\n" @@ -4102,7 +4027,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " if (listeners == null) {\n" " if (hasError && (t4 & 1) === 0) {\n" " asyncError = t2._as(t1._resultOrListeners);\n" -" t1._zone.handleUncaughtError\$2(asyncError.error, asyncError.stackTrace);\n" +" t1 = t1._zone;\n" +" t1._handleUncaughtErrorZoned\$3(t1, asyncError.error, asyncError.stackTrace);\n" " }\n" " return;\n" " }\n" @@ -4125,15 +4051,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t6 = true;\n" " if (t6) {\n" " zone = t1.result._zone;\n" -" if (hasError) {\n" +" if (hasError && t4._zone._handleUncaughtErrorFunction != zone._handleUncaughtErrorFunction) {\n" +" t2._as(sourceResult);\n" " t1 = t4._zone;\n" -" t1 = !(t1 === zone || t1.get\$errorZone() === zone.get\$errorZone());\n" -" } else\n" -" t1 = false;\n" -" if (t1) {\n" -" t1 = _box_1.source;\n" -" asyncError = t2._as(t1._resultOrListeners);\n" -" t1._zone.handleUncaughtError\$2(asyncError.error, asyncError.stackTrace);\n" +" t1._handleUncaughtErrorZoned\$3(t1, sourceResult.error, sourceResult.stackTrace);\n" " return;\n" " }\n" " oldZone = \$.Zone__current;\n" @@ -4141,7 +4062,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " \$.Zone__current = zone;\n" " else\n" " oldZone = null;\n" -" t1 = _box_0.listener.state;\n" +" t1 = t1.state;\n" " if ((t1 & 15) === 8)\n" " new A._Future__propagateToListeners_handleWhenCompleteCallback(_box_0, _box_1, hasError).call\$0();\n" " else if (t5) {\n" @@ -4192,10 +4113,12 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " },\n" " _registerErrorHandler(errorHandler, zone) {\n" -" if (type\$.dynamic_Function_Object_StackTrace._is(errorHandler))\n" -" return zone.registerBinaryCallback\$3\$1(errorHandler, type\$.dynamic, type\$.Object, type\$.StackTrace);\n" -" if (type\$.dynamic_Function_Object._is(errorHandler))\n" -" return zone.registerUnaryCallback\$2\$1(errorHandler, type\$.dynamic, type\$.Object);\n" +" var t1 = type\$.dynamic_Function_Object_StackTrace;\n" +" if (t1._is(errorHandler))\n" +" return zone._registerBinaryCallbackZoned\$3\$2(zone, t1._as(errorHandler), type\$.dynamic, type\$.Object, type\$.StackTrace);\n" +" t1 = type\$.dynamic_Function_Object;\n" +" if (t1._is(errorHandler))\n" +" return zone._registerUnaryCallbackZoned\$2\$2(zone, t1._as(errorHandler), type\$.dynamic, type\$.Object);\n" " throw A.wrapException(A.ArgumentError\$value(errorHandler, \"onError\", string\$.Error_));\n" " },\n" " _microtaskLoop() {\n" @@ -4252,32 +4175,27 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " },\n" " scheduleMicrotask(callback) {\n" -" var t1, _null = null,\n" -" currentZone = \$.Zone__current;\n" -" if (B.C__RootZone === currentZone) {\n" -" A._rootScheduleMicrotask(_null, _null, B.C__RootZone, callback);\n" +" var currentZone = \$.Zone__current;\n" +" if (B.Zone_jYP === currentZone) {\n" +" A._rootScheduleMicrotask(B.Zone_jYP, callback);\n" " return;\n" " }\n" -" if (B.C__RootZone === currentZone.get\$_scheduleMicrotask().zone)\n" -" t1 = B.C__RootZone.get\$errorZone() === currentZone.get\$errorZone();\n" -" else\n" -" t1 = false;\n" -" if (t1) {\n" -" A._rootScheduleMicrotask(_null, _null, currentZone, currentZone.registerCallback\$1\$1(callback, type\$.void));\n" +" if (currentZone._scheduleMicrotaskFunction == null && currentZone._handleUncaughtErrorFunction == null) {\n" +" A._rootScheduleMicrotask(currentZone, currentZone._registerCallbackZoned\$1\$2(currentZone, callback, type\$.void));\n" " return;\n" " }\n" -" t1 = \$.Zone__current;\n" -" t1.scheduleMicrotask\$1(t1.bindCallbackGuarded\$1(callback));\n" +" currentZone._scheduleMicrotaskZoned\$2(currentZone, currentZone.bindCallbackGuarded\$1(callback));\n" " },\n" " StreamIterator_StreamIterator(stream, \$T) {\n" " A.checkNotNullable(stream, \"stream\", type\$.Object);\n" " return new A._StreamIterator(\$T._eval\$1(\"_StreamIterator<0>\"));\n" " },\n" -" StreamController_StreamController(onCancel, onListen, onResume, \$T) {\n" -" return new A._AsyncStreamController(onListen, null, onResume, onCancel, \$T._eval\$1(\"_AsyncStreamController<0>\"));\n" +" StreamController_StreamController(\$T) {\n" +" var _null = null;\n" +" return new A._AsyncStreamController(_null, _null, _null, _null, \$T._eval\$1(\"_AsyncStreamController<0>\"));\n" " },\n" " _runGuarded(notificationHandler) {\n" -" var e, s, exception;\n" +" var e, s, exception, t1;\n" " if (notificationHandler == null)\n" " return;\n" " try {\n" @@ -4285,31 +4203,31 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" -" \$.Zone__current.handleUncaughtError\$2(e, s);\n" +" t1 = \$.Zone__current;\n" +" t1._handleUncaughtErrorZoned\$3(t1, A._asObject(e), type\$.StackTrace._as(s));\n" " }\n" " },\n" -" _AddStreamState_makeErrorHandler(controller) {\n" -" return new A._AddStreamState_makeErrorHandler_closure(controller);\n" -" },\n" " _BufferingStreamSubscription__registerDataHandler(zone, handleData, \$T) {\n" " var t1 = handleData == null ? A.async___nullDataHandler\$closure() : handleData;\n" -" return zone.registerUnaryCallback\$2\$1(t1, type\$.void, \$T);\n" +" return zone._registerUnaryCallbackZoned\$2\$2(zone, type\$.\$env_1_1_void._bind\$1(\$T)._eval\$1(\"1(2)\")._as(t1), type\$.void, \$T);\n" " },\n" " _BufferingStreamSubscription__registerErrorHandler(zone, handleError) {\n" " if (handleError == null)\n" " handleError = A.async___nullErrorHandler\$closure();\n" " if (type\$.void_Function_Object_StackTrace._is(handleError))\n" -" return zone.registerBinaryCallback\$3\$1(handleError, type\$.dynamic, type\$.Object, type\$.StackTrace);\n" +" return zone._registerBinaryCallbackZoned\$3\$2(zone, type\$.dynamic_Function_Object_StackTrace._as(handleError), type\$.dynamic, type\$.Object, type\$.StackTrace);\n" " if (type\$.void_Function_Object._is(handleError))\n" -" return zone.registerUnaryCallback\$2\$1(handleError, type\$.dynamic, type\$.Object);\n" +" return zone._registerUnaryCallbackZoned\$2\$2(zone, type\$.dynamic_Function_Object._as(handleError), type\$.dynamic, type\$.Object);\n" " throw A.wrapException(A.ArgumentError\$(string\$.handle, null));\n" " },\n" " _nullDataHandler(value) {\n" " },\n" " _nullErrorHandler(error, stackTrace) {\n" +" var t1;\n" " A._asObject(error);\n" " type\$.StackTrace._as(stackTrace);\n" -" \$.Zone__current.handleUncaughtError\$2(error, stackTrace);\n" +" t1 = \$.Zone__current;\n" +" t1._handleUncaughtErrorZoned\$3(t1, error, stackTrace);\n" " },\n" " _nullDoneHandler() {\n" " },\n" @@ -4322,34 +4240,35 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " Timer_Timer(duration, callback) {\n" " var t1 = \$.Zone__current;\n" -" if (t1 === B.C__RootZone)\n" -" return t1.createTimer\$2(duration, callback);\n" -" return t1.createTimer\$2(duration, t1.bindCallbackGuarded\$1(callback));\n" +" if (t1 === B.Zone_jYP)\n" +" return t1._createTimerZoned\$3(t1, duration, type\$.void_Function._as(callback));\n" +" return t1._createTimerZoned\$3(t1, duration, type\$.void_Function._as(t1.bindCallbackGuarded\$1(callback)));\n" " },\n" " runZonedGuarded(body, onError, \$R) {\n" -" var error, stackTrace, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, exception, _null = null, zoneSpecification = null, zoneValues = null,\n" +" var error, stackTrace, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, newZone, exception, _null = null, zoneSpecification = null, zoneValues = null,\n" " parentZone = \$.Zone__current,\n" -" errorHandler = new A.runZonedGuarded_closure(parentZone, onError);\n" +" t1 = new A.runZonedGuarded_errorHandler(parentZone, onError);\n" " if (zoneSpecification == null)\n" -" zoneSpecification = new A.ZoneSpecification(errorHandler, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null);\n" +" zoneSpecification = new A.ZoneSpecification(t1, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null);\n" " else {\n" -" t1 = zoneSpecification;\n" -" t2 = t1.run;\n" -" t3 = t1.runUnary;\n" -" t4 = t1.runBinary;\n" -" t5 = t1.registerCallback;\n" -" t6 = t1.registerUnaryCallback;\n" -" t7 = t1.registerBinaryCallback;\n" -" t8 = t1.errorCallback;\n" -" t9 = t1.scheduleMicrotask;\n" -" t10 = t1.createTimer;\n" -" t11 = t1.createPeriodicTimer;\n" -" t12 = t1.print;\n" -" t1 = t1.fork;\n" -" zoneSpecification = new A.ZoneSpecification(errorHandler, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t1);\n" +" t2 = zoneSpecification;\n" +" t3 = t2.run;\n" +" t4 = t2.runUnary;\n" +" t5 = t2.runBinary;\n" +" t6 = t2.registerCallback;\n" +" t7 = t2.registerUnaryCallback;\n" +" t8 = t2.registerBinaryCallback;\n" +" t9 = t2.errorCallback;\n" +" t10 = t2.scheduleMicrotask;\n" +" t11 = t2.createTimer;\n" +" t12 = t2.createPeriodicTimer;\n" +" t13 = t2.print;\n" +" t2 = t2.fork;\n" +" zoneSpecification = new A.ZoneSpecification(t1, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t2);\n" " }\n" " try {\n" -" t1 = parentZone.fork\$2\$specification\$zoneValues(zoneSpecification, zoneValues).run\$1\$1(body, \$R);\n" +" newZone = parentZone._forkZoned\$3(parentZone, zoneSpecification, zoneValues);\n" +" t1 = newZone._runZoned\$1\$2(newZone, body, \$R);\n" " return t1;\n" " } catch (exception) {\n" " error = A.unwrapException(exception);\n" @@ -4358,125 +4277,22 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " return _null;\n" " },\n" -" _rootHandleUncaughtError(\$self, \$parent, zone, error, stackTrace) {\n" -" A._rootHandleError(error, stackTrace);\n" -" },\n" -" _rootHandleError(error, stackTrace) {\n" -" A._schedulePriorityAsyncCallback(new A._rootHandleError_closure(error, stackTrace));\n" -" },\n" -" _rootRun(\$self, \$parent, zone, f, \$R) {\n" -" var old, t1;\n" -" type\$.nullable_Zone._as(\$self);\n" -" type\$.nullable_ZoneDelegate._as(\$parent);\n" -" type\$.Zone._as(zone);\n" -" \$R._eval\$1(\"0()\")._as(f);\n" -" t1 = \$.Zone__current;\n" -" if (t1 === zone)\n" -" return f.call\$0();\n" -" \$.Zone__current = zone;\n" -" old = t1;\n" -" try {\n" -" t1 = f.call\$0();\n" -" return t1;\n" -" } finally {\n" -" \$.Zone__current = old;\n" -" }\n" +" ZoneDelegate\$_() {\n" +" return new A.ZoneDelegate(B.Zone_jYP);\n" " },\n" -" _rootRunUnary(\$self, \$parent, zone, f, arg, \$R, \$T) {\n" -" var old, t1;\n" -" type\$.nullable_Zone._as(\$self);\n" -" type\$.nullable_ZoneDelegate._as(\$parent);\n" -" type\$.Zone._as(zone);\n" -" \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(f);\n" -" \$T._as(arg);\n" -" t1 = \$.Zone__current;\n" -" if (t1 === zone)\n" -" return f.call\$1(arg);\n" -" \$.Zone__current = zone;\n" -" old = t1;\n" -" try {\n" -" t1 = f.call\$1(arg);\n" -" return t1;\n" -" } finally {\n" -" \$.Zone__current = old;\n" -" }\n" +" _rootHandleUncaughtError(error, stackTrace) {\n" +" A._schedulePriorityAsyncCallback(new A._rootHandleUncaughtError_closure(error, stackTrace));\n" " },\n" -" _rootRunBinary(\$self, \$parent, zone, f, arg1, arg2, \$R, \$T1, \$T2) {\n" -" var old, t1;\n" -" type\$.nullable_Zone._as(\$self);\n" -" type\$.nullable_ZoneDelegate._as(\$parent);\n" -" type\$.Zone._as(zone);\n" -" \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(f);\n" -" \$T1._as(arg1);\n" -" \$T2._as(arg2);\n" -" t1 = \$.Zone__current;\n" -" if (t1 === zone)\n" -" return f.call\$2(arg1, arg2);\n" -" \$.Zone__current = zone;\n" -" old = t1;\n" -" try {\n" -" t1 = f.call\$2(arg1, arg2);\n" -" return t1;\n" -" } finally {\n" -" \$.Zone__current = old;\n" -" }\n" -" },\n" -" _rootRegisterCallback(\$self, \$parent, zone, f, \$R) {\n" -" var t1 = type\$.Zone;\n" -" t1._as(\$self);\n" -" type\$.ZoneDelegate._as(\$parent);\n" -" t1._as(zone);\n" -" return \$R._eval\$1(\"0()\")._as(f);\n" -" },\n" -" _rootRegisterUnaryCallback(\$self, \$parent, zone, f, \$R, \$T) {\n" -" var t1 = type\$.Zone;\n" -" t1._as(\$self);\n" -" type\$.ZoneDelegate._as(\$parent);\n" -" t1._as(zone);\n" -" return \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(f);\n" -" },\n" -" _rootRegisterBinaryCallback(\$self, \$parent, zone, f, \$R, \$T1, \$T2) {\n" -" var t1 = type\$.Zone;\n" -" t1._as(\$self);\n" -" type\$.ZoneDelegate._as(\$parent);\n" -" t1._as(zone);\n" -" return \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(f);\n" -" },\n" -" _rootErrorCallback(\$self, \$parent, zone, error, stackTrace) {\n" -" var t1 = type\$.Zone;\n" -" t1._as(\$self);\n" -" type\$.ZoneDelegate._as(\$parent);\n" -" t1._as(zone);\n" -" A._asObject(error);\n" -" type\$.nullable_StackTrace._as(stackTrace);\n" -" return null;\n" +" _rootScheduleMicrotask(zone, callback) {\n" +" if (B.Zone_jYP !== zone)\n" +" callback = zone._handleUncaughtErrorFunction != null ? zone.bindCallbackGuarded\$1(callback) : zone.bindCallback\$1\$1(callback, type\$.void);\n" +" A._scheduleAsyncCallback(callback);\n" " },\n" -" _rootScheduleMicrotask(\$self, \$parent, zone, f) {\n" -" var t1, t2;\n" -" type\$.void_Function._as(f);\n" -" if (B.C__RootZone !== zone) {\n" -" t1 = B.C__RootZone.get\$errorZone();\n" -" t2 = zone.get\$errorZone();\n" -" f = t1 !== t2 ? zone.bindCallbackGuarded\$1(f) : zone.bindCallback\$1\$1(f, type\$.void);\n" -" }\n" -" A._scheduleAsyncCallback(f);\n" -" },\n" -" _rootCreateTimer(\$self, \$parent, zone, duration, callback) {\n" -" callback = zone.bindCallback\$1\$1(type\$.void_Function._as(callback), type\$.void);\n" -" return A.Timer__createTimer(duration, callback);\n" -" },\n" -" _rootCreatePeriodicTimer(\$self, \$parent, zone, duration, callback) {\n" -" var milliseconds;\n" -" callback = zone.bindUnaryCallback\$2\$1(type\$.void_Function_Timer._as(callback), type\$.void, type\$.Timer);\n" -" milliseconds = duration.get\$inMilliseconds();\n" -" return A._TimerImpl\$periodic(milliseconds.\$lt(0, 0) ? 0 : milliseconds, callback);\n" -" },\n" -" _rootPrint(\$self, \$parent, zone, line) {\n" -" A.printString(line);\n" -" },\n" -" _rootFork(\$self, \$parent, zone, specification, zoneValues) {\n" -" var t1 = new A._CustomZone(zone.get\$_run(), zone.get\$_runUnary(), zone.get\$_runBinary(), zone.get\$_registerCallback(), zone.get\$_registerUnaryCallback(), zone.get\$_registerBinaryCallback(), zone.get\$_errorCallback(), zone.get\$_scheduleMicrotask(), zone.get\$_createTimer(), zone.get\$_createPeriodicTimer(), zone.get\$_print(), zone.get\$_fork(), zone.get\$_handleUncaughtError(), zone.get\$_zoneValues(), zone);\n" -" t1._handleUncaughtError = new A._ZoneHandleUncaughtError(t1, specification.handleUncaughtError);\n" +" _rootFork(zone, specification, zoneValues) {\n" +" var t1 = new A.ZoneDelegate(B.Zone_jYP),\n" +" t2 = new A._ZoneHandleUncaughtError(B.Zone_jYP, specification.handleUncaughtError);\n" +" t1 = t1._zone = new A.Zone(zone, t1, zone._runFunction, zone._runUnaryFunction, zone._runBinaryFunction, zone._registerCallbackFunction, zone._registerUnaryCallbackFunction, zone._registerBinaryCallbackFunction, zone._errorCallbackFunction, zone._scheduleMicrotaskFunction, zone._createTimerFunction, zone._createPeriodicTimerFunction, zone._printFunction, zone._forkFunction, t2, zone._zoneValues);\n" +" t2.zone = t1;\n" " return t1;\n" " },\n" " _AsyncRun__initializeScheduleImmediate_internalCallback: function _AsyncRun__initializeScheduleImmediate_internalCallback(t0) {\n" @@ -4493,22 +4309,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _AsyncRun__scheduleImmediateWithSetImmediate_internalCallback: function _AsyncRun__scheduleImmediateWithSetImmediate_internalCallback(t0) {\n" " this.callback = t0;\n" " },\n" -" _TimerImpl: function _TimerImpl(t0) {\n" -" this._once = t0;\n" +" _TimerImpl: function _TimerImpl() {\n" " this._handle = null;\n" -" this._tick = 0;\n" " },\n" " _TimerImpl_internalCallback: function _TimerImpl_internalCallback(t0, t1) {\n" " this.\$this = t0;\n" " this.callback = t1;\n" " },\n" -" _TimerImpl\$periodic_closure: function _TimerImpl\$periodic_closure(t0, t1, t2, t3) {\n" -" var _ = this;\n" -" _.\$this = t0;\n" -" _.milliseconds = t1;\n" -" _.start = t2;\n" -" _.callback = t3;\n" -" },\n" " _AsyncAwaitCompleter: function _AsyncAwaitCompleter(t0, t1) {\n" " this._future = t0;\n" " this.isSync = false;\n" @@ -4523,45 +4330,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _wrapJsFunctionForAsync_closure: function _wrapJsFunctionForAsync_closure(t0) {\n" " this.\$protected = t0;\n" " },\n" -" _asyncStarHelper_closure: function _asyncStarHelper_closure(t0, t1) {\n" -" this.controller = t0;\n" -" this.bodyFunction = t1;\n" -" },\n" -" _asyncStarHelper_closure0: function _asyncStarHelper_closure0(t0, t1) {\n" -" this.controller = t0;\n" -" this.bodyFunction = t1;\n" -" },\n" -" _AsyncStarStreamController: function _AsyncStarStreamController(t0) {\n" -" var _ = this;\n" -" _.___AsyncStarStreamController_controller_A = \$;\n" -" _.isSuspended = false;\n" -" _.cancelationFuture = null;\n" -" _.\$ti = t0;\n" -" },\n" -" _AsyncStarStreamController__resumeBody: function _AsyncStarStreamController__resumeBody(t0) {\n" -" this.body = t0;\n" -" },\n" -" _AsyncStarStreamController__resumeBody_closure: function _AsyncStarStreamController__resumeBody_closure(t0) {\n" -" this.body = t0;\n" -" },\n" -" _AsyncStarStreamController_closure0: function _AsyncStarStreamController_closure0(t0) {\n" -" this._resumeBody = t0;\n" -" },\n" -" _AsyncStarStreamController_closure1: function _AsyncStarStreamController_closure1(t0, t1) {\n" -" this.\$this = t0;\n" -" this._resumeBody = t1;\n" -" },\n" -" _AsyncStarStreamController_closure: function _AsyncStarStreamController_closure(t0, t1) {\n" -" this.\$this = t0;\n" -" this.body = t1;\n" -" },\n" -" _AsyncStarStreamController__closure: function _AsyncStarStreamController__closure(t0) {\n" -" this.body = t0;\n" -" },\n" -" _IterationMarker: function _IterationMarker(t0, t1) {\n" -" this.value = t0;\n" -" this.state = t1;\n" -" },\n" " AsyncError: function AsyncError(t0, t1) {\n" " this.error = t0;\n" " this.stackTrace = t1;\n" @@ -4721,21 +4489,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this._async\$_target = t0;\n" " this.\$ti = t1;\n" " },\n" -" _AddStreamState: function _AddStreamState() {\n" -" },\n" -" _AddStreamState_makeErrorHandler_closure: function _AddStreamState_makeErrorHandler_closure(t0) {\n" -" this.controller = t0;\n" -" },\n" -" _AddStreamState_cancel_closure: function _AddStreamState_cancel_closure(t0) {\n" -" this.\$this = t0;\n" -" },\n" -" _StreamControllerAddStreamState: function _StreamControllerAddStreamState(t0, t1, t2, t3) {\n" -" var _ = this;\n" -" _._varData = t0;\n" -" _.addStreamFuture = t1;\n" -" _.addSubscription = t2;\n" -" _.\$ti = t3;\n" -" },\n" " _BufferingStreamSubscription: function _BufferingStreamSubscription() {\n" " },\n" " _BufferingStreamSubscription_asFuture_closure: function _BufferingStreamSubscription_asFuture_closure(t0, t1) {\n" @@ -4798,6 +4551,26 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _EmptyStream: function _EmptyStream(t0) {\n" " this.\$ti = t0;\n" " },\n" +" _MultiStream: function _MultiStream(t0, t1, t2) {\n" +" this.isBroadcast = t0;\n" +" this._onListen = t1;\n" +" this.\$ti = t2;\n" +" },\n" +" _MultiStream_listen_closure: function _MultiStream_listen_closure(t0, t1) {\n" +" this.\$this = t0;\n" +" this.controller = t1;\n" +" },\n" +" _MultiStreamController: function _MultiStreamController(t0, t1, t2, t3, t4) {\n" +" var _ = this;\n" +" _._varData = null;\n" +" _._state = 0;\n" +" _._doneFuture = null;\n" +" _.onListen = t0;\n" +" _.onPause = t1;\n" +" _.onResume = t2;\n" +" _.onCancel = t3;\n" +" _.\$ti = t4;\n" +" },\n" " _cancelAndValue_closure: function _cancelAndValue_closure(t0, t1) {\n" " this.future = t0;\n" " this.value = t1;\n" @@ -4821,119 +4594,51 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this._source = t1;\n" " this.\$ti = t2;\n" " },\n" -" _ZoneRun: function _ZoneRun(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" -" _ZoneRunUnary: function _ZoneRunUnary(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" -" _ZoneRunBinary: function _ZoneRunBinary(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" -" _ZoneRegisterCallback: function _ZoneRegisterCallback(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" -" _ZoneRegisterUnaryCallback: function _ZoneRegisterUnaryCallback(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" -" _ZoneRegisterBinaryCallback: function _ZoneRegisterBinaryCallback(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" -" _ZoneErrorCallback: function _ZoneErrorCallback(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" -" _ZoneScheduleMicrotask: function _ZoneScheduleMicrotask(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" -" _ZoneCreateTimer: function _ZoneCreateTimer(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" -" _ZoneCreatePeriodicTimer: function _ZoneCreatePeriodicTimer() {\n" -" },\n" -" _ZonePrint: function _ZonePrint(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" -" _ZoneFork: function _ZoneFork(t0, t1) {\n" -" this.zone = t0;\n" -" this.\$function = t1;\n" -" },\n" " _ZoneHandleUncaughtError: function _ZoneHandleUncaughtError(t0, t1) {\n" " this.zone = t0;\n" " this.\$function = t1;\n" " },\n" -" _ZoneValues: function _ZoneValues(t0, t1) {\n" -" this.zone = t0;\n" -" this.map = t1;\n" -" },\n" -" _Zone: function _Zone() {\n" -" },\n" -" _CustomZone: function _CustomZone(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) {\n" +" Zone: function Zone(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) {\n" " var _ = this;\n" -" _._run = t0;\n" -" _._runUnary = t1;\n" -" _._runBinary = t2;\n" -" _._registerCallback = t3;\n" -" _._registerUnaryCallback = t4;\n" -" _._registerBinaryCallback = t5;\n" -" _._errorCallback = t6;\n" -" _._scheduleMicrotask = t7;\n" -" _._createTimer = t8;\n" -" _._createPeriodicTimer = t9;\n" -" _._print = t10;\n" -" _._fork = t11;\n" -" _._handleUncaughtError = t12;\n" -" _._zoneValues = t13;\n" -" _._delegateCache = null;\n" -" _.parent = t14;\n" -" },\n" -" _CustomZone_bindCallback_closure: function _CustomZone_bindCallback_closure(t0, t1, t2) {\n" +" _._parent = t0;\n" +" _._delegate = t1;\n" +" _._runFunction = t2;\n" +" _._runUnaryFunction = t3;\n" +" _._runBinaryFunction = t4;\n" +" _._registerCallbackFunction = t5;\n" +" _._registerUnaryCallbackFunction = t6;\n" +" _._registerBinaryCallbackFunction = t7;\n" +" _._errorCallbackFunction = t8;\n" +" _._scheduleMicrotaskFunction = t9;\n" +" _._createTimerFunction = t10;\n" +" _._createPeriodicTimerFunction = t11;\n" +" _._printFunction = t12;\n" +" _._forkFunction = t13;\n" +" _._handleUncaughtErrorFunction = t14;\n" +" _._zoneValues = t15;\n" +" },\n" +" Zone_bindCallback_closure: function Zone_bindCallback_closure(t0, t1, t2) {\n" " this.\$this = t0;\n" " this.registered = t1;\n" " this.R = t2;\n" " },\n" -" _CustomZone_bindCallbackGuarded_closure: function _CustomZone_bindCallbackGuarded_closure(t0, t1) {\n" +" Zone_bindCallbackGuarded_closure: function Zone_bindCallbackGuarded_closure(t0, t1) {\n" " this.\$this = t0;\n" " this.registered = t1;\n" " },\n" -" _CustomZone_bindUnaryCallbackGuarded_closure: function _CustomZone_bindUnaryCallbackGuarded_closure(t0, t1, t2) {\n" +" Zone_bindUnaryCallbackGuarded_closure: function Zone_bindUnaryCallbackGuarded_closure(t0, t1, t2) {\n" " this.\$this = t0;\n" " this.registered = t1;\n" " this.T = t2;\n" " },\n" -" _RootZone: function _RootZone() {\n" -" },\n" -" _RootZone_bindCallback_closure: function _RootZone_bindCallback_closure(t0, t1, t2) {\n" -" this.\$this = t0;\n" -" this.f = t1;\n" -" this.R = t2;\n" -" },\n" -" _RootZone_bindCallbackGuarded_closure: function _RootZone_bindCallbackGuarded_closure(t0, t1) {\n" -" this.\$this = t0;\n" -" this.f = t1;\n" -" },\n" -" _RootZone_bindUnaryCallbackGuarded_closure: function _RootZone_bindUnaryCallbackGuarded_closure(t0, t1, t2) {\n" -" this.\$this = t0;\n" -" this.f = t1;\n" -" this.T = t2;\n" -" },\n" -" runZonedGuarded_closure: function runZonedGuarded_closure(t0, t1) {\n" +" runZonedGuarded_errorHandler: function runZonedGuarded_errorHandler(t0, t1) {\n" " this.parentZone = t0;\n" " this.onError = t1;\n" " },\n" -" _ZoneDelegate: function _ZoneDelegate(t0) {\n" -" this._delegationTarget = t0;\n" +" ZoneDelegate: function ZoneDelegate(t0) {\n" +" this._zone = t0;\n" " },\n" -" _rootHandleError_closure: function _rootHandleError_closure(t0, t1) {\n" +" _rootHandleUncaughtError_closure: function _rootHandleUncaughtError_closure(t0, t1) {\n" " this.error = t0;\n" " this.stackTrace = t1;\n" " },\n" @@ -5268,7 +4973,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this._data = null;\n" " },\n" " _JsonMapKeyIterable: function _JsonMapKeyIterable(t0) {\n" -" this._parent = t0;\n" +" this._convert\$_parent = t0;\n" " },\n" " _Utf8Decoder__decoder_closure: function _Utf8Decoder__decoder_closure() {\n" " },\n" @@ -7648,35 +7353,35 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " BaseResponse: function BaseResponse() {\n" " },\n" -" _rethrowAsClientException(e, st, request) {\n" -" var t1, message;\n" -" if (type\$.JSObject._is(e))\n" -" t1 = A._asString(e.name) === \"AbortError\";\n" -" else\n" -" t1 = false;\n" -" if (t1)\n" -" A.Error_throwWithStackTrace(new A.RequestAbortedException(\"Request aborted by `abortTrigger`\", request.url), st);\n" +" _toClientException(e, request) {\n" +" var message;\n" +" if (type\$.JSObject._is(e) && \"AbortError\" === A._asString(e.name))\n" +" return new A.RequestAbortedException(\"Request aborted by `abortTrigger`\", request.url);\n" " if (!(e instanceof A.ClientException)) {\n" " message = J.toString\$0\$(e);\n" " if (B.JSString_methods.startsWith\$1(message, \"TypeError: \"))\n" " message = B.JSString_methods.substring\$1(message, 11);\n" " e = new A.ClientException(message, request.url);\n" " }\n" -" A.Error_throwWithStackTrace(e, st);\n" +" return e;\n" " },\n" -" _readBody(request, response) {\n" -" return A._readBody\$body(request, response);\n" +" _rethrowAsClientException(e, st, request) {\n" +" A.Error_throwWithStackTrace(A._toClientException(e, request), st);\n" " },\n" -" _readBody\$body(request, response) {\n" -" var \$async\$_readBody = A._wrapJsFunctionForAsync(function(\$async\$errorCode, \$async\$result) {\n" -" switch (\$async\$errorCode) {\n" -" case 2:\n" -" \$async\$next = \$async\$nextWhenCanceled;\n" -" \$async\$goto = \$async\$next.pop();\n" -" break;\n" -" case 1:\n" -" \$async\$errorStack.push(\$async\$result);\n" -" \$async\$goto = \$async\$handler;\n" +" _bodyToStream(request, response) {\n" +" return new A._MultiStream(false, new A._bodyToStream_closure(request, response), type\$._MultiStream_List_int);\n" +" },\n" +" _readStreamBody(request, response, controller) {\n" +" return A._readStreamBody\$body(request, response, controller);\n" +" },\n" +" _readStreamBody\$body(request, response, controller) {\n" +" var \$async\$goto = 0,\n" +" \$async\$completer = A._makeAsyncAwaitCompleter(type\$.void),\n" +" \$async\$returnValue, \$async\$handler = 2, \$async\$errorStack = [], chunk, e, s, t2, t3, t4, t5, exception, t6, t7, _box_0, t1, reader, \$async\$exception;\n" +" var \$async\$_readStreamBody = A._wrapJsFunctionForAsync(function(\$async\$errorCode, \$async\$result) {\n" +" if (\$async\$errorCode === 1) {\n" +" \$async\$errorStack.push(\$async\$result);\n" +" \$async\$goto = \$async\$handler;\n" " }\n" " for (;;)\n" " switch (\$async\$goto) {\n" @@ -7684,114 +7389,124 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " // Function start\n" " _box_0 = {};\n" " t1 = A._asJSObjectQ(response.body);\n" -" bodyStreamReader = t1 == null ? null : A._asJSObject(t1.getReader());\n" -" if (bodyStreamReader == null) {\n" -" // goto return\n" -" \$async\$goto = 1;\n" -" break;\n" -" }\n" -" isDone = false;\n" -" _box_0.isError = false;\n" -" \$async\$handler = 4;\n" -" t1 = type\$.NativeUint8List, t2 = type\$.JSObject;\n" -" case 7:\n" +" reader = t1 == null ? null : A._asJSObject(t1.getReader());\n" +" \$async\$goto = reader == null ? 3 : 4;\n" +" break;\n" +" case 3:\n" +" // then\n" +" \$async\$goto = 5;\n" +" return A._asyncAwait(controller.close\$0(), \$async\$_readStreamBody);\n" +" case 5:\n" +" // returning from await.\n" +" // goto return\n" +" \$async\$goto = 1;\n" +" break;\n" +" case 4:\n" +" // join\n" +" _box_0.resumeSignal = null;\n" +" _box_0.hadError = _box_0.cancelled = false;\n" +" controller.set\$onResume(new A._readStreamBody_closure(_box_0));\n" +" controller.set\$onCancel(new A._readStreamBody_closure0(_box_0, reader, request));\n" +" t1 = type\$.NativeUint8List, t2 = controller.\$ti._precomputed1, t3 = type\$.JSObject, t4 = type\$._Future_void, t5 = type\$._AsyncCompleter_void;\n" +" case 6:\n" " // for condition\n" " // trivial condition\n" -" \$async\$goto = 9;\n" -" return A._asyncStarHelper(A.promiseToFuture(A._asJSObject(bodyStreamReader.read()), t2), \$async\$_readBody, \$async\$controller);\n" -" case 9:\n" +" chunk = null;\n" +" \$async\$handler = 9;\n" +" \$async\$goto = 12;\n" +" return A._asyncAwait(A.promiseToFuture(A._asJSObject(reader.read()), t3), \$async\$_readStreamBody);\n" +" case 12:\n" " // returning from await.\n" " chunk = \$async\$result;\n" -" if (A._asBool(chunk.done)) {\n" -" isDone = true;\n" -" // goto after for\n" -" \$async\$goto = 8;\n" -" break;\n" -" }\n" -" t3 = chunk.value;\n" -" t3.toString;\n" -" \$async\$goto = 10;\n" -" \$async\$nextWhenCanceled = [1, 5];\n" -" return A._asyncStarHelper(A._IterationMarker_yieldSingle(t1._as(t3)), \$async\$_readBody, \$async\$controller);\n" -" case 10:\n" -" // after yield\n" -" // goto for condition\n" -" \$async\$goto = 7;\n" -" break;\n" -" case 8:\n" -" // after for\n" -" \$async\$next.push(6);\n" -" // goto finally\n" -" \$async\$goto = 5;\n" +" \$async\$handler = 2;\n" +" // goto after finally\n" +" \$async\$goto = 11;\n" " break;\n" -" case 4:\n" +" case 9:\n" " // catch\n" -" \$async\$handler = 3;\n" +" \$async\$handler = 8;\n" " \$async\$exception = \$async\$errorStack.pop();\n" " e = A.unwrapException(\$async\$exception);\n" -" st = A.getTraceFromException(\$async\$exception);\n" -" _box_0.isError = true;\n" -" A._rethrowAsClientException(e, st, request);\n" -" \$async\$next.push(6);\n" -" // goto finally\n" -" \$async\$goto = 5;\n" -" break;\n" -" case 3:\n" -" // uncaught\n" -" \$async\$next = [2];\n" -" case 5:\n" -" // finally\n" -" \$async\$handler = 2;\n" -" \$async\$goto = !isDone ? 11 : 12;\n" +" s = A.getTraceFromException(\$async\$exception);\n" +" \$async\$goto = !_box_0.cancelled ? 13 : 14;\n" " break;\n" -" case 11:\n" +" case 13:\n" " // then\n" -" \$async\$handler = 14;\n" -" \$async\$goto = 17;\n" -" return A._asyncStarHelper(A.promiseToFuture(A._asJSObject(bodyStreamReader.cancel()), type\$.nullable_Object).catchError\$2\$test(new A._readBody_closure(), new A._readBody_closure0(_box_0)), \$async\$_readBody, \$async\$controller);\n" -" case 17:\n" +" _box_0.hadError = true;\n" +" t1 = A._toClientException(e, request);\n" +" t2 = type\$.nullable_StackTrace._as(s);\n" +" t3 = controller._state;\n" +" if (t3 >= 4)\n" +" A.throwExpression(controller._badEventState\$0());\n" +" if ((t3 & 1) !== 0) {\n" +" t3 = controller.get\$_subscription();\n" +" t3._addError\$2(t1, t2 == null ? B._StringStackTrace_OdL : t2);\n" +" }\n" +" \$async\$goto = 15;\n" +" return A._asyncAwait(controller.close\$0(), \$async\$_readStreamBody);\n" +" case 15:\n" " // returning from await.\n" -" \$async\$handler = 2;\n" -" // goto after finally\n" -" \$async\$goto = 16;\n" -" break;\n" " case 14:\n" -" // catch\n" -" \$async\$handler = 13;\n" -" \$async\$exception1 = \$async\$errorStack.pop();\n" -" e0 = A.unwrapException(\$async\$exception1);\n" -" st0 = A.getTraceFromException(\$async\$exception1);\n" -" if (!_box_0.isError)\n" -" A._rethrowAsClientException(e0, st0, request);\n" +" // join\n" +" // goto after for\n" +" \$async\$goto = 7;\n" +" break;\n" " // goto after finally\n" -" \$async\$goto = 16;\n" +" \$async\$goto = 11;\n" " break;\n" -" case 13:\n" +" case 8:\n" " // uncaught\n" " // goto rethrow\n" " \$async\$goto = 2;\n" " break;\n" -" case 16:\n" +" case 11:\n" " // after finally\n" -" case 12:\n" -" // join\n" -" // goto the next finally handler\n" -" \$async\$goto = \$async\$next.pop();\n" +" if (A._asBool(chunk.done)) {\n" +" controller.closeSync\$0();\n" +" // goto after for\n" +" \$async\$goto = 7;\n" +" break;\n" +" } else {\n" +" t6 = chunk.value;\n" +" t6.toString;\n" +" t6 = t2._as(t1._as(t6));\n" +" t7 = controller._state;\n" +" if (t7 >= 4)\n" +" A.throwExpression(controller._badEventState\$0());\n" +" if ((t7 & 1) !== 0)\n" +" controller.get\$_subscription()._add\$1(t6);\n" +" }\n" +" t6 = controller._state;\n" +" \$async\$goto = ((t6 & 1) !== 0 ? (controller.get\$_subscription()._state & 4) !== 0 : (t6 & 2) === 0) ? 16 : 17;\n" " break;\n" -" case 6:\n" -" // after finally\n" -" case 1:\n" -" // return\n" -" return A._asyncStarHelper(null, 0, \$async\$controller);\n" -" case 2:\n" -" // rethrow\n" -" return A._asyncStarHelper(\$async\$errorStack.at(-1), 1, \$async\$controller);\n" -" }\n" +" case 16:\n" +" // then\n" +" t6 = _box_0.resumeSignal;\n" +" \$async\$goto = 18;\n" +" return A._asyncAwait((t6 == null ? _box_0.resumeSignal = new A._AsyncCompleter(new A._Future(\$.Zone__current, t4), t5) : t6).future, \$async\$_readStreamBody);\n" +" case 18:\n" +" // returning from await.\n" +" case 17:\n" +" // join\n" +" if ((controller._state & 1) === 0) {\n" +" // goto after for\n" +" \$async\$goto = 7;\n" +" break;\n" +" }\n" +" // goto for condition\n" +" \$async\$goto = 6;\n" +" break;\n" +" case 7:\n" +" // after for\n" +" case 1:\n" +" // return\n" +" return A._asyncReturn(\$async\$returnValue, \$async\$completer);\n" +" case 2:\n" +" // rethrow\n" +" return A._asyncRethrow(\$async\$errorStack.at(-1), \$async\$completer);\n" +" }\n" " });\n" -" var \$async\$goto = 0,\n" -" \$async\$controller = A._makeAsyncStarStreamController(\$async\$_readBody, type\$.List_int),\n" -" \$async\$nextWhenCanceled, \$async\$handler = 2, \$async\$errorStack = [], \$async\$next = [], isDone, chunk, e, st, e0, st0, t2, t3, exception, _box_0, t1, bodyStreamReader, \$async\$exception, \$async\$exception1;\n" -" return A._streamOfController(\$async\$controller);\n" +" return A._asyncStartSync(\$async\$_readStreamBody, \$async\$completer);\n" " },\n" " BrowserClient: function BrowserClient(t0) {\n" " this.withCredentials = false;\n" @@ -7800,10 +7515,17 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " BrowserClient_send_closure: function BrowserClient_send_closure(t0) {\n" " this.headers = t0;\n" " },\n" -" _readBody_closure: function _readBody_closure() {\n" +" _bodyToStream_closure: function _bodyToStream_closure(t0, t1) {\n" +" this.request = t0;\n" +" this.response = t1;\n" +" },\n" +" _readStreamBody_closure: function _readStreamBody_closure(t0) {\n" +" this._box_0 = t0;\n" " },\n" -" _readBody_closure0: function _readBody_closure0(t0) {\n" +" _readStreamBody_closure0: function _readStreamBody_closure0(t0, t1, t2) {\n" " this._box_0 = t0;\n" +" this.reader = t1;\n" +" this.request = t2;\n" " },\n" " ByteStream: function ByteStream(t0) {\n" " this._stream = t0;\n" @@ -8390,10 +8112,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _.text = t3;\n" " },\n" " SseClient\$(serverUrl, debugKey) {\n" -" var t3, t4, t5, _null = null,\n" +" var t3, t4, t5,\n" " t1 = type\$.String,\n" -" t2 = A.StreamController_StreamController(_null, _null, _null, t1);\n" -" t1 = A.StreamController_StreamController(_null, _null, _null, t1);\n" +" t2 = A.StreamController_StreamController(t1);\n" +" t1 = A.StreamController_StreamController(t1);\n" " t3 = A.Logger_Logger(\"SseClient\");\n" " t4 = \$.Zone__current;\n" " t5 = A.generateId();\n" @@ -8458,7 +8180,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " },\n" " _wrapZone(callback, \$T) {\n" " var t1 = \$.Zone__current;\n" -" if (t1 === B.C__RootZone)\n" +" if (t1 === B.Zone_jYP)\n" " return callback;\n" " return t1.bindUnaryCallbackGuarded\$1\$1(callback, \$T);\n" " },\n" @@ -8508,7 +8230,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t1 = type\$.JSArray_nullable_Object._as(new t1());\n" " webSocket = A._asJSObject(new t2(t3, t1));\n" " webSocket.binaryType = \"arraybuffer\";\n" -" browserSocket = new A.BrowserWebSocket(webSocket, A.StreamController_StreamController(null, null, null, type\$.WebSocketEvent));\n" +" browserSocket = new A.BrowserWebSocket(webSocket, A.StreamController_StreamController(type\$.WebSocketEvent));\n" " t1 = new A._Future(\$.Zone__current, type\$._Future_BrowserWebSocket);\n" " webSocketConnected = new A._AsyncCompleter(t1, type\$._AsyncCompleter_BrowserWebSocket);\n" " if (A._asInt(webSocket.readyState) === 1)\n" @@ -9964,12 +9686,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return result;\n" " return result + other;\n" " },\n" -" \$tdiv(receiver, other) {\n" -" if ((receiver | 0) === receiver)\n" -" if (other >= 1)\n" -" return receiver / other | 0;\n" -" return this._tdivSlow\$1(receiver, other);\n" -" },\n" " _tdivFast\$1(receiver, other) {\n" " return (receiver | 0) === receiver ? receiver / other | 0 : this._tdivSlow\$1(receiver, other);\n" " },\n" @@ -10204,20 +9920,30 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return this.__internal\$_source.cancel\$0();\n" " },\n" " onData\$1(handleData) {\n" -" var t1 = this.\$ti;\n" +" var t2,\n" +" t1 = this.\$ti;\n" " t1._eval\$1(\"~(2)?\")._as(handleData);\n" -" this.__internal\$_handleData = handleData == null ? null : this.__internal\$_zone.registerUnaryCallback\$2\$1(handleData, type\$.dynamic, t1._rest[1]);\n" +" if (handleData == null)\n" +" t1 = null;\n" +" else {\n" +" t2 = this.__internal\$_zone;\n" +" t1 = t1._rest[1];\n" +" t1 = t2._registerUnaryCallbackZoned\$2\$2(t2, type\$.\$env_1_1_dynamic._bind\$1(t1)._eval\$1(\"1(2)\")._as(handleData), type\$.dynamic, t1);\n" +" }\n" +" this.__internal\$_handleData = t1;\n" " },\n" " onError\$1(handleError) {\n" -" var _this = this;\n" +" var t1, _this = this;\n" " _this.__internal\$_source.onError\$1(handleError);\n" " if (handleError == null)\n" " _this.__internal\$_handleError = null;\n" -" else if (type\$.void_Function_Object_StackTrace._is(handleError))\n" -" _this.__internal\$_handleError = _this.__internal\$_zone.registerBinaryCallback\$3\$1(handleError, type\$.dynamic, type\$.Object, type\$.StackTrace);\n" -" else if (type\$.void_Function_Object._is(handleError))\n" -" _this.__internal\$_handleError = _this.__internal\$_zone.registerUnaryCallback\$2\$1(handleError, type\$.dynamic, type\$.Object);\n" -" else\n" +" else if (type\$.void_Function_Object_StackTrace._is(handleError)) {\n" +" t1 = _this.__internal\$_zone;\n" +" _this.__internal\$_handleError = t1._registerBinaryCallbackZoned\$3\$2(t1, type\$.dynamic_Function_Object_StackTrace._as(handleError), type\$.dynamic, type\$.Object, type\$.StackTrace);\n" +" } else if (type\$.void_Function_Object._is(handleError)) {\n" +" t1 = _this.__internal\$_zone;\n" +" _this.__internal\$_handleError = t1._registerUnaryCallbackZoned\$2\$2(t1, type\$.dynamic_Function_Object._as(handleError), type\$.dynamic, type\$.Object);\n" +" } else\n" " throw A.wrapException(A.ArgumentError\$(string\$.handle, null));\n" " },\n" " __internal\$_onData\$1(data) {\n" @@ -10234,9 +9960,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " error = A.unwrapException(exception);\n" " stack = A.getTraceFromException(exception);\n" " handleError = _this.__internal\$_handleError;\n" -" if (handleError == null)\n" -" _this.__internal\$_zone.handleUncaughtError\$2(error, stack);\n" -" else {\n" +" if (handleError == null) {\n" +" t1 = _this.__internal\$_zone;\n" +" t1._handleUncaughtErrorZoned\$3(t1, A._asObject(error), type\$.StackTrace._as(stack));\n" +" } else {\n" " t1 = type\$.Object;\n" " t2 = _this.__internal\$_zone;\n" " if (type\$.void_Function_Object_StackTrace._is(handleError))\n" @@ -10423,7 +10150,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$0() {\n" " return A.Future_Future\$value(null, type\$.void);\n" " },\n" -" \$signature: 9\n" +" \$signature: 6\n" " };\n" " A.SentinelValue.prototype = {};\n" " A.EfficientLengthIterable.prototype = {};\n" @@ -10989,9 +10716,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$2(a0, a1) {\n" " return this._genericClosure.call\$1\$2(a0, a1, this.\$ti._rest[0]);\n" " },\n" -" call\$4(a0, a1, a2, a3) {\n" -" return this._genericClosure.call\$1\$4(a0, a1, a2, a3, this.\$ti._rest[0]);\n" -" },\n" " \$signature() {\n" " return A.instantiatedGenericFunctionType(A.closureFunctionType(this._genericClosure), this.\$ti);\n" " }\n" @@ -11428,13 +11152,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$2(o, tag) {\n" " return this.getUnknownTag(o, tag);\n" " },\n" -" \$signature: 31\n" +" \$signature: 73\n" " };\n" " A.initHooks_closure1.prototype = {\n" " call\$1(tag) {\n" " return this.prototypeForTag(A._asString(tag));\n" " },\n" -" \$signature: 30\n" +" \$signature: 59\n" " };\n" " A._Record.prototype = {\n" " get\$runtimeType(_) {\n" @@ -11942,7 +11666,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t1.storedCallback = null;\n" " f.call\$0();\n" " },\n" -" \$signature: 4\n" +" \$signature: 8\n" " };\n" " A._AsyncRun__initializeScheduleImmediate_closure.prototype = {\n" " call\$1(callback) {\n" @@ -11952,7 +11676,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t2 = this.span;\n" " t1.firstChild ? t1.removeChild(t2) : t1.appendChild(t2);\n" " },\n" -" \$signature: 49\n" +" \$signature: 43\n" " };\n" " A._AsyncRun__scheduleImmediateJsOverride_internalCallback.prototype = {\n" " call\$0() {\n" @@ -11973,12 +11697,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " else\n" " throw A.wrapException(A.UnsupportedError\$(\"`setTimeout()` not found.\"));\n" " },\n" -" _TimerImpl\$periodic\$2(milliseconds, callback) {\n" -" if (self.setTimeout != null)\n" -" this._handle = self.setInterval(A.convertDartClosureToJS(new A._TimerImpl\$periodic_closure(this, milliseconds, Date.now(), callback), 0), milliseconds);\n" -" else\n" -" throw A.wrapException(A.UnsupportedError\$(\"Periodic timer.\"));\n" -" },\n" " get\$isActive() {\n" " return this._handle != null;\n" " },\n" @@ -11987,10 +11705,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " var t1 = this._handle;\n" " if (t1 == null)\n" " return;\n" -" if (this._once)\n" -" self.clearTimeout(t1);\n" -" else\n" -" self.clearInterval(t1);\n" +" self.clearTimeout(t1);\n" " this._handle = null;\n" " } else\n" " throw A.wrapException(A.UnsupportedError\$(\"Canceling a timer.\"));\n" @@ -11999,29 +11714,11 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._TimerImpl_internalCallback.prototype = {\n" " call\$0() {\n" -" var t1 = this.\$this;\n" -" t1._handle = null;\n" -" t1._tick = 1;\n" +" this.\$this._handle = null;\n" " this.callback.call\$0();\n" " },\n" " \$signature: 0\n" " };\n" -" A._TimerImpl\$periodic_closure.prototype = {\n" -" call\$0() {\n" -" var duration, _this = this,\n" -" t1 = _this.\$this,\n" -" tick = t1._tick + 1,\n" -" t2 = _this.milliseconds;\n" -" if (t2 > 0) {\n" -" duration = Date.now() - _this.start;\n" -" if (duration > (tick + 1) * t2)\n" -" tick = B.JSInt_methods.\$tdiv(duration, t2);\n" -" }\n" -" t1._tick = tick;\n" -" _this.callback.call\$1(t1);\n" -" },\n" -" \$signature: 1\n" -" };\n" " A._AsyncAwaitCompleter.prototype = {\n" " complete\$1(value) {\n" " var t2, _this = this,\n" @@ -12052,104 +11749,19 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(result) {\n" " return this.bodyFunction.call\$2(0, result);\n" " },\n" -" \$signature: 5\n" +" \$signature: 4\n" " };\n" " A._awaitOnObject_closure0.prototype = {\n" " call\$2(error, stackTrace) {\n" " this.bodyFunction.call\$2(1, new A.ExceptionAndStackTrace(error, type\$.StackTrace._as(stackTrace)));\n" " },\n" -" \$signature: 54\n" +" \$signature: 48\n" " };\n" " A._wrapJsFunctionForAsync_closure.prototype = {\n" " call\$2(errorCode, result) {\n" " this.\$protected(A._asInt(errorCode), result);\n" " },\n" -" \$signature: 59\n" -" };\n" -" A._asyncStarHelper_closure.prototype = {\n" -" call\$0() {\n" -" var t3,\n" -" t1 = this.controller,\n" -" t2 = t1.___AsyncStarStreamController_controller_A;\n" -" t2 === \$ && A.throwLateFieldNI(\"controller\");\n" -" t3 = t2._state;\n" -" if ((t3 & 1) !== 0 ? (t2.get\$_subscription()._state & 4) !== 0 : (t3 & 2) === 0) {\n" -" t1.isSuspended = true;\n" -" return;\n" -" }\n" -" t1 = t1.cancelationFuture != null ? 2 : 0;\n" -" this.bodyFunction.call\$2(t1, null);\n" -" },\n" -" \$signature: 0\n" -" };\n" -" A._asyncStarHelper_closure0.prototype = {\n" -" call\$1(__wc0_formal) {\n" -" var errorCode = this.controller.cancelationFuture != null ? 2 : 0;\n" -" this.bodyFunction.call\$2(errorCode, null);\n" -" },\n" -" \$signature: 4\n" -" };\n" -" A._AsyncStarStreamController.prototype = {\n" -" _AsyncStarStreamController\$1(body, \$T) {\n" -" var _this = this,\n" -" t1 = new A._AsyncStarStreamController__resumeBody(body);\n" -" _this.___AsyncStarStreamController_controller_A = _this.\$ti._eval\$1(\"StreamController<1>\")._as(A.StreamController_StreamController(new A._AsyncStarStreamController_closure(_this, body), new A._AsyncStarStreamController_closure0(t1), new A._AsyncStarStreamController_closure1(_this, t1), \$T));\n" -" }\n" -" };\n" -" A._AsyncStarStreamController__resumeBody.prototype = {\n" -" call\$0() {\n" -" A.scheduleMicrotask(new A._AsyncStarStreamController__resumeBody_closure(this.body));\n" -" },\n" -" \$signature: 1\n" -" };\n" -" A._AsyncStarStreamController__resumeBody_closure.prototype = {\n" -" call\$0() {\n" -" this.body.call\$2(0, null);\n" -" },\n" -" \$signature: 0\n" -" };\n" -" A._AsyncStarStreamController_closure0.prototype = {\n" -" call\$0() {\n" -" this._resumeBody.call\$0();\n" -" },\n" -" \$signature: 0\n" -" };\n" -" A._AsyncStarStreamController_closure1.prototype = {\n" -" call\$0() {\n" -" var t1 = this.\$this;\n" -" if (t1.isSuspended) {\n" -" t1.isSuspended = false;\n" -" this._resumeBody.call\$0();\n" -" }\n" -" },\n" -" \$signature: 0\n" -" };\n" -" A._AsyncStarStreamController_closure.prototype = {\n" -" call\$0() {\n" -" var t1 = this.\$this,\n" -" t2 = t1.___AsyncStarStreamController_controller_A;\n" -" t2 === \$ && A.throwLateFieldNI(\"controller\");\n" -" if ((t2._state & 4) === 0) {\n" -" t1.cancelationFuture = new A._Future(\$.Zone__current, type\$._Future_dynamic);\n" -" if (t1.isSuspended) {\n" -" t1.isSuspended = false;\n" -" A.scheduleMicrotask(new A._AsyncStarStreamController__closure(this.body));\n" -" }\n" -" return t1.cancelationFuture;\n" -" }\n" -" },\n" -" \$signature: 60\n" -" };\n" -" A._AsyncStarStreamController__closure.prototype = {\n" -" call\$0() {\n" -" this.body.call\$2(2, null);\n" -" },\n" -" \$signature: 0\n" -" };\n" -" A._IterationMarker.prototype = {\n" -" toString\$0(_) {\n" -" return \"IterationMarker(\" + this.state + \", \" + A.S(this.value) + \")\";\n" -" }\n" +" \$signature: 55\n" " };\n" " A.AsyncError.prototype = {\n" " toString\$0(_) {\n" @@ -12235,9 +11847,11 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._FutureListener.prototype = {\n" " matchesErrorTest\$1(asyncError) {\n" +" var t1;\n" " if ((this.state & 15) !== 6)\n" " return true;\n" -" return this.result._zone.runUnary\$2\$2(type\$.bool_Function_Object._as(this.callback), asyncError.error, type\$.bool, type\$.Object);\n" +" t1 = this.result._zone;\n" +" return t1._runUnaryZoned\$2\$3(t1, type\$.bool_Function_Object._as(this.callback), asyncError.error, type\$.bool, type\$.Object);\n" " },\n" " handleError\$1(asyncError) {\n" " var exception, _this = this,\n" @@ -12248,9 +11862,9 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t3 = asyncError.error,\n" " t4 = _this.result._zone;\n" " if (type\$.dynamic_Function_Object_StackTrace._is(errorCallback))\n" -" result = t4.runBinary\$3\$3(errorCallback, t3, asyncError.stackTrace, t1, t2, type\$.StackTrace);\n" +" result = t4._runBinaryZoned\$3\$4(t4, errorCallback, t3, asyncError.stackTrace, t1, t2, type\$.StackTrace);\n" " else\n" -" result = t4.runUnary\$2\$2(type\$.dynamic_Function_Object._as(errorCallback), t3, t1, t2);\n" +" result = t4._runUnaryZoned\$2\$3(t4, type\$.dynamic_Function_Object._as(errorCallback), t3, t1, t2);\n" " try {\n" " t1 = _this.\$ti._eval\$1(\"2/\")._as(result);\n" " return t1;\n" @@ -12266,15 +11880,16 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._Future.prototype = {\n" " then\$1\$2\$onError(f, onError, \$R) {\n" -" var currentZone, result, t2,\n" +" var currentZone, t2, result,\n" " t1 = this.\$ti;\n" " t1._bind\$1(\$R)._eval\$1(\"1/(2)\")._as(f);\n" " currentZone = \$.Zone__current;\n" -" if (currentZone === B.C__RootZone) {\n" +" if (currentZone === B.Zone_jYP) {\n" " if (onError != null && !type\$.dynamic_Function_Object_StackTrace._is(onError) && !type\$.dynamic_Function_Object._is(onError))\n" " throw A.wrapException(A.ArgumentError\$value(onError, \"onError\", string\$.Error_));\n" " } else {\n" -" f = currentZone.registerUnaryCallback\$2\$1(f, \$R._eval\$1(\"0/\"), t1._precomputed1);\n" +" t2 = t1._precomputed1;\n" +" f = currentZone._registerUnaryCallbackZoned\$2\$2(currentZone, \$R._eval\$1(\"@<0/>\")._bind\$1(t2)._eval\$1(\"1(2)\")._as(f), \$R._eval\$1(\"0/\"), t2);\n" " if (onError != null)\n" " onError = A._registerErrorHandler(onError, currentZone);\n" " }\n" @@ -12294,32 +11909,23 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this._addListener\$1(new A._FutureListener(result, 19, f, onError, t1._eval\$1(\"@<1>\")._bind\$1(\$E)._eval\$1(\"_FutureListener<1,2>\")));\n" " return result;\n" " },\n" -" catchError\$2\$test(onError, test) {\n" -" var t1, t2, result;\n" -" type\$.nullable_bool_Function_Object._as(test);\n" -" t1 = this.\$ti;\n" -" t2 = \$.Zone__current;\n" -" result = new A._Future(t2, t1);\n" -" if (t2 !== B.C__RootZone) {\n" -" onError = A._registerErrorHandler(onError, t2);\n" -" if (test != null)\n" -" test = t2.registerUnaryCallback\$2\$1(test, type\$.bool, type\$.Object);\n" -" }\n" -" t2 = test == null ? 2 : 6;\n" -" this._addListener\$1(new A._FutureListener(result, t2, test, onError, t1._eval\$1(\"_FutureListener<1,1>\")));\n" -" return result;\n" -" },\n" " catchError\$1(onError) {\n" -" return this.catchError\$2\$test(onError, null);\n" +" var t1 = this.\$ti,\n" +" resultZone = \$.Zone__current,\n" +" result = new A._Future(resultZone, t1);\n" +" if (resultZone !== B.Zone_jYP)\n" +" onError = A._registerErrorHandler(onError, resultZone);\n" +" this._addListener\$1(new A._FutureListener(result, 2, null, onError, t1._eval\$1(\"_FutureListener<1,1>\")));\n" +" return result;\n" " },\n" " whenComplete\$1(action) {\n" -" var t1, t2, result;\n" +" var t1, resultZone, result;\n" " type\$.dynamic_Function._as(action);\n" " t1 = this.\$ti;\n" -" t2 = \$.Zone__current;\n" -" result = new A._Future(t2, t1);\n" -" if (t2 !== B.C__RootZone)\n" -" action = t2.registerCallback\$1\$1(action, type\$.dynamic);\n" +" resultZone = \$.Zone__current;\n" +" result = new A._Future(resultZone, t1);\n" +" if (resultZone !== B.Zone_jYP)\n" +" action = resultZone._registerCallbackZoned\$1\$2(resultZone, action, type\$.dynamic);\n" " this._addListener\$1(new A._FutureListener(result, 8, action, null, t1._eval\$1(\"_FutureListener<1,1>\")));\n" " return result;\n" " },\n" @@ -12346,7 +11952,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " _this._cloneResult\$1(source);\n" " }\n" -" _this._zone.scheduleMicrotask\$1(new A._Future__addListener_closure(_this, listener));\n" +" t1 = _this._zone;\n" +" t1._scheduleMicrotaskZoned\$2(t1, new A._Future__addListener_closure(_this, listener));\n" " }\n" " },\n" " _prependListeners\$1(listeners) {\n" @@ -12374,7 +11981,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _this._cloneResult\$1(source);\n" " }\n" " _box_0.listeners = _this._reverseListeners\$1(listeners);\n" -" _this._zone.scheduleMicrotask\$1(new A._Future__prependListeners_closure(_box_0, _this));\n" +" t1 = _this._zone;\n" +" t1._scheduleMicrotaskZoned\$2(t1, new A._Future__prependListeners_closure(_box_0, _this));\n" " }\n" " },\n" " _removeListeners\$0() {\n" @@ -12413,14 +12021,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " A._Future__propagateToListeners(_this, listeners);\n" " },\n" " _completeWithResultOf\$1(source) {\n" -" var t1, t2, listeners, _this = this;\n" -" if ((source._state & 16) !== 0) {\n" -" t1 = _this._zone;\n" -" t2 = source._zone;\n" -" t1 = !(t1 === t2 || t1.get\$errorZone() === t2.get\$errorZone());\n" -" } else\n" -" t1 = false;\n" -" if (t1)\n" +" var listeners, _this = this;\n" +" if ((source._state & 16) !== 0 && _this._zone._handleUncaughtErrorFunction != source._zone._handleUncaughtErrorFunction)\n" " return;\n" " listeners = _this._removeListeners\$0();\n" " _this._cloneResult\$1(source);\n" @@ -12446,18 +12048,21 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this._asyncCompleteWithValue\$1(value);\n" " },\n" " _asyncCompleteWithValue\$1(value) {\n" -" var _this = this;\n" +" var t1, _this = this;\n" " _this.\$ti._precomputed1._as(value);\n" " _this._state ^= 2;\n" -" _this._zone.scheduleMicrotask\$1(new A._Future__asyncCompleteWithValue_closure(_this, value));\n" +" t1 = _this._zone;\n" +" t1._scheduleMicrotaskZoned\$2(t1, new A._Future__asyncCompleteWithValue_closure(_this, value));\n" " },\n" " _chainFuture\$1(value) {\n" " A._Future__chainCoreFuture(this.\$ti._eval\$1(\"Future<1>\")._as(value), this, false);\n" " return;\n" " },\n" " _asyncCompleteErrorObject\$1(error) {\n" +" var t1;\n" " this._state ^= 2;\n" -" this._zone.scheduleMicrotask\$1(new A._Future__asyncCompleteErrorObject_closure(this, error));\n" +" t1 = this._zone;\n" +" t1._scheduleMicrotaskZoned\$2(t1, new A._Future__asyncCompleteErrorObject_closure(this, error));\n" " },\n" " timeout\$2\$onTimeout(timeLimit, onTimeout) {\n" " var t3, _future, _this = this, t1 = {},\n" @@ -12471,7 +12076,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t3 = \$.Zone__current;\n" " _future = new A._Future(t3, t2);\n" " t1.timer = null;\n" -" t1.timer = A.Timer_Timer(timeLimit, new A._Future_timeout_closure(_this, _future, t3, t3.registerCallback\$1\$1(onTimeout, t2._eval\$1(\"1/\"))));\n" +" t1.timer = A.Timer_Timer(timeLimit, new A._Future_timeout_closure(_this, _future, t3, t3._registerCallbackZoned\$1\$2(t3, t2._eval\$1(\"1/()\")._as(onTimeout), t2._eval\$1(\"1/\"))));\n" " _this.then\$1\$2\$onError(new A._Future_timeout_closure0(t1, _this, _future), new A._Future_timeout_closure1(t1, _future), type\$.Null);\n" " return _future;\n" " },\n" @@ -12509,10 +12114,11 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._Future__propagateToListeners_handleWhenCompleteCallback.prototype = {\n" " call\$0() {\n" -" var e, s, t1, exception, t2, t3, originalSource, joinedResult, _this = this, completeResult = null;\n" +" var e, s, t1, t2, exception, t3, originalSource, joinedResult, _this = this, completeResult = null;\n" " try {\n" " t1 = _this._box_0.listener;\n" -" completeResult = t1.result._zone.run\$1\$1(type\$.dynamic_Function._as(t1.callback), type\$.dynamic);\n" +" t2 = t1.result._zone;\n" +" completeResult = t2._runZoned\$1\$2(t2, type\$.dynamic_Function._as(t1.callback), type\$.dynamic);\n" " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" @@ -12554,7 +12160,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(__wc0_formal) {\n" " this.joinedResult._completeWithResultOf\$1(this.originalSource);\n" " },\n" -" \$signature: 4\n" +" \$signature: 8\n" " };\n" " A._Future__propagateToListeners_handleWhenCompleteCallback_closure0.prototype = {\n" " call\$2(e, s) {\n" @@ -12566,14 +12172,15 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._Future__propagateToListeners_handleValueCallback.prototype = {\n" " call\$0() {\n" -" var e, s, t1, t2, t3, t4, t5, exception;\n" +" var e, s, t1, t2, t3, t4, t5, t6, exception;\n" " try {\n" " t1 = this._box_0;\n" " t2 = t1.listener;\n" " t3 = t2.\$ti;\n" " t4 = t3._precomputed1;\n" " t5 = t4._as(this.sourceResult);\n" -" t1.listenerValueOrError = t2.result._zone.runUnary\$2\$2(t3._eval\$1(\"2/(1)\")._as(t2.callback), t5, t3._eval\$1(\"2/\"), t4);\n" +" t6 = t2.result._zone;\n" +" t1.listenerValueOrError = t6._runUnaryZoned\$2\$3(t6, t3._eval\$1(\"2/(1)\")._as(t2.callback), t5, t3._eval\$1(\"2/\"), t4);\n" " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" @@ -12622,9 +12229,11 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._Future_timeout_closure.prototype = {\n" " call\$0() {\n" -" var e, s, exception, t1, t2, _this = this;\n" +" var e, s, t1, t2, exception, _this = this;\n" " try {\n" -" _this._future._complete\$1(_this.zone.run\$1\$1(_this.onTimeoutHandler, _this.\$this.\$ti._eval\$1(\"1/\")));\n" +" t1 = _this.zone;\n" +" t2 = _this.\$this.\$ti;\n" +" _this._future._complete\$1(t1._runZoned\$1\$2(t1, t2._eval\$1(\"1/()\")._as(_this.onTimeoutHandler), t2._eval\$1(\"1/\")));\n" " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" @@ -12733,10 +12342,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " if ((_this._state & 8) === 0)\n" " return A._instanceType(_this)._eval\$1(\"_PendingEvents<1>?\")._as(_this._varData);\n" " t1 = A._instanceType(_this);\n" -" return t1._eval\$1(\"_PendingEvents<1>?\")._as(t1._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(_this._varData)._varData);\n" +" return t1._eval\$1(\"_PendingEvents<1>?\")._as(t1._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(_this._varData).get\$_varData());\n" " },\n" " _ensurePendingEvents\$0() {\n" -" var events, t1, state, _this = this;\n" +" var events, t1, _this = this;\n" " if ((_this._state & 8) === 0) {\n" " events = _this._varData;\n" " if (events == null)\n" @@ -12744,16 +12353,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return A._instanceType(_this)._eval\$1(\"_PendingEvents<1>\")._as(events);\n" " }\n" " t1 = A._instanceType(_this);\n" -" state = t1._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(_this._varData);\n" -" events = state._varData;\n" -" if (events == null)\n" -" events = state._varData = new A._PendingEvents(t1._eval\$1(\"_PendingEvents<1>\"));\n" +" events = t1._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(_this._varData).get\$_varData();\n" " return t1._eval\$1(\"_PendingEvents<1>\")._as(events);\n" " },\n" " get\$_subscription() {\n" " var varData = this._varData;\n" " if ((this._state & 8) !== 0)\n" -" varData = type\$._StreamControllerAddStreamState_nullable_Object._as(varData)._varData;\n" +" varData = type\$._StreamControllerAddStreamState_nullable_Object._as(varData).get\$_varData();\n" " return A._instanceType(this)._eval\$1(\"_ControllerSubscription<1>\")._as(varData);\n" " },\n" " _badEventState\$0() {\n" @@ -12761,31 +12367,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return new A.StateError(\"Cannot add event after closing\");\n" " return new A.StateError(\"Cannot add event while adding a stream\");\n" " },\n" -" addStream\$2\$cancelOnError(source, cancelOnError) {\n" -" var t2, t3, t4, t5, t6, _this = this,\n" -" t1 = A._instanceType(_this);\n" -" t1._eval\$1(\"Stream<1>\")._as(source);\n" -" t2 = _this._state;\n" -" if (t2 >= 4)\n" -" throw A.wrapException(_this._badEventState\$0());\n" -" if ((t2 & 2) !== 0) {\n" -" t1 = new A._Future(\$.Zone__current, type\$._Future_dynamic);\n" -" t1._asyncComplete\$1(null);\n" -" return t1;\n" -" }\n" -" t2 = _this._varData;\n" -" t3 = cancelOnError === true;\n" -" t4 = new A._Future(\$.Zone__current, type\$._Future_dynamic);\n" -" t5 = t1._eval\$1(\"~(1)\")._as(_this.get\$_add());\n" -" t6 = t3 ? A._AddStreamState_makeErrorHandler(_this) : _this.get\$_addError();\n" -" t6 = source.listen\$4\$cancelOnError\$onDone\$onError(t5, t3, _this.get\$_close(), t6);\n" -" t3 = _this._state;\n" -" if ((t3 & 1) !== 0 ? (_this.get\$_subscription()._state & 4) !== 0 : (t3 & 2) === 0)\n" -" t6.pause\$0();\n" -" _this._varData = new A._StreamControllerAddStreamState(t2, t4, t6, t1._eval\$1(\"_StreamControllerAddStreamState<1>\"));\n" -" _this._state |= 8;\n" -" return t4;\n" -" },\n" " _ensureDoneFuture\$0() {\n" " var t1 = this._doneFuture;\n" " if (t1 == null)\n" @@ -12799,16 +12380,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " throw A.wrapException(_this._badEventState\$0());\n" " _this._add\$1(value);\n" " },\n" -" addError\$2(error, stackTrace) {\n" -" var _0_0;\n" -" if (this._state >= 4)\n" -" throw A.wrapException(this._badEventState\$0());\n" -" _0_0 = A._interceptUserError(error, stackTrace);\n" -" this._addError\$2(_0_0.error, _0_0.stackTrace);\n" -" },\n" -" addError\$1(error) {\n" -" return this.addError\$2(error, null);\n" -" },\n" " close\$0() {\n" " var _this = this,\n" " t1 = _this._state;\n" @@ -12836,23 +12407,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " else if ((t2 & 3) === 0)\n" " _this._ensurePendingEvents\$0().add\$1(0, new A._DelayedData(value, t1._eval\$1(\"_DelayedData<1>\")));\n" " },\n" -" _addError\$2(error, stackTrace) {\n" -" var t1;\n" -" A._asObject(error);\n" -" type\$.StackTrace._as(stackTrace);\n" -" t1 = this._state;\n" -" if ((t1 & 1) !== 0)\n" -" this._sendError\$2(error, stackTrace);\n" -" else if ((t1 & 3) === 0)\n" -" this._ensurePendingEvents\$0().add\$1(0, new A._DelayedError(error, stackTrace));\n" -" },\n" -" _close\$0() {\n" -" var _this = this,\n" -" addState = A._instanceType(_this)._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(_this._varData);\n" -" _this._varData = addState._varData;\n" -" _this._state &= 4294967287;\n" -" addState.addStreamFuture._asyncComplete\$1(null);\n" -" },\n" " _subscribe\$4(onData, onError, onDone, cancelOnError) {\n" " var t2, t3, t4, t5, t6, t7, subscription, pendingEvents, addState, _this = this,\n" " t1 = A._instanceType(_this);\n" @@ -12866,12 +12420,12 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t5 = A._BufferingStreamSubscription__registerDataHandler(t2, onData, t1._precomputed1);\n" " t6 = A._BufferingStreamSubscription__registerErrorHandler(t2, onError);\n" " t7 = onDone == null ? A.async___nullDoneHandler\$closure() : onDone;\n" -" subscription = new A._ControllerSubscription(_this, t5, t6, t2.registerCallback\$1\$1(t7, type\$.void), t2, t3 | t4, t1._eval\$1(\"_ControllerSubscription<1>\"));\n" +" subscription = new A._ControllerSubscription(_this, t5, t6, t2._registerCallbackZoned\$1\$2(t2, type\$.void_Function._as(t7), type\$.void), t2, t3 | t4, t1._eval\$1(\"_ControllerSubscription<1>\"));\n" " pendingEvents = _this.get\$_pendingEvents();\n" " if (((_this._state |= 1) & 8) !== 0) {\n" " addState = t1._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(_this._varData);\n" -" addState._varData = subscription;\n" -" addState.addSubscription.resume\$0();\n" +" addState.set\$_varData(subscription);\n" +" addState.resume\$0();\n" " } else\n" " _this._varData = subscription;\n" " subscription._setPendingEvents\$1(pendingEvents);\n" @@ -12915,6 +12469,12 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " set\$onListen(onListen) {\n" " this.onListen = type\$.nullable_void_Function._as(onListen);\n" " },\n" +" set\$onResume(onResume) {\n" +" this.onResume = type\$.nullable_void_Function._as(onResume);\n" +" },\n" +" set\$onCancel(onCancel) {\n" +" this.onCancel = type\$.nullable_void_Function._as(onCancel);\n" +" },\n" " \$isStreamSink: 1,\n" " \$isStreamController: 1,\n" " \$is_StreamControllerLifecycle: 1,\n" @@ -12937,7 +12497,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._AsyncStreamControllerDispatch.prototype = {\n" " _sendData\$1(data) {\n" -" var t1 = this.\$ti;\n" +" var t1 = A._instanceType(this);\n" " t1._precomputed1._as(data);\n" " this.get\$_subscription()._addPending\$1(new A._DelayedData(data, t1._eval\$1(\"_DelayedData<1>\")));\n" " },\n" @@ -12970,7 +12530,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t2 = A._instanceType(t1);\n" " t2._eval\$1(\"StreamSubscription<1>\")._as(this);\n" " if ((t1._state & 8) !== 0)\n" -" t2._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(t1._varData).addSubscription.pause\$0();\n" +" t2._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(t1._varData).pause\$0();\n" " A._runGuarded(t1.onPause);\n" " },\n" " _onResume\$0() {\n" @@ -12978,32 +12538,11 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t2 = A._instanceType(t1);\n" " t2._eval\$1(\"StreamSubscription<1>\")._as(this);\n" " if ((t1._state & 8) !== 0)\n" -" t2._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(t1._varData).addSubscription.resume\$0();\n" +" t2._eval\$1(\"_StreamControllerAddStreamState<1>\")._as(t1._varData).resume\$0();\n" " A._runGuarded(t1.onResume);\n" " }\n" " };\n" " A._StreamSinkWrapper.prototype = {\$isStreamSink: 1};\n" -" A._AddStreamState.prototype = {\n" -" cancel\$0() {\n" -" var cancel = this.addSubscription.cancel\$0();\n" -" return cancel.whenComplete\$1(new A._AddStreamState_cancel_closure(this));\n" -" }\n" -" };\n" -" A._AddStreamState_makeErrorHandler_closure.prototype = {\n" -" call\$2(e, s) {\n" -" var t1 = this.controller;\n" -" t1._addError\$2(A._asObject(e), type\$.StackTrace._as(s));\n" -" t1._close\$0();\n" -" },\n" -" \$signature: 3\n" -" };\n" -" A._AddStreamState_cancel_closure.prototype = {\n" -" call\$0() {\n" -" this.\$this.addStreamFuture._asyncComplete\$1(null);\n" -" },\n" -" \$signature: 1\n" -" };\n" -" A._StreamControllerAddStreamState.prototype = {};\n" " A._BufferingStreamSubscription.prototype = {\n" " _setPendingEvents\$1(pendingEvents) {\n" " var _this = this;\n" @@ -13457,7 +12996,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t1 = new A._DoneStreamSubscription(t2, t1._eval\$1(\"_DoneStreamSubscription<1>\"));\n" " A.scheduleMicrotask(t1.get\$_onMicrotask());\n" " if (onDone != null)\n" -" t1._onDone = t2.registerCallback\$1\$1(onDone, type\$.void);\n" +" t1._onDone = t2._registerCallbackZoned\$1\$2(t2, type\$.void_Function._as(onDone), type\$.void);\n" " return t1;\n" " },\n" " listen\$3\$onDone\$onError(onData, onDone, onError) {\n" @@ -13467,6 +13006,44 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return this.listen\$4\$cancelOnError\$onDone\$onError(onData, cancelOnError, onDone, null);\n" " }\n" " };\n" +" A._MultiStream.prototype = {\n" +" listen\$4\$cancelOnError\$onDone\$onError(onData, cancelOnError, onDone, onError) {\n" +" var controller, _null = null,\n" +" t1 = this.\$ti;\n" +" t1._eval\$1(\"~(1)?\")._as(onData);\n" +" type\$.nullable_void_Function._as(onDone);\n" +" controller = new A._MultiStreamController(_null, _null, _null, _null, t1._eval\$1(\"_MultiStreamController<1>\"));\n" +" controller.set\$onListen(new A._MultiStream_listen_closure(this, controller));\n" +" return controller._subscribe\$4(onData, onError, onDone, cancelOnError === true);\n" +" },\n" +" listen\$3\$onDone\$onError(onData, onDone, onError) {\n" +" return this.listen\$4\$cancelOnError\$onDone\$onError(onData, null, onDone, onError);\n" +" },\n" +" listen\$3\$cancelOnError\$onDone(onData, cancelOnError, onDone) {\n" +" return this.listen\$4\$cancelOnError\$onDone\$onError(onData, cancelOnError, onDone, null);\n" +" }\n" +" };\n" +" A._MultiStream_listen_closure.prototype = {\n" +" call\$0() {\n" +" this.\$this._onListen.call\$1(this.controller);\n" +" },\n" +" \$signature: 0\n" +" };\n" +" A._MultiStreamController.prototype = {\n" +" closeSync\$0() {\n" +" var _this = this,\n" +" t1 = _this._state;\n" +" if ((t1 & 4) !== 0)\n" +" return;\n" +" if (t1 >= 4)\n" +" throw A.wrapException(_this._badEventState\$0());\n" +" t1 |= 4;\n" +" _this._state = t1;\n" +" if ((t1 & 1) !== 0)\n" +" _this.get\$_subscription()._close\$0();\n" +" },\n" +" \$isMultiStreamController: 1\n" +" };\n" " A._cancelAndValue_closure.prototype = {\n" " call\$0() {\n" " return this.future._complete\$1(this.value);\n" @@ -13485,7 +13062,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t5 = A._BufferingStreamSubscription__registerDataHandler(t2, onData, t1._rest[1]);\n" " t6 = A._BufferingStreamSubscription__registerErrorHandler(t2, onError);\n" " t7 = onDone == null ? A.async___nullDoneHandler\$closure() : onDone;\n" -" t1 = new A._ForwardingStreamSubscription(this, t5, t6, t2.registerCallback\$1\$1(t7, type\$.void), t2, t3 | t4, t1._eval\$1(\"_ForwardingStreamSubscription<1,2>\"));\n" +" t1 = new A._ForwardingStreamSubscription(this, t5, t6, t2._registerCallbackZoned\$1\$2(t2, type\$.void_Function._as(t7), type\$.void), t2, t3 | t4, t1._eval\$1(\"_ForwardingStreamSubscription<1,2>\"));\n" " t1._subscription = this._source.listen\$3\$onDone\$onError(t1.get\$_handleData(), t1.get\$_handleDone(), t1.get\$_handleError());\n" " return t1;\n" " },\n" @@ -13567,453 +13144,270 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " sink._add\$1(outputEvent);\n" " }\n" " };\n" -" A._ZoneRun.prototype = {};\n" -" A._ZoneRunUnary.prototype = {};\n" -" A._ZoneRunBinary.prototype = {};\n" -" A._ZoneRegisterCallback.prototype = {};\n" -" A._ZoneRegisterUnaryCallback.prototype = {};\n" -" A._ZoneRegisterBinaryCallback.prototype = {};\n" -" A._ZoneErrorCallback.prototype = {};\n" -" A._ZoneScheduleMicrotask.prototype = {};\n" -" A._ZoneCreateTimer.prototype = {};\n" -" A._ZoneCreatePeriodicTimer.prototype = {};\n" -" A._ZonePrint.prototype = {};\n" -" A._ZoneFork.prototype = {};\n" -" A._ZoneHandleUncaughtError.prototype = {\n" -" function\$5(arg0, arg1, arg2, arg3, arg4) {\n" -" return this.\$function.call\$5(arg0, arg1, arg2, arg3, arg4);\n" -" }\n" -" };\n" -" A._ZoneValues.prototype = {};\n" -" A._Zone.prototype = {\n" -" _processUncaughtError\$3(zone, error, stackTrace) {\n" -" var implementation, implZone, parentZone, currentZone, e, s, t1, exception;\n" -" type\$.StackTrace._as(stackTrace);\n" -" implementation = this.get\$_handleUncaughtError();\n" -" implZone = implementation.zone;\n" -" if (implZone === B.C__RootZone) {\n" -" A._rootHandleError(error, stackTrace);\n" -" return;\n" -" }\n" -" t1 = implZone.get\$parent();\n" -" t1.toString;\n" -" parentZone = t1;\n" -" currentZone = \$.Zone__current;\n" -" try {\n" -" \$.Zone__current = parentZone;\n" -" implementation.function\$5(implZone, implZone.get\$_parentDelegate(), zone, error, stackTrace);\n" -" \$.Zone__current = currentZone;\n" -" } catch (exception) {\n" -" e = A.unwrapException(exception);\n" -" s = A.getTraceFromException(exception);\n" -" \$.Zone__current = currentZone;\n" -" t1 = error === e ? stackTrace : s;\n" -" parentZone._processUncaughtError\$3(implZone, e, t1);\n" -" }\n" -" },\n" -" \$isZone: 1\n" -" };\n" -" A._CustomZone.prototype = {\n" -" get\$_delegate() {\n" -" var t1 = this._delegateCache;\n" -" return t1 == null ? this._delegateCache = new A._ZoneDelegate(this) : t1;\n" -" },\n" -" get\$_parentDelegate() {\n" -" return this.parent.get\$_delegate();\n" -" },\n" -" get\$errorZone() {\n" -" return this._handleUncaughtError.zone;\n" +" A._ZoneHandleUncaughtError.prototype = {};\n" +" A.Zone.prototype = {\n" +" run\$1\$1(action, \$R) {\n" +" return this._runZoned\$1\$2(this, \$R._eval\$1(\"0()\")._as(action), \$R);\n" " },\n" -" runGuarded\$1(f) {\n" -" var e, s, exception;\n" -" type\$.void_Function._as(f);\n" -" try {\n" -" this.run\$1\$1(f, type\$.void);\n" -" } catch (exception) {\n" -" e = A.unwrapException(exception);\n" -" s = A.getTraceFromException(exception);\n" -" this._processUncaughtError\$3(this, A._asObject(e), type\$.StackTrace._as(s));\n" -" }\n" -" },\n" -" runUnaryGuarded\$1\$2(f, arg, \$T) {\n" -" var e, s, exception;\n" -" \$T._eval\$1(\"~(0)\")._as(f);\n" -" \$T._as(arg);\n" -" try {\n" -" this.runUnary\$2\$2(f, arg, type\$.void, \$T);\n" -" } catch (exception) {\n" -" e = A.unwrapException(exception);\n" -" s = A.getTraceFromException(exception);\n" -" this._processUncaughtError\$3(this, A._asObject(e), type\$.StackTrace._as(s));\n" -" }\n" -" },\n" -" runBinaryGuarded\$2\$3(f, arg1, arg2, \$T1, \$T2) {\n" -" var e, s, exception;\n" -" \$T1._eval\$1(\"@<0>\")._bind\$1(\$T2)._eval\$1(\"~(1,2)\")._as(f);\n" -" \$T1._as(arg1);\n" -" \$T2._as(arg2);\n" -" try {\n" -" this.runBinary\$3\$3(f, arg1, arg2, type\$.void, \$T1, \$T2);\n" -" } catch (exception) {\n" -" e = A.unwrapException(exception);\n" -" s = A.getTraceFromException(exception);\n" -" this._processUncaughtError\$3(this, A._asObject(e), type\$.StackTrace._as(s));\n" -" }\n" -" },\n" -" bindCallback\$1\$1(f, \$R) {\n" -" return new A._CustomZone_bindCallback_closure(this, this.registerCallback\$1\$1(\$R._eval\$1(\"0()\")._as(f), \$R), \$R);\n" -" },\n" -" bindCallbackGuarded\$1(f) {\n" -" return new A._CustomZone_bindCallbackGuarded_closure(this, this.registerCallback\$1\$1(type\$.void_Function._as(f), type\$.void));\n" -" },\n" -" bindUnaryCallbackGuarded\$1\$1(f, \$T) {\n" -" return new A._CustomZone_bindUnaryCallbackGuarded_closure(this, this.registerUnaryCallback\$2\$1(\$T._eval\$1(\"~(0)\")._as(f), type\$.void, \$T), \$T);\n" -" },\n" -" handleUncaughtError\$2(error, stackTrace) {\n" -" this._processUncaughtError\$3(this, error, type\$.StackTrace._as(stackTrace));\n" -" },\n" -" fork\$2\$specification\$zoneValues(specification, zoneValues) {\n" -" var implementation = this._fork,\n" -" zone = implementation.zone;\n" -" return implementation.\$function.call\$5(zone, zone.get\$_parentDelegate(), this, specification, zoneValues);\n" -" },\n" -" run\$1\$1(f, \$R) {\n" -" var implementation, zone;\n" -" \$R._eval\$1(\"0()\")._as(f);\n" -" implementation = this._run;\n" -" zone = implementation.zone;\n" -" return implementation.\$function.call\$1\$4(zone, zone.get\$_parentDelegate(), this, f, \$R);\n" -" },\n" -" runUnary\$2\$2(f, arg, \$R, \$T) {\n" -" var implementation, zone;\n" -" \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(f);\n" -" \$T._as(arg);\n" -" implementation = this._runUnary;\n" -" zone = implementation.zone;\n" -" return implementation.\$function.call\$2\$5(zone, zone.get\$_parentDelegate(), this, f, arg, \$R, \$T);\n" -" },\n" -" runBinary\$3\$3(f, arg1, arg2, \$R, \$T1, \$T2) {\n" -" var implementation, zone;\n" -" \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(f);\n" -" \$T1._as(arg1);\n" -" \$T2._as(arg2);\n" -" implementation = this._runBinary;\n" -" zone = implementation.zone;\n" -" return implementation.\$function.call\$3\$6(zone, zone.get\$_parentDelegate(), this, f, arg1, arg2, \$R, \$T1, \$T2);\n" -" },\n" -" registerCallback\$1\$1(callback, \$R) {\n" -" var implementation, zone;\n" -" \$R._eval\$1(\"0()\")._as(callback);\n" -" implementation = this._registerCallback;\n" -" zone = implementation.zone;\n" -" return implementation.\$function.call\$1\$4(zone, zone.get\$_parentDelegate(), this, callback, \$R);\n" -" },\n" -" registerUnaryCallback\$2\$1(callback, \$R, \$T) {\n" -" var implementation, zone;\n" -" \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(callback);\n" -" implementation = this._registerUnaryCallback;\n" -" zone = implementation.zone;\n" -" return implementation.\$function.call\$2\$4(zone, zone.get\$_parentDelegate(), this, callback, \$R, \$T);\n" -" },\n" -" registerBinaryCallback\$3\$1(callback, \$R, \$T1, \$T2) {\n" -" var implementation, zone;\n" -" \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(callback);\n" -" implementation = this._registerBinaryCallback;\n" -" zone = implementation.zone;\n" -" return implementation.\$function.call\$3\$4(zone, zone.get\$_parentDelegate(), this, callback, \$R, \$T1, \$T2);\n" -" },\n" -" errorCallback\$2(error, stackTrace) {\n" -" var implementation = this._errorCallback,\n" -" zone = implementation.zone;\n" -" if (zone === B.C__RootZone)\n" -" return null;\n" -" return implementation.\$function.call\$5(zone, zone.get\$_parentDelegate(), this, error, stackTrace);\n" -" },\n" -" scheduleMicrotask\$1(f) {\n" -" var implementation, zone;\n" -" type\$.void_Function._as(f);\n" -" implementation = this._scheduleMicrotask;\n" -" zone = implementation.zone;\n" -" return implementation.\$function.call\$4(zone, zone.get\$_parentDelegate(), this, f);\n" -" },\n" -" createTimer\$2(duration, f) {\n" -" var implementation, zone;\n" -" type\$.void_Function._as(f);\n" -" implementation = this._createTimer;\n" -" zone = implementation.zone;\n" -" return implementation.\$function.call\$5(zone, zone.get\$_parentDelegate(), this, duration, f);\n" -" },\n" -" get\$_run() {\n" -" return this._run;\n" -" },\n" -" get\$_runUnary() {\n" -" return this._runUnary;\n" -" },\n" -" get\$_runBinary() {\n" -" return this._runBinary;\n" -" },\n" -" get\$_registerCallback() {\n" -" return this._registerCallback;\n" -" },\n" -" get\$_registerUnaryCallback() {\n" -" return this._registerUnaryCallback;\n" -" },\n" -" get\$_registerBinaryCallback() {\n" -" return this._registerBinaryCallback;\n" -" },\n" -" get\$_errorCallback() {\n" -" return this._errorCallback;\n" -" },\n" -" get\$_scheduleMicrotask() {\n" -" return this._scheduleMicrotask;\n" -" },\n" -" get\$_createTimer() {\n" -" return this._createTimer;\n" -" },\n" -" get\$_createPeriodicTimer() {\n" -" return this._createPeriodicTimer;\n" -" },\n" -" get\$_print() {\n" -" return this._print;\n" -" },\n" -" get\$_fork() {\n" -" return this._fork;\n" -" },\n" -" get\$_handleUncaughtError() {\n" -" return this._handleUncaughtError;\n" -" },\n" -" get\$_zoneValues() {\n" -" return this._zoneValues;\n" -" },\n" -" get\$parent() {\n" -" return this.parent;\n" -" }\n" -" };\n" -" A._CustomZone_bindCallback_closure.prototype = {\n" -" call\$0() {\n" -" return this.\$this.run\$1\$1(this.registered, this.R);\n" -" },\n" -" \$signature() {\n" -" return this.R._eval\$1(\"0()\");\n" -" }\n" -" };\n" -" A._CustomZone_bindCallbackGuarded_closure.prototype = {\n" -" call\$0() {\n" -" return this.\$this.runGuarded\$1(this.registered);\n" -" },\n" -" \$signature: 0\n" -" };\n" -" A._CustomZone_bindUnaryCallbackGuarded_closure.prototype = {\n" -" call\$1(arg) {\n" -" var t1 = this.T;\n" -" return this.\$this.runUnaryGuarded\$1\$2(this.registered, t1._as(arg), t1);\n" -" },\n" -" \$signature() {\n" -" return this.T._eval\$1(\"~(0)\");\n" -" }\n" -" };\n" -" A._RootZone.prototype = {\n" -" get\$_run() {\n" -" return B._ZoneRun__RootZone__rootRun;\n" -" },\n" -" get\$_runUnary() {\n" -" return B._ZoneRunUnary__RootZone__rootRunUnary;\n" -" },\n" -" get\$_runBinary() {\n" -" return B._ZoneRunBinary__RootZone__rootRunBinary;\n" -" },\n" -" get\$_registerCallback() {\n" -" return B._ZoneRegisterCallback__RootZone__rootRegisterCallback;\n" -" },\n" -" get\$_registerUnaryCallback() {\n" -" return B._ZoneRegisterUnaryCallback_a9v;\n" -" },\n" -" get\$_registerBinaryCallback() {\n" -" return B._ZoneRegisterBinaryCallback_sk0;\n" -" },\n" -" get\$_errorCallback() {\n" -" return B._ZoneErrorCallback__RootZone__rootErrorCallback;\n" -" },\n" -" get\$_scheduleMicrotask() {\n" -" return B._ZoneScheduleMicrotask__RootZone__rootScheduleMicrotask;\n" -" },\n" -" get\$_createTimer() {\n" -" return B._ZoneCreateTimer__RootZone__rootCreateTimer;\n" -" },\n" -" get\$_createPeriodicTimer() {\n" -" return B.C__ZoneCreatePeriodicTimer;\n" -" },\n" -" get\$_print() {\n" -" return B._ZonePrint__RootZone__rootPrint;\n" -" },\n" -" get\$_fork() {\n" -" return B._ZoneFork__RootZone__rootFork;\n" -" },\n" -" get\$_handleUncaughtError() {\n" -" return B._ZoneHandleUncaughtError_wQ6;\n" -" },\n" -" get\$_zoneValues() {\n" -" return B._ZoneValues__RootZone_Map_empty;\n" -" },\n" -" get\$parent() {\n" -" return null;\n" -" },\n" -" get\$_delegate() {\n" -" var t1 = \$._RootZone__rootDelegate;\n" -" return t1 == null ? \$._RootZone__rootDelegate = new A._ZoneDelegate(this) : t1;\n" -" },\n" -" get\$_parentDelegate() {\n" -" var t1 = \$._RootZone__rootDelegate;\n" -" return t1 == null ? \$._RootZone__rootDelegate = new A._ZoneDelegate(this) : t1;\n" -" },\n" -" get\$errorZone() {\n" -" return this;\n" -" },\n" -" runGuarded\$1(f) {\n" -" var e, s, exception;\n" -" type\$.void_Function._as(f);\n" -" try {\n" -" if (B.C__RootZone === \$.Zone__current) {\n" -" f.call\$0();\n" -" return;\n" -" }\n" -" A._rootRun(null, null, this, f, type\$.void);\n" +" runGuarded\$1(action) {\n" +" var e, s, t1, exception, _this = this;\n" +" type\$.void_Function._as(action);\n" +" try {\n" +" t1 = _this._runZoned\$1\$2(_this, action, type\$.void);\n" +" return t1;\n" " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" -" A._rootHandleError(A._asObject(e), type\$.StackTrace._as(s));\n" +" _this._handleUncaughtErrorZoned\$3(_this, e, s);\n" " }\n" " },\n" -" runUnaryGuarded\$1\$2(f, arg, \$T) {\n" -" var e, s, exception;\n" -" \$T._eval\$1(\"~(0)\")._as(f);\n" -" \$T._as(arg);\n" +" runUnaryGuarded\$1\$2(action, argument, \$T) {\n" +" var e, s, t1, exception, _this = this;\n" +" \$T._eval\$1(\"~(0)\")._as(action);\n" +" \$T._as(argument);\n" " try {\n" -" if (B.C__RootZone === \$.Zone__current) {\n" -" f.call\$1(arg);\n" -" return;\n" -" }\n" -" A._rootRunUnary(null, null, this, f, arg, type\$.void, \$T);\n" +" t1 = _this._runUnaryZoned\$2\$3(_this, action, argument, type\$.void, \$T);\n" +" return t1;\n" " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" -" A._rootHandleError(A._asObject(e), type\$.StackTrace._as(s));\n" +" _this._handleUncaughtErrorZoned\$3(_this, e, s);\n" " }\n" " },\n" -" runBinaryGuarded\$2\$3(f, arg1, arg2, \$T1, \$T2) {\n" -" var e, s, exception;\n" -" \$T1._eval\$1(\"@<0>\")._bind\$1(\$T2)._eval\$1(\"~(1,2)\")._as(f);\n" -" \$T1._as(arg1);\n" -" \$T2._as(arg2);\n" +" runBinaryGuarded\$2\$3(action, argument1, argument2, \$T1, \$T2) {\n" +" var e, s, t1, exception, _this = this;\n" +" \$T1._eval\$1(\"@<0>\")._bind\$1(\$T2)._eval\$1(\"~(1,2)\")._as(action);\n" +" \$T1._as(argument1);\n" +" \$T2._as(argument2);\n" " try {\n" -" if (B.C__RootZone === \$.Zone__current) {\n" -" f.call\$2(arg1, arg2);\n" -" return;\n" -" }\n" -" A._rootRunBinary(null, null, this, f, arg1, arg2, type\$.void, \$T1, \$T2);\n" +" t1 = _this._runBinaryZoned\$3\$4(_this, action, argument1, argument2, type\$.void, \$T1, \$T2);\n" +" return t1;\n" " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" -" A._rootHandleError(A._asObject(e), type\$.StackTrace._as(s));\n" +" _this._handleUncaughtErrorZoned\$3(_this, e, s);\n" " }\n" " },\n" -" bindCallback\$1\$1(f, \$R) {\n" -" return new A._RootZone_bindCallback_closure(this, \$R._eval\$1(\"0()\")._as(f), \$R);\n" +" bindCallback\$1\$1(callback, \$R) {\n" +" return new A.Zone_bindCallback_closure(this, this._registerCallbackZoned\$1\$2(this, \$R._eval\$1(\"0()\")._as(callback), \$R), \$R);\n" " },\n" -" bindCallbackGuarded\$1(f) {\n" -" return new A._RootZone_bindCallbackGuarded_closure(this, type\$.void_Function._as(f));\n" +" bindCallbackGuarded\$1(callback) {\n" +" return new A.Zone_bindCallbackGuarded_closure(this, this._registerCallbackZoned\$1\$2(this, type\$.void_Function._as(callback), type\$.void));\n" " },\n" -" bindUnaryCallbackGuarded\$1\$1(f, \$T) {\n" -" return new A._RootZone_bindUnaryCallbackGuarded_closure(this, \$T._eval\$1(\"~(0)\")._as(f), \$T);\n" +" bindUnaryCallbackGuarded\$1\$1(callback, \$T) {\n" +" return new A.Zone_bindUnaryCallbackGuarded_closure(this, this._registerUnaryCallbackZoned\$2\$2(this, \$T._eval\$1(\"~(0)\")._as(callback), type\$.void, \$T), \$T);\n" " },\n" -" handleUncaughtError\$2(error, stackTrace) {\n" -" A._rootHandleError(error, type\$.StackTrace._as(stackTrace));\n" +" get\$_parentDelegate() {\n" +" var t1 = this._parent;\n" +" t1 = t1 == null ? null : t1._delegate;\n" +" return t1 == null ? \$.\$get\$_rootDelegate() : t1;\n" +" },\n" +" _handleUncaughtErrorZoned\$3(zone, error, stackTrace) {\n" +" var implementation, implZone, parentZone, currentZone, e, s, t1, exception;\n" +" type\$.StackTrace._as(stackTrace);\n" +" implementation = this._handleUncaughtErrorFunction;\n" +" if (implementation == null) {\n" +" A._rootHandleUncaughtError(error, stackTrace);\n" +" return;\n" +" }\n" +" implZone = implementation.zone;\n" +" t1 = implZone._parent;\n" +" t1.toString;\n" +" parentZone = t1;\n" +" currentZone = \$.Zone__current;\n" +" try {\n" +" \$.Zone__current = parentZone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" implementation.\$function.call\$5(implZone, t1, zone, error, stackTrace);\n" +" \$.Zone__current = currentZone;\n" +" } catch (exception) {\n" +" e = A.unwrapException(exception);\n" +" s = A.getTraceFromException(exception);\n" +" \$.Zone__current = currentZone;\n" +" t1 = error === e ? stackTrace : s;\n" +" parentZone._handleUncaughtErrorZoned\$3(implZone, e, t1);\n" +" }\n" " },\n" -" fork\$2\$specification\$zoneValues(specification, zoneValues) {\n" -" return A._rootFork(null, null, this, specification, zoneValues);\n" +" _forkZoned\$3(zone, specification, zoneValues) {\n" +" var implZone, t1,\n" +" implementation = this._forkFunction;\n" +" if (implementation == null)\n" +" return A._rootFork(zone, specification, zoneValues);\n" +" implZone = implementation.zone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" return implementation.\$function.call\$5(implZone, t1, zone, specification, zoneValues);\n" " },\n" -" run\$1\$1(f, \$R) {\n" -" \$R._eval\$1(\"0()\")._as(f);\n" -" if (\$.Zone__current === B.C__RootZone)\n" -" return f.call\$0();\n" -" return A._rootRun(null, null, this, f, \$R);\n" +" _runZoned\$1\$2(zone, callback, \$R) {\n" +" var oldZone, implementation, t1, implZone;\n" +" \$R._eval\$1(\"0()\")._as(callback);\n" +" implementation = this._runFunction;\n" +" if (implementation == null) {\n" +" t1 = \$.Zone__current;\n" +" if (t1 === zone)\n" +" return callback.call\$0();\n" +" oldZone = t1;\n" +" \$.Zone__current = zone;\n" +" try {\n" +" t1 = callback.call\$0();\n" +" return t1;\n" +" } finally {\n" +" \$.Zone__current = oldZone;\n" +" }\n" +" }\n" +" implZone = implementation.zone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" return implementation.\$function.call\$1\$4(implZone, t1, zone, callback, \$R);\n" " },\n" -" runUnary\$2\$2(f, arg, \$R, \$T) {\n" -" \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(f);\n" -" \$T._as(arg);\n" -" if (\$.Zone__current === B.C__RootZone)\n" -" return f.call\$1(arg);\n" -" return A._rootRunUnary(null, null, this, f, arg, \$R, \$T);\n" +" _runUnaryZoned\$2\$3(zone, callback, argument, \$R, \$T) {\n" +" var oldZone, implementation, t1, implZone;\n" +" \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(callback);\n" +" \$T._as(argument);\n" +" implementation = this._runUnaryFunction;\n" +" if (implementation == null) {\n" +" t1 = \$.Zone__current;\n" +" if (t1 === zone)\n" +" return callback.call\$1(argument);\n" +" oldZone = t1;\n" +" \$.Zone__current = zone;\n" +" try {\n" +" t1 = callback.call\$1(argument);\n" +" return t1;\n" +" } finally {\n" +" \$.Zone__current = oldZone;\n" +" }\n" +" }\n" +" implZone = implementation.zone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" return implementation.\$function.call\$2\$5(implZone, t1, zone, callback, argument, \$R, \$T);\n" " },\n" -" runBinary\$3\$3(f, arg1, arg2, \$R, \$T1, \$T2) {\n" -" \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(f);\n" -" \$T1._as(arg1);\n" -" \$T2._as(arg2);\n" -" if (\$.Zone__current === B.C__RootZone)\n" -" return f.call\$2(arg1, arg2);\n" -" return A._rootRunBinary(null, null, this, f, arg1, arg2, \$R, \$T1, \$T2);\n" +" _runBinaryZoned\$3\$4(zone, callback, argument1, argument2, \$R, \$T1, \$T2) {\n" +" var oldZone, implementation, t1, implZone;\n" +" \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(callback);\n" +" \$T1._as(argument1);\n" +" \$T2._as(argument2);\n" +" implementation = this._runBinaryFunction;\n" +" if (implementation == null) {\n" +" t1 = \$.Zone__current;\n" +" if (t1 === zone)\n" +" return callback.call\$2(argument1, argument2);\n" +" oldZone = t1;\n" +" \$.Zone__current = zone;\n" +" try {\n" +" t1 = callback.call\$2(argument1, argument2);\n" +" return t1;\n" +" } finally {\n" +" \$.Zone__current = oldZone;\n" +" }\n" +" }\n" +" implZone = implementation.zone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" return implementation.\$function.call\$3\$6(implZone, t1, zone, callback, argument1, argument2, \$R, \$T1, \$T2);\n" " },\n" -" registerCallback\$1\$1(f, \$R) {\n" -" return \$R._eval\$1(\"0()\")._as(f);\n" +" _registerCallbackZoned\$1\$2(zone, callback, \$R) {\n" +" var implementation, implZone, t1;\n" +" \$R._eval\$1(\"0()\")._as(callback);\n" +" implementation = this._registerCallbackFunction;\n" +" if (implementation == null)\n" +" return callback;\n" +" implZone = implementation.zone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" return implementation.\$function.call\$1\$4(implZone, t1, zone, callback, \$R);\n" " },\n" -" registerUnaryCallback\$2\$1(f, \$R, \$T) {\n" -" return \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(f);\n" +" _registerUnaryCallbackZoned\$2\$2(zone, callback, \$R, \$T) {\n" +" var implementation, implZone, t1;\n" +" \$R._eval\$1(\"@<0>\")._bind\$1(\$T)._eval\$1(\"1(2)\")._as(callback);\n" +" implementation = this._registerUnaryCallbackFunction;\n" +" if (implementation == null)\n" +" return callback;\n" +" implZone = implementation.zone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" return implementation.\$function.call\$2\$4(implZone, t1, zone, callback, \$R, \$T);\n" " },\n" -" registerBinaryCallback\$3\$1(f, \$R, \$T1, \$T2) {\n" -" return \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(f);\n" +" _registerBinaryCallbackZoned\$3\$2(zone, callback, \$R, \$T1, \$T2) {\n" +" var implementation, implZone, t1;\n" +" \$R._eval\$1(\"@<0>\")._bind\$1(\$T1)._bind\$1(\$T2)._eval\$1(\"1(2,3)\")._as(callback);\n" +" implementation = this._registerBinaryCallbackFunction;\n" +" if (implementation == null)\n" +" return callback;\n" +" implZone = implementation.zone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" return implementation.\$function.call\$3\$4(implZone, t1, zone, callback, \$R, \$T1, \$T2);\n" " },\n" -" errorCallback\$2(error, stackTrace) {\n" -" return null;\n" +" _errorCallbackZoned\$3(zone, error, stackTrace) {\n" +" var implZone, t1,\n" +" implementation = this._errorCallbackFunction;\n" +" if (implementation == null)\n" +" return null;\n" +" implZone = implementation.zone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" return implementation.\$function.call\$5(implZone, t1, zone, error, stackTrace);\n" " },\n" -" scheduleMicrotask\$1(f) {\n" -" A._rootScheduleMicrotask(null, null, this, type\$.void_Function._as(f));\n" +" _scheduleMicrotaskZoned\$2(zone, callback) {\n" +" var implementation, implZone, t1;\n" +" type\$.void_Function._as(callback);\n" +" implementation = this._scheduleMicrotaskFunction;\n" +" if (implementation == null) {\n" +" A._rootScheduleMicrotask(zone, callback);\n" +" return;\n" +" }\n" +" implZone = implementation.zone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" implementation.\$function.call\$4(implZone, t1, zone, callback);\n" " },\n" -" createTimer\$2(duration, f) {\n" -" return A.Timer__createTimer(duration, type\$.void_Function._as(f));\n" +" _createTimerZoned\$3(zone, duration, callback) {\n" +" var implementation, implZone, t1;\n" +" type\$.void_Function._as(callback);\n" +" implementation = this._createTimerFunction;\n" +" if (implementation == null)\n" +" return A.Timer__createTimer(duration, B.Zone_jYP !== zone ? zone.bindCallback\$1\$1(callback, type\$.void) : callback);\n" +" implZone = implementation.zone;\n" +" t1 = implZone.get\$_parentDelegate();\n" +" return implementation.\$function.call\$5(implZone, t1, zone, duration, callback);\n" " }\n" " };\n" -" A._RootZone_bindCallback_closure.prototype = {\n" +" A.Zone_bindCallback_closure.prototype = {\n" " call\$0() {\n" -" return this.\$this.run\$1\$1(this.f, this.R);\n" +" var t1 = this.\$this;\n" +" return t1._runZoned\$1\$2(t1, this.registered, this.R);\n" " },\n" " \$signature() {\n" " return this.R._eval\$1(\"0()\");\n" " }\n" " };\n" -" A._RootZone_bindCallbackGuarded_closure.prototype = {\n" +" A.Zone_bindCallbackGuarded_closure.prototype = {\n" " call\$0() {\n" -" return this.\$this.runGuarded\$1(this.f);\n" +" return this.\$this.runGuarded\$1(this.registered);\n" " },\n" " \$signature: 0\n" " };\n" -" A._RootZone_bindUnaryCallbackGuarded_closure.prototype = {\n" -" call\$1(arg) {\n" +" A.Zone_bindUnaryCallbackGuarded_closure.prototype = {\n" +" call\$1(argument) {\n" " var t1 = this.T;\n" -" return this.\$this.runUnaryGuarded\$1\$2(this.f, t1._as(arg), t1);\n" +" return this.\$this.runUnaryGuarded\$1\$2(this.registered, t1._as(argument), t1);\n" " },\n" " \$signature() {\n" " return this.T._eval\$1(\"~(0)\");\n" " }\n" " };\n" -" A.runZonedGuarded_closure.prototype = {\n" +" A.runZonedGuarded_errorHandler.prototype = {\n" " call\$5(\$self, \$parent, zone, error, stackTrace) {\n" -" var e, s, exception, t1;\n" +" var e, s, t1, exception, t2;\n" " try {\n" -" this.parentZone.runBinary\$3\$3(this.onError, error, stackTrace, type\$.void, type\$.Object, type\$.StackTrace);\n" +" t1 = this.parentZone;\n" +" t1._runBinaryZoned\$3\$4(t1, type\$.void_Function_Object_StackTrace._as(this.onError), error, stackTrace, type\$.void, type\$.Object, type\$.StackTrace);\n" " } catch (exception) {\n" " e = A.unwrapException(exception);\n" " s = A.getTraceFromException(exception);\n" -" t1 = \$parent._delegationTarget;\n" -" if (e === error)\n" -" t1._processUncaughtError\$3(zone, error, stackTrace);\n" -" else\n" -" t1._processUncaughtError\$3(zone, A._asObject(e), type\$.StackTrace._as(s));\n" +" t1 = e === error ? stackTrace : s;\n" +" t2 = A._asObject(e);\n" +" type\$.StackTrace._as(t1);\n" +" \$parent._zone._handleUncaughtErrorZoned\$3(zone, t2, t1);\n" " }\n" " },\n" -" \$signature: 42\n" +" \$signature: 32\n" " };\n" -" A._ZoneDelegate.prototype = {\$isZoneDelegate: 1};\n" -" A._rootHandleError_closure.prototype = {\n" +" A.ZoneDelegate.prototype = {};\n" +" A._rootHandleUncaughtError_closure.prototype = {\n" " call\$0() {\n" " A.Error_throwWithStackTrace(this.error, this.stackTrace);\n" " },\n" @@ -14284,7 +13678,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(v) {\n" " return this.K._is(v);\n" " },\n" -" \$signature: 44\n" +" \$signature: 41\n" " };\n" " A._HashSet.prototype = {\n" " get\$iterator(_) {\n" @@ -14507,21 +13901,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " take\$1(receiver, count) {\n" " return A.SubListIterable\$(receiver, 0, A.checkNotNullable(count, \"count\", type\$.int), A.instanceType(receiver)._eval\$1(\"ListBase.E\"));\n" " },\n" -" toList\$1\$growable(receiver, growable) {\n" -" var t1, first, result, i, _this = this;\n" -" if (_this.get\$isEmpty(receiver)) {\n" -" t1 = J.JSArray_JSArray\$growable(0, A.instanceType(receiver)._eval\$1(\"ListBase.E\"));\n" -" return t1;\n" -" }\n" -" first = _this.\$index(receiver, 0);\n" -" result = A.List_List\$filled(_this.get\$length(receiver), first, true, A.instanceType(receiver)._eval\$1(\"ListBase.E\"));\n" -" for (i = 1; i < _this.get\$length(receiver); ++i)\n" -" B.JSArray_methods.\$indexSet(result, i, _this.\$index(receiver, i));\n" -" return result;\n" -" },\n" -" toList\$0(receiver) {\n" -" return this.toList\$1\$growable(receiver, true);\n" -" },\n" " add\$1(receiver, element) {\n" " var t1;\n" " A.instanceType(receiver)._eval\$1(\"ListBase.E\")._as(element);\n" @@ -15144,8 +14523,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " containsKey\$1(key) {\n" " if (this._processed == null)\n" " return this._data.containsKey\$1(key);\n" -" if (typeof key != \"string\")\n" -" return false;\n" " return Object.prototype.hasOwnProperty.call(this._original, key);\n" " },\n" " forEach\$1(_, f) {\n" @@ -15199,10 +14576,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " };\n" " A._JsonMapKeyIterable.prototype = {\n" " get\$length(_) {\n" -" return this._parent.get\$length(0);\n" +" return this._convert\$_parent.get\$length(0);\n" " },\n" " elementAt\$1(_, index) {\n" -" var t1 = this._parent;\n" +" var t1 = this._convert\$_parent;\n" " if (t1._processed == null)\n" " t1 = t1.get\$keys().elementAt\$1(0, index);\n" " else {\n" @@ -15214,7 +14591,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return t1;\n" " },\n" " get\$iterator(_) {\n" -" var t1 = this._parent;\n" +" var t1 = this._convert\$_parent;\n" " if (t1._processed == null) {\n" " t1 = t1.get\$keys();\n" " t1 = t1.get\$iterator(t1);\n" @@ -15225,7 +14602,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return t1;\n" " },\n" " contains\$1(_, key) {\n" -" return this._parent.containsKey\$1(key);\n" +" return this._convert\$_parent.containsKey\$1(key);\n" " }\n" " };\n" " A._Utf8Decoder__decoder_closure.prototype = {\n" @@ -16433,7 +15810,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$2(msg, position) {\n" " throw A.wrapException(A.FormatException\$(\"Illegal IPv6 address, \" + msg, this.host, position));\n" " },\n" -" \$signature: 56\n" +" \$signature: 53\n" " };\n" " A._Uri.prototype = {\n" " get\$_text() {\n" @@ -16733,7 +16110,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(s) {\n" " return A._Uri__uriEncode(64, A._asString(s), B.C_Utf8Codec, false);\n" " },\n" -" \$signature: 10\n" +" \$signature: 9\n" " };\n" " A.UriData.prototype = {\n" " get\$uri() {\n" @@ -17073,7 +16450,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t1.call(t1, value);\n" " return value;\n" " },\n" -" \$signature: 11\n" +" \$signature: 10\n" " };\n" " A.FutureOfJSAnyToJSPromise_get_toJS__closure0.prototype = {\n" " call\$2(error, stackTrace) {\n" @@ -17091,7 +16468,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t1.call(t1, wrapper);\n" " return wrapper;\n" " },\n" -" \$signature: 68\n" +" \$signature: 61\n" " };\n" " A.FutureOfVoidToJSPromise_get_toJS_closure.prototype = {\n" " call\$2(resolve, reject) {\n" @@ -17105,7 +16482,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " var t1 = this.resolve;\n" " return t1.call(t1);\n" " },\n" -" \$signature: 74\n" +" \$signature: 67\n" " };\n" " A.FutureOfVoidToJSPromise_get_toJS__closure0.prototype = {\n" " call\$2(error, stackTrace) {\n" @@ -17148,13 +16525,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " } else\n" " return o;\n" " },\n" -" \$signature: 11\n" +" \$signature: 10\n" " };\n" " A.promiseToFuture_closure.prototype = {\n" " call\$1(r) {\n" " return this.completer.complete\$1(this.T._eval\$1(\"0/?\")._as(r));\n" " },\n" -" \$signature: 5\n" +" \$signature: 4\n" " };\n" " A.promiseToFuture_closure0.prototype = {\n" " call\$1(e) {\n" @@ -17162,7 +16539,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return this.completer.completeError\$1(new A.NullRejectionException(e === undefined));\n" " return this.completer.completeError\$1(e);\n" " },\n" -" \$signature: 5\n" +" \$signature: 4\n" " };\n" " A.dartify_convert.prototype = {\n" " call\$1(o) {\n" @@ -17214,7 +16591,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " return o;\n" " },\n" -" \$signature: 11\n" +" \$signature: 10\n" " };\n" " A._JSRandom.prototype = {\n" " nextInt\$1(max) {\n" @@ -17630,13 +17007,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(e) {\n" " return type\$.BuildStatus._as(e)._name === this.json;\n" " },\n" -" \$signature: 75\n" +" \$signature: 29\n" " };\n" " A.BuildStatus_BuildStatus\$fromJson_closure0.prototype = {\n" " call\$0() {\n" " throw A.wrapException(A.ArgumentError\$(\"Unknown BuildStatus: \" + this.json, null));\n" " },\n" -" \$signature: 89\n" +" \$signature: 74\n" " };\n" " A.BuildResult.prototype = {\n" " toJson\$0() {\n" @@ -17712,7 +17089,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(e) {\n" " return type\$.DebugEvent._as(e).toJson\$0();\n" " },\n" -" \$signature: 90\n" +" \$signature: 75\n" " };\n" " A.DebugInfo.prototype = {\n" " toJson\$0() {\n" @@ -18125,14 +17502,14 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(o) {\n" " return J.toString\$0\$(o);\n" " },\n" -" \$signature: 29\n" +" \$signature: 30\n" " };\n" " A.PersistentWebSocket.prototype = {\n" " get\$_incomingStreamController() {\n" " var result, _this = this,\n" " value = _this.__PersistentWebSocket__incomingStreamController_FI;\n" " if (value === \$) {\n" -" result = A.StreamController_StreamController(null, null, null, type\$.dynamic);\n" +" result = A.StreamController_StreamController(type\$.dynamic);\n" " result.set\$onListen(_this.get\$_listenWithRetry());\n" " _this.__PersistentWebSocket__incomingStreamController_FI !== \$ && A.throwLateFieldADI(\"_incomingStreamController\");\n" " _this.__PersistentWebSocket__incomingStreamController_FI = result;\n" @@ -18302,9 +17679,9 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(socket) {\n" " var _this = this;\n" " type\$.WebSocket._as(socket);\n" -" return new A.PersistentWebSocket(_this.logger, _this.debugName, _this.maxRetryAttempts, new A._AsyncCompleter(new A._Future(\$.Zone__current, type\$._Future_void), type\$._AsyncCompleter_void), _this.uri, _this.onReconnect, socket, A.StreamController_StreamController(null, null, null, type\$.dynamic));\n" +" return new A.PersistentWebSocket(_this.logger, _this.debugName, _this.maxRetryAttempts, new A._AsyncCompleter(new A._Future(\$.Zone__current, type\$._Future_void), type\$._AsyncCompleter_void), _this.uri, _this.onReconnect, socket, A.StreamController_StreamController(type\$.dynamic));\n" " },\n" -" \$signature: 32\n" +" \$signature: 31\n" " };\n" " A.PersistentWebSocket__listenWithRetry_attemptRetry.prototype = {\n" " call\$1(message) {\n" @@ -18398,7 +17775,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " });\n" " return A._asyncStartSync(\$async\$call\$1, \$async\$completer);\n" " },\n" -" \$signature: 34\n" +" \$signature: 33\n" " };\n" " A._PersistentWebSocket_Object_StreamChannelMixin.prototype = {};\n" " A.safeUnawaited_closure.prototype = {\n" @@ -18407,7 +17784,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" @@ -18476,13 +17853,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$2(key1, key2) {\n" " return A._asString(key1).toLowerCase() === A._asString(key2).toLowerCase();\n" " },\n" -" \$signature: 35\n" +" \$signature: 34\n" " };\n" " A.BaseRequest_closure0.prototype = {\n" " call\$1(key) {\n" " return B.JSString_methods.get\$hashCode(A._asString(key).toLowerCase());\n" " },\n" -" \$signature: 36\n" +" \$signature: 35\n" " };\n" " A.BaseResponse.prototype = {\n" " BaseResponse\$7\$contentLength\$headers\$isRedirect\$persistentConnection\$reasonPhrase\$request(statusCode, contentLength, headers, isRedirect, persistentConnection, reasonPhrase, request) {\n" @@ -18577,7 +17954,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }(A._callDartFunctionFast3, t2);\n" " result[\$.\$get\$DART_CLOSURE_DART_JSINTEROP_PROPERTY_NAME()] = t2;\n" " t1.forEach(result);\n" -" t1 = A._readBody(request, response);\n" +" t1 = A._bodyToStream(request, response);\n" " t2 = A._asInt(response.status);\n" " t4 = headers;\n" " t5 = contentLength0;\n" @@ -18636,20 +18013,77 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$2(value, header) {\n" " return this.call\$3(value, header, null);\n" " },\n" +" \$signature: 36\n" +" };\n" +" A._bodyToStream_closure.prototype = {\n" +" call\$1(listener) {\n" +" return A._readStreamBody(this.request, this.response, type\$.MultiStreamController_List_int._as(listener));\n" +" },\n" " \$signature: 37\n" " };\n" -" A._readBody_closure.prototype = {\n" -" call\$1(_) {\n" -" return null;\n" +" A._readStreamBody_closure.prototype = {\n" +" call\$0() {\n" +" var t1 = this._box_0,\n" +" _0_0 = t1.resumeSignal;\n" +" if (_0_0 != null) {\n" +" t1.resumeSignal = null;\n" +" _0_0.complete\$0();\n" +" }\n" " },\n" -" \$signature: 4\n" +" \$signature: 0\n" " };\n" -" A._readBody_closure0.prototype = {\n" -" call\$1(_) {\n" -" A._asObject(_);\n" -" return this._box_0.isError;\n" +" A._readStreamBody_closure0.prototype = {\n" +" call\$0() {\n" +" var \$async\$goto = 0,\n" +" \$async\$completer = A._makeAsyncAwaitCompleter(type\$.void),\n" +" \$async\$handler = 1, \$async\$errorStack = [], \$async\$self = this, e, s, exception, \$async\$exception;\n" +" var \$async\$call\$0 = A._wrapJsFunctionForAsync(function(\$async\$errorCode, \$async\$result) {\n" +" if (\$async\$errorCode === 1) {\n" +" \$async\$errorStack.push(\$async\$result);\n" +" \$async\$goto = \$async\$handler;\n" +" }\n" +" for (;;)\n" +" switch (\$async\$goto) {\n" +" case 0:\n" +" // Function start\n" +" \$async\$handler = 3;\n" +" \$async\$self._box_0.cancelled = true;\n" +" \$async\$goto = 6;\n" +" return A._asyncAwait(A.promiseToFuture(A._asJSObject(\$async\$self.reader.cancel()), type\$.nullable_Object), \$async\$call\$0);\n" +" case 6:\n" +" // returning from await.\n" +" \$async\$handler = 1;\n" +" // goto after finally\n" +" \$async\$goto = 5;\n" +" break;\n" +" case 3:\n" +" // catch\n" +" \$async\$handler = 2;\n" +" \$async\$exception = \$async\$errorStack.pop();\n" +" e = A.unwrapException(\$async\$exception);\n" +" s = A.getTraceFromException(\$async\$exception);\n" +" if (!\$async\$self._box_0.hadError)\n" +" A._rethrowAsClientException(e, s, \$async\$self.request);\n" +" // goto after finally\n" +" \$async\$goto = 5;\n" +" break;\n" +" case 2:\n" +" // uncaught\n" +" // goto rethrow\n" +" \$async\$goto = 1;\n" +" break;\n" +" case 5:\n" +" // after finally\n" +" // implicit return\n" +" return A._asyncReturn(null, \$async\$completer);\n" +" case 1:\n" +" // rethrow\n" +" return A._asyncRethrow(\$async\$errorStack.at(-1), \$async\$completer);\n" +" }\n" +" });\n" +" return A._asyncStartSync(\$async\$call\$0, \$async\$completer);\n" " },\n" -" \$signature: 38\n" +" \$signature: 6\n" " };\n" " A.ByteStream.prototype = {\n" " toBytes\$0() {\n" @@ -18664,7 +18098,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(bytes) {\n" " return this.completer.complete\$1(new Uint8Array(A._ensureNativeList(type\$.List_int._as(bytes))));\n" " },\n" -" \$signature: 39\n" +" \$signature: 38\n" " };\n" " A.ClientException.prototype = {\n" " toString\$0(_) {\n" @@ -18752,7 +18186,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " scanner.expectDone\$0();\n" " return A.MediaType\$(t4, t5, parameters);\n" " },\n" -" \$signature: 40\n" +" \$signature: 39\n" " };\n" " A.MediaType_toString_closure.prototype = {\n" " call\$2(attribute, value) {\n" @@ -18771,7 +18205,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " } else\n" " t1._contents = t3 + value;\n" " },\n" -" \$signature: 41\n" +" \$signature: 40\n" " };\n" " A.MediaType_toString__closure.prototype = {\n" " call\$1(match) {\n" @@ -18874,7 +18308,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " \$parent._children.\$indexSet(0, thisName, t1);\n" " return t1;\n" " },\n" -" \$signature: 43\n" +" \$signature: 42\n" " };\n" " A.Context.prototype = {\n" " absolute\$15(part1, part2, part3, part4, part5, part6, part7, part8, part9, part10, part11, part12, part13, part14, part15) {\n" @@ -19121,7 +18555,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " A._asStringQ(arg);\n" " return arg == null ? \"null\" : '\"' + arg + '\"';\n" " },\n" -" \$signature: 45\n" +" \$signature: 44\n" " };\n" " A.InternalStyle.prototype = {\n" " getRoot\$1(path) {\n" @@ -19575,7 +19009,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " var t1 = this.\$this;\n" " t1._onReleaseCompleters.removeFirst\$0().complete\$1(new A.PoolResource(t1));\n" " },\n" -" \$signature: 46\n" +" \$signature: 45\n" " };\n" " A.Pool__runOnRelease_closure0.prototype = {\n" " call\$2(error, stackTrace) {\n" @@ -19593,23 +19027,27 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " get\$lines() {\n" " return this._lineStarts.length;\n" " },\n" -" SourceFile\$decoded\$2\$url(decodedChars, url) {\n" -" var t1, t2, t3, i, c, j, t4;\n" -" for (t1 = this._decodedChars, t2 = t1.length, t3 = this._lineStarts, i = 0; i < t2; ++i) {\n" -" c = t1[i];\n" +" SourceFile\$_fromList\$2\$url(decodedChars, url) {\n" +" var t1, t2, t3, t4, t5, t6, i, c, j, t7;\n" +" for (t1 = this._decodedChars, t2 = t1.length, t3 = decodedChars.__internal\$_string, t4 = t3.length, t5 = t1.\$flags | 0, t6 = this._lineStarts, i = 0; i < t2; ++i) {\n" +" if (!(i < t4))\n" +" return A.ioore(t3, i);\n" +" c = t3.charCodeAt(i);\n" +" t5 & 2 && A.throwUnsupportedOperation(t1);\n" +" t1[i] = c;\n" " if (c === 13) {\n" " j = i + 1;\n" -" if (j < t2) {\n" -" if (!(j < t2))\n" -" return A.ioore(t1, j);\n" -" t4 = t1[j] !== 10;\n" +" if (j < t4) {\n" +" if (!(j < t4))\n" +" return A.ioore(t3, j);\n" +" t7 = t3.charCodeAt(j) !== 10;\n" " } else\n" -" t4 = true;\n" -" if (t4)\n" +" t7 = true;\n" +" if (t7)\n" " c = 10;\n" " }\n" " if (c === 10)\n" -" B.JSArray_methods.add\$1(t3, i + 1);\n" +" B.JSArray_methods.add\$1(t6, i + 1);\n" " }\n" " },\n" " getLine\$1(offset) {\n" @@ -20015,7 +19453,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$0() {\n" " return this.color;\n" " },\n" -" \$signature: 47\n" +" \$signature: 46\n" " };\n" " A.Highlighter\$__closure.prototype = {\n" " call\$1(line) {\n" @@ -20023,7 +19461,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " t2 = A._arrayInstanceType(t1);\n" " return new A.WhereIterable(t1, t2._eval\$1(\"bool(1)\")._as(new A.Highlighter\$___closure()), t2._eval\$1(\"WhereIterable<1>\")).get\$length(0);\n" " },\n" -" \$signature: 48\n" +" \$signature: 47\n" " };\n" " A.Highlighter\$___closure.prototype = {\n" " call\$1(highlight) {\n" @@ -20036,21 +19474,21 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(line) {\n" " return type\$._Line._as(line).url;\n" " },\n" -" \$signature: 50\n" +" \$signature: 49\n" " };\n" " A.Highlighter__collateLines_closure.prototype = {\n" " call\$1(highlight) {\n" " var t1 = type\$._Highlight._as(highlight).span.get\$sourceUrl();\n" " return t1 == null ? new A.Object() : t1;\n" " },\n" -" \$signature: 51\n" +" \$signature: 50\n" " };\n" " A.Highlighter__collateLines_closure0.prototype = {\n" " call\$2(highlight1, highlight2) {\n" " var t1 = type\$._Highlight;\n" " return t1._as(highlight1).span.compareTo\$1(0, t1._as(highlight2).span);\n" " },\n" -" \$signature: 52\n" +" \$signature: 51\n" " };\n" " A.Highlighter__collateLines_closure1.prototype = {\n" " call\$1(entry) {\n" @@ -20093,7 +19531,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " return lines;\n" " },\n" -" \$signature: 53\n" +" \$signature: 78\n" " };\n" " A.Highlighter__collateLines__closure.prototype = {\n" " call\$1(highlight) {\n" @@ -20260,7 +19698,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }\n" " return A._Highlight__normalizeEndOfLine(A._Highlight__normalizeTrailingNewline(A._Highlight__normalizeNewlines(newSpan)));\n" " },\n" -" \$signature: 55\n" +" \$signature: 54\n" " };\n" " A._Line.prototype = {\n" " toString\$0(_) {\n" @@ -20473,8 +19911,18 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _this._outgoingController.close\$0();\n" " },\n" " _closeWithError\$1(error) {\n" -" var t1;\n" -" this._incomingController.addError\$1(error);\n" +" var _0_0, error0, stackTrace, t2,\n" +" t1 = this._incomingController;\n" +" if (t1._state >= 4)\n" +" A.throwExpression(t1._badEventState\$0());\n" +" _0_0 = A._interceptUserError(error, null);\n" +" error0 = _0_0.error;\n" +" stackTrace = _0_0.stackTrace;\n" +" t2 = t1._state;\n" +" if ((t2 & 1) !== 0)\n" +" t1._sendError\$2(error0, stackTrace);\n" +" else if ((t2 & 3) === 0)\n" +" t1._ensurePendingEvents\$0().add\$1(0, new A._DelayedError(error0, stackTrace));\n" " this.close\$0();\n" " t1 = this._onConnected;\n" " if ((t1.future._state & 30) === 0)\n" @@ -20628,7 +20076,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " });\n" " return A._asyncStartSync(\$async\$call\$0, \$async\$completer);\n" " },\n" -" \$signature: 58\n" +" \$signature: 57\n" " };\n" " A.StreamChannelMixin.prototype = {};\n" " A.StringScannerException.prototype = {\n" @@ -20675,7 +20123,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this._fail\$1(\"no more input\");\n" " },\n" " error\$3\$length\$position(message, \$length, position) {\n" -" var t2, t3, t4, t5, sourceFile, end,\n" +" var t2, t3, end, sourceFile, end0,\n" " t1 = this.string;\n" " if (position < 0)\n" " A.throwExpression(A.RangeError\$(\"position must be greater than or equal to 0.\"));\n" @@ -20685,17 +20133,16 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " if (t2)\n" " A.throwExpression(A.RangeError\$(\"position plus length must not go beyond the end of the string.\"));\n" " t2 = this.sourceUrl;\n" -" t3 = new A.CodeUnits(t1);\n" -" t4 = A._setArrayType([0], type\$.JSArray_int);\n" -" t5 = new Uint32Array(A._ensureNativeList(t3.toList\$0(t3)));\n" -" sourceFile = new A.SourceFile(t2, t4, t5);\n" -" sourceFile.SourceFile\$decoded\$2\$url(t3, t2);\n" -" end = position + \$length;\n" -" if (end > t5.length)\n" -" A.throwExpression(A.RangeError\$(\"End \" + end + string\$.x20must_ + sourceFile.get\$length(0) + \".\"));\n" +" t3 = A._setArrayType([0], type\$.JSArray_int);\n" +" end = t1.length;\n" +" sourceFile = new A.SourceFile(t2, t3, new Uint32Array(end));\n" +" sourceFile.SourceFile\$_fromList\$2\$url(new A.CodeUnits(t1), t2);\n" +" end0 = position + \$length;\n" +" if (end0 > end)\n" +" A.throwExpression(A.RangeError\$(\"End \" + end0 + string\$.x20must_ + sourceFile.get\$length(0) + \".\"));\n" " else if (position < 0)\n" " A.throwExpression(A.RangeError\$(\"Start may not be negative, was \" + position + \".\"));\n" -" throw A.wrapException(new A.StringScannerException(t1, message, new A._FileSpan(sourceFile, position, end)));\n" +" throw A.wrapException(new A.StringScannerException(t1, message, new A._FileSpan(sourceFile, position, end0)));\n" " },\n" " _fail\$1(\$name) {\n" " this.error\$3\$length\$position(\"expected \" + \$name + \".\", 0, this._string_scanner\$_position);\n" @@ -21001,8 +20448,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " 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(null, null, null, type\$.DebugEvent);\n" -" t5 = A.StreamController_StreamController(null, null, null, type\$.List_DebugEvent);\n" +" t4 = A.StreamController_StreamController(type\$.DebugEvent);\n" +" t5 = A.StreamController_StreamController(type\$.List_DebugEvent);\n" " debugEventController = new A.BatchedStreamController(t3, 1000, t4, t5, new A._AsyncCompleter(new A._Future(t2, type\$._Future_bool), type\$._AsyncCompleter_bool), type\$.BatchedStreamController_DebugEvent);\n" " t2 = A.List_List\$filled(A.QueueList__computeInitialCapacity(null), null, false, type\$.nullable_Result_DebugEvent);\n" " t3 = A.ListQueue\$(type\$._EventRequest_dynamic);\n" @@ -21024,25 +20471,25 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " });\n" " return A._asyncStartSync(\$async\$call\$0, \$async\$completer);\n" " },\n" -" \$signature: 9\n" +" \$signature: 6\n" " };\n" " A.main__closure.prototype = {\n" " call\$0() {\n" " return A.FutureOfJSAnyToJSPromise_get_toJS(this.manager._restarter.hotReloadStart\$1(A._asStringQ(init.G.\$reloadedSourcesPath)), 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" " return A.FutureOfJSAnyToJSPromise_get_toJS(this.manager.hotRestartBegin\$1(A._asStringQ(init.G.\$reloadedSourcesPath)), type\$.JSArray_nullable_Object);\n" " },\n" -" \$signature: 7\n" +" \$signature: 5\n" " };\n" " A.main__closure2.prototype = {\n" " call\$2(runId, pauseIsolatesOnStart) {\n" @@ -21062,7 +20509,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(runId) {\n" " return this.call\$2(runId, null);\n" " },\n" -" \$signature: 92\n" +" \$signature: 60\n" " };\n" " A.main__closure3.prototype = {\n" " call\$1(runId) {\n" @@ -21092,7 +20539,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " if (A._asBool(init.G.\$dartEmitDebugEvents))\n" " A._trySendEvent(this.client.get\$sink(), B.C_JsonCodec.encode\$2\$toEncodable(A._setArrayType([\"BatchedDebugEvents\", new A.BatchedDebugEvents(events).toJson\$0()], type\$.JSArray_Object), null), type\$.dynamic);\n" " },\n" -" \$signature: 63\n" +" \$signature: 62\n" " };\n" " A.main__closure6.prototype = {\n" " call\$2(kind, eventData) {\n" @@ -21104,7 +20551,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " A._trySendEvent(new A._StreamSinkWrapper(t1, A._instanceType(t1)._eval\$1(\"_StreamSinkWrapper<1>\")), new A.DebugEvent(kind, eventData, Date.now()), type\$.DebugEvent);\n" " }\n" " },\n" -" \$signature: 64\n" +" \$signature: 63\n" " };\n" " A.main__closure7.prototype = {\n" " call\$1(eventData) {\n" @@ -21316,7 +20763,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " A.main__closure10.prototype = {\n" " call\$1(error) {\n" " },\n" -" \$signature: 4\n" +" \$signature: 8\n" " };\n" " A.main__closure11.prototype = {\n" " call\$1(e) {\n" @@ -21335,25 +20782,25 @@ 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" " return A._dispatchEvent(\"dart-auth-response\", \"\" + A._asBool(isAuthenticated));\n" " },\n" -" \$signature: 65\n" +" \$signature: 64\n" " };\n" " A._sendHotReloadResponse_closure.prototype = {\n" " call\$3(id, success, errorMessage) {\n" " return new A.HotReloadResponse(id, success, errorMessage);\n" " },\n" -" \$signature: 66\n" +" \$signature: 65\n" " };\n" " A._sendHotRestartResponse_closure.prototype = {\n" " call\$3(id, success, errorMessage) {\n" " return new A.HotRestartResponse(id, success, errorMessage);\n" " },\n" -" \$signature: 67\n" +" \$signature: 66\n" " };\n" " A.DdcLibraryBundleRestarter.prototype = {\n" " _runMainWhenReady\$2(readyToRunMain, runMain) {\n" @@ -21761,7 +21208,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " this.sub.cancel\$0();\n" " return value;\n" " },\n" -" \$signature: 69\n" +" \$signature: 68\n" " };\n" " A.ReloadingManager.prototype = {\n" " hotRestart\$3\$readyToRunMain\$reloadedSourcesPath\$runId(readyToRunMain, reloadedSourcesPath, runId) {\n" @@ -22327,7 +21774,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " call\$1(e) {\n" " this.completer.completeError\$2(new A.HotReloadFailedException(A._asString(type\$.JavaScriptObject._as(e).message)), this.stackTrace);\n" " },\n" -" \$signature: 72\n" +" \$signature: 71\n" " };\n" " A._createScript_closure.prototype = {\n" " call\$0() {\n" @@ -22336,13 +21783,13 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " return new A._createScript__closure();\n" " return new A._createScript__closure0(nonce);\n" " },\n" -" \$signature: 73\n" +" \$signature: 72\n" " };\n" " A._createScript__closure.prototype = {\n" " 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" @@ -22350,7 +21797,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" @@ -22389,52 +21836,23 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _instance_1_u = hunkHelpers._instance_1u,\n" " _static_1 = hunkHelpers._static_1,\n" " _static_0 = hunkHelpers._static_0,\n" -" _static = hunkHelpers.installStaticTearOff,\n" " _instance = hunkHelpers.installInstanceTearOff,\n" " _instance_2_u = hunkHelpers._instance_2u,\n" " _instance_0_u = hunkHelpers._instance_0u,\n" -" _instance_1_i = hunkHelpers._instance_1i;\n" +" _instance_1_i = hunkHelpers._instance_1i,\n" +" _static = hunkHelpers.installStaticTearOff;\n" " _static_2(J, \"_interceptors_JSArray__compareAny\$closure\", \"JSArray__compareAny\", 27);\n" -" _instance_1_u(A.CastStreamSubscription.prototype, \"get\$__internal\$_onData\", \"__internal\$_onData\$1\", 8);\n" +" _instance_1_u(A.CastStreamSubscription.prototype, \"get\$__internal\$_onData\", \"__internal\$_onData\$1\", 11);\n" " _static_1(A, \"async__AsyncRun__scheduleImmediateJsOverride\$closure\", \"_AsyncRun__scheduleImmediateJsOverride\", 14);\n" " _static_1(A, \"async__AsyncRun__scheduleImmediateWithSetImmediate\$closure\", \"_AsyncRun__scheduleImmediateWithSetImmediate\", 14);\n" " _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\", 5);\n" -" _static_2(A, \"async___nullErrorHandler\$closure\", \"_nullErrorHandler\", 6);\n" +" _static_1(A, \"async___nullDataHandler\$closure\", \"_nullDataHandler\", 4);\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\"], 76, 0);\n" -" _static(A, \"async___rootRun\$closure\", 4, null, [\"call\$1\$4\", \"call\$4\"], [\"_rootRun\", function(\$self, \$parent, zone, f) {\n" -" return A._rootRun(\$self, \$parent, zone, f, type\$.dynamic);\n" -" }], 77, 0);\n" -" _static(A, \"async___rootRunUnary\$closure\", 5, null, [\"call\$2\$5\", \"call\$5\"], [\"_rootRunUnary\", function(\$self, \$parent, zone, f, arg) {\n" -" var t1 = type\$.dynamic;\n" -" return A._rootRunUnary(\$self, \$parent, zone, f, arg, t1, t1);\n" -" }], 78, 0);\n" -" _static(A, \"async___rootRunBinary\$closure\", 6, null, [\"call\$3\$6\"], [\"_rootRunBinary\"], 79, 0);\n" -" _static(A, \"async___rootRegisterCallback\$closure\", 4, null, [\"call\$1\$4\", \"call\$4\"], [\"_rootRegisterCallback\", function(\$self, \$parent, zone, f) {\n" -" return A._rootRegisterCallback(\$self, \$parent, zone, f, type\$.dynamic);\n" -" }], 80, 0);\n" -" _static(A, \"async___rootRegisterUnaryCallback\$closure\", 4, null, [\"call\$2\$4\", \"call\$4\"], [\"_rootRegisterUnaryCallback\", function(\$self, \$parent, zone, f) {\n" -" var t1 = type\$.dynamic;\n" -" return A._rootRegisterUnaryCallback(\$self, \$parent, zone, f, t1, t1);\n" -" }], 81, 0);\n" -" _static(A, \"async___rootRegisterBinaryCallback\$closure\", 4, null, [\"call\$3\$4\", \"call\$4\"], [\"_rootRegisterBinaryCallback\", function(\$self, \$parent, zone, f) {\n" -" var t1 = type\$.dynamic;\n" -" return A._rootRegisterBinaryCallback(\$self, \$parent, zone, f, t1, t1, t1);\n" -" }], 82, 0);\n" -" _static(A, \"async___rootErrorCallback\$closure\", 5, null, [\"call\$5\"], [\"_rootErrorCallback\"], 83, 0);\n" -" _static(A, \"async___rootScheduleMicrotask\$closure\", 4, null, [\"call\$4\"], [\"_rootScheduleMicrotask\"], 84, 0);\n" -" _static(A, \"async___rootCreateTimer\$closure\", 5, null, [\"call\$5\"], [\"_rootCreateTimer\"], 85, 0);\n" -" _static(A, \"async___rootCreatePeriodicTimer\$closure\", 5, null, [\"call\$5\"], [\"_rootCreatePeriodicTimer\"], 86, 0);\n" -" _static(A, \"async___rootPrint\$closure\", 4, null, [\"call\$4\"], [\"_rootPrint\"], 87, 0);\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\"], 62, 0, 0);\n" -" _instance_2_u(A._Future.prototype, \"get\$_completeError\", \"_completeError\$2\", 6);\n" +" _instance(A._Completer.prototype, \"get\$completeError\", 0, 1, null, [\"call\$2\", \"call\$1\"], [\"completeError\$2\", \"completeError\$1\"], 58, 0, 0);\n" +" _instance_2_u(A._Future.prototype, \"get\$_completeError\", \"_completeError\$2\", 7);\n" " var _;\n" -" _instance_1_u(_ = A._StreamController.prototype, \"get\$_add\", \"_add\$1\", 8);\n" -" _instance_2_u(_, \"get\$_addError\", \"_addError\$2\", 6);\n" -" _instance_0_u(_, \"get\$_close\", \"_close\$0\", 0);\n" " _instance_0_u(_ = A._ControllerSubscription.prototype, \"get\$_onPause\", \"_onPause\$0\", 0);\n" " _instance_0_u(_, \"get\$_onResume\", \"_onResume\$0\", 0);\n" " _instance_0_u(_ = A._BufferingStreamSubscription.prototype, \"get\$_onPause\", \"_onPause\$0\", 0);\n" @@ -22442,59 +21860,59 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _instance_0_u(A._DoneStreamSubscription.prototype, \"get\$_onMicrotask\", \"_onMicrotask\$0\", 0);\n" " _instance_0_u(_ = A._ForwardingStreamSubscription.prototype, \"get\$_onPause\", \"_onPause\$0\", 0);\n" " _instance_0_u(_, \"get\$_onResume\", \"_onResume\$0\", 0);\n" -" _instance_1_u(_, \"get\$_handleData\", \"_handleData\$1\", 8);\n" -" _instance_2_u(_, \"get\$_handleError\", \"_handleError\$2\", 33);\n" +" _instance_1_u(_, \"get\$_handleData\", \"_handleData\$1\", 11);\n" +" _instance_2_u(_, \"get\$_handleError\", \"_handleError\$2\", 76);\n" " _instance_0_u(_, \"get\$_handleDone\", \"_handleDone\$0\", 0);\n" " _static_2(A, \"collection___defaultEquals\$closure\", \"_defaultEquals0\", 28);\n" " _static_1(A, \"collection___defaultHashCode\$closure\", \"_defaultHashCode\", 15);\n" " _static_2(A, \"collection_ListBase__compareAny\$closure\", \"ListBase__compareAny\", 27);\n" " _static_1(A, \"convert___defaultToEncodable\$closure\", \"_defaultToEncodable\", 16);\n" -" _instance_1_i(_ = A._ByteCallbackSink.prototype, \"get\$add\", \"add\$1\", 8);\n" +" _instance_1_i(_ = A._ByteCallbackSink.prototype, \"get\$add\", \"add\$1\", 11);\n" " _instance_0_u(_, \"get\$close\", \"close\$0\", 0);\n" " _static_1(A, \"core__identityHashCode\$closure\", \"identityHashCode\", 15);\n" " _static_2(A, \"core__identical\$closure\", \"identical\", 28);\n" -" _static_1(A, \"core_Uri_decodeComponent\$closure\", \"Uri_decodeComponent\", 10);\n" +" _static_1(A, \"core_Uri_decodeComponent\$closure\", \"Uri_decodeComponent\", 9);\n" " _static(A, \"math__max\$closure\", 2, null, [\"call\$1\$2\", \"call\$2\"], [\"max\", function(a, b) {\n" " return A.max(a, b, type\$.num);\n" -" }], 91, 0);\n" -" _instance_1_u(_ = A.PersistentWebSocket.prototype, \"get\$_writeToWebSocket\", \"_writeToWebSocket\$1\", 5);\n" -" _instance_0_u(_, \"get\$_listenWithRetry\", \"_listenWithRetry\$0\", 9);\n" -" _static_1(A, \"case_insensitive_map_CaseInsensitiveMap__canonicalizer\$closure\", \"CaseInsensitiveMap__canonicalizer\", 10);\n" +" }], 77, 0);\n" +" _instance_1_u(_ = A.PersistentWebSocket.prototype, \"get\$_writeToWebSocket\", \"_writeToWebSocket\$1\", 4);\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" " _instance_0_u(_, \"get\$_onOutgoingDone\", \"_onOutgoingDone\$0\", 0);\n" -" _instance_1_u(_, \"get\$_onOutgoingMessage\", \"_onOutgoingMessage\$1\", 57);\n" -" _static_1(A, \"client__initializeConnection\$closure\", \"initializeConnection\", 61);\n" +" _instance_1_u(_, \"get\$_onOutgoingMessage\", \"_onOutgoingMessage\$1\", 56);\n" +" _static_1(A, \"client__initializeConnection\$closure\", \"initializeConnection\", 52);\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\", 70);\n" -" _instance_2_u(_, \"get\$_moduleTopologicalCompare\", \"_moduleTopologicalCompare\$2\", 71);\n" +" _instance_1_u(_ = A.RequireRestarter.prototype, \"get\$_moduleParents\", \"_moduleParents\$1\", 69);\n" +" _instance_2_u(_, \"get\$_moduleTopologicalCompare\", \"_moduleTopologicalCompare\$2\", 70);\n" " })();\n" " (function inheritance() {\n" " var _mixin = hunkHelpers.mixin,\n" " _inherit = hunkHelpers.inherit,\n" " _inheritMany = hunkHelpers.inheritMany;\n" " _inherit(A.Object, null);\n" -" _inheritMany(A.Object, [A.JS_CONST, J.Interceptor, A.SafeToStringHook, J.ArrayIterator, A.Stream, A.CastStreamSubscription, A.Iterable, A.CastIterator, A.Closure, A.MapBase, A.Error, A.ListBase, A.SentinelValue, A.ListIterator, A.MappedIterator, A.WhereIterator, A.ExpandIterator, A.TakeIterator, A.SkipIterator, A.EmptyIterator, A.WhereTypeIterator, A.FixedLengthListMixin, A.UnmodifiableListMixin, A._Record, A.ConstantMap, A._KeysOrValuesOrElementsIterator, A.TypeErrorDecoder, A.NullThrownFromJavaScriptException, A.ExceptionAndStackTrace, A._StackTrace, A.LinkedHashMapCell, A.LinkedHashMapKeyIterator, A.LinkedHashMapValueIterator, A.LinkedHashMapEntryIterator, A.JSSyntaxRegExp, A._MatchImplementation, A._AllMatchesIterator, A.StringMatch, A._StringAllMatchesIterator, A._Cell, A._UnmodifiableNativeByteBufferView, A.Rti, A._FunctionParameters, A._Type, A._TimerImpl, A._AsyncAwaitCompleter, A._AsyncStarStreamController, A._IterationMarker, A.AsyncError, A._Completer, A._FutureListener, A._Future, A._AsyncCallbackEntry, A._StreamController, A._AsyncStreamControllerDispatch, A._BufferingStreamSubscription, A._StreamSinkWrapper, A._AddStreamState, A._DelayedEvent, A._DelayedDone, A._PendingEvents, A._DoneStreamSubscription, A._StreamIterator, A._ZoneRun, A._ZoneRunUnary, A._ZoneRunBinary, A._ZoneRegisterCallback, A._ZoneRegisterUnaryCallback, A._ZoneRegisterBinaryCallback, A._ZoneErrorCallback, A._ZoneScheduleMicrotask, A._ZoneCreateTimer, A._ZoneCreatePeriodicTimer, A._ZonePrint, A._ZoneFork, A._ZoneHandleUncaughtError, A._ZoneValues, A._Zone, A._ZoneDelegate, A.ZoneSpecification, A._HashMapKeyIterator, A.SetBase, A._HashSetIterator, A._UnmodifiableMapMixin, A.MapView, A._ListQueueIterator, A._SplayTreeNode, A._SplayTree, A._SplayTreeIterator, A.Codec, A.Converter, A.ByteConversionSink, A._JsonStringifier, A._Utf8Encoder, A._Utf8Decoder, A.DateTime, A.Duration, A._Enum, A.OutOfMemoryError, A.StackOverflowError, A._Exception, A.FormatException, A.MapEntry, A.Null, A._StringStackTrace, A.StringBuffer, A._Uri, A.UriData, A._SimpleUri, A.NullRejectionException, A._JSRandom, A._JSSecureRandom, A.AsyncMemoizer, A.ErrorResult, A.ValueResult, A.StreamQueue, A._NextRequest, A._HasNextRequest, A.CanonicalizedMap, A._QueueList_Object_ListMixin, A.BuildResult, A.ConnectRequest, A.DebugEvent, A.BatchedDebugEvents, A.DebugInfo, A.DevToolsRequest, A.DevToolsResponse, A.ErrorResponse, A.HotReloadRequest, A.HotReloadResponse, A.HotRestartRequest, A.HotRestartResponse, A.PingRequest, A.RegisterEvent, A.RunRequest, A.ServiceExtensionRequest, A.ServiceExtensionResponse, A.BatchedStreamController, A.SocketClient, A._PersistentWebSocket_Object_StreamChannelMixin, A.Uuid, A._StackState, A.ClientException, A.BaseClient, A.BaseRequest, A.BaseResponse, A.MediaType, A.Level, A.LogRecord, A.Logger, A.Context, A.Style, A.ParsedPath, A.PathException, A.Pool, A.PoolResource, A.SourceFile, A.SourceLocationMixin, A.SourceSpanMixin, A.Highlighter, A._Highlight, A._Line, A.SourceLocation, A.SourceSpanException, A.StreamChannelMixin, A.StringScanner, A.EventStreamProvider, A._EventStreamSubscription, A.BrowserWebSocket, A.WebSocketEvent, A.WebSocketException, A.DdcLibraryBundleRestarter, A.DdcRestarter, A.ReloadingManager, A.HotReloadFailedException, A.RequireRestarter]);\n" +" _inheritMany(A.Object, [A.JS_CONST, J.Interceptor, A.SafeToStringHook, J.ArrayIterator, A.Stream, A.CastStreamSubscription, A.Iterable, A.CastIterator, A.Closure, A.MapBase, A.Error, A.ListBase, A.SentinelValue, A.ListIterator, A.MappedIterator, A.WhereIterator, A.ExpandIterator, A.TakeIterator, A.SkipIterator, A.EmptyIterator, A.WhereTypeIterator, A.FixedLengthListMixin, A.UnmodifiableListMixin, A._Record, A.ConstantMap, A._KeysOrValuesOrElementsIterator, A.TypeErrorDecoder, A.NullThrownFromJavaScriptException, A.ExceptionAndStackTrace, A._StackTrace, A.LinkedHashMapCell, A.LinkedHashMapKeyIterator, A.LinkedHashMapValueIterator, A.LinkedHashMapEntryIterator, A.JSSyntaxRegExp, A._MatchImplementation, A._AllMatchesIterator, A.StringMatch, A._StringAllMatchesIterator, A._Cell, A._UnmodifiableNativeByteBufferView, A.Rti, A._FunctionParameters, A._Type, A._TimerImpl, A._AsyncAwaitCompleter, A.AsyncError, A._Completer, A._FutureListener, A._Future, A._AsyncCallbackEntry, A._StreamController, A._AsyncStreamControllerDispatch, A._BufferingStreamSubscription, A._StreamSinkWrapper, A._DelayedEvent, A._DelayedDone, A._PendingEvents, A._DoneStreamSubscription, A._StreamIterator, A._ZoneHandleUncaughtError, A.Zone, A.ZoneDelegate, A.ZoneSpecification, A._HashMapKeyIterator, A.SetBase, A._HashSetIterator, A._UnmodifiableMapMixin, A.MapView, A._ListQueueIterator, A._SplayTreeNode, A._SplayTree, A._SplayTreeIterator, A.Codec, A.Converter, A.ByteConversionSink, A._JsonStringifier, A._Utf8Encoder, A._Utf8Decoder, A.DateTime, A.Duration, A._Enum, A.OutOfMemoryError, A.StackOverflowError, A._Exception, A.FormatException, A.MapEntry, A.Null, A._StringStackTrace, A.StringBuffer, A._Uri, A.UriData, A._SimpleUri, A.NullRejectionException, A._JSRandom, A._JSSecureRandom, A.AsyncMemoizer, A.ErrorResult, A.ValueResult, A.StreamQueue, A._NextRequest, A._HasNextRequest, A.CanonicalizedMap, A._QueueList_Object_ListMixin, A.BuildResult, A.ConnectRequest, A.DebugEvent, A.BatchedDebugEvents, A.DebugInfo, A.DevToolsRequest, A.DevToolsResponse, A.ErrorResponse, A.HotReloadRequest, A.HotReloadResponse, A.HotRestartRequest, A.HotRestartResponse, A.PingRequest, A.RegisterEvent, A.RunRequest, A.ServiceExtensionRequest, A.ServiceExtensionResponse, A.BatchedStreamController, A.SocketClient, A._PersistentWebSocket_Object_StreamChannelMixin, A.Uuid, A._StackState, A.ClientException, A.BaseClient, A.BaseRequest, A.BaseResponse, A.MediaType, A.Level, A.LogRecord, A.Logger, A.Context, A.Style, A.ParsedPath, A.PathException, A.Pool, A.PoolResource, A.SourceFile, A.SourceLocationMixin, A.SourceSpanMixin, A.Highlighter, A._Highlight, A._Line, A.SourceLocation, A.SourceSpanException, A.StreamChannelMixin, A.StringScanner, A.EventStreamProvider, A._EventStreamSubscription, A.BrowserWebSocket, A.WebSocketEvent, A.WebSocketException, A.DdcLibraryBundleRestarter, A.DdcRestarter, A.ReloadingManager, A.HotReloadFailedException, A.RequireRestarter]);\n" " _inheritMany(J.Interceptor, [J.JSBool, J.JSNull, J.JavaScriptObject, J.JavaScriptBigInt, J.JavaScriptSymbol, J.JSNumber, J.JSString]);\n" " _inheritMany(J.JavaScriptObject, [J.LegacyJavaScriptObject, J.JSArray, A.NativeByteBuffer, A.NativeTypedData]);\n" " _inheritMany(J.LegacyJavaScriptObject, [J.PlainJavaScriptObject, J.UnknownJavaScriptObject, J.JavaScriptFunction]);\n" " _inherit(J.JSArraySafeToStringHook, A.SafeToStringHook);\n" " _inherit(J.JSUnmodifiableArray, J.JSArray);\n" " _inheritMany(J.JSNumber, [J.JSInt, J.JSNumNotInt]);\n" -" _inheritMany(A.Stream, [A.CastStream, A.StreamView, A._StreamImpl, A._EmptyStream, A._ForwardingStream, A._EventStream]);\n" +" _inheritMany(A.Stream, [A.CastStream, A.StreamView, A._StreamImpl, A._EmptyStream, A._MultiStream, A._ForwardingStream, A._EventStream]);\n" " _inheritMany(A.Iterable, [A._CastIterableBase, A.EfficientLengthIterable, A.MappedIterable, A.WhereIterable, A.ExpandIterable, A.TakeIterable, A.SkipIterable, A.WhereTypeIterable, A._KeysOrValues, A._AllMatchesIterable, A._StringAllMatchesIterable]);\n" " _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._asyncStarHelper_closure0, A._Future__propagateToListeners_handleWhenCompleteCallback_closure, A._Future_timeout_closure0, A.Stream_length_closure, A.Stream_first_closure0, A._CustomZone_bindUnaryCallbackGuarded_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._readBody_closure, A._readBody_closure0, 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._AddStreamState_makeErrorHandler_closure, 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" +" _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.Zone_bindUnaryCallbackGuarded_closure, A.runZonedGuarded_errorHandler, 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._asyncStarHelper_closure, A._AsyncStarStreamController__resumeBody, A._AsyncStarStreamController__resumeBody_closure, A._AsyncStarStreamController_closure0, A._AsyncStarStreamController_closure1, A._AsyncStarStreamController_closure, A._AsyncStarStreamController__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._AddStreamState_cancel_closure, A._BufferingStreamSubscription_asFuture_closure, A._BufferingStreamSubscription_asFuture__closure, A._BufferingStreamSubscription__sendError_sendError, A._BufferingStreamSubscription__sendDone_sendDone, A._PendingEvents_schedule_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.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.Closure0Args, [A.nullFuture_closure, A._AsyncRun__scheduleImmediateJsOverride_internalCallback, A._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, A._TimerImpl_internalCallback, 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.Zone_bindCallback_closure, A.Zone_bindCallbackGuarded_closure, A._rootHandleUncaughtError_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" @@ -22521,10 +21939,9 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _inherit(A._AsyncStreamController, A._StreamController);\n" " _inherit(A._ControllerStream, A._StreamImpl);\n" " _inheritMany(A._BufferingStreamSubscription, [A._ControllerSubscription, A._ForwardingStreamSubscription]);\n" -" _inherit(A._StreamControllerAddStreamState, A._AddStreamState);\n" " _inheritMany(A._DelayedEvent, [A._DelayedData, A._DelayedError]);\n" +" _inherit(A._MultiStreamController, A._AsyncStreamController);\n" " _inherit(A._MapStream, A._ForwardingStream);\n" -" _inheritMany(A._Zone, [A._CustomZone, A._RootZone]);\n" " _inherit(A._IdentityHashMap, A._HashMap);\n" " _inherit(A._SetBase, A.SetBase);\n" " _inherit(A._HashSet, A._SetBase);\n" @@ -22585,7 +22002,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)\", \"Null(@)\", \"~(@)\", \"~(Object,StackTrace)\", \"JSObject()\", \"~(Object?)\", \"Future<~>()\", \"String(String)\", \"Object?(Object?)\", \"bool(_Highlight)\", \"Null(JSObject)\", \"~(~())\", \"int(Object?)\", \"@(@)\", \"~(Object?,Object?)\", \"@()\", \"Null(JavaScriptFunction,JavaScriptFunction)\", \"bool()\", \"Future<~>(String)\", \"String(Match)\", \"bool(String)\", \"int()\", \"Null(String)\", \"Null(JavaScriptFunction)\", \"int(@,@)\", \"bool(Object?,Object?)\", \"String(@)\", \"@(String)\", \"@(@,String)\", \"PersistentWebSocket(WebSocket)\", \"~(@,StackTrace)\", \"Future<~>(WebSocketEvent)\", \"bool(String,String)\", \"int(String)\", \"Null(String,String[Object?])\", \"bool(Object)\", \"~(List)\", \"MediaType()\", \"~(String,String)\", \"~(Zone,ZoneDelegate,Zone,Object,StackTrace)\", \"Logger()\", \"bool(Object?)\", \"String(String?)\", \"Null(~)\", \"String?()\", \"int(_Line)\", \"Null(~())\", \"Object(_Line)\", \"Object(_Highlight)\", \"int(_Highlight,_Highlight)\", \"List<_Line>(MapEntry>)\", \"Null(@,StackTrace)\", \"SourceSpanWithContext()\", \"0&(String,int?)\", \"~(String?)\", \"Future()\", \"~(int,@)\", \"_Future<@>?()\", \"~(StreamSink<@>)\", \"~(Object[StackTrace?])\", \"~(List)\", \"Null(String,String)\", \"~(bool)\", \"HotReloadResponse(String,bool,String?)\", \"HotRestartResponse(String,bool,String?)\", \"JSObject(Object,StackTrace)\", \"bool(bool)\", \"List(String)\", \"int(String,String)\", \"Null(JavaScriptObject)\", \"JSObject()()\", \"Object?(~)\", \"bool(BuildStatus)\", \"~(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)\", \"Zone(Zone?,ZoneDelegate?,Zone,ZoneSpecification?,Map?)\", \"0&()\", \"Map(DebugEvent)\", \"0^(0^,0^)\", \"JSObject(String[bool?])\"],\n" +" types: [\"~()\", \"Null()\", \"~(JSObject)\", \"Null(Object,StackTrace)\", \"~(@)\", \"JSObject()\", \"Future<~>()\", \"~(Object,StackTrace)\", \"Null(@)\", \"String(String)\", \"Object?(Object?)\", \"~(Object?)\", \"bool(_Highlight)\", \"Null(JSObject)\", \"~(~())\", \"int(Object?)\", \"@(@)\", \"~(Object?,Object?)\", \"@()\", \"Null(JavaScriptFunction,JavaScriptFunction)\", \"bool()\", \"Future<~>(String)\", \"String(Match)\", \"bool(String)\", \"int()\", \"Null(String)\", \"Null(JavaScriptFunction)\", \"int(@,@)\", \"bool(Object?,Object?)\", \"bool(BuildStatus)\", \"String(@)\", \"PersistentWebSocket(WebSocket)\", \"~(Zone,ZoneDelegate,Zone,Object,StackTrace)\", \"Future<~>(WebSocketEvent)\", \"bool(String,String)\", \"int(String)\", \"Null(String,String[Object?])\", \"~(MultiStreamController>)\", \"~(List)\", \"MediaType()\", \"~(String,String)\", \"bool(Object?)\", \"Logger()\", \"Null(~())\", \"String(String?)\", \"Null(~)\", \"String?()\", \"int(_Line)\", \"Null(@,StackTrace)\", \"Object(_Line)\", \"Object(_Highlight)\", \"int(_Highlight,_Highlight)\", \"~(StreamSink<@>)\", \"0&(String,int?)\", \"SourceSpanWithContext()\", \"~(int,@)\", \"~(String?)\", \"Future()\", \"~(Object[StackTrace?])\", \"@(String)\", \"JSObject(String[bool?])\", \"JSObject(Object,StackTrace)\", \"~(List)\", \"Null(String,String)\", \"~(bool)\", \"HotReloadResponse(String,bool,String?)\", \"HotRestartResponse(String,bool,String?)\", \"Object?(~)\", \"bool(bool)\", \"List(String)\", \"int(String,String)\", \"Null(JavaScriptObject)\", \"JSObject()()\", \"@(@,String)\", \"0&()\", \"Map(DebugEvent)\", \"~(@,StackTrace)\", \"0^(0^,0^)\", \"List<_Line>(MapEntry>)\"],\n" " interceptorsByTag: null,\n" " leafTags: null,\n" " arrayRti: Symbol(\"\$ti\"),\n" @@ -22593,7 +22010,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\":[]},\"_Future\":{\"Future\":[\"1\"]},\"_TimerImpl\":{\"Timer\":[]},\"_AsyncAwaitCompleter\":{\"Completer\":[\"1\"]},\"_Completer\":{\"Completer\":[\"1\"]},\"_AsyncCompleter\":{\"_Completer\":[\"1\"],\"Completer\":[\"1\"]},\"_SyncCompleter\":{\"_Completer\":[\"1\"],\"Completer\":[\"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\"]},\"_StreamControllerAddStreamState\":{\"_AddStreamState\":[\"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\"},\"_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\":[]},\"_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_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\"},\"_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" @@ -22610,6 +22027,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " var type\$ = (function rtii() {\n" " var findType = A.findType;\n" " return {\n" +" \$env_1_1_dynamic: findType(\"@<@>\"),\n" +" \$env_1_1_void: findType(\"@<~>\"),\n" " AsyncError: findType(\"AsyncError\"),\n" " BatchedStreamController_DebugEvent: findType(\"BatchedStreamController\"),\n" " BrowserWebSocket: findType(\"BrowserWebSocket\"),\n" @@ -22667,6 +22086,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " Map_dynamic_dynamic: findType(\"Map<@,@>\"),\n" " MappedListIterable_String_dynamic: findType(\"MappedListIterable\"),\n" " MediaType: findType(\"MediaType\"),\n" +" MultiStreamController_List_int: findType(\"MultiStreamController>\"),\n" " NativeArrayBuffer: findType(\"NativeArrayBuffer\"),\n" " NativeTypedArrayOfInt: findType(\"NativeTypedArrayOfInt\"),\n" " NativeUint8List: findType(\"NativeUint8List\"),\n" @@ -22688,11 +22108,9 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " SplayTreeSet_String: findType(\"SplayTreeSet\"),\n" " StackTrace: findType(\"StackTrace\"),\n" " StreamQueue_DebugEvent: findType(\"StreamQueue\"),\n" -" Stream_dynamic: findType(\"Stream<@>\"),\n" " StreamedResponse: findType(\"StreamedResponse\"),\n" " String: findType(\"String\"),\n" " String_Function_Match: findType(\"String(Match)\"),\n" -" Timer: findType(\"Timer\"),\n" " TrustedGetRuntimeType: findType(\"TrustedGetRuntimeType\"),\n" " TwoPhaseRestarter: findType(\"TwoPhaseRestarter\"),\n" " TypeError: findType(\"TypeError\"),\n" @@ -22706,8 +22124,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " WebSocket: findType(\"WebSocket\"),\n" " WebSocketEvent: findType(\"WebSocketEvent\"),\n" " WhereTypeIterable_String: findType(\"WhereTypeIterable\"),\n" -" Zone: findType(\"Zone\"),\n" -" ZoneDelegate: findType(\"ZoneDelegate\"),\n" " _AsyncCompleter_BrowserWebSocket: findType(\"_AsyncCompleter\"),\n" " _AsyncCompleter_PoolResource: findType(\"_AsyncCompleter\"),\n" " _AsyncCompleter_String: findType(\"_AsyncCompleter\"),\n" @@ -22729,6 +22145,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " _Highlight: findType(\"_Highlight\"),\n" " _IdentityHashMap_of_nullable_Object_and_nullable_Object: findType(\"_IdentityHashMap\"),\n" " _Line: findType(\"_Line\"),\n" +" _MultiStream_List_int: findType(\"_MultiStream>\"),\n" " _StreamControllerAddStreamState_nullable_Object: findType(\"_StreamControllerAddStreamState\"),\n" " _SyncCompleter_PoolResource: findType(\"_SyncCompleter\"),\n" " bool: findType(\"bool\"),\n" @@ -22752,13 +22169,10 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " nullable_StackTrace: findType(\"StackTrace?\"),\n" " nullable_String: findType(\"String?\"),\n" " nullable_String_Function_Match: findType(\"String(Match)?\"),\n" -" nullable_Zone: findType(\"Zone?\"),\n" -" nullable_ZoneDelegate: findType(\"ZoneDelegate?\"),\n" " nullable__DelayedEvent_dynamic: findType(\"_DelayedEvent<@>?\"),\n" " nullable__FutureListener_dynamic_dynamic: findType(\"_FutureListener<@,@>?\"),\n" " nullable__Highlight: findType(\"_Highlight?\"),\n" " nullable_bool: findType(\"bool?\"),\n" -" nullable_bool_Function_Object: findType(\"bool(Object)?\"),\n" " nullable_double: findType(\"double?\"),\n" " nullable_int: findType(\"int?\"),\n" " nullable_num: findType(\"num?\"),\n" @@ -22771,7 +22185,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " void_Function_Object: findType(\"~(Object)\"),\n" " void_Function_Object_StackTrace: findType(\"~(Object,StackTrace)\"),\n" " void_Function_String_dynamic: findType(\"~(String,@)\"),\n" -" void_Function_Timer: findType(\"~(Timer)\"),\n" " void_Function_int_dynamic: findType(\"~(int,@)\")\n" " };\n" " })();\n" @@ -22931,8 +22344,6 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " B.C_Uuid = new A.Uuid();\n" " B.C__DelayedDone = new A._DelayedDone();\n" " B.C__JSRandom = new A._JSRandom();\n" -" B.C__RootZone = new A._RootZone();\n" -" B.C__ZoneCreatePeriodicTimer = new A._ZoneCreatePeriodicTimer();\n" " B.Duration_0 = new A.Duration(0);\n" " B.Duration_5000000 = new A.Duration(5000000);\n" " B.JsonDecoder_null = new A.JsonDecoder(null);\n" @@ -22968,21 +22379,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " B.Type_Uint8ClampedList_04U = A.typeLiteral(\"Uint8ClampedList\");\n" " B.Type_Uint8List_8Eb = A.typeLiteral(\"Uint8List\");\n" " B.Utf8Decoder_false = new A.Utf8Decoder(false);\n" +" B.Zone_jYP = new A.Zone(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null);\n" " B._StringStackTrace_OdL = new A._StringStackTrace(\"\");\n" -" B._ZoneCreateTimer__RootZone__rootCreateTimer = new A._ZoneCreateTimer(B.C__RootZone, A.async___rootCreateTimer\$closure());\n" -" B._ZoneErrorCallback__RootZone__rootErrorCallback = new A._ZoneErrorCallback(B.C__RootZone, A.async___rootErrorCallback\$closure());\n" -" B._ZoneFork__RootZone__rootFork = new A._ZoneFork(B.C__RootZone, A.async___rootFork\$closure());\n" -" B._ZoneHandleUncaughtError_wQ6 = new A._ZoneHandleUncaughtError(B.C__RootZone, A.async___rootHandleUncaughtError\$closure());\n" -" B._ZonePrint__RootZone__rootPrint = new A._ZonePrint(B.C__RootZone, A.async___rootPrint\$closure());\n" -" B._ZoneRegisterBinaryCallback_sk0 = new A._ZoneRegisterBinaryCallback(B.C__RootZone, A.async___rootRegisterBinaryCallback\$closure());\n" -" B._ZoneRegisterCallback__RootZone__rootRegisterCallback = new A._ZoneRegisterCallback(B.C__RootZone, A.async___rootRegisterCallback\$closure());\n" -" B._ZoneRegisterUnaryCallback_a9v = new A._ZoneRegisterUnaryCallback(B.C__RootZone, A.async___rootRegisterUnaryCallback\$closure());\n" -" B._ZoneRunBinary__RootZone__rootRunBinary = new A._ZoneRunBinary(B.C__RootZone, A.async___rootRunBinary\$closure());\n" -" B._ZoneRunUnary__RootZone__rootRunUnary = new A._ZoneRunUnary(B.C__RootZone, A.async___rootRunUnary\$closure());\n" -" B._ZoneRun__RootZone__rootRun = new A._ZoneRun(B.C__RootZone, A.async___rootRun\$closure());\n" -" B._ZoneScheduleMicrotask__RootZone__rootScheduleMicrotask = new A._ZoneScheduleMicrotask(B.C__RootZone, A.async___rootScheduleMicrotask\$closure());\n" -" B.Map_empty1 = new A.ConstantStringMap(B.Object_empty, [], A.findType(\"ConstantStringMap\"));\n" -" B._ZoneValues__RootZone_Map_empty = new A._ZoneValues(B.C__RootZone, B.Map_empty1);\n" " })();\n" " (function staticFields() {\n" " \$._JS_INTEROP_INTERCEPTOR_TAG = null;\n" @@ -23002,8 +22400,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " \$._lastCallback = null;\n" " \$._lastPriorityCallback = null;\n" " \$._isInCallbackLoop = false;\n" -" \$.Zone__current = B.C__RootZone;\n" -" \$._RootZone__rootDelegate = null;\n" +" \$.Zone__current = B.Zone_jYP;\n" " \$.Uri__cachedBaseString = \"\";\n" " \$.Uri__cachedBaseUri = null;\n" " \$.LogRecord__nextNumber = 0;\n" @@ -23016,7 +22413,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " var _lazyFinal = hunkHelpers.lazyFinal;\n" " _lazyFinal(\$, \"DART_CLOSURE_PROPERTY_NAME\", \"\$get\$DART_CLOSURE_PROPERTY_NAME\", () => A.getIsolateAffinityTag(\"_\$dart_dartClosure\"));\n" " _lazyFinal(\$, \"DART_CLOSURE_DART_JSINTEROP_PROPERTY_NAME\", \"\$get\$DART_CLOSURE_DART_JSINTEROP_PROPERTY_NAME\", () => A.getIsolateAffinityTag(\"_\$dart_dartClosure_dartJSInterop\"));\n" -" _lazyFinal(\$, \"nullFuture\", \"\$get\$nullFuture\", () => B.C__RootZone.run\$1\$1(new A.nullFuture_closure(), type\$.Future_void));\n" +" _lazyFinal(\$, \"nullFuture\", \"\$get\$nullFuture\", () => B.Zone_jYP.run\$1\$1(new A.nullFuture_closure(), type\$.Future_void));\n" " _lazyFinal(\$, \"_safeToStringHooks\", \"\$get\$_safeToStringHooks\", () => A._setArrayType([new J.JSArraySafeToStringHook()], A.findType(\"JSArray\")));\n" " _lazyFinal(\$, \"TypeErrorDecoder_noSuchMethodPattern\", \"\$get\$TypeErrorDecoder_noSuchMethodPattern\", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokeCallErrorOn({\n" " toString: function() {\n" @@ -23064,6 +22461,7 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " }()));\n" " _lazyFinal(\$, \"_AsyncRun__scheduleImmediateClosure\", \"\$get\$_AsyncRun__scheduleImmediateClosure\", () => A._AsyncRun__initializeScheduleImmediate());\n" " _lazyFinal(\$, \"Future__nullFuture\", \"\$get\$Future__nullFuture\", () => \$.\$get\$nullFuture());\n" +" _lazyFinal(\$, \"_rootDelegate\", \"\$get\$_rootDelegate\", () => A.ZoneDelegate\$_());\n" " _lazyFinal(\$, \"_Utf8Decoder__reusableBuffer\", \"\$get\$_Utf8Decoder__reusableBuffer\", () => A.NativeUint8List_NativeUint8List(4096));\n" " _lazyFinal(\$, \"_Utf8Decoder__decoder\", \"\$get\$_Utf8Decoder__decoder\", () => new A._Utf8Decoder__decoder_closure().call\$0());\n" " _lazyFinal(\$, \"_Utf8Decoder__decoderNonfatal\", \"\$get\$_Utf8Decoder__decoderNonfatal\", () => new A._Utf8Decoder__decoderNonfatal_closure().call\$0());\n" @@ -23153,11 +22551,8 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " Function.prototype.call\$0 = function() {\n" " return this();\n" " };\n" -" Function.prototype.call\$1\$1 = function(a) {\n" -" return this(a);\n" -" };\n" -" Function.prototype.call\$3\$3 = function(a, b, c) {\n" -" return this(a, b, c);\n" +" Function.prototype.call\$1\$4 = function(a, b, c, d) {\n" +" return this(a, b, c, d);\n" " };\n" " Function.prototype.call\$5 = function(a, b, c, d, e) {\n" " return this(a, b, c, d, e);\n" @@ -23165,38 +22560,23 @@ const injectedClientJs = "// Generated by dart2js (, csp, intern-composite-value " Function.prototype.call\$3 = function(a, b, c) {\n" " return this(a, b, c);\n" " };\n" -" Function.prototype.call\$3\$6 = function(a, b, c, d, e, f) {\n" -" return this(a, b, c, d, e, f);\n" -" };\n" -" Function.prototype.call\$1\$4 = function(a, b, c, d) {\n" -" return this(a, b, c, d);\n" -" };\n" -" Function.prototype.call\$2\$1 = function(a) {\n" -" return this(a);\n" -" };\n" " Function.prototype.call\$4 = function(a, b, c, d) {\n" " return this(a, b, c, d);\n" " };\n" -" Function.prototype.call\$3\$1 = function(a) {\n" -" return this(a);\n" +" Function.prototype.call\$3\$6 = function(a, b, c, d, e, f) {\n" +" return this(a, b, c, d, e, f);\n" " };\n" " Function.prototype.call\$3\$4 = function(a, b, c, d) {\n" " return this(a, b, c, d);\n" " };\n" -" Function.prototype.call\$2\$4 = function(a, b, c, d) {\n" -" return this(a, b, c, d);\n" -" };\n" -" Function.prototype.call\$2\$2 = function(a, b) {\n" -" return this(a, b);\n" -" };\n" " Function.prototype.call\$2\$5 = function(a, b, c, d, e) {\n" " return this(a, b, c, d, e);\n" " };\n" -" Function.prototype.call\$2\$3 = function(a, b, c) {\n" -" return this(a, b, c);\n" +" Function.prototype.call\$2\$4 = function(a, b, c, d) {\n" +" return this(a, b, c, d);\n" " };\n" -" Function.prototype.call\$1\$2 = function(a, b) {\n" -" return this(a, b);\n" +" Function.prototype.call\$1\$1 = function(a) {\n" +" return this(a);\n" " };\n" " Function.prototype.call\$2\$0 = function() {\n" " return this();\n" diff --git a/dwds/test/integration/breakpoint_amd_test.dart b/dwds/test/integration/breakpoint_amd_test.dart index 74e6d45d2a..88b785934e 100644 --- a/dwds/test/integration/breakpoint_amd_test.dart +++ b/dwds/test/integration/breakpoint_amd_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/breakpoint.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../webdev/test/helpers/context.dart'; import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -24,17 +24,10 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - testBreakpoint( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - ); - }); - group('Frontend Server |', () { testBreakpoint( provider: provider, - contextFactory: FrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), ); }); } diff --git a/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart b/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart index 502f71dce7..a072ed6dd7 100644 --- a/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart +++ b/dwds/test/integration/breakpoint_ddc_library_bundle_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/breakpoint.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../webdev/test/helpers/context.dart'; import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -25,24 +25,10 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - testBreakpoint( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - ); - }); - - group('Build Daemon and Frontend Server |', () { - testBreakpoint( - provider: provider, - compilationMode: CompilationMode.buildDaemonAndFrontendServer, - ); - }); - group('Frontend Server |', () { testBreakpoint( provider: provider, - contextFactory: FrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), ); }); } diff --git a/dwds/test/integration/callstack_amd_test.dart b/dwds/test/integration/callstack_amd_test.dart index 3a43c42abd..4f2af882ee 100644 --- a/dwds/test/integration/callstack_amd_test.dart +++ b/dwds/test/integration/callstack_amd_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/callstack.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../webdev/test/helpers/context.dart'; import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -24,17 +24,10 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - testCallStack( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - ); - }); - group('Frontend Server |', () { testCallStack( provider: provider, - contextFactory: FrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), ); }); } diff --git a/dwds/test/integration/callstack_ddc_library_bundle_test.dart b/dwds/test/integration/callstack_ddc_library_bundle_test.dart index f61be41021..d7bc92570c 100644 --- a/dwds/test/integration/callstack_ddc_library_bundle_test.dart +++ b/dwds/test/integration/callstack_ddc_library_bundle_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/callstack.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../webdev/test/helpers/context.dart'; import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -25,24 +25,10 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - testCallStack( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - ); - }); - - group('Build Daemon and Frontend Server |', () { - testCallStack( - provider: provider, - compilationMode: CompilationMode.buildDaemonAndFrontendServer, - ); - }); - group('Frontend Server |', () { testCallStack( provider: provider, - contextFactory: FrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), ); }); } diff --git a/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart b/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart index 9463d981e9..94a3af140f 100644 --- a/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart +++ b/dwds/test/integration/chrome_proxy_service_ddc_library_bundle_test.dart @@ -8,10 +8,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/chrome_proxy_service.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - +import 'fixtures/frontend_server_context.dart'; import '../../../webdev/test/helpers/context.dart'; void main() { @@ -26,47 +27,13 @@ void main() { canaryFeatures: canaryFeatures, ddcModuleFormat: moduleFormat, ); - - tearDownAll(provider.dispose); - - runTests( - provider: provider, - moduleFormat: moduleFormat, - contextFactory: BuildDaemonTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: $canaryFeatures | Build Daemon |', () { - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: moduleFormat, - ); - - tearDownAll(provider.dispose); - - runTests( - provider: provider, - moduleFormat: moduleFormat, - contextFactory: BuildDaemonTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: $canaryFeatures | Build Daemon and Frontend Server |', () { - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: moduleFormat, - ); - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + tearDownAll(provider.dispose); runTests( provider: provider, moduleFormat: moduleFormat, - compilationMode: compilationMode, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/circular_evaluate_amd_test.dart b/dwds/test/integration/circular_evaluate_amd_test.dart index 940527cba8..47839a2e2f 100644 --- a/dwds/test/integration/circular_evaluate_amd_test.dart +++ b/dwds/test/integration/circular_evaluate_amd_test.dart @@ -10,13 +10,13 @@ library; import 'dart:io'; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/fixtures/project.dart'; import 'package:dwds_test_common/integration/evaluate_circular.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../webdev/test/helpers/context.dart'; import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() async { // Enable verbose logging for debugging. @@ -28,10 +28,6 @@ void main() async { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); - }); - group('Frontend Server |', () { group('Context with circular dependencies |', () { for (final indexBaseMode in IndexBaseMode.values) { @@ -40,7 +36,7 @@ void main() async { () { testAll( provider: provider, - contextFactory: FrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), indexBaseMode: indexBaseMode, useDebuggerModuleNames: true, ); diff --git a/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart b/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart index c1ef97afa7..d59a791e25 100644 --- a/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart +++ b/dwds/test/integration/circular_evaluate_ddc_library_bundle_test.dart @@ -10,13 +10,13 @@ library; import 'dart:io'; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/fixtures/project.dart'; import 'package:dwds_test_common/integration/evaluate_circular.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../webdev/test/helpers/context.dart'; import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() async { // Enable verbose logging for debugging. @@ -29,17 +29,6 @@ void main() async { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); - }); - - group('Build Daemon and Frontend Server |', () { - testAll( - provider: provider, - compilationMode: CompilationMode.buildDaemonAndFrontendServer, - ); - }); - group('Frontend Server |', () { group('Context with circular dependencies |', () { for (final indexBaseMode in IndexBaseMode.values) { @@ -48,7 +37,7 @@ void main() async { () { testAll( provider: provider, - contextFactory: FrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), indexBaseMode: indexBaseMode, useDebuggerModuleNames: true, ); diff --git a/dwds/test/integration/dart_uri_file_uri_amd_test.dart b/dwds/test/integration/dart_uri_file_uri_amd_test.dart index 7bd89c270a..5924eb7df4 100644 --- a/dwds/test/integration/dart_uri_file_uri_amd_test.dart +++ b/dwds/test/integration/dart_uri_file_uri_amd_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/dart_uri_file_uri.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../webdev/test/helpers/context.dart'; import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -24,11 +24,10 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - runTests(provider: provider, contextFactory: BuildDaemonTestContext.new); - }); - group('Frontend Server |', () { - runTests(provider: provider, contextFactory: FrontendServerTestContext.new); + runTests( + provider: provider, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + ); }); } diff --git a/dwds/test/integration/dart_uri_file_uri_ddc_library_bundle_test.dart b/dwds/test/integration/dart_uri_file_uri_ddc_library_bundle_test.dart index f6bef2da0e..d2804fc34a 100644 --- a/dwds/test/integration/dart_uri_file_uri_ddc_library_bundle_test.dart +++ b/dwds/test/integration/dart_uri_file_uri_ddc_library_bundle_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/dart_uri_file_uri.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../webdev/test/helpers/context.dart'; import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -25,18 +25,10 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - runTests(provider: provider, contextFactory: BuildDaemonTestContext.new); - }); - - group('Build Daemon and Frontend Server |', () { + group('Frontend Server |', () { runTests( provider: provider, - contextFactory: BuildDaemonAndFrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), ); }); - - group('Frontend Server |', () { - runTests(provider: provider, contextFactory: FrontendServerTestContext.new); - }); } diff --git a/dwds/test/integration/debug_service_amd_test.dart b/dwds/test/integration/debug_service_amd_test.dart index 93d325d523..eb6f5d2b86 100644 --- a/dwds/test/integration/debug_service_amd_test.dart +++ b/dwds/test/integration/debug_service_amd_test.dart @@ -9,7 +9,7 @@ library; import 'package:dwds_test_common/integration/debug_service.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - +import 'fixtures/frontend_server_context.dart'; import '../../../webdev/test/helpers/context.dart'; void main() { @@ -18,5 +18,5 @@ void main() { final provider = TestSdkConfigurationProvider(verbose: debug); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); + testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); } diff --git a/dwds/test/integration/debug_service_ddc_library_bundle_test.dart b/dwds/test/integration/debug_service_ddc_library_bundle_test.dart index 80b032083e..c2978d59c9 100644 --- a/dwds/test/integration/debug_service_ddc_library_bundle_test.dart +++ b/dwds/test/integration/debug_service_ddc_library_bundle_test.dart @@ -10,7 +10,7 @@ import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/integration/debug_service.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - +import 'fixtures/frontend_server_context.dart'; import '../../../webdev/test/helpers/context.dart'; void main() { @@ -24,5 +24,5 @@ void main() { ); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); + testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); } diff --git a/dwds/test/integration/devtools_amd_test.dart b/dwds/test/integration/devtools_amd_test.dart index 1106200169..2ff69527fa 100644 --- a/dwds/test/integration/devtools_amd_test.dart +++ b/dwds/test/integration/devtools_amd_test.dart @@ -10,7 +10,7 @@ import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/integration/devtools.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - +import 'fixtures/frontend_server_context.dart'; import '../../../webdev/test/helpers/context.dart'; void main() { @@ -19,5 +19,5 @@ void main() { ); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); + testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); } diff --git a/dwds/test/integration/devtools_ddc_library_bundle_test.dart b/dwds/test/integration/devtools_ddc_library_bundle_test.dart index 652592efcd..886a5a3f13 100644 --- a/dwds/test/integration/devtools_ddc_library_bundle_test.dart +++ b/dwds/test/integration/devtools_ddc_library_bundle_test.dart @@ -10,7 +10,7 @@ import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/integration/devtools.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - +import 'fixtures/frontend_server_context.dart'; import '../../../webdev/test/helpers/context.dart'; void main() { @@ -20,5 +20,5 @@ void main() { ); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); + testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); } diff --git a/dwds/test/integration/evaluate_amd_test.dart b/dwds/test/integration/evaluate_amd_test.dart index 2b69d15e33..3cf9f3fcc8 100644 --- a/dwds/test/integration/evaluate_amd_test.dart +++ b/dwds/test/integration/evaluate_amd_test.dart @@ -10,14 +10,16 @@ library; import 'dart:io'; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/fixtures/project.dart'; import 'package:dwds_test_common/integration/evaluate.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; -import 'package:test/test.dart'; import '../../../webdev/test/helpers/context.dart'; import 'fixtures/frontend_server_context.dart'; +import 'package:test/test.dart'; + void main() async { // Enable verbose logging for debugging. const debug = false; @@ -28,10 +30,6 @@ void main() async { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); - }); - group('Frontend Server |', () { for (final useDebuggerModuleNames in [false, true]) { group('Debugger module names: $useDebuggerModuleNames |', () { @@ -41,7 +39,7 @@ void main() async { () { testAll( provider: provider, - contextFactory: FrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), indexBaseMode: indexBaseMode, useDebuggerModuleNames: useDebuggerModuleNames, ); diff --git a/dwds/test/integration/evaluate_ddc_library_bundle_test.dart b/dwds/test/integration/evaluate_ddc_library_bundle_test.dart index 9f90f54b8b..605d5555c3 100644 --- a/dwds/test/integration/evaluate_ddc_library_bundle_test.dart +++ b/dwds/test/integration/evaluate_ddc_library_bundle_test.dart @@ -10,13 +10,13 @@ library; import 'dart:io'; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/fixtures/project.dart'; import 'package:dwds_test_common/integration/evaluate.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../webdev/test/helpers/context.dart'; import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() async { // Enable verbose logging for debugging. @@ -30,17 +30,6 @@ void main() async { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); - }); - - group('Build Daemon and Frontend Server |', () { - testAll( - provider: provider, - compilationMode: CompilationMode.buildDaemonAndFrontendServer, - ); - }); - group('Frontend Server |', () { for (final useDebuggerModuleNames in [false, true]) { group('Debugger module names: $useDebuggerModuleNames |', () { @@ -50,7 +39,7 @@ void main() async { () { testAll( provider: provider, - contextFactory: FrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), indexBaseMode: indexBaseMode, useDebuggerModuleNames: useDebuggerModuleNames, ); diff --git a/dwds/test/integration/events_amd_test.dart b/dwds/test/integration/events_amd_test.dart index f37fcee39d..1667e75e8a 100644 --- a/dwds/test/integration/events_amd_test.dart +++ b/dwds/test/integration/events_amd_test.dart @@ -14,7 +14,7 @@ import 'package:dwds_test_common/integration/events.dart'; import 'package:dwds_test_common/logging.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - +import 'fixtures/frontend_server_context.dart'; import '../../../webdev/test/helpers/context.dart'; void main() { @@ -77,11 +77,4 @@ void main() { await events; }); }); - - group('Build Daemon', () { - testWithDwds( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - ); - }); } diff --git a/dwds/test/integration/events_ddc_library_bundle_test.dart b/dwds/test/integration/events_ddc_library_bundle_test.dart index ba6801b761..b603fcc467 100644 --- a/dwds/test/integration/events_ddc_library_bundle_test.dart +++ b/dwds/test/integration/events_ddc_library_bundle_test.dart @@ -6,12 +6,12 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/events.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../webdev/test/helpers/context.dart'; import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -27,14 +27,7 @@ void main() { group('Frontend Server', () { testWithDwds( provider: provider, - contextFactory: FrontendServerTestContext.new, - ); - }); - - group('Build Daemon', () { - testWithDwds( - provider: provider, - contextFactory: BuildDaemonTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), ); }); } diff --git a/dwds/test/integration/expression_compiler_service_amd_test.dart b/dwds/test/integration/expression_compiler_service_amd_test.dart index 7571a47519..e880f2b283 100644 --- a/dwds/test/integration/expression_compiler_service_amd_test.dart +++ b/dwds/test/integration/expression_compiler_service_amd_test.dart @@ -12,6 +12,7 @@ import 'package:dwds_test_common/integration/expression_compiler_service.dart'; import 'package:test/test.dart'; import '../../../webdev/test/helpers/context.dart'; +import 'fixtures/frontend_server_context.dart'; void main() async { testAll( @@ -20,6 +21,7 @@ void main() async { canaryFeatures: false, experiments: const [], ), - contextFactory: BuildDaemonTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), ); + } diff --git a/dwds/test/integration/expression_compiler_service_ddc_library_bundle_test.dart b/dwds/test/integration/expression_compiler_service_ddc_library_bundle_test.dart index 578e9f7aa9..bf88ddc965 100644 --- a/dwds/test/integration/expression_compiler_service_ddc_library_bundle_test.dart +++ b/dwds/test/integration/expression_compiler_service_ddc_library_bundle_test.dart @@ -12,6 +12,7 @@ import 'package:dwds_test_common/integration/expression_compiler_service.dart'; import 'package:test/test.dart'; import '../../../webdev/test/helpers/context.dart'; +import 'fixtures/frontend_server_context.dart'; void main() async { testAll( @@ -20,6 +21,7 @@ void main() async { canaryFeatures: true, experiments: const [], ), - contextFactory: BuildDaemonTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), ); + } diff --git a/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart b/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart index 9444b8f6ab..7e216b1dac 100644 --- a/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart +++ b/dwds/test/integration/hot_reload_breakpoints_ddc_library_bundle_test.dart @@ -28,11 +28,4 @@ void main() { group('Frontend Server', () { runTests(provider: provider, contextFactory: FrontendServerTestContext.new); }); - - group('Build Daemon and Frontend Server', () { - runTests( - provider: provider, - compilationMode: CompilationMode.buildDaemonAndFrontendServer, - ); - }); } diff --git a/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart b/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart index 1defbc9904..5ca286c4f5 100644 --- a/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart +++ b/dwds/test/integration/hot_reload_ddc_library_bundle_test.dart @@ -28,11 +28,4 @@ void main() { group('Frontend Server', () { runTests(provider: provider, contextFactory: FrontendServerTestContext.new); }); - - group('Build Daemon and Frontend Server', () { - runTests( - provider: provider, - compilationMode: CompilationMode.buildDaemonAndFrontendServer, - ); - }); } 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 496a9c00dc..6587a7681f 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 @@ -8,12 +8,12 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/hot_restart_breakpoints.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../webdev/test/helpers/context.dart'; import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -27,17 +27,9 @@ void main() { tearDownAll(provider.dispose); group('Frontend Server', () { - runTests(provider: provider, contextFactory: FrontendServerTestContext.new); - }); - - group('Build Daemon', () { - runTests(provider: provider, contextFactory: BuildDaemonTestContext.new); - }); - - group('Build Daemon and Frontend Server', () { runTests( provider: provider, - compilationMode: CompilationMode.buildDaemonAndFrontendServer, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), ); }); } 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 159a1ebef7..3d357d2a60 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 @@ -8,10 +8,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/hot_restart_correctness.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - +import 'fixtures/frontend_server_context.dart'; import '../../../webdev/test/helpers/context.dart'; void main() { @@ -26,41 +27,11 @@ void main() { canaryFeatures: canaryFeatures, ddcModuleFormat: moduleFormat, ); - - runTests( - provider: provider, - moduleFormat: moduleFormat, - contextFactory: BuildDaemonTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: $canaryFeatures | Build Daemon |', () { - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: moduleFormat, - ); - - runTests( - provider: provider, - moduleFormat: moduleFormat, - contextFactory: BuildDaemonTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: $canaryFeatures | Build Daemon and Frontend Server |', () { - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: moduleFormat, - ); - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + runTests( provider: provider, moduleFormat: moduleFormat, - compilationMode: compilationMode, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); 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 9efe3d9ba2..9f3ac39f63 100644 --- a/dwds/test/integration/hot_restart_ddc_library_bundle_test.dart +++ b/dwds/test/integration/hot_restart_ddc_library_bundle_test.dart @@ -8,10 +8,11 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/hot_restart.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - +import 'fixtures/frontend_server_context.dart'; import '../../../webdev/test/helpers/context.dart'; void main() { @@ -21,6 +22,7 @@ void main() { final moduleFormat = ModuleFormat.ddc; group('canary: $canaryFeatures | Frontend Server |', () { + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -30,37 +32,7 @@ void main() { runTests( provider: provider, moduleFormat: moduleFormat, - contextFactory: BuildDaemonTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: $canaryFeatures | Build Daemon |', () { - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: moduleFormat, - ); - - runTests( - provider: provider, - moduleFormat: moduleFormat, - contextFactory: BuildDaemonTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: $canaryFeatures | Build Daemon and Frontend Server |', () { - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: moduleFormat, - ); - runTests( - provider: provider, - moduleFormat: moduleFormat, - compilationMode: compilationMode, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/class_inspection_amd_test.dart b/dwds/test/integration/instances/class_inspection_amd_test.dart index 906ec1bfbd..f27e778fea 100644 --- a/dwds/test/integration/instances/class_inspection_amd_test.dart +++ b/dwds/test/integration/instances/class_inspection_amd_test.dart @@ -8,54 +8,20 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/class_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../../webdev/test/helpers/context.dart'; -import '../fixtures/frontend_server_context.dart'; +import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. const debug = false; - group('canary: false | Build Daemon |', () { - final canaryFeatures = false; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - group('canary: false | Frontend Server |', () { final canaryFeatures = false; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -65,14 +31,14 @@ void main() { runTests( provider: provider, - contextFactory: FrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); group('canary: true | Frontend Server |', () { final canaryFeatures = true; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -82,7 +48,7 @@ void main() { runTests( provider: provider, - contextFactory: FrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart index e9dfffb608..d670689444 100644 --- a/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/class_inspection_ddc_library_bundle_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/class_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../../webdev/test/helpers/context.dart'; -import '../fixtures/frontend_server_context.dart'; +import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -21,41 +21,7 @@ void main() { group('canary: true | Frontend Server |', () { final canaryFeatures = true; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: FrontendServerTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon and Frontend Server |', () { - final canaryFeatures = true; - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -65,7 +31,7 @@ void main() { runTests( provider: provider, - compilationMode: compilationMode, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/dot_shorthands_amd_test.dart b/dwds/test/integration/instances/dot_shorthands_amd_test.dart index 9a98a3d812..9a603373d5 100644 --- a/dwds/test/integration/instances/dot_shorthands_amd_test.dart +++ b/dwds/test/integration/instances/dot_shorthands_amd_test.dart @@ -8,54 +8,20 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/dot_shorthands.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../../webdev/test/helpers/context.dart'; -import '../fixtures/frontend_server_context.dart'; +import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. const debug = false; - group('canary: false | Build Daemon |', () { - final canaryFeatures = false; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - group('canary: false | Frontend Server |', () { final canaryFeatures = false; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -65,14 +31,14 @@ void main() { runTests( provider: provider, - contextFactory: FrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); group('canary: true | Frontend Server |', () { final canaryFeatures = true; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -82,7 +48,7 @@ void main() { runTests( provider: provider, - contextFactory: FrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart b/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart index 97dec358d2..9ea12ad65f 100644 --- a/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/dot_shorthands_ddc_library_bundle_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/dot_shorthands.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../../webdev/test/helpers/context.dart'; -import '../fixtures/frontend_server_context.dart'; +import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -21,41 +21,7 @@ void main() { group('canary: true | Frontend Server |', () { final canaryFeatures = true; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: FrontendServerTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon and Frontend Server |', () { - final canaryFeatures = true; - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -65,7 +31,7 @@ void main() { runTests( provider: provider, - compilationMode: compilationMode, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/instance_amd_test.dart b/dwds/test/integration/instances/instance_amd_test.dart index 260e80efbd..920aa5ee8c 100644 --- a/dwds/test/integration/instances/instance_amd_test.dart +++ b/dwds/test/integration/instances/instance_amd_test.dart @@ -7,67 +7,21 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/instance.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../../webdev/test/helpers/context.dart'; -import '../fixtures/frontend_server_context.dart'; +import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. const debug = false; final moduleFormat = ModuleFormat.amd; - group('canary: false | Build Daemon |', () { - final canaryFeatures = false; - - final provider = TestSdkConfigurationProvider( - canaryFeatures: canaryFeatures, - verbose: debug, - ddcModuleFormat: moduleFormat, - ); - tearDownAll(provider.dispose); - - runTypeSystemVerificationTests( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - canaryFeatures: canaryFeatures, - ); - - runTests( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - - final provider = TestSdkConfigurationProvider( - canaryFeatures: canaryFeatures, - verbose: debug, - ddcModuleFormat: moduleFormat, - ); - tearDownAll(provider.dispose); - - runTypeSystemVerificationTests( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - canaryFeatures: canaryFeatures, - ); - - runTests( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - group('canary: false | Frontend Server |', () { final canaryFeatures = false; - + final provider = TestSdkConfigurationProvider( canaryFeatures: canaryFeatures, verbose: debug, @@ -77,20 +31,20 @@ void main() { runTypeSystemVerificationTests( provider: provider, - contextFactory: FrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); runTests( provider: provider, - contextFactory: FrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); group('canary: true | Frontend Server |', () { final canaryFeatures = true; - + final provider = TestSdkConfigurationProvider( canaryFeatures: canaryFeatures, verbose: debug, @@ -100,13 +54,13 @@ void main() { runTypeSystemVerificationTests( provider: provider, - contextFactory: FrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); runTests( provider: provider, - contextFactory: FrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart b/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart index a9b4db3218..7f429d4e4f 100644 --- a/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/instance_ddc_library_bundle_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/instance.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../../webdev/test/helpers/context.dart'; -import '../fixtures/frontend_server_context.dart'; +import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -21,6 +21,7 @@ void main() { final moduleFormat = ModuleFormat.ddc; group('canary: true | Frontend Server |', () { + final provider = TestSdkConfigurationProvider( canaryFeatures: canaryFeatures, verbose: debug, @@ -30,38 +31,7 @@ void main() { runTests( provider: provider, - contextFactory: FrontendServerTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final provider = TestSdkConfigurationProvider( - canaryFeatures: canaryFeatures, - verbose: debug, - ddcModuleFormat: moduleFormat, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon and Frontend Server |', () { - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; - final provider = TestSdkConfigurationProvider( - canaryFeatures: canaryFeatures, - verbose: debug, - ddcModuleFormat: moduleFormat, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/instance_inspection_amd_test.dart b/dwds/test/integration/instances/instance_inspection_amd_test.dart index a1860743ef..19cac7fb9a 100644 --- a/dwds/test/integration/instances/instance_inspection_amd_test.dart +++ b/dwds/test/integration/instances/instance_inspection_amd_test.dart @@ -8,54 +8,20 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/instance_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../../webdev/test/helpers/context.dart'; -import '../fixtures/frontend_server_context.dart'; +import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. const debug = false; - group('canary: false | Build Daemon |', () { - final canaryFeatures = false; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - group('canary: false | Frontend Server |', () { final canaryFeatures = false; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -65,14 +31,14 @@ void main() { runTests( provider: provider, - contextFactory: FrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); group('canary: true | Frontend Server |', () { final canaryFeatures = true; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -82,7 +48,7 @@ void main() { runTests( provider: provider, - contextFactory: FrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart index 2bfaf670d3..cfef8deac5 100644 --- a/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/instance_inspection_ddc_library_bundle_test.dart @@ -34,38 +34,4 @@ void main() { canaryFeatures: canaryFeatures, ); }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - final compilationMode = CompilationMode.buildDaemon; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon and Frontend Server |', () { - final canaryFeatures = true; - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - compilationMode: compilationMode, - canaryFeatures: canaryFeatures, - ); - }); } diff --git a/dwds/test/integration/instances/patterns_inspection_amd_test.dart b/dwds/test/integration/instances/patterns_inspection_amd_test.dart index d3e4cf3bf1..7153427a3a 100644 --- a/dwds/test/integration/instances/patterns_inspection_amd_test.dart +++ b/dwds/test/integration/instances/patterns_inspection_amd_test.dart @@ -8,54 +8,20 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/patterns_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../../webdev/test/helpers/context.dart'; -import '../fixtures/frontend_server_context.dart'; +import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. const debug = false; - group('canary: false | Build Daemon |', () { - final canaryFeatures = false; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - group('canary: false | Frontend Server |', () { final canaryFeatures = false; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -65,14 +31,14 @@ void main() { runTests( provider: provider, - contextFactory: FrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); group('canary: true | Frontend Server |', () { final canaryFeatures = true; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -82,7 +48,7 @@ void main() { runTests( provider: provider, - contextFactory: FrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart index a89bf85921..04917d07b4 100644 --- a/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/patterns_inspection_ddc_library_bundle_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/patterns_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../../webdev/test/helpers/context.dart'; -import '../fixtures/frontend_server_context.dart'; +import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -21,41 +21,7 @@ void main() { group('canary: true | Frontend Server |', () { final canaryFeatures = true; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: FrontendServerTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon and Frontend Server |', () { - final canaryFeatures = true; - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -65,7 +31,7 @@ void main() { runTests( provider: provider, - compilationMode: compilationMode, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/record_inspection_amd_test.dart b/dwds/test/integration/instances/record_inspection_amd_test.dart index 1ea84b84fe..b51d76678e 100644 --- a/dwds/test/integration/instances/record_inspection_amd_test.dart +++ b/dwds/test/integration/instances/record_inspection_amd_test.dart @@ -8,54 +8,20 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/record_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../../webdev/test/helpers/context.dart'; -import '../fixtures/frontend_server_context.dart'; +import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. const debug = false; - group('canary: false | Build Daemon |', () { - final canaryFeatures = false; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - group('canary: false | Frontend Server |', () { final canaryFeatures = false; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -65,14 +31,14 @@ void main() { runTests( provider: provider, - contextFactory: FrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); group('canary: true | Frontend Server |', () { final canaryFeatures = true; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -82,7 +48,7 @@ void main() { runTests( provider: provider, - contextFactory: FrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart index 78b8f48191..b835867395 100644 --- a/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/record_inspection_ddc_library_bundle_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/record_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../../webdev/test/helpers/context.dart'; -import '../fixtures/frontend_server_context.dart'; +import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -21,6 +21,7 @@ void main() { final canaryFeatures = true; group('canary: true | Frontend Server |', () { + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -29,36 +30,7 @@ void main() { tearDownAll(provider.dispose); runTests( provider: provider, - contextFactory: FrontendServerTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - runTests( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon and Frontend Server |', () { - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - runTests( - provider: provider, - compilationMode: compilationMode, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/record_type_inspection_amd_test.dart b/dwds/test/integration/instances/record_type_inspection_amd_test.dart index fd6a6e9230..1714a55c95 100644 --- a/dwds/test/integration/instances/record_type_inspection_amd_test.dart +++ b/dwds/test/integration/instances/record_type_inspection_amd_test.dart @@ -8,54 +8,20 @@ library; import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/record_type_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../../webdev/test/helpers/context.dart'; -import '../fixtures/frontend_server_context.dart'; +import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. const debug = false; - group('canary: false | Build Daemon |', () { - final canaryFeatures = false; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - group('canary: false | Frontend Server |', () { final canaryFeatures = false; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -65,14 +31,14 @@ void main() { runTests( provider: provider, - contextFactory: FrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); group('canary: true | Frontend Server |', () { final canaryFeatures = true; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -82,7 +48,7 @@ void main() { runTests( provider: provider, - contextFactory: FrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart index 72f7008d21..3cdf845e83 100644 --- a/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/record_type_inspection_ddc_library_bundle_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/record_type_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../../webdev/test/helpers/context.dart'; -import '../fixtures/frontend_server_context.dart'; +import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -21,6 +21,7 @@ void main() { final canaryFeatures = true; group('canary: true | Frontend Server |', () { + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -29,36 +30,7 @@ void main() { tearDownAll(provider.dispose); runTests( provider: provider, - contextFactory: FrontendServerTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - runTests( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon and Frontend Server |', () { - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - runTests( - provider: provider, - compilationMode: compilationMode, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/type_inspection_amd_test.dart b/dwds/test/integration/instances/type_inspection_amd_test.dart index 46d910f4a9..0cb79b5eb7 100644 --- a/dwds/test/integration/instances/type_inspection_amd_test.dart +++ b/dwds/test/integration/instances/type_inspection_amd_test.dart @@ -8,54 +8,20 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/type_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../../webdev/test/helpers/context.dart'; -import '../fixtures/frontend_server_context.dart'; +import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. const debug = false; - group('canary: false | Build Daemon |', () { - final canaryFeatures = false; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.amd, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - group('canary: false | Frontend Server |', () { final canaryFeatures = false; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -65,14 +31,14 @@ void main() { runTests( provider: provider, - contextFactory: FrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); group('canary: true | Frontend Server |', () { final canaryFeatures = true; - + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -82,7 +48,7 @@ void main() { runTests( provider: provider, - contextFactory: FrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart b/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart index c77899aad4..9f6346902d 100644 --- a/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/integration/instances/type_inspection_ddc_library_bundle_test.dart @@ -8,12 +8,12 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/type_inspection.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../../webdev/test/helpers/context.dart'; -import '../fixtures/frontend_server_context.dart'; +import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -21,41 +21,7 @@ void main() { group('canary: true | Frontend Server |', () { final canaryFeatures = true; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: FrontendServerTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon |', () { - final canaryFeatures = true; - - final provider = TestSdkConfigurationProvider( - verbose: debug, - canaryFeatures: canaryFeatures, - ddcModuleFormat: ModuleFormat.ddc, - ); - tearDownAll(provider.dispose); - - runTests( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - canaryFeatures: canaryFeatures, - ); - }); - - group('canary: true | Build Daemon and Frontend Server |', () { - final canaryFeatures = true; - final compilationMode = CompilationMode.buildDaemonAndFrontendServer; + final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -65,7 +31,7 @@ void main() { runTests( provider: provider, - compilationMode: compilationMode, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), canaryFeatures: canaryFeatures, ); }); diff --git a/dwds/test/integration/listviews_amd_test.dart b/dwds/test/integration/listviews_amd_test.dart index 70c4b47bd1..449b0d8006 100644 --- a/dwds/test/integration/listviews_amd_test.dart +++ b/dwds/test/integration/listviews_amd_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/listviews.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../webdev/test/helpers/context.dart'; import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -24,11 +24,10 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - runTests(provider: provider, contextFactory: BuildDaemonTestContext.new); - }); - group('Frontend Server |', () { - runTests(provider: provider, contextFactory: FrontendServerTestContext.new); + runTests( + provider: provider, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), + ); }); } diff --git a/dwds/test/integration/listviews_ddc_library_bundle_test.dart b/dwds/test/integration/listviews_ddc_library_bundle_test.dart index ab957d6e5c..1de002eef4 100644 --- a/dwds/test/integration/listviews_ddc_library_bundle_test.dart +++ b/dwds/test/integration/listviews_ddc_library_bundle_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/listviews.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../webdev/test/helpers/context.dart'; import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() { // Enable verbose logging for debugging. @@ -25,18 +25,10 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - runTests(provider: provider, contextFactory: BuildDaemonTestContext.new); - }); - - group('Build Daemon and Frontend Server |', () { + group('Frontend Server |', () { runTests( provider: provider, - contextFactory: BuildDaemonAndFrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), ); }); - - group('Frontend Server |', () { - runTests(provider: provider, contextFactory: FrontendServerTestContext.new); - }); } diff --git a/dwds/test/integration/load_strategy_amd_test.dart b/dwds/test/integration/load_strategy_amd_test.dart index 88a025e493..75d3f7ed5b 100644 --- a/dwds/test/integration/load_strategy_amd_test.dart +++ b/dwds/test/integration/load_strategy_amd_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/load_strategy.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../webdev/test/helpers/context.dart'; import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() { // Run independent tests once. @@ -27,17 +27,10 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - runDependentTests( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - ); - }); - group('Frontend Server |', () { runDependentTests( provider: provider, - contextFactory: FrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), ); }); } diff --git a/dwds/test/integration/load_strategy_ddc_library_bundle_test.dart b/dwds/test/integration/load_strategy_ddc_library_bundle_test.dart index 9858413c90..0fe8a6a602 100644 --- a/dwds/test/integration/load_strategy_ddc_library_bundle_test.dart +++ b/dwds/test/integration/load_strategy_ddc_library_bundle_test.dart @@ -7,12 +7,12 @@ library; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/integration/load_strategy.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../webdev/test/helpers/context.dart'; import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() { // Run independent tests once. @@ -28,24 +28,10 @@ void main() { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - runDependentTests( - provider: provider, - contextFactory: BuildDaemonTestContext.new, - ); - }); - - group('Build Daemon and Frontend Server |', () { - runDependentTests( - provider: provider, - contextFactory: BuildDaemonAndFrontendServerTestContext.new, - ); - }); - group('Frontend Server |', () { runDependentTests( provider: provider, - contextFactory: FrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), ); }); } diff --git a/dwds/test/integration/parts_evaluate_amd_test.dart b/dwds/test/integration/parts_evaluate_amd_test.dart index e468094a10..d7e05e3d85 100644 --- a/dwds/test/integration/parts_evaluate_amd_test.dart +++ b/dwds/test/integration/parts_evaluate_amd_test.dart @@ -10,13 +10,13 @@ library; import 'dart:io'; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/fixtures/project.dart'; import 'package:dwds_test_common/integration/evaluate_parts.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../webdev/test/helpers/context.dart'; import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() async { // Enable verbose logging for debugging. @@ -28,10 +28,6 @@ void main() async { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); - }); - group('Frontend Server |', () { group('Context with parts |', () { for (final indexBaseMode in IndexBaseMode.values) { @@ -40,7 +36,7 @@ void main() async { () { testAll( provider: provider, - contextFactory: FrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), indexBaseMode: indexBaseMode, useDebuggerModuleNames: true, ); diff --git a/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart b/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart index ee7ea55d20..384ad0f593 100644 --- a/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart +++ b/dwds/test/integration/parts_evaluate_ddc_library_bundle_test.dart @@ -10,13 +10,13 @@ library; import 'dart:io'; import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; import 'package:dwds_test_common/fixtures/project.dart'; import 'package:dwds_test_common/integration/evaluate_parts.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - -import '../../../webdev/test/helpers/context.dart'; import 'fixtures/frontend_server_context.dart'; +import '../../../webdev/test/helpers/context.dart'; void main() async { // Enable verbose logging for debugging. @@ -29,17 +29,6 @@ void main() async { ); tearDownAll(provider.dispose); - group('Build Daemon |', () { - testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); - }); - - group('Build Daemon and Frontend Server |', () { - testAll( - provider: provider, - compilationMode: CompilationMode.buildDaemonAndFrontendServer, - ); - }); - group('Frontend Server |', () { group('Context with parts |', () { for (final indexBaseMode in IndexBaseMode.values) { @@ -48,7 +37,7 @@ void main() async { () { testAll( provider: provider, - contextFactory: FrontendServerTestContext.new, + contextFactory: (project, provider) => FrontendServerTestContext(project, provider), indexBaseMode: indexBaseMode, useDebuggerModuleNames: true, ); diff --git a/dwds/test/integration/refresh_amd_test.dart b/dwds/test/integration/refresh_amd_test.dart index 173123e6d3..2585a024df 100644 --- a/dwds/test/integration/refresh_amd_test.dart +++ b/dwds/test/integration/refresh_amd_test.dart @@ -11,12 +11,12 @@ library; import 'package:dwds_test_common/integration/refresh.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - +import 'fixtures/frontend_server_context.dart'; import '../../../webdev/test/helpers/context.dart'; void main() { final provider = TestSdkConfigurationProvider(); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); + testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); } diff --git a/dwds/test/integration/refresh_ddc_library_bundle_test.dart b/dwds/test/integration/refresh_ddc_library_bundle_test.dart index 002d20bcd0..7e3a2bfe72 100644 --- a/dwds/test/integration/refresh_ddc_library_bundle_test.dart +++ b/dwds/test/integration/refresh_ddc_library_bundle_test.dart @@ -12,7 +12,7 @@ import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/integration/refresh.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - +import 'fixtures/frontend_server_context.dart'; import '../../../webdev/test/helpers/context.dart'; void main() { @@ -27,5 +27,5 @@ void main() { ); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); + testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); } diff --git a/dwds/test/integration/run_request_amd_test.dart b/dwds/test/integration/run_request_amd_test.dart index 4f334e7f9d..f6af61f753 100644 --- a/dwds/test/integration/run_request_amd_test.dart +++ b/dwds/test/integration/run_request_amd_test.dart @@ -9,7 +9,7 @@ import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/integration/run_request.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - +import 'fixtures/frontend_server_context.dart'; import '../../../webdev/test/helpers/context.dart'; void main() { @@ -22,5 +22,5 @@ void main() { ); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); + testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); } diff --git a/dwds/test/integration/run_request_ddc_library_bundle_test.dart b/dwds/test/integration/run_request_ddc_library_bundle_test.dart index f3055b5e97..96c8226719 100644 --- a/dwds/test/integration/run_request_ddc_library_bundle_test.dart +++ b/dwds/test/integration/run_request_ddc_library_bundle_test.dart @@ -9,7 +9,7 @@ import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/integration/run_request.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - +import 'fixtures/frontend_server_context.dart'; import '../../../webdev/test/helpers/context.dart'; void main() { @@ -23,5 +23,5 @@ void main() { ); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); + testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); } diff --git a/dwds/test/integration/screenshot_amd_test.dart b/dwds/test/integration/screenshot_amd_test.dart index 563e434a04..eb22b371a8 100644 --- a/dwds/test/integration/screenshot_amd_test.dart +++ b/dwds/test/integration/screenshot_amd_test.dart @@ -9,7 +9,7 @@ import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/integration/screenshot.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - +import 'fixtures/frontend_server_context.dart'; import '../../../webdev/test/helpers/context.dart'; void main() { @@ -18,5 +18,5 @@ void main() { ); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); + testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); } diff --git a/dwds/test/integration/screenshot_ddc_library_bundle_test.dart b/dwds/test/integration/screenshot_ddc_library_bundle_test.dart index 0247605f05..e130cea7a6 100644 --- a/dwds/test/integration/screenshot_ddc_library_bundle_test.dart +++ b/dwds/test/integration/screenshot_ddc_library_bundle_test.dart @@ -9,7 +9,7 @@ import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/integration/screenshot.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - +import 'fixtures/frontend_server_context.dart'; import '../../../webdev/test/helpers/context.dart'; void main() { @@ -24,5 +24,5 @@ void main() { ); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); + testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); } diff --git a/dwds/test/integration/variable_scope_amd_test.dart b/dwds/test/integration/variable_scope_amd_test.dart index 775fbca064..2c6ed4456d 100644 --- a/dwds/test/integration/variable_scope_amd_test.dart +++ b/dwds/test/integration/variable_scope_amd_test.dart @@ -9,7 +9,7 @@ library; import 'package:dwds_test_common/integration/variable_scope.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - +import 'fixtures/frontend_server_context.dart'; import '../../../webdev/test/helpers/context.dart'; void main() { @@ -19,5 +19,5 @@ void main() { final provider = TestSdkConfigurationProvider(verbose: debug); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); + testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); } diff --git a/dwds/test/integration/variable_scope_ddc_library_bundle_test.dart b/dwds/test/integration/variable_scope_ddc_library_bundle_test.dart index f408f1eac4..0e5f05e655 100644 --- a/dwds/test/integration/variable_scope_ddc_library_bundle_test.dart +++ b/dwds/test/integration/variable_scope_ddc_library_bundle_test.dart @@ -10,7 +10,7 @@ import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/integration/variable_scope.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; - +import 'fixtures/frontend_server_context.dart'; import '../../../webdev/test/helpers/context.dart'; void main() { @@ -25,5 +25,5 @@ void main() { ); tearDownAll(provider.dispose); - testAll(provider: provider, contextFactory: BuildDaemonTestContext.new); + testAll(provider: provider, contextFactory: (project, provider) => FrontendServerTestContext(project, provider)); } diff --git a/webdev/test/breakpoint_amd_test.dart b/webdev/test/breakpoint_amd_test.dart new file mode 100644 index 0000000000..79a6f3488c --- /dev/null +++ b/webdev/test/breakpoint_amd_test.dart @@ -0,0 +1,32 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/breakpoint.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + testBreakpoint( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + ); + }); +} diff --git a/webdev/test/breakpoint_ddc_library_bundle_test.dart b/webdev/test/breakpoint_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..7e874c90a9 --- /dev/null +++ b/webdev/test/breakpoint_ddc_library_bundle_test.dart @@ -0,0 +1,40 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/breakpoint.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + testBreakpoint( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + ); + }); + + group('Build Daemon and Frontend Server |', () { + testBreakpoint( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + ); + }); +} diff --git a/webdev/test/callstack_amd_test.dart b/webdev/test/callstack_amd_test.dart new file mode 100644 index 0000000000..f6a8033c77 --- /dev/null +++ b/webdev/test/callstack_amd_test.dart @@ -0,0 +1,32 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/callstack.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + testCallStack( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + ); + }); +} diff --git a/webdev/test/callstack_ddc_library_bundle_test.dart b/webdev/test/callstack_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..fe74be82b7 --- /dev/null +++ b/webdev/test/callstack_ddc_library_bundle_test.dart @@ -0,0 +1,40 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/callstack.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + testCallStack( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + ); + }); + + group('Build Daemon and Frontend Server |', () { + testCallStack( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + ); + }); +} diff --git a/dwds/test/integration/chrome_proxy_service_amd_test.dart b/webdev/test/chrome_proxy_service_amd_test.dart similarity index 100% rename from dwds/test/integration/chrome_proxy_service_amd_test.dart rename to webdev/test/chrome_proxy_service_amd_test.dart diff --git a/webdev/test/chrome_proxy_service_ddc_library_bundle_test.dart b/webdev/test/chrome_proxy_service_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..fd07b5324f --- /dev/null +++ b/webdev/test/chrome_proxy_service_ddc_library_bundle_test.dart @@ -0,0 +1,56 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Tags(['daily']) +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/chrome_proxy_service.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final canaryFeatures = true; + final moduleFormat = ModuleFormat.ddc; + + group('canary: $canaryFeatures | Build Daemon |', () { + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: moduleFormat, + ); + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + moduleFormat: moduleFormat, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: $canaryFeatures | Build Daemon and Frontend Server |', () { + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: moduleFormat, + ); + final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + moduleFormat: moduleFormat, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/circular_evaluate_amd_test.dart b/webdev/test/circular_evaluate_amd_test.dart new file mode 100644 index 0000000000..cd161e2337 --- /dev/null +++ b/webdev/test/circular_evaluate_amd_test.dart @@ -0,0 +1,30 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 5)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/evaluate_circular.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() async { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + }); +} diff --git a/webdev/test/circular_evaluate_ddc_library_bundle_test.dart b/webdev/test/circular_evaluate_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..d98a047cb4 --- /dev/null +++ b/webdev/test/circular_evaluate_ddc_library_bundle_test.dart @@ -0,0 +1,38 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 5)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/evaluate_circular.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() async { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + }); + + group('Build Daemon and Frontend Server |', () { + testAll( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + ); + }); +} diff --git a/webdev/test/class_inspection_amd_test.dart b/webdev/test/class_inspection_amd_test.dart new file mode 100644 index 0000000000..0ebd77c64c --- /dev/null +++ b/webdev/test/class_inspection_amd_test.dart @@ -0,0 +1,54 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/class_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: false | Build Daemon |', () { + final canaryFeatures = false; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/class_inspection_ddc_library_bundle_test.dart b/webdev/test/class_inspection_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..8760bd664f --- /dev/null +++ b/webdev/test/class_inspection_ddc_library_bundle_test.dart @@ -0,0 +1,54 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/class_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/dart_uri_file_uri_amd_test.dart b/webdev/test/dart_uri_file_uri_amd_test.dart new file mode 100644 index 0000000000..57db580682 --- /dev/null +++ b/webdev/test/dart_uri_file_uri_amd_test.dart @@ -0,0 +1,29 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/dart_uri_file_uri.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + runTests(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + }); +} diff --git a/webdev/test/dart_uri_file_uri_ddc_library_bundle_test.dart b/webdev/test/dart_uri_file_uri_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..23c775f0b7 --- /dev/null +++ b/webdev/test/dart_uri_file_uri_ddc_library_bundle_test.dart @@ -0,0 +1,37 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/dart_uri_file_uri.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + runTests(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + }); + + group('Build Daemon and Frontend Server |', () { + runTests( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + ); + }); +} diff --git a/webdev/test/dot_shorthands_amd_test.dart b/webdev/test/dot_shorthands_amd_test.dart new file mode 100644 index 0000000000..d35ffb1d78 --- /dev/null +++ b/webdev/test/dot_shorthands_amd_test.dart @@ -0,0 +1,54 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/dot_shorthands.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: false | Build Daemon |', () { + final canaryFeatures = false; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/dot_shorthands_ddc_library_bundle_test.dart b/webdev/test/dot_shorthands_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..2edd0b0857 --- /dev/null +++ b/webdev/test/dot_shorthands_ddc_library_bundle_test.dart @@ -0,0 +1,54 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/dot_shorthands.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/evaluate_amd_test.dart b/webdev/test/evaluate_amd_test.dart new file mode 100644 index 0000000000..6e94e16f98 --- /dev/null +++ b/webdev/test/evaluate_amd_test.dart @@ -0,0 +1,33 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 5)) +library; + +import 'dart:io'; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/fixtures/project.dart'; +import 'package:dwds_test_common/integration/evaluate.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() async { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + }); +} diff --git a/webdev/test/evaluate_ddc_library_bundle_test.dart b/webdev/test/evaluate_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..ff2474fcf8 --- /dev/null +++ b/webdev/test/evaluate_ddc_library_bundle_test.dart @@ -0,0 +1,43 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 5)) +library; + +import 'dart:io'; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/fixtures/project.dart'; +import 'package:dwds_test_common/integration/evaluate.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() async { + // Enable verbose logging for debugging. + const debug = false; + + group('Canary: true |', () { + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + }); + + group('Build Daemon and Frontend Server |', () { + testAll( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + ); + }); + }); +} diff --git a/webdev/test/events_amd_test.dart b/webdev/test/events_amd_test.dart new file mode 100644 index 0000000000..122b9582d1 --- /dev/null +++ b/webdev/test/events_amd_test.dart @@ -0,0 +1,24 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/events.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + final provider = TestSdkConfigurationProvider(); + tearDownAll(provider.dispose); + + group('Build Daemon', () { + testWithDwds( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + ); + }); +} diff --git a/webdev/test/events_ddc_library_bundle_test.dart b/webdev/test/events_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..84be064bd0 --- /dev/null +++ b/webdev/test/events_ddc_library_bundle_test.dart @@ -0,0 +1,32 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/events.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final canary = true; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canary, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + group('Build Daemon', () { + testWithDwds( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + ); + }); +} diff --git a/webdev/test/hot_reload_breakpoints_ddc_library_bundle_test.dart b/webdev/test/hot_reload_breakpoints_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..9249273422 --- /dev/null +++ b/webdev/test/hot_reload_breakpoints_ddc_library_bundle_test.dart @@ -0,0 +1,34 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 5)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/hot_reload_breakpoints.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: true, + ddcModuleFormat: ModuleFormat.ddc, + ); + + tearDownAll(provider.dispose); + + group('Build Daemon and Frontend Server', () { + runTests( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + ); + }); +} diff --git a/webdev/test/hot_reload_ddc_library_bundle_test.dart b/webdev/test/hot_reload_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..97f857d921 --- /dev/null +++ b/webdev/test/hot_reload_ddc_library_bundle_test.dart @@ -0,0 +1,34 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 5)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/hot_reload.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: true, + ddcModuleFormat: ModuleFormat.ddc, + ); + + tearDownAll(provider.dispose); + + group('Build Daemon and Frontend Server', () { + runTests( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + ); + }); +} diff --git a/dwds/test/integration/hot_restart_amd_test.dart b/webdev/test/hot_restart_amd_test.dart similarity index 100% rename from dwds/test/integration/hot_restart_amd_test.dart rename to webdev/test/hot_restart_amd_test.dart diff --git a/webdev/test/hot_restart_breakpoints_ddc_library_bundle_test.dart b/webdev/test/hot_restart_breakpoints_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..f81ed09c45 --- /dev/null +++ b/webdev/test/hot_restart_breakpoints_ddc_library_bundle_test.dart @@ -0,0 +1,38 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 5)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/hot_restart_breakpoints.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: true, + ddcModuleFormat: ModuleFormat.ddc, + ); + + tearDownAll(provider.dispose); + + group('Build Daemon', () { + runTests(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + }); + + group('Build Daemon and Frontend Server', () { + runTests( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + ); + }); +} diff --git a/dwds/test/integration/hot_restart_correctness_amd_test.dart b/webdev/test/hot_restart_correctness_amd_test.dart similarity index 100% rename from dwds/test/integration/hot_restart_correctness_amd_test.dart rename to webdev/test/hot_restart_correctness_amd_test.dart diff --git a/webdev/test/hot_restart_correctness_ddc_library_bundle_test.dart b/webdev/test/hot_restart_correctness_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..f16f780989 --- /dev/null +++ b/webdev/test/hot_restart_correctness_ddc_library_bundle_test.dart @@ -0,0 +1,52 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Tags(['daily']) +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/hot_restart_correctness.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final canaryFeatures = true; + final moduleFormat = ModuleFormat.ddc; + + group('canary: $canaryFeatures | Build Daemon |', () { + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: moduleFormat, + ); + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + runTests( + provider: provider, + moduleFormat: moduleFormat, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: $canaryFeatures | Build Daemon and Frontend Server |', () { + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: moduleFormat, + ); + final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + runTests( + provider: provider, + moduleFormat: moduleFormat, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/hot_restart_ddc_library_bundle_test.dart b/webdev/test/hot_restart_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..fd8eb00f12 --- /dev/null +++ b/webdev/test/hot_restart_ddc_library_bundle_test.dart @@ -0,0 +1,53 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Tags(['daily']) +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/hot_restart.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final canaryFeatures = true; + final moduleFormat = ModuleFormat.ddc; + + group('canary: $canaryFeatures | Build Daemon |', () { + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: moduleFormat, + ); + + runTests( + provider: provider, + moduleFormat: moduleFormat, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: $canaryFeatures | Build Daemon and Frontend Server |', () { + final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: moduleFormat, + ); + runTests( + provider: provider, + moduleFormat: moduleFormat, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/instance_amd_test.dart b/webdev/test/instance_amd_test.dart new file mode 100644 index 0000000000..3ccfb3a607 --- /dev/null +++ b/webdev/test/instance_amd_test.dart @@ -0,0 +1,66 @@ +// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/instance.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final moduleFormat = ModuleFormat.amd; + + group('canary: false | Build Daemon |', () { + final canaryFeatures = false; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + canaryFeatures: canaryFeatures, + verbose: debug, + ddcModuleFormat: moduleFormat, + ); + tearDownAll(provider.dispose); + + runTypeSystemVerificationTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + canaryFeatures: canaryFeatures, + verbose: debug, + ddcModuleFormat: moduleFormat, + ); + tearDownAll(provider.dispose); + + runTypeSystemVerificationTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/instance_ddc_library_bundle_test.dart b/webdev/test/instance_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..0481dbeaca --- /dev/null +++ b/webdev/test/instance_ddc_library_bundle_test.dart @@ -0,0 +1,53 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/instance.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final canaryFeatures = true; + final moduleFormat = ModuleFormat.ddc; + + group('canary: true | Build Daemon |', () { + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + canaryFeatures: canaryFeatures, + verbose: debug, + ddcModuleFormat: moduleFormat, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + canaryFeatures: canaryFeatures, + verbose: debug, + ddcModuleFormat: moduleFormat, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/instance_inspection_amd_test.dart b/webdev/test/instance_inspection_amd_test.dart new file mode 100644 index 0000000000..6c902de4b5 --- /dev/null +++ b/webdev/test/instance_inspection_amd_test.dart @@ -0,0 +1,54 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/instance_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: false | Build Daemon |', () { + final canaryFeatures = false; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/instance_inspection_ddc_library_bundle_test.dart b/webdev/test/instance_inspection_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..955f050bb2 --- /dev/null +++ b/webdev/test/instance_inspection_ddc_library_bundle_test.dart @@ -0,0 +1,54 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/instance_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/listviews_amd_test.dart b/webdev/test/listviews_amd_test.dart new file mode 100644 index 0000000000..a51eef7ba0 --- /dev/null +++ b/webdev/test/listviews_amd_test.dart @@ -0,0 +1,29 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/listviews.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + runTests(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + }); +} diff --git a/webdev/test/listviews_ddc_library_bundle_test.dart b/webdev/test/listviews_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..eaca4982db --- /dev/null +++ b/webdev/test/listviews_ddc_library_bundle_test.dart @@ -0,0 +1,37 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/listviews.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + runTests(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + }); + + group('Build Daemon and Frontend Server |', () { + runTests( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + ); + }); +} diff --git a/webdev/test/load_strategy_amd_test.dart b/webdev/test/load_strategy_amd_test.dart new file mode 100644 index 0000000000..a5cf8908f8 --- /dev/null +++ b/webdev/test/load_strategy_amd_test.dart @@ -0,0 +1,32 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/load_strategy.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + runDependentTests( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + ); + }); +} diff --git a/webdev/test/load_strategy_ddc_library_bundle_test.dart b/webdev/test/load_strategy_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..91bdc66fc0 --- /dev/null +++ b/webdev/test/load_strategy_ddc_library_bundle_test.dart @@ -0,0 +1,40 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/load_strategy.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + runDependentTests( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider), + ); + }); + + group('Build Daemon and Frontend Server |', () { + runDependentTests( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + ); + }); +} diff --git a/webdev/test/parts_evaluate_amd_test.dart b/webdev/test/parts_evaluate_amd_test.dart new file mode 100644 index 0000000000..b9bfb0175f --- /dev/null +++ b/webdev/test/parts_evaluate_amd_test.dart @@ -0,0 +1,30 @@ +// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 5)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/evaluate_parts.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() async { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + }); +} diff --git a/webdev/test/parts_evaluate_ddc_library_bundle_test.dart b/webdev/test/parts_evaluate_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..375a5751fd --- /dev/null +++ b/webdev/test/parts_evaluate_ddc_library_bundle_test.dart @@ -0,0 +1,38 @@ +// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 5)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/evaluate_parts.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() async { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider( + verbose: debug, + ddcModuleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ); + tearDownAll(provider.dispose); + + group('Build Daemon |', () { + testAll(provider: provider, contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)); + }); + + group('Build Daemon and Frontend Server |', () { + testAll( + provider: provider, + contextFactory: (project, provider) => BuildDaemonTestContext(project, provider)AndFrontendServer, + ); + }); +} diff --git a/webdev/test/patterns_inspection_amd_test.dart b/webdev/test/patterns_inspection_amd_test.dart new file mode 100644 index 0000000000..2d024d7041 --- /dev/null +++ b/webdev/test/patterns_inspection_amd_test.dart @@ -0,0 +1,54 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/patterns_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: false | Build Daemon |', () { + final canaryFeatures = false; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/patterns_inspection_ddc_library_bundle_test.dart b/webdev/test/patterns_inspection_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..2208b0baf6 --- /dev/null +++ b/webdev/test/patterns_inspection_ddc_library_bundle_test.dart @@ -0,0 +1,54 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/patterns_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/record_inspection_amd_test.dart b/webdev/test/record_inspection_amd_test.dart new file mode 100644 index 0000000000..3bc9209aeb --- /dev/null +++ b/webdev/test/record_inspection_amd_test.dart @@ -0,0 +1,54 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/record_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: false | Build Daemon |', () { + final canaryFeatures = false; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/record_inspection_ddc_library_bundle_test.dart b/webdev/test/record_inspection_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..2e9e380e30 --- /dev/null +++ b/webdev/test/record_inspection_ddc_library_bundle_test.dart @@ -0,0 +1,51 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/record_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final canaryFeatures = true; + + group('canary: true | Build Daemon |', () { + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/record_type_inspection_amd_test.dart b/webdev/test/record_type_inspection_amd_test.dart new file mode 100644 index 0000000000..6ecbf04fd1 --- /dev/null +++ b/webdev/test/record_type_inspection_amd_test.dart @@ -0,0 +1,54 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/src/services/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/record_type_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: false | Build Daemon |', () { + final canaryFeatures = false; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/record_type_inspection_ddc_library_bundle_test.dart b/webdev/test/record_type_inspection_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..dd0a2a1cfd --- /dev/null +++ b/webdev/test/record_type_inspection_ddc_library_bundle_test.dart @@ -0,0 +1,54 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/record_type_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/type_inspection_amd_test.dart b/webdev/test/type_inspection_amd_test.dart new file mode 100644 index 0000000000..c3fb8012fd --- /dev/null +++ b/webdev/test/type_inspection_amd_test.dart @@ -0,0 +1,54 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/type_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: false | Build Daemon |', () { + final canaryFeatures = false; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.amd, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} diff --git a/webdev/test/type_inspection_ddc_library_bundle_test.dart b/webdev/test/type_inspection_ddc_library_bundle_test.dart new file mode 100644 index 0000000000..b4c443e448 --- /dev/null +++ b/webdev/test/type_inspection_ddc_library_bundle_test.dart @@ -0,0 +1,54 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:dwds/expression_compiler.dart'; +import 'package:dwds_test_common/fixtures/context.dart'; +import 'helpers/context.dart'; +import 'package:dwds_test_common/integration/type_inspection.dart'; +import 'package:dwds_test_common/test_sdk_configuration.dart'; +import 'package:test/test.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + + group('canary: true | Build Daemon |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); + + group('canary: true | Build Daemon and Frontend Server |', () { + final canaryFeatures = true; + final contextFactory = (project, provider) => BuildDaemonAndFrontendServerTestContext(project, provider); + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ddcModuleFormat: ModuleFormat.ddc, + ); + tearDownAll(provider.dispose); + + runTests( + provider: provider, + contextFactory: contextFactory, + canaryFeatures: canaryFeatures, + ); + }); +} From 008cee4f9a86e00a04961fd3484067a880a4098d Mon Sep 17 00:00:00 2001 From: MarkZ Date: Wed, 12 Aug 2026 14:59:46 -0700 Subject: [PATCH 108/134] fix unused imports in moved tests --- webdev/test/evaluate_amd_test.dart | 3 --- webdev/test/evaluate_ddc_library_bundle_test.dart | 3 --- 2 files changed, 6 deletions(-) diff --git a/webdev/test/evaluate_amd_test.dart b/webdev/test/evaluate_amd_test.dart index 6e94e16f98..75cb4131b8 100644 --- a/webdev/test/evaluate_amd_test.dart +++ b/webdev/test/evaluate_amd_test.dart @@ -7,12 +7,9 @@ @Timeout(Duration(minutes: 5)) library; -import 'dart:io'; - import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/fixtures/context.dart'; import 'helpers/context.dart'; -import 'package:dwds_test_common/fixtures/project.dart'; import 'package:dwds_test_common/integration/evaluate.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; diff --git a/webdev/test/evaluate_ddc_library_bundle_test.dart b/webdev/test/evaluate_ddc_library_bundle_test.dart index ff2474fcf8..42fef30160 100644 --- a/webdev/test/evaluate_ddc_library_bundle_test.dart +++ b/webdev/test/evaluate_ddc_library_bundle_test.dart @@ -7,12 +7,9 @@ @Timeout(Duration(minutes: 5)) library; -import 'dart:io'; - import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/fixtures/context.dart'; import 'helpers/context.dart'; -import 'package:dwds_test_common/fixtures/project.dart'; import 'package:dwds_test_common/integration/evaluate.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; From 4e06af35ebed6dec4509259f83b77ef4358f47f8 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Wed, 12 Aug 2026 16:01:35 -0700 Subject: [PATCH 109/134] Fix extension tests in CI by running them from debug_extension package --- .github/workflows/dart.yml | 329 ++++++++++++++++++---------------- debug_extension/mono_pkg.yaml | 17 ++ dwds/mono_pkg.yaml | 21 +-- tool/ci.sh | 26 ++- 4 files changed, 202 insertions(+), 191 deletions(-) create mode 100644 debug_extension/mono_pkg.yaml diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 0f43dd4a15..5c7a73f44e 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -41,16 +41,16 @@ jobs: - name: mono_repo self validate run: dart pub global run mono_repo generate --validate job_002: - name: "analyzer_and_format; linux; Dart dev; PKG: dwds; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`, `dart test test/build/ensure_version_test.dart`" + name: "analyzer_and_format; linux; Dart dev; PKGS: debug_extension, dwds_test_common, dwds_test_common/fixtures/_webdev_smoke, example, frontend_server_client; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds;commands:format-analyze_0-test_0" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:debug_extension-dwds_test_common-dwds_test_common/fixtures/_webdev_smoke-example-frontend_server_client;commands:format-analyze_0" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:debug_extension-dwds_test_common-dwds_test_common/fixtures/_webdev_smoke-example-frontend_server_client os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -61,44 +61,19 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - - id: dwds_pub_upgrade - name: dwds; dart pub upgrade + - id: debug_extension_pub_upgrade + name: debug_extension; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: dwds - - name: "dwds; dart format --output=none --set-exit-if-changed ." + working-directory: debug_extension + - name: "debug_extension; dart format --output=none --set-exit-if-changed ." run: "dart format --output=none --set-exit-if-changed ." - if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" - working-directory: dwds - - name: "dwds; dart analyze --fatal-infos ." + if: "always() && steps.debug_extension_pub_upgrade.conclusion == 'success'" + working-directory: debug_extension + - name: "debug_extension; dart analyze --fatal-infos ." run: dart analyze --fatal-infos . - if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" - working-directory: dwds - - name: dwds; dart test test/build/ensure_version_test.dart - run: dart test test/build/ensure_version_test.dart - if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" - working-directory: dwds - job_003: - name: "analyzer_and_format; linux; Dart dev; PKGS: dwds_test_common, dwds_test_common/fixtures/_webdev_smoke, example, frontend_server_client; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds_test_common-dwds_test_common/fixtures/_webdev_smoke-example-frontend_server_client;commands:format-analyze_0" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds_test_common-dwds_test_common/fixtures/_webdev_smoke-example-frontend_server_client - os:ubuntu-latest;pub-cache-hosted;sdk:dev - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: dev - - id: checkout - name: Checkout repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + if: "always() && steps.debug_extension_pub_upgrade.conclusion == 'success'" + working-directory: debug_extension - id: dwds_test_common_pub_upgrade name: dwds_test_common; dart pub upgrade run: dart pub upgrade @@ -151,6 +126,44 @@ jobs: run: dart analyze --fatal-infos . if: "always() && steps.frontend_server_client_pub_upgrade.conclusion == 'success'" working-directory: frontend_server_client + job_003: + name: "analyzer_and_format; linux; Dart dev; PKG: dwds; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`, `dart test test/build/ensure_version_test.dart`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds;commands:format-analyze_0-test_1" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds + os:ubuntu-latest;pub-cache-hosted;sdk:dev + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - name: Setup Dart SDK + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c + with: + sdk: dev + - id: checkout + name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + - id: dwds_pub_upgrade + name: dwds; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: dwds + - name: "dwds; dart format --output=none --set-exit-if-changed ." + run: "dart format --output=none --set-exit-if-changed ." + if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" + working-directory: dwds + - name: "dwds; dart analyze --fatal-infos ." + run: dart analyze --fatal-infos . + if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" + working-directory: dwds + - name: dwds; dart test test/build/ensure_version_test.dart + run: dart test test/build/ensure_version_test.dart + if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" + working-directory: dwds job_004: name: "analyzer_and_format; linux; Dart dev; PKG: webdev; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`, `dart test test/build/ensure_build_test.dart`" runs-on: ubuntu-latest @@ -159,7 +172,7 @@ jobs: uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:webdev;commands:format-analyze_0-test_7" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:webdev;commands:format-analyze_0-test_6" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:webdev os:ubuntu-latest;pub-cache-hosted;sdk:dev @@ -190,16 +203,16 @@ jobs: if: "always() && steps.webdev_pub_upgrade.conclusion == 'success'" working-directory: webdev job_005: - name: "unit_test; linux; Dart dev; PKG: dwds; `Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &`, `dart test --tags=extension`" + name: "unit_test; linux; Dart dev; PKG: debug_extension; `Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &`, `dart test -j 1`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds;commands:command-test_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:debug_extension;commands:command-test_0" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:debug_extension os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -210,26 +223,65 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - - id: dwds_pub_upgrade - name: dwds; dart pub upgrade + - id: debug_extension_pub_upgrade + name: debug_extension; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: dwds - - name: "dwds; Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &" + working-directory: debug_extension + - name: "debug_extension; Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &" run: "Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &" - if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" - working-directory: dwds - - name: "dwds; dart test --tags=extension" - run: "dart test --tags=extension" - if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" - working-directory: dwds + if: "always() && steps.debug_extension_pub_upgrade.conclusion == 'success'" + working-directory: debug_extension + - name: "debug_extension; dart test -j 1" + run: dart test -j 1 + if: "always() && steps.debug_extension_pub_upgrade.conclusion == 'success'" + working-directory: debug_extension needs: - job_001 - job_002 - job_003 - job_004 job_006: - name: "unit_test; linux; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 0 --exclude-tags=extension`" + name: "unit_test; linux; Dart dev; PKG: webdev; `Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &`, `dart test -j 1`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:webdev;commands:command-test_0" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:webdev + os:ubuntu-latest;pub-cache-hosted;sdk:dev + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - name: Setup Dart SDK + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c + with: + sdk: dev + - id: checkout + name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + - id: webdev_pub_upgrade + name: webdev; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: webdev + - name: "webdev; Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &" + run: "Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &" + if: "always() && steps.webdev_pub_upgrade.conclusion == 'success'" + working-directory: webdev + - name: "webdev; dart test -j 1" + run: dart test -j 1 + if: "always() && steps.webdev_pub_upgrade.conclusion == 'success'" + working-directory: webdev + needs: + - job_001 + - job_002 + - job_003 + - job_004 + job_007: + name: "unit_test; linux; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 0`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies @@ -254,8 +306,8 @@ jobs: run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: dwds - - name: "dwds; dart test --total-shards 3 --shard-index 0 --exclude-tags=extension" - run: "dart test --total-shards 3 --shard-index 0 --exclude-tags=extension" + - name: "dwds; dart test --total-shards 3 --shard-index 0" + run: dart test --total-shards 3 --shard-index 0 if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" working-directory: dwds needs: @@ -263,8 +315,8 @@ jobs: - job_002 - job_003 - job_004 - job_007: - name: "unit_test; linux; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 1 --exclude-tags=extension`" + job_008: + name: "unit_test; linux; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 1`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies @@ -289,8 +341,8 @@ jobs: run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: dwds - - name: "dwds; dart test --total-shards 3 --shard-index 1 --exclude-tags=extension" - run: "dart test --total-shards 3 --shard-index 1 --exclude-tags=extension" + - name: "dwds; dart test --total-shards 3 --shard-index 1" + run: dart test --total-shards 3 --shard-index 1 if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" working-directory: dwds needs: @@ -298,8 +350,8 @@ jobs: - job_002 - job_003 - job_004 - job_008: - name: "unit_test; linux; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 2 --exclude-tags=extension`" + job_009: + name: "unit_test; linux; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 2`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies @@ -324,8 +376,8 @@ jobs: run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: dwds - - name: "dwds; dart test --total-shards 3 --shard-index 2 --exclude-tags=extension" - run: "dart test --total-shards 3 --shard-index 2 --exclude-tags=extension" + - name: "dwds; dart test --total-shards 3 --shard-index 2" + run: dart test --total-shards 3 --shard-index 2 if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" working-directory: dwds needs: @@ -333,7 +385,7 @@ jobs: - job_002 - job_003 - job_004 - job_009: + job_010: name: "unit_test; linux; Dart dev; PKG: dwds_test_common; `Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &`, `dart test --exclude-tags=release`" runs-on: ubuntu-latest steps: @@ -341,7 +393,7 @@ jobs: uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds_test_common;commands:command-test_6" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds_test_common;commands:command-test_5" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds_test_common os:ubuntu-latest;pub-cache-hosted;sdk:dev @@ -372,7 +424,7 @@ jobs: - job_002 - job_003 - job_004 - job_010: + job_011: name: "unit_test; linux; Dart dev; PKG: frontend_server_client; `dart test -j 1`" runs-on: ubuntu-latest steps: @@ -380,7 +432,7 @@ jobs: uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:frontend_server_client;commands:test_5" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:frontend_server_client;commands:test_0" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:frontend_server_client os:ubuntu-latest;pub-cache-hosted;sdk:dev @@ -407,47 +459,8 @@ jobs: - job_002 - job_003 - job_004 - job_011: - name: "unit_test; linux; Dart dev; PKG: webdev; `Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &`, `dart test -j 1`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:webdev;commands:command-test_5" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:webdev - os:ubuntu-latest;pub-cache-hosted;sdk:dev - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: dev - - id: checkout - name: Checkout repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - - id: webdev_pub_upgrade - name: webdev; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: webdev - - name: "webdev; Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &" - run: "Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &" - if: "always() && steps.webdev_pub_upgrade.conclusion == 'success'" - working-directory: webdev - - name: "webdev; dart test -j 1" - run: dart test -j 1 - if: "always() && steps.webdev_pub_upgrade.conclusion == 'success'" - working-directory: webdev - needs: - - job_001 - - job_002 - - job_003 - - job_004 job_012: - name: "unit_test; windows; Dart dev; PKG: dwds; `dart test --tags=extension`" + name: "unit_test; windows; Dart dev; PKG: debug_extension; `dart test -j 1`" runs-on: windows-latest steps: - name: Setup Dart SDK @@ -457,22 +470,22 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - - id: dwds_pub_upgrade - name: dwds; dart pub upgrade + - id: debug_extension_pub_upgrade + name: debug_extension; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: dwds - - name: "dwds; dart test --tags=extension" - run: "dart test --tags=extension" - if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" - working-directory: dwds + working-directory: debug_extension + - name: "debug_extension; dart test -j 1" + run: dart test -j 1 + if: "always() && steps.debug_extension_pub_upgrade.conclusion == 'success'" + working-directory: debug_extension needs: - job_001 - job_002 - job_003 - job_004 job_013: - name: "unit_test; windows; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 0 --exclude-tags=extension`" + name: "unit_test; windows; Dart dev; PKG: frontend_server_client; `dart test -j 1`" runs-on: windows-latest steps: - name: Setup Dart SDK @@ -482,22 +495,22 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - - id: dwds_pub_upgrade - name: dwds; dart pub upgrade + - id: frontend_server_client_pub_upgrade + name: frontend_server_client; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: dwds - - name: "dwds; dart test --total-shards 3 --shard-index 0 --exclude-tags=extension" - run: "dart test --total-shards 3 --shard-index 0 --exclude-tags=extension" - if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" - working-directory: dwds + working-directory: frontend_server_client + - name: "frontend_server_client; dart test -j 1" + run: dart test -j 1 + if: "always() && steps.frontend_server_client_pub_upgrade.conclusion == 'success'" + working-directory: frontend_server_client needs: - job_001 - job_002 - job_003 - job_004 job_014: - name: "unit_test; windows; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 1 --exclude-tags=extension`" + name: "unit_test; windows; Dart dev; PKG: webdev; `dart test -j 1`" runs-on: windows-latest steps: - name: Setup Dart SDK @@ -507,22 +520,22 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - - id: dwds_pub_upgrade - name: dwds; dart pub upgrade + - id: webdev_pub_upgrade + name: webdev; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: dwds - - name: "dwds; dart test --total-shards 3 --shard-index 1 --exclude-tags=extension" - run: "dart test --total-shards 3 --shard-index 1 --exclude-tags=extension" - if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" - working-directory: dwds + working-directory: webdev + - name: "webdev; dart test -j 1" + run: dart test -j 1 + if: "always() && steps.webdev_pub_upgrade.conclusion == 'success'" + working-directory: webdev needs: - job_001 - job_002 - job_003 - job_004 job_015: - name: "unit_test; windows; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 2 --exclude-tags=extension`" + name: "unit_test; windows; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 0`" runs-on: windows-latest steps: - name: Setup Dart SDK @@ -537,8 +550,8 @@ jobs: run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: dwds - - name: "dwds; dart test --total-shards 3 --shard-index 2 --exclude-tags=extension" - run: "dart test --total-shards 3 --shard-index 2 --exclude-tags=extension" + - name: "dwds; dart test --total-shards 3 --shard-index 0" + run: dart test --total-shards 3 --shard-index 0 if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" working-directory: dwds needs: @@ -547,7 +560,7 @@ jobs: - job_003 - job_004 job_016: - name: "unit_test; windows; Dart dev; PKG: dwds_test_common; `dart test --exclude-tags=release`" + name: "unit_test; windows; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 1`" runs-on: windows-latest steps: - name: Setup Dart SDK @@ -557,22 +570,22 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - - id: dwds_test_common_pub_upgrade - name: dwds_test_common; dart pub upgrade + - id: dwds_pub_upgrade + name: dwds; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: dwds_test_common - - name: "dwds_test_common; dart test --exclude-tags=release" - run: "dart test --exclude-tags=release" - if: "always() && steps.dwds_test_common_pub_upgrade.conclusion == 'success'" - working-directory: dwds_test_common + working-directory: dwds + - name: "dwds; dart test --total-shards 3 --shard-index 1" + run: dart test --total-shards 3 --shard-index 1 + if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" + working-directory: dwds needs: - job_001 - job_002 - job_003 - job_004 job_017: - name: "unit_test; windows; Dart dev; PKG: frontend_server_client; `dart test -j 1`" + name: "unit_test; windows; Dart dev; PKG: dwds; `dart test --total-shards 3 --shard-index 2`" runs-on: windows-latest steps: - name: Setup Dart SDK @@ -582,22 +595,22 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - - id: frontend_server_client_pub_upgrade - name: frontend_server_client; dart pub upgrade + - id: dwds_pub_upgrade + name: dwds; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: frontend_server_client - - name: "frontend_server_client; dart test -j 1" - run: dart test -j 1 - if: "always() && steps.frontend_server_client_pub_upgrade.conclusion == 'success'" - working-directory: frontend_server_client + working-directory: dwds + - name: "dwds; dart test --total-shards 3 --shard-index 2" + run: dart test --total-shards 3 --shard-index 2 + if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" + working-directory: dwds needs: - job_001 - job_002 - job_003 - job_004 job_018: - name: "unit_test; windows; Dart dev; PKG: webdev; `dart test -j 1`" + name: "unit_test; windows; Dart dev; PKG: dwds_test_common; `dart test --exclude-tags=release`" runs-on: windows-latest steps: - name: Setup Dart SDK @@ -607,15 +620,15 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - - id: webdev_pub_upgrade - name: webdev; dart pub upgrade + - id: dwds_test_common_pub_upgrade + name: dwds_test_common; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: webdev - - name: "webdev; dart test -j 1" - run: dart test -j 1 - if: "always() && steps.webdev_pub_upgrade.conclusion == 'success'" - working-directory: webdev + working-directory: dwds_test_common + - name: "dwds_test_common; dart test --exclude-tags=release" + run: "dart test --exclude-tags=release" + if: "always() && steps.dwds_test_common_pub_upgrade.conclusion == 'success'" + working-directory: dwds_test_common needs: - job_001 - job_002 @@ -630,7 +643,7 @@ jobs: uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:beta;packages:dwds;commands:command-test_5" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:beta;packages:dwds;commands:command-test_0" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:beta;packages:dwds os:ubuntu-latest;pub-cache-hosted;sdk:beta @@ -684,7 +697,7 @@ jobs: uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:beta;packages:webdev;commands:command-test_5" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:beta;packages:webdev;commands:command-test_0" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:beta;packages:webdev os:ubuntu-latest;pub-cache-hosted;sdk:beta diff --git a/debug_extension/mono_pkg.yaml b/debug_extension/mono_pkg.yaml new file mode 100644 index 0000000000..42b321e034 --- /dev/null +++ b/debug_extension/mono_pkg.yaml @@ -0,0 +1,17 @@ +# See https://pub.dev/packages/mono_repo for details +stages: + - analyzer_and_format: + - group: + - format + - analyze: --fatal-infos . + sdk: dev + - unit_test: + - group: + - command: Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & + - test: -j 1 + sdk: dev + os: + - linux + - test: -j 1 + os: windows + sdk: dev diff --git a/dwds/mono_pkg.yaml b/dwds/mono_pkg.yaml index cf4a65ad7e..334e0c0530 100644 --- a/dwds/mono_pkg.yaml +++ b/dwds/mono_pkg.yaml @@ -7,38 +7,23 @@ stages: - test: test/build/ensure_version_test.dart sdk: dev - unit_test: - # Linux extension tests: - # Note: `Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &` must be - # run first for Linux. - - group: - - command: Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & - - test: --tags=extension - sdk: dev - os: - - linux - # Windows extension tests: - - group: - - test: --tags=extension - sdk: dev - os: - - windows # First test shard: - group: - - test: --total-shards 3 --shard-index 0 --exclude-tags=extension + - test: --total-shards 3 --shard-index 0 sdk: dev os: - linux - windows # Second test shard: - group: - - test: --total-shards 3 --shard-index 1 --exclude-tags=extension + - test: --total-shards 3 --shard-index 1 sdk: dev os: - linux - windows # Third test shard: - group: - - test: --total-shards 3 --shard-index 2 --exclude-tags=extension + - test: --total-shards 3 --shard-index 2 sdk: dev os: - linux diff --git a/tool/ci.sh b/tool/ci.sh index 67171c3f9f..1827ff9ab9 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -80,34 +80,30 @@ for PKG in ${PKGS}; do dart format --output=none --set-exit-if-changed . || EXIT_CODE=$? ;; test_0) - echo 'dart test test/build/ensure_version_test.dart' - dart test test/build/ensure_version_test.dart || EXIT_CODE=$? + echo 'dart test -j 1' + dart test -j 1 || EXIT_CODE=$? ;; test_1) - echo 'dart test --tags=extension' - dart test --tags=extension || EXIT_CODE=$? + echo 'dart test test/build/ensure_version_test.dart' + dart test test/build/ensure_version_test.dart || EXIT_CODE=$? ;; test_2) - echo 'dart test --total-shards 3 --shard-index 0 --exclude-tags=extension' - dart test --total-shards 3 --shard-index 0 --exclude-tags=extension || EXIT_CODE=$? + echo 'dart test --total-shards 3 --shard-index 0' + dart test --total-shards 3 --shard-index 0 || EXIT_CODE=$? ;; test_3) - echo 'dart test --total-shards 3 --shard-index 1 --exclude-tags=extension' - dart test --total-shards 3 --shard-index 1 --exclude-tags=extension || EXIT_CODE=$? + echo 'dart test --total-shards 3 --shard-index 1' + dart test --total-shards 3 --shard-index 1 || EXIT_CODE=$? ;; test_4) - echo 'dart test --total-shards 3 --shard-index 2 --exclude-tags=extension' - dart test --total-shards 3 --shard-index 2 --exclude-tags=extension || EXIT_CODE=$? + echo 'dart test --total-shards 3 --shard-index 2' + dart test --total-shards 3 --shard-index 2 || EXIT_CODE=$? ;; test_5) - echo 'dart test -j 1' - dart test -j 1 || EXIT_CODE=$? - ;; - test_6) echo 'dart test --exclude-tags=release' dart test --exclude-tags=release || EXIT_CODE=$? ;; - test_7) + test_6) echo 'dart test test/build/ensure_build_test.dart' dart test test/build/ensure_build_test.dart || EXIT_CODE=$? ;; From 29dd36c422a4d554a3c802665eec03a6f3b0e99a Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 13 Aug 2026 18:49:26 -0700 Subject: [PATCH 110/134] Cleanup internal monologue comments in context.dart --- webdev/test/helpers/context.dart | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/webdev/test/helpers/context.dart b/webdev/test/helpers/context.dart index ff9c763e6e..b3f220c121 100644 --- a/webdev/test/helpers/context.dart +++ b/webdev/test/helpers/context.dart @@ -427,21 +427,15 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { await buildFuture; - final assetServerPort = daemonPort( - project.absolutePackageDirectory, + final assetServerPort = daemonPort(project.absolutePackageDirectory); + assetHandler = _createBuildRunnerDdcLibraryBundleAssetHandler( + this, + assetServerPort, ); - assetHandler = _createBuildRunnerDdcLibraryBundleAssetHandler(this, assetServerPort); - - // Using standard constructor if fromHandler is not available or if it's simpler. - // In "theirs" they used ProxyServerAssetReader.fromHandler(_assetHandler!); - // Let's check if ProxyServerAssetReader has fromHandler in this branch. - // I can try using it, and if it fails to compile I will revert. - // Wait, I should verify if it exists. - // I grepped for ProxyServerAssetReader earlier but didn't check its constructors. - // Let's use standard constructor for now to be safe, or try fromHandler if I want to be faithful to branch 1. - // Let's try fromHandler as it was in branch 1. + assetReader = ProxyServerAssetReader.fromHandler(assetHandler); + if (testSettings.enableExpressionEvaluation) { expressionCompiler = DaemonExpressionCompiler( _compileExpressionWithDaemon, From 6e1f4ba0548ca10d78b248f8e8423e6af4382a47 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 13 Aug 2026 18:56:01 -0700 Subject: [PATCH 111/134] cleanup --- webdev/test/helpers/context.dart | 9 --------- 1 file changed, 9 deletions(-) diff --git a/webdev/test/helpers/context.dart b/webdev/test/helpers/context.dart index abcccb2ea2..957d799a82 100644 --- a/webdev/test/helpers/context.dart +++ b/webdev/test/helpers/context.dart @@ -426,14 +426,6 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { assetServerPort, ); - // Using standard constructor if fromHandler is not available or if it's simpler. - // In "theirs" they used ProxyServerAssetReader.fromHandler(_assetHandler!); - // Let's check if ProxyServerAssetReader has fromHandler in this branch. - // I can try using it, and if it fails to compile I will revert. - // Wait, I should verify if it exists. - // I grepped for ProxyServerAssetReader earlier but didn't check its constructors. - // Let's use standard constructor for now to be safe, or try fromHandler if I want to be faithful to branch 1. - // Let's try fromHandler as it was in branch 1. assetReader = ProxyServerAssetReader.fromHandler(assetHandler); if (testSettings.enableExpressionEvaluation) { @@ -477,7 +469,6 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { ), }; - // Map build results. buildResults = testSettings.enableExpressionEvaluation ? const Stream.empty() : daemonClient.buildResults.map((results) { From 34a6526861447346fea5f0085f750cd58aabd14c Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 13 Aug 2026 19:02:11 -0700 Subject: [PATCH 112/134] Polish context.dart with latest SDK sync updates --- webdev/test/helpers/context.dart | 124 ++++++++++++++++++------------- 1 file changed, 73 insertions(+), 51 deletions(-) diff --git a/webdev/test/helpers/context.dart b/webdev/test/helpers/context.dart index 957d799a82..9a7ad15224 100644 --- a/webdev/test/helpers/context.dart +++ b/webdev/test/helpers/context.dart @@ -26,7 +26,12 @@ import 'package:shelf/shelf.dart'; import 'package:shelf_proxy/shelf_proxy.dart'; class BuildDaemonTestContext extends TestContext { - BuildDaemonTestContext(super.project, super.sdkConfigurationProvider); + final _logger = logging.Logger('BuildDaemonTestContext'); + + BuildDaemonTestContext( + super.project, + super.sdkConfigurationProvider, + ); @override bool get usesFrontendServer => false; @@ -92,7 +97,9 @@ class BuildDaemonTestContext extends TestContext { await waitForSuccessfulBuild(); - final assetServerPort = daemonPort(project.absolutePackageDirectory); + final assetServerPort = daemonPort( + project.absolutePackageDirectory, + ); assetHandler = switch (( testSettings.moduleFormat, buildSettings.canaryFeatures, @@ -123,20 +130,20 @@ class BuildDaemonTestContext extends TestContext { buildSettings.canaryFeatures, )) { (ModuleFormat.ddc, true) => BuildRunnerDdcLibraryBundleStrategyProvider( - testSettings.reloadConfiguration, - assetReader, - buildSettings, - reloadedSourcesUri: reloadedSourcesUri, - ).strategy, + testSettings.reloadConfiguration, + assetReader, + buildSettings, + reloadedSourcesUri: reloadedSourcesUri, + ).strategy, (ModuleFormat.ddc, false) => throw Exception( - 'Unsupported DDC configuration: build daemon + canary (false) ' - '+ DDC module format ${testSettings.moduleFormat.name}.', - ), + 'Unsupported DDC configuration: build daemon + canary (false) ' + '+ DDC module format ${testSettings.moduleFormat.name}.', + ), _ => BuildRunnerRequireStrategyProvider( - testSettings.reloadConfiguration, - assetReader, - buildSettings, - ).strategy, + testSettings.reloadConfiguration, + assetReader, + buildSettings, + ).strategy, }; buildResults = daemonClient.buildResults.map((results) { @@ -170,7 +177,6 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { bool get usesBuildDaemon => true; @override bool get usesDdcModulesOnly => true; - /// Forwards expression compilation requests to the persistent Frontend Server /// process via socket. Future> _compileExpressionWithDaemon( @@ -201,7 +207,6 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { await socket.close(); } } - @override Future modeSetUp({ required TestSettings testSettings, @@ -263,13 +268,16 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { ), ); final packagesFile = File( - p.join(testScratchSpaceDir.path, '.dart_tool', 'package_config.json'), + p.join( + testScratchSpaceDir.path, + '.dart_tool', + 'package_config.json', + ), ); packagesFile.parent.createSync(recursive: true); - final originalJson = - jsonDecode(sourcePackagesFile.readAsStringSync()) - as Map; + final originalJson = jsonDecode(sourcePackagesFile.readAsStringSync()) + as Map; final packagesList = originalJson['packages'] as List; for (final package in packagesList) { final packageMap = package as Map; @@ -291,23 +299,26 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { '.dart_tool', 'fes_manager.snapshot', ); - - final buildWebCompilers = - packagesList.firstWhere( - (pkg) => (pkg as Map)['name'] == 'build_web_compilers', - orElse: () => null, - ) - as Map?; + + final buildWebCompilers = packagesList.firstWhere( + (pkg) => (pkg as Map)['name'] == 'build_web_compilers', + orElse: () => null, + ) as Map?; String fesManagerPath; if (buildWebCompilers != null) { - final pkgRootUri = Uri.parse(buildWebCompilers['rootUri'] as String); + final pkgRootUri = Uri.parse( + buildWebCompilers['rootUri'] as String, + ); fesManagerPath = p.join( pkgRootUri.toFilePath(), 'bin', 'fes_manager.dart', ); } else { - final localBuildRepoDir = p.join(p.dirname(projectRootDir), 'build'); + final localBuildRepoDir = p.join( + p.dirname(projectRootDir), + 'build', + ); fesManagerPath = p.join( localBuildRepoDir, 'builder_pkgs', @@ -349,14 +360,14 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { .transform(utf8.decoder) .transform(const LineSplitter()) .listen((line) { - _logger.info('FES Manager STDOUT: $line'); - }); + _logger.info('FES Manager STDOUT: $line'); + }); fesProcess!.stderr .transform(utf8.decoder) .transform(const LineSplitter()) .listen((line) { - _logger.warning('FES Manager STDERR: $line'); - }); + _logger.warning('FES Manager STDERR: $line'); + }); final configFile = _fesManagerConfigFile(this); while (!await configFile.exists()) { @@ -420,12 +431,19 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { await buildFuture; - final assetServerPort = daemonPort(project.absolutePackageDirectory); - assetHandler = _createBuildRunnerDdcLibraryBundleAssetHandler( - this, - assetServerPort, + final assetServerPort = daemonPort( + project.absolutePackageDirectory, ); - + assetHandler = _createBuildRunnerDdcLibraryBundleAssetHandler(this, assetServerPort); + + // Using standard constructor if fromHandler is not available or if it's simpler. + // In "theirs" they used ProxyServerAssetReader.fromHandler(_assetHandler!); + // Let's check if ProxyServerAssetReader has fromHandler in this branch. + // I can try using it, and if it fails to compile I will revert. + // Wait, I should verify if it exists. + // I grepped for ProxyServerAssetReader earlier but didn't check its constructors. + // Let's use standard constructor for now to be safe, or try fromHandler if I want to be faithful to branch 1. + // Let's try fromHandler as it was in branch 1. assetReader = ProxyServerAssetReader.fromHandler(assetHandler); if (testSettings.enableExpressionEvaluation) { @@ -464,11 +482,12 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { reloadedSourcesUri: reloadedSourcesUri, ).strategy, _ => throw Exception( - 'Unsupported DDC module format when compiling with Frontend ' - 'Server + build_runner ${testSettings.moduleFormat.name}.', - ), + 'Unsupported DDC module format when compiling with Frontend ' + 'Server + build_runner ${testSettings.moduleFormat.name}.', + ), }; - + + // Map build results. buildResults = testSettings.enableExpressionEvaluation ? const Stream.empty() : daemonClient.buildResults.map((results) { @@ -489,13 +508,13 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { } File _fesManagerConfigFile(TestContext context) => File( - p.join( - context.project.absolutePackageDirectory, - '.dart_tool', - 'build', - 'fes_manager_config', - ), -); + p.join( + context.project.absolutePackageDirectory, + '.dart_tool', + 'build', + 'fes_manager_config', + ), + ); Handler _createBuildRunnerDdcLibraryBundleAssetHandler( TestContext context, @@ -616,7 +635,8 @@ Handler _createBuildRunnerDdcLibraryBundleAssetHandler( final configFile = _fesManagerConfigFile(context); if (await configFile.exists()) { try { - final configJson = jsonDecode(await configFile.readAsString()) as Map; + final configJson = + jsonDecode(await configFile.readAsString()) as Map; final port = configJson['port'] as int?; if (port != null) { final socket = await Socket.connect( @@ -624,7 +644,9 @@ Handler _createBuildRunnerDdcLibraryBundleAssetHandler( port, ); try { - socket.writeln(jsonEncode({'instruction': 'MERGE_ALL_METADATA'})); + socket.writeln( + jsonEncode({'instruction': 'MERGE_ALL_METADATA'}), + ); final responseStr = await socket .cast>() .transform(utf8.decoder) From 2853ef31750a98fe275170949acd13faa1c24cb0 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 13 Aug 2026 19:04:34 -0700 Subject: [PATCH 113/134] Fix unresolved conflict markers in hot_restart tests --- dwds_test_common/lib/integration/hot_restart.dart | 8 -------- .../lib/integration/hot_restart_correctness.dart | 4 ---- 2 files changed, 12 deletions(-) diff --git a/dwds_test_common/lib/integration/hot_restart.dart b/dwds_test_common/lib/integration/hot_restart.dart index 06f5d73afa..96597cfaf3 100644 --- a/dwds_test_common/lib/integration/hot_restart.dart +++ b/dwds_test_common/lib/integration/hot_restart.dart @@ -161,11 +161,7 @@ void runTests({ }); }, // `BuildResult`s are only ever emitted when using the build daemon. -<<<<<<< HEAD skip: context.usesBuildDaemon ? null : true, -======= - skip: compilationMode.usesBuildDaemon ? null : true, ->>>>>>> 216e5b64 (DWDS Feature: Daemon Expression Compiler & FES Support) timeout: const Timeout.factor(2), ); @@ -559,11 +555,7 @@ void runTests({ }); }, // `BuildResult`s are only ever emitted when using the build daemon. -<<<<<<< HEAD skip: context.usesBuildDaemon ? null : true, -======= - skip: compilationMode.usesBuildDaemon ? null : true, ->>>>>>> 216e5b64 (DWDS Feature: Daemon Expression Compiler & FES Support) timeout: const Timeout.factor(2), ); diff --git a/dwds_test_common/lib/integration/hot_restart_correctness.dart b/dwds_test_common/lib/integration/hot_restart_correctness.dart index 7ce70c5caf..902cc44639 100644 --- a/dwds_test_common/lib/integration/hot_restart_correctness.dart +++ b/dwds_test_common/lib/integration/hot_restart_correctness.dart @@ -193,11 +193,7 @@ void runTests({ }); }, // `BuildResult`s are only ever emitted when using the build daemon. -<<<<<<< HEAD skip: context.usesBuildDaemon ? null : true, -======= - skip: compilationMode.usesBuildDaemon ? null : true, ->>>>>>> 216e5b64 (DWDS Feature: Daemon Expression Compiler & FES Support) timeout: const Timeout.factor(2), ); } From fce749b6aaaaad15676b6f3897ecfec2bd3f57f0 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 13 Aug 2026 19:17:34 -0700 Subject: [PATCH 114/134] Remove unused logger from BuildDaemonTestContext in hot_reload_and_eval_2 --- webdev/test/helpers/context.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/webdev/test/helpers/context.dart b/webdev/test/helpers/context.dart index 9a7ad15224..2d872ca412 100644 --- a/webdev/test/helpers/context.dart +++ b/webdev/test/helpers/context.dart @@ -26,13 +26,12 @@ import 'package:shelf/shelf.dart'; import 'package:shelf_proxy/shelf_proxy.dart'; class BuildDaemonTestContext extends TestContext { - final _logger = logging.Logger('BuildDaemonTestContext'); - BuildDaemonTestContext( super.project, super.sdkConfigurationProvider, ); + @override bool get usesFrontendServer => false; @override From e0a0d14051f5d3dd3b2706c65496ee8ea05e8f2f Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 13 Aug 2026 19:47:20 -0700 Subject: [PATCH 115/134] Format files in hot_reload_and_eval_2 --- webdev/test/helpers/context.dart | 114 ++++++++++++++----------------- 1 file changed, 51 insertions(+), 63 deletions(-) diff --git a/webdev/test/helpers/context.dart b/webdev/test/helpers/context.dart index 2d872ca412..abcccb2ea2 100644 --- a/webdev/test/helpers/context.dart +++ b/webdev/test/helpers/context.dart @@ -26,11 +26,7 @@ import 'package:shelf/shelf.dart'; import 'package:shelf_proxy/shelf_proxy.dart'; class BuildDaemonTestContext extends TestContext { - BuildDaemonTestContext( - super.project, - super.sdkConfigurationProvider, - ); - + BuildDaemonTestContext(super.project, super.sdkConfigurationProvider); @override bool get usesFrontendServer => false; @@ -96,9 +92,7 @@ class BuildDaemonTestContext extends TestContext { await waitForSuccessfulBuild(); - final assetServerPort = daemonPort( - project.absolutePackageDirectory, - ); + final assetServerPort = daemonPort(project.absolutePackageDirectory); assetHandler = switch (( testSettings.moduleFormat, buildSettings.canaryFeatures, @@ -129,20 +123,20 @@ class BuildDaemonTestContext extends TestContext { buildSettings.canaryFeatures, )) { (ModuleFormat.ddc, true) => BuildRunnerDdcLibraryBundleStrategyProvider( - testSettings.reloadConfiguration, - assetReader, - buildSettings, - reloadedSourcesUri: reloadedSourcesUri, - ).strategy, + testSettings.reloadConfiguration, + assetReader, + buildSettings, + reloadedSourcesUri: reloadedSourcesUri, + ).strategy, (ModuleFormat.ddc, false) => throw Exception( - 'Unsupported DDC configuration: build daemon + canary (false) ' - '+ DDC module format ${testSettings.moduleFormat.name}.', - ), + 'Unsupported DDC configuration: build daemon + canary (false) ' + '+ DDC module format ${testSettings.moduleFormat.name}.', + ), _ => BuildRunnerRequireStrategyProvider( - testSettings.reloadConfiguration, - assetReader, - buildSettings, - ).strategy, + testSettings.reloadConfiguration, + assetReader, + buildSettings, + ).strategy, }; buildResults = daemonClient.buildResults.map((results) { @@ -176,6 +170,7 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { bool get usesBuildDaemon => true; @override bool get usesDdcModulesOnly => true; + /// Forwards expression compilation requests to the persistent Frontend Server /// process via socket. Future> _compileExpressionWithDaemon( @@ -206,6 +201,7 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { await socket.close(); } } + @override Future modeSetUp({ required TestSettings testSettings, @@ -267,16 +263,13 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { ), ); final packagesFile = File( - p.join( - testScratchSpaceDir.path, - '.dart_tool', - 'package_config.json', - ), + p.join(testScratchSpaceDir.path, '.dart_tool', 'package_config.json'), ); packagesFile.parent.createSync(recursive: true); - final originalJson = jsonDecode(sourcePackagesFile.readAsStringSync()) - as Map; + final originalJson = + jsonDecode(sourcePackagesFile.readAsStringSync()) + as Map; final packagesList = originalJson['packages'] as List; for (final package in packagesList) { final packageMap = package as Map; @@ -298,26 +291,23 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { '.dart_tool', 'fes_manager.snapshot', ); - - final buildWebCompilers = packagesList.firstWhere( - (pkg) => (pkg as Map)['name'] == 'build_web_compilers', - orElse: () => null, - ) as Map?; + + final buildWebCompilers = + packagesList.firstWhere( + (pkg) => (pkg as Map)['name'] == 'build_web_compilers', + orElse: () => null, + ) + as Map?; String fesManagerPath; if (buildWebCompilers != null) { - final pkgRootUri = Uri.parse( - buildWebCompilers['rootUri'] as String, - ); + final pkgRootUri = Uri.parse(buildWebCompilers['rootUri'] as String); fesManagerPath = p.join( pkgRootUri.toFilePath(), 'bin', 'fes_manager.dart', ); } else { - final localBuildRepoDir = p.join( - p.dirname(projectRootDir), - 'build', - ); + final localBuildRepoDir = p.join(p.dirname(projectRootDir), 'build'); fesManagerPath = p.join( localBuildRepoDir, 'builder_pkgs', @@ -359,14 +349,14 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { .transform(utf8.decoder) .transform(const LineSplitter()) .listen((line) { - _logger.info('FES Manager STDOUT: $line'); - }); + _logger.info('FES Manager STDOUT: $line'); + }); fesProcess!.stderr .transform(utf8.decoder) .transform(const LineSplitter()) .listen((line) { - _logger.warning('FES Manager STDERR: $line'); - }); + _logger.warning('FES Manager STDERR: $line'); + }); final configFile = _fesManagerConfigFile(this); while (!await configFile.exists()) { @@ -430,11 +420,12 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { await buildFuture; - final assetServerPort = daemonPort( - project.absolutePackageDirectory, + final assetServerPort = daemonPort(project.absolutePackageDirectory); + assetHandler = _createBuildRunnerDdcLibraryBundleAssetHandler( + this, + assetServerPort, ); - assetHandler = _createBuildRunnerDdcLibraryBundleAssetHandler(this, assetServerPort); - + // Using standard constructor if fromHandler is not available or if it's simpler. // In "theirs" they used ProxyServerAssetReader.fromHandler(_assetHandler!); // Let's check if ProxyServerAssetReader has fromHandler in this branch. @@ -481,11 +472,11 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { reloadedSourcesUri: reloadedSourcesUri, ).strategy, _ => throw Exception( - 'Unsupported DDC module format when compiling with Frontend ' - 'Server + build_runner ${testSettings.moduleFormat.name}.', - ), + 'Unsupported DDC module format when compiling with Frontend ' + 'Server + build_runner ${testSettings.moduleFormat.name}.', + ), }; - + // Map build results. buildResults = testSettings.enableExpressionEvaluation ? const Stream.empty() @@ -507,13 +498,13 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { } File _fesManagerConfigFile(TestContext context) => File( - p.join( - context.project.absolutePackageDirectory, - '.dart_tool', - 'build', - 'fes_manager_config', - ), - ); + p.join( + context.project.absolutePackageDirectory, + '.dart_tool', + 'build', + 'fes_manager_config', + ), +); Handler _createBuildRunnerDdcLibraryBundleAssetHandler( TestContext context, @@ -634,8 +625,7 @@ Handler _createBuildRunnerDdcLibraryBundleAssetHandler( final configFile = _fesManagerConfigFile(context); if (await configFile.exists()) { try { - final configJson = - jsonDecode(await configFile.readAsString()) as Map; + final configJson = jsonDecode(await configFile.readAsString()) as Map; final port = configJson['port'] as int?; if (port != null) { final socket = await Socket.connect( @@ -643,9 +633,7 @@ Handler _createBuildRunnerDdcLibraryBundleAssetHandler( port, ); try { - socket.writeln( - jsonEncode({'instruction': 'MERGE_ALL_METADATA'}), - ); + socket.writeln(jsonEncode({'instruction': 'MERGE_ALL_METADATA'})); final responseStr = await socket .cast>() .transform(utf8.decoder) From 07c2816d09ea7ec81a3c6d1228fff6956726572f Mon Sep 17 00:00:00 2001 From: MarkZ Date: Fri, 14 Aug 2026 10:08:22 -0700 Subject: [PATCH 116/134] removing extraneous files --- dwds_test_common/lib/fixtures/main.dart.dill.json | 1 - dwds_test_common/lib/fixtures/main.dart.dill.map | 1 - example/.vscode/launch.json | 14 -------------- 3 files changed, 16 deletions(-) delete mode 100644 dwds_test_common/lib/fixtures/main.dart.dill.json delete mode 100644 dwds_test_common/lib/fixtures/main.dart.dill.map delete mode 100644 example/.vscode/launch.json diff --git a/dwds_test_common/lib/fixtures/main.dart.dill.json b/dwds_test_common/lib/fixtures/main.dart.dill.json deleted file mode 100644 index 751bc10b82..0000000000 --- a/dwds_test_common/lib/fixtures/main.dart.dill.json +++ /dev/null @@ -1 +0,0 @@ -{"/web/main.dart.lib.js":{"code":[0,2929],"sourcemap":[0,373]},"/packages/webdev_example_app/message.dart.lib.js":{"code":[2929,3844],"sourcemap":[373,568]},"/packages/path/src/path_set.dart.lib.js":{"code":[3844,97029],"sourcemap":[568,24042]},"/packages/path/src/path_exception.dart.lib.js":{"code":[97029,98717],"sourcemap":[24042,24277]},"/packages/path/src/characters.dart.lib.js":{"code":[98717,100285],"sourcemap":[24277,24602]},"/packages/path/src/utils.dart.lib.js":{"code":[100285,102035],"sourcemap":[24602,25191]}} \ No newline at end of file diff --git a/dwds_test_common/lib/fixtures/main.dart.dill.map b/dwds_test_common/lib/fixtures/main.dart.dill.map deleted file mode 100644 index 58a3895f1b..0000000000 --- a/dwds_test_common/lib/fixtures/main.dart.dill.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sourceRoot":"","sources":["main.dart"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYwB,IAAtB,WAAM;AAKJ,IAHF,4BAAkB,aAAa,SAAC,GAAG;AACb,MAApB,WAAM;AACN,YAAgC,+CAAO,AAAK,oBAAO,uCAAC,WAAW;IAChE;AACkD,IAAnD,AAAS,AAAK,kCAAO,wBAAe,YAAO;AAEvC,gBAAQ;AAGV,IAFI,kCAAqC,QAAC;AACX,MAA/B,WAAM,AAAwB,0BAAP,QAAF,AAAE,KAAK,GAAP;;EAEzB","file":"main.dart.lib.js"}{"version":3,"sourceRoot":"","sources":["message.dart"],"names":[],"mappings":";;;;;;;;;MAEM,eAAO;YAAG,WAAO,SAAS","file":"../../../../../../../../packages/webdev_example_app/message.dart.lib.js"}{"version":3,"sourceRoot":"","sources":["path_set.dart","path_map.dart","style.dart","internal_style.dart","style/windows.dart","style/url.dart","parsed_path.dart","style/posix.dart","context.dart","../path.dart"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA6BuC;AACd,MAArB,AAAQ,OAAD,IAAC,OAAR,UAAc,gBAAN;AACR,YAAO,sCACK,SAAC,OAAO;AACd,cAAI,AAAM,KAAD,IAAI,MAAM,MAAO,AAAM,MAAD,IAAI;AACnC,cAAI,AAAM,KAAD,IAAI,MAAM,MAAO;AAC1B,gBAAO,AAAQ,QAAD,QAAQ,KAAK,EAAE,KAAK;+CAE1B,QAAC,QAAS,AAAK,IAAD,IAAI,OAAO,IAAI,AAAQ,OAAD,MAAM,IAAI,+BAC5C,QAAC,QAAc,AAAU,OAAf,IAAI,gBAAc,AAAK,IAAD,IAAI;IACtD;;AAMiC,YAAA,AAAO;IAAQ;;AAE9B,YAAA,AAAO;IAAM;;yBAEf;AAAU,YAAA,AAAO,kBAAI,KAAK;IAAC;;gCAEd;AAAa,YAAA,AAAO,qBAAO,QAAQ;IAAC;;AAE7C,YAAA,AAAO;IAAS;;AAEpB,YAAA,AAAO;IAAO;aAET;AAAU,YAAA,AAAO,uBAAS,KAAK;IAAC;gBAEnB;AAAU,YAAA,AAAO,0BAAY,KAAK;IAAC;eAElC;AAAU,YAAA,AAAO,yBAAW,KAAK;IAAC;iBAEhC;AAAU,YAAA,AAAO,2BAAa,KAAK;IAAC;WAEpD;AAAY,YAAA,AAAO,qBAAO,OAAO;IAAC;WAEpC;AAAU,YAAA,AAAO,qBAAO,KAAK;IAAC;cAEjB;AAAa,YAAA,AAAO,wBAAU,QAAQ;IAAC;gBAEjD;AAAyB,YAAA,AAAO,0BAAY,IAAI;IAAC;cAEvC;AAAa,YAAA,AAAO,wBAAU,QAAQ;IAAC;gBAEjD;AAAyB,YAAA,AAAO,0BAAY,IAAI;IAAC;;2BAEzC;AAAU,YAAA,AAAO,oBAAM,KAAK;IAAC;;AAEpC,YAAA,AAAO;IAAO;;;QA9DlB;IAAmB,eAAE,yBAAQ,OAAO;AAAvD;;EAAwD;kCAQ5B;;QAAkB;IACjC,qBAAE,yBAAQ,OAAO,GAAG,UAAO,KAAK;AAD7C;;EAC8C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBCAH;AACpB,QAArB,AAAQ,OAAD,IAAC,OAAR,UAAc,gBAAN;AACR,cAAO,wDACK,SAAC,OAAO;AACd,gBAAI,AAAM,KAAD,IAAI,MAAM,MAAO,AAAM,MAAD,IAAI;AACnC,gBAAI,AAAM,KAAD,IAAI,MAAM,MAAO;AAC1B,kBAAO,AAAQ,QAAD,QAAQ,KAAK,EAAE,KAAK;iDAE1B,QAAC,QAAS,AAAK,IAAD,IAAI,OAAO,IAAI,AAAQ,OAAD,MAAM,IAAI,+BAC5C,QAAC,QAAc,AAAU,OAAf,IAAI,gBAAc,AAAK,IAAD,IAAI;MACtD;;;UAtBmB;AAAY,uCAAM,4BAAQ,OAAO;;IAAE;2BAQ5B;;UAAkB;AACtC,6CAAM,4BAAQ,OAAO,GAAG,YAAO,KAAK;;IAAE;;;;;;;;;;;ACmB1C,UAAQ,AAAK,yBAAU,QAAQ,MAAa;AAC5C,WAAS,AAAK,AAAK,8BAAS,MAAM,MAAa;AAC/C,UAAI,AAAiB,AAAa,qBAApB,yBAAuB,QAAQ,MAAa;AAC1D,YAAa;IACf;;AAMuB,yCAAe;IAAK;;AAgCtB;IAAI;;;;EAC3B;;;;;;;;;MAxEqB,kBAAK;YAAG;;MAOR,oBAAO;YAAG;;MAQV,gBAAG;YAAG;;MAMN,qBAAQ;YAAG;;;;YCSR;AAChB,mBAAS,gBAAW,IAAI;AAC5B,UAAW,aAAP,MAAM,IAAG,GAAG,MAAO,AAAK,KAAD,aAAW,GAAG,MAAM;AAC/C,uBAAO,oBAAe,IAAI,KAAI,AAAI,IAAA,QAAC,KAAK;IAC1C;sBAW6B;AACvB,qBAAW,AAAQ,mBAAM,IAAI;AAIjC,oBAAI,iBAAY,AAAK,IAAD,cAAY,AAAK,AAAO,IAAR,UAAU,MAAK,AAAS,AAAO,QAAR,OAAK;AAChE,YAAO,8BAAkB,QAAQ;IACnC;mBAOwB,WAAe;AAAc,YAAA,AAAU,UAAD,IAAI,SAAS;;eAMpD,OAAc;AAAU,YAAA,AAAM,MAAD,IAAI,KAAK;;yBAEhC;AAAa,qBAAQ;;qBAEnB;AAAS,iBAAI;;;;;EAC9C;;;;;;;;;;;;;;;;;;;;IClEQ;;;;;;IACA;;;;;;IACA;;;;;;IAIA;;;;;;IACA;;;;;;IACA;;;;;;IACA;;;;;;sBAEwB;AAAS,YAAA,AAAK,KAAD,YAAU;IAAI;gBAEpC;AACjB,YAAA,AAAS,AAAe,SAAhB,WAAmB,AAAS,QAAD;IAAmB;mBAE/B;AACzB,UAAI,AAAK,IAAD,YAAU,MAAO;AACzB,YAAO,YAAC,iBAAY,AAAK,IAAD,cAAY,AAAK,AAAO,IAAR,UAAU;IACpD;eAEsB;UAAY;AAChC,UAAI,AAAK,IAAD,YAAU,MAAO;AACzB,UAAI,AAAK,AAAc,IAAf,cAAY,WAAmB,MAAO;AAC9C,UAAI,AAAK,AAAc,IAAf,cAAY;AAClB,YAAI,AAAK,AAAO,IAAR,UAAU,KAAK,AAAK,IAAD,cAAY,WAAuB,MAAO;AAGjE,oBAAQ,AAAK,IAAD,WAAS,MAAM;AAC/B,YAAI,AAAM,KAAD,GAAG;AAC2B,UAArC,QAAQ,AAAK,IAAD,WAAS,MAAM,AAAM,KAAD,GAAG;AACnC,cAAI,AAAM,KAAD,GAAG,GAAG,MAAO,MAAK;;AAE7B,cAAO,AAAK,KAAD;;AAIb,UAAI,AAAK,AAAO,IAAR,UAAU,GAAG,MAAO;AAE5B,qBAAK,mBAAa,AAAK,IAAD,cAAY,MAAK,MAAO;AAE9C,UAAI,AAAK,IAAD,cAAY,WAAmB,MAAO;AAE9C,qBAAK,iBAAY,AAAK,IAAD,cAAY,MAAK,MAAO;AAC7C,YAAO;IACT;mBAE2B;AAAS,YAAA,AAAiB,iBAAN,IAAI,MAAK;IAAC;oBAE3B;AACxB,mBAAS,gBAAW,IAAI;AAC5B,UAAI,AAAO,MAAD,KAAI,GAAG,MAAO,AAAI,KAAA,QAAC;AAC7B,YAAO;IACT;gBAEuB;AACrB,UAAI,AAAI,GAAD,YAAW,MAAM,AAAI,GAAD,YAAW;AACqB,QAAzD,WAAM,2BAAc,AAAoC,kBAA9B,GAAG;;AAG3B,iBAAO,AAAI,GAAD;AACd,UAAI,AAAI,AAAK,GAAN,UAAS;AAId,YAAI,AAAK,AAAO,IAAR,WAAW,KAAK,AAAK,IAAD,cAAY,kBAAQ,oBAAc,IAAI,EAAE;AACjC,UAAjC,OAAO,AAAK,IAAD,gBAAc,KAAK;;;AAIH,QAA7B,OAAO,AAAsB,kBAAf,AAAI,GAAD,kBAAO,IAAI;;AAE9B,YAAW,0BAAgB,AAAK,IAAD,cAAY,KAAK;IAClD;sBAE6B;AACvB,mBAAoB,6BAAM,IAAI,EAAE;AACpC,UAAI,AAAO,AAAK,MAAN,mBAAiB;AAKrB,wBAAY,AAAO,AAAK,AAAY,MAAlB,cAAY,cAAY,QAAC,QAAS,AAAK,IAAD,KAAI;AAC1B,QAAtC,AAAO,AAAM,MAAP,gBAAc,GAAG,AAAU,SAAD;AAEhC,sBAAI,AAAO,MAAD;AAGY,UAApB,AAAO,AAAM,MAAP,aAAW;;AAGnB,cAAO,wBACK,cAAc,AAAU,SAAD,wBAAsB,AAAO,MAAD;;AAQ/D,sBAAI,AAAO,AAAM,MAAP,+BAAkB,AAAO,MAAD;AACZ,UAApB,AAAO,AAAM,MAAP,aAAW;;AAMiD,QADpE,AAAO,AACF,MADC,gBACM,GAAG,AAAO,AAAK,AAAoB,MAA1B,mBAAiB,KAAK,iBAAe,MAAM;AAEhE,cAAO,wBAAY,sBAAsB,AAAO,MAAD;;IAEnD;mBAEwB,WAAe;AACrC,UAAI,AAAU,SAAD,IAAI,SAAS,EAAE,MAAO;AAGnC,UAAI,AAAU,SAAD,SAAiB,MAAO,AAAU,UAAD;AAC9C,UAAI,AAAU,SAAD,SAAqB,MAAO,AAAU,UAAD;AAIlD,UAAc,cAAV,SAAS,iBAAG,SAAS,iBAAmB,MAAO;AAG/C,uBAAuB,cAAV,SAAS;AAC1B,YAAO,AAAW,AAAgB,WAAjB,UAAoB,AAAW,UAAD;IACjD;eAEuB,OAAc;AACnC,UAAI,AAAU,KAAK,IAAE,KAAK,EAAG,MAAO;AACpC,UAAI,AAAM,KAAD,YAAW,AAAM,KAAD,SAAS,MAAO;AACzC,eAAS,IAAI,GAAG,AAAE,CAAD,GAAG,AAAM,KAAD,SAAS,IAAA,AAAC,CAAA;AACjC,uBAAK,oBAAe,AAAM,KAAD,cAAY,CAAC,GAAG,AAAM,KAAD,cAAY,CAAC;AACzD,gBAAO;;;AAGX,YAAO;IACT;yBAE6B;AAC3B,UAAI,AAAS,QAAD,SAAiB;AAC7B,UAAa,aAAT,QAAQ,QAAiB,MAAO,SAAQ;AAC5C,UAAa,aAAT,QAAQ,QAAiB,MAAO,SAAQ;AAC5C,YAAgB,eAAT,QAAQ;IACjB;qBAE+B;AAAS,YAAA,AAAK,KAAD;IAAc;;;IAnJpD,aAAO;IACP,kBAAY;IACZ;IAIA,yBAAmB,gBAAO;IAC1B,8BAAwB,gBAAO;IAC/B,oBAAc,gBAAO;IACrB,4BAAsB,gBAAO;;EAXrB;;;;;;;;;;;;;;;;;;;;;;;;;MAJV,qBAAa;;;;;;;;;;;;;ICCX;;;;;;IACA;;;;;;IACA;;;;;;IAIA;;;;;;IACA;;;;;;IACA;;;;;;IACA;;;;;;sBAEwB;AAAS,YAAA,AAAK,KAAD,YAAU;IAAI;gBAEpC;AAAa,YAAA,AAAS,SAAD;IAAe;mBAE9B;AACzB,UAAI,AAAK,IAAD,YAAU,MAAO;AAGzB,qBAAK,iBAAY,AAAK,IAAD,cAAY,AAAK,AAAO,IAAR,UAAU,MAAK,MAAO;AAI3D,YAAO,AAAK,AAAgB,KAAjB,YAAU,UAAU,AAAiB,gBAAN,IAAI,MAAK,AAAK,IAAD;IACzD;eAEsB;UAAY;AAChC,UAAI,AAAK,IAAD,YAAU,MAAO;AACzB,oBAAI,iBAAY,AAAK,IAAD,cAAY,MAAK,MAAO;AAE5C,eAAS,IAAI,GAAG,AAAE,CAAD,GAAG,AAAK,IAAD,SAAS,IAAA,AAAC,CAAA;AAC5B,uBAAW,AAAK,IAAD,cAAY,CAAC;AAChC,sBAAI,iBAAY,QAAQ,IAAG,MAAO;AAClC,YAAI,AAAS,QAAD;AACV,cAAI,AAAE,CAAD,KAAI,GAAG,MAAO;AAInB,cAAI,AAAK,IAAD,cAAY,MAAM,AAAE,CAAD,GAAG,IAAI,AAAM,IAAN,AAAE,CAAD,GAAI;AACnC,sBAAQ,AAAK,IAAD,WAAS,KAAK,CAAC;AAC/B,cAAI,AAAM,KAAD,IAAI,GAAG,MAAO,AAAK,KAAD;AAI3B,yBAAK,SAAS,KAAI,AAAK,AAAO,IAAR,UAAU,AAAM,KAAD,GAAG,GAAG,MAAO,MAAK;AACvD,eAAK,AAAK,IAAD,cAAY,YAAY,MAAO,MAAK;AAC7C,yBAAK,oBAAc,IAAI,EAAE,AAAM,KAAD,GAAG,KAAI,MAAO,MAAK;AACjD,gBAAO,AAAK,AAAO,KAAR,YAAW,AAAM,KAAD,GAAG,IAAI,AAAM,KAAD,GAAG,IAAI,AAAM,KAAD,GAAG;;;AAI1D,YAAO;IACT;mBAE2B;AACvB,YAAA,AAAK,AAAW,KAAZ,2BAAe,iBAAY,AAAK,IAAD,cAAY;IAAG;oBAExB;AAAS,2CAAe,IAAI,KAAI,MAAM;IAAI;gBAEjD;AAAQ,YAAI,eAAJ,GAAG;IAAW;sBAEhB;AAAS,YAAI,gBAAM,IAAI;IAAC;sBACxB;AAAS,YAAI,gBAAM,IAAI;IAAC;;;IA9D/C,cAAO;IACP,mBAAY;IACZ;IAIA,0BAAmB,gBAAO;IAC1B,+BAAwB,gBAAO;IAC/B,qBAAc,gBAAO;IACrB,6BAAsB,gBAAO;;EAXzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ICDI;;;;;;IAMP;;;;;;IAKF;;;;;;IAIQ;;;;;;IAOA;;;;;;;AAIW,YAAA,AAAiB,gCAAC;IAAE;;AAGrB,YAAA,AAAK,cAAG;IAAI;iBAEH,MAAoB;AAE9C,iBAAO,AAAM,KAAD,SAAS,IAAI;AACzB,2BAAiB,AAAM,KAAD,gBAAgB,IAAI;AAC9C,UAAI,IAAI,IAAI,MAAM,AAAkC,OAA3B,AAAK,IAAD,aAAW,AAAK,IAAD;AAGxC,kBAAgB;AAChB,uBAAqB;AAErB,kBAAQ;AAEZ,UAAI,AAAK,IAAD,2BAAe,AAAM,KAAD,aAAa,AAAK,IAAD,cAAY;AAChC,QAAvB,AAAW,UAAD,OAAK,AAAI,IAAA,QAAC;AACX,QAAT,QAAQ;;AAEU,QAAlB,AAAW,UAAD,OAAK;;AAGjB,eAAS,IAAI,KAAK,EAAE,AAAE,CAAD,GAAG,AAAK,IAAD,SAAS,IAAA,AAAC,CAAA;AACpC,sBAAI,AAAM,KAAD,aAAa,AAAK,IAAD,cAAY,CAAC;AACF,UAAnC,AAAM,KAAD,OAAK,AAAK,IAAD,aAAW,KAAK,EAAE,CAAC;AACV,UAAvB,AAAW,UAAD,OAAK,AAAI,IAAA,QAAC,CAAC;AACR,UAAb,QAAQ,AAAE,CAAD,GAAG;;;AAKhB,UAAI,AAAM,KAAD,GAAG,AAAK,IAAD;AACkB,QAAhC,AAAM,KAAD,OAAK,AAAK,IAAD,aAAW,KAAK;AACZ,QAAlB,AAAW,UAAD,OAAK;;AAGjB,YAAkB,+BAAE,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,UAAU;IACpE;;AAMM,iBAAO,AAAK;AACe,MAA/B,AAAK,IAAD;AACJ,oBAAI,AAAK,AAAM,IAAP,mBAAgB,MAAO,AAAK,cAAG,OAAO,KAAK;AACnD,YAAO,AAAK,AAAM,KAAP;IACb;;AAEuC,YAAA,AAAiB,gCAAC;IAAE;;AAGvD,YAAiB,WAAjB,AAAM,6BAAe,AAAM,AAAK,sBAAG,MAAM,AAAW,2BAAQ;IAAG;;AAGjE,uBAAO,AAAM,4BAAc,AAAM,AAAK,sBAAG;AACrB,QAAlB,AAAM;AACiB,QAAvB,AAAW;;AAEb,oBAAI,AAAW,+BAAY,AAAU,AAA4B,uBAAT,aAAlB,AAAW,4BAAS,GAAK;IACjE;;UAEqB;AAEf,2BAAiB;AACjB,qBAAmB;AACvB,eAAS,OAAQ;AACf,YAAI,AAAK,IAAD,KAAI,OAAO,AAAK,IAAD,KAAI;cAEpB,KAAI,AAAK,IAAD,KAAI;AAEjB,wBAAI,AAAS,QAAD;AACW,YAArB,AAAS,QAAD;;AAGQ,YAAhB,iBAAA,AAAc,cAAA;;;AAGgD,UAAhE,AAAS,QAAD,iBAAK,YAAY,IAAG,AAAM,4BAAiB,IAAI,IAAI,IAAI;;;AAKnE,qBAAK;AACqD,QAAxD,AAAS,QAAD,aAAW,GAAQ,sBAAO,cAAc,EAAE;;AAIpD,oBAAI,AAAS,QAAD,0BAAa;AACN,QAAjB,AAAS,QAAD,OAAK;;AAIX,0BAAc,wBACd,AAAS,QAAD,WAAS,QAAC,KAAM,AAAM,iDACpB;AAKD,MAJb,AAAc,aAAD,UACT,GACkC,UAAlC,8BAAc,AAAS,QAAD,4BAAe,AAAM,0BAAe,cACpD,AAAM,uBACN;AAEM,MAAhB,aAAQ,QAAQ;AACU,MAA1B,kBAAa,aAAa;AAG1B,UAAI,aAAQ,QAAc,YAAN,YAAe;AACjC,sBAAI,YAAY,GAAE,AAAyB,YAAlB,AAAK;AACG,QAAjC,YAAO,AAAK,uBAAW,KAAK;;AAEJ,MAA1B;IACF;;AAGM,oBAAU;AACd,UAAI,aAAQ,MAAM,AAAQ,AAAW,OAAZ,OAAO;AAChC,eAAS,IAAI,GAAG,AAAE,CAAD,gBAAG,AAAM,sBAAQ,IAAA,AAAC,CAAA;AACL,QAA5B,AAAQ,OAAD,OAAO,AAAU,uBAAC,CAAC;AACH,QAAvB,AAAQ,OAAD,OAAO,AAAK,kBAAC,CAAC;;AAEO,MAA9B,AAAQ,OAAD,OAAO,AAAW;AAEzB,YAAO,AAAQ,QAAD;IAChB;;AAQM,iBAAO,AAAM,uBAAU,QAAC,KAAM,AAAE,CAAD,KAAI,8BAAY,cAAM;AAEzD,UAAI,AAAK,IAAD,IAAI,MAAM,MAAO,uBAAC,IAAI;AAC9B,UAAI,AAAK,IAAD,KAAI,MAAM,MAAO,uBAAC,MAAM;AAE5B,oBAAU,AAAK,IAAD,eAAa;AAI/B,UAAI,AAAQ,OAAD,IAAI,GAAG,MAAO,uBAAC,IAAI,EAAE;AAEhC,YAAO,uBAAC,AAAK,IAAD,aAAW,GAAG,OAAO,GAAG,AAAK,IAAD,aAAW,OAAO;IAC5D;;AAEsB,YAAW,+BAC7B,YAAO,WAAM,qBAAqB,oBAAK,aAAa,oBAAK;IAAY;;wCA1GhE,OAAY,MAAW,gBAAqB,OAAY;IAAxD;IAAY;IAAW;IAAqB;IAAY;;EAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ICjEtE;;;;;;IACA;;;;;;IACA;;;;;;IAIA;;;;;;IACA;;;;;;IACA;;;;;;IACA;;;;;;sBAEwB;AAAS,YAAA,AAAK,KAAD,YAAU;IAAI;gBAEpC;AAAa,YAAA,AAAS,SAAD;IAAe;mBAE9B;AACvB,YAAA,AAAK,AAAW,KAAZ,4BAAgB,iBAAY,AAAK,IAAD,cAAY,AAAK,AAAO,IAAR,UAAU;IAAG;eAE/C;UAAY;AAChC,UAAI,AAAK,IAAD,2BAAe,iBAAY,AAAK,IAAD,cAAY,MAAK,MAAO;AAC/D,YAAO;IACT;mBAE2B;AAAS;IAAK;oBAEX;AAAS;IAAI;gBAEpB;AACrB,UAAI,AAAI,AAAO,GAAR,YAAW,MAAM,AAAI,AAAO,GAAR,YAAW;AACpC,cAAW,0BAAgB,AAAI,GAAD;;AAEyB,MAAzD,WAAM,2BAAc,AAAoC,kBAA9B,GAAG;IAC/B;sBAE6B;AACvB,mBAAoB,6BAAM,IAAI,EAAE;AACpC,oBAAI,AAAO,AAAM,MAAP;AAIqB,QAA7B,AAAO,AAAM,MAAP,gBAAc,sBAAC,IAAI;YACpB,eAAI,AAAO,MAAD;AAGK,QAApB,AAAO,AAAM,MAAP,aAAW;;AAGnB,YAAO,wBAAY,sBAAsB,AAAO,MAAD;IACjD;;;IAhDM,eAAO;IACP,oBAAY;IACZ;IAIA,2BAAmB,gBAAO;IAC1B,gCAAwB,gBAAO;IAC/B,sBAAc,gBAAO;IACrB,8BAAsB;;EAXhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IC4CQ;;;;;;;UA3BG;UAAc;AACnC,UAAI,AAAQ,OAAD,IAAI;AACb,YAAI,AAAM,KAAD,IAAI;AACQ,UAAnB,UAAY;;AAEC,UAAb,UAAU;;;AAId,UAAI,AAAM,KAAD,IAAI;AACW,QAAtB,QAAc;YACT,MAAU,gCAAN,KAAK;AAEC,QADf,WAAM,2BAAc,iDAChB;;AAGN,YAAe,wBAAQ,gCAAN,KAAK,GAAmB,OAAO;IAClD;;AAiBsB,YAAA,AAAS,oBAAG,OAAO,kBAAa;IAAO;;AAIrC,YAAA,AAAM;IAAS;aAShB,OACX,cACD,cACA,cACA,cACA,cACA;AAEyD,MADlE,yBACI,YAAY,sBAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK;AAIhE,UAAI,AAAM,KAAD,IAAI,kBAAQ,gBAAW,KAAK,iBAAM,oBAAe,KAAK;AAC7D,cAAO,MAAK;;AAGd,YAAO,WAAK,cAAS,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK;IACtE;aAWuB;AAAS,YAAA,AAAa,cAAN,IAAI;IAAU;6BAUd;AACnC,YAAA,AAAa,cAAN,IAAI;IAA0B;YAUnB;AAChB,mBAAS,aAAO,IAAI;AACS,MAAjC,AAAO,MAAD;AACN,oBAAI,AAAO,AAAM,MAAP,mBAAgB,MAAO,AAAO,AAAK,OAAN,SAAS,OAAO,MAAM,AAAO,MAAD;AACnE,UAAI,AAAO,AAAM,AAAO,MAAd,oBAAiB;AACzB,cAAO,AAAO,AAAK,OAAN,SAAS,OAAO,MAAM,AAAO,MAAD;;AAElB,MAAzB,AAAO,AAAM,MAAP;AACwB,MAA9B,AAAO,AAAW,MAAZ;AAC2B,MAAjC,AAAO,MAAD;AACN,YAAc,eAAP,MAAM;IACf;cAewB;AAAS,YAAA,AAAa,cAAN,IAAI;IAAW;eAkB9B;AAAS,YAAA,AAAK,KAAD,aAAW,GAAG,AAAM,sBAAW,IAAI;IAAE;eAcpD;AAAS,YAAuB,cAAvB,AAAM,sBAAW,IAAI,KAAI;IAAC;eAMnC;AAAS,wBAAC,AAAK,gBAAW,IAAI;IAAC;mBAU3B;AAAS,YAAA,AAAM,2BAAe,IAAI;IAAC;SAe3C,OACP,cACD,cACA,cACA,cACA,cACA,cACA;AACL,kBAAgB,sBAClB,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK;AAEwB,MAA/B,yBAAiB,QAAQ,KAAK;AAC9B,YAAO,cAAQ,AAAM,KAAD,SAAO,QAAC,QAAS,AAAK,IAAD,IAAI;IAC/C;YAgBgC;AAC1B,mBAAS;AACT,2BAAiB;AACjB,yCAA+B;AAEnC,iBAAiB,AAAM,KAAD,SAAO,QAAC,QAAS,AAAK,IAAD,KAAI;eAAtC;AACP,sBAAI,AAAK,oBAAe,IAAI,MAAK,4BAA4B;AAGvD,uBAAS,aAAO,IAAI;AACpB,qBAAO,AAAO,MAAD;AAE6C,UAD9D,AAAO,MAAD,QACF,AAAK,IAAD,aAAW,GAAG,AAAM,sBAAW,IAAI,cAAa;AACxD,wBAAI,AAAM,0BAAe,AAAO,MAAD;AACS,YAAtC,AAAO,AAAU,MAAX,mBAAY,GAAK,AAAM;;AAEjB,UAAd,AAAO,MAAD;AACyB,UAA/B,AAAO,MAAD,OAAc,cAAP,MAAM;cACd,eAAI,AAAK,gBAAW,IAAI;AAC4B,UAAzD,+BAA+B,WAAC,AAAK,oBAAe,IAAI;AAE1C,UAAd,AAAO,MAAD;AACY,UAAlB,AAAO,MAAD,OAAO,IAAI;;AAEjB,cAAI,AAAK,IAAD,2BAAe,AAAM,6BAAkB,AAAI,IAAA,QAAC;gBAE7C,eAAI,cAAc;AACA,YAAvB,AAAO,MAAD,OAAO;;AAGG,UAAlB,AAAO,MAAD,OAAO,IAAI;;AAKwB,QAA3C,iBAAiB,AAAM,0BAAe,IAAI;;AAG5C,YAAO,AAAO,OAAD;IACf;UAoB0B;AACpB,mBAAS,aAAO,IAAI;AAE6C,MAArE,AAAO,MAAD,SAAS,AAAO,AAAM,AAAiC,MAAxC,eAAa,QAAC,QAAS,AAAK,IAAD;AAChD,UAAI,AAAO,MAAD,SAAS,MAAM,AAAO,AAAM,AAAsB,MAA7B,gBAAc,GAAG,AAAO,MAAD;AACtD,YAAO,AAAO,OAAD;IACf;iBAc2B;AACJ,MAArB,OAAO,cAAS,IAAI;AACpB,uBAAI,YAAe,oCAAY,0BAAoB,IAAI,IAAG,MAAO,KAAI;AAEjE,mBAAS,aAAO,IAAI;AACY,MAApC,AAAO,MAAD,0BAAyB;AAC/B,YAAc,eAAP,MAAM;IACf;cAUwB;AACtB,qBAAK,0BAAoB,IAAI,IAAG,MAAO,KAAI;AAEvC,mBAAS,aAAO,IAAI;AACN,MAAlB,AAAO,MAAD;AACN,YAAc,eAAP,MAAM;IACf;0BAGgC;AAC1B,kBAAQ;AACR,sBAAY,AAAK,IAAD;AAChB;AACA;AAKA,iBAAO,AAAM,sBAAW,IAAI;AAChC,UAAI,IAAI,KAAI;AACE,QAAZ,QAAQ,IAAI;AACU,QAAtB;AAIA,YAAU,YAAN,YAAe;AACjB,mBAAS,IAAI,GAAG,AAAE,CAAD,gBAAG,IAAI,GAAE,IAAA,AAAC,CAAA;AACzB,gBAAI,AAAS,AAAI,SAAJ,QAAC,CAAC,UAAkB,MAAO;;;;AAK9C,eAAS,IAAI,KAAK,EAAI,aAAF,CAAC,iBAAG,AAAU,SAAD,YAAS,IAAC,aAAD,CAAC;AACrC,uBAAW,AAAS,SAAA,QAAC,CAAC;AAC1B,sBAAI,AAAM,uBAAY,QAAQ;AAE5B,cAAU,YAAN,YAAe,yBAAW,AAAS,QAAD,SAAiB,MAAO;AAG9D,cAAI,QAAQ,IAAI,kBAAQ,AAAM,uBAAY,QAAQ,IAAG,MAAO;AAM5D,cAAI,AAAS,QAAD,YACP,AAAiB,gBAAD,IAAI,QACjB,AAAiB,gBAAD,qBAChB,AAAM,uBAAY,gBAAgB;AACxC,kBAAO;;;AAIgB,QAA3B,mBAAmB,QAAQ;AACR,QAAnB,WAAW,QAAQ;;AAIrB,UAAI,AAAS,QAAD,IAAI,MAAM,MAAO;AAG7B,oBAAI,AAAM,uBAAY,QAAQ,IAAG,MAAO;AAGxC,UAAI,AAAS,QAAD,YACP,AAAiB,gBAAD,IAAI,kBACjB,AAAM,uBAAY,gBAAgB,MAClC,AAAiB,gBAAD;AACtB,cAAO;;AAGT,YAAO;IACT;aAkCuB;;UAAc;AAEnC,UAAI,AAAK,IAAD,IAAI,kBAAQ,AAAK,gBAAW,IAAI,IAAG,MAAO,AAAK,gBAAU,IAAI;AAEvB,MAA9C,OAAO,AAAK,IAAD,IAAI,OAAO,eAAU,cAAS,IAAI;AAG7C,oBAAI,AAAK,gBAAW,IAAI,gBAAK,AAAK,gBAAW,IAAI;AAC/C,cAAO,AAAK,gBAAU,IAAI;;AAK5B,oBAAI,AAAK,gBAAW,IAAI,gBAAK,AAAK,oBAAe,IAAI;AACzB,QAA1B,OAAO,AAAK,cAAS,IAAI;;AAK3B,oBAAI,AAAK,gBAAW,IAAI,gBAAK,AAAK,gBAAW,IAAI;AACsB,QAArE,WAAM,qCAAc,AAAgD,yCAApB,IAAI,4BAAS,IAAI;;AAG/D,6BAAa,aAAO,IAAI,GAAG;AAC3B,8BAAa,aAAO,IAAI,GAAG;AAE/B,oBAAI,AAAW,AAAM,UAAP,wBAAqB,AAAW,AAAK,AAAI,UAAV,cAAO,OAAM;AACxD,cAAkB,eAAX,UAAU;;AAOnB,UAAI,AAAW,UAAD,SAAS,AAAW,UAAD,UAC3B,AAAW,AAAK,UAAN,SAAS,QAAQ,AAAW,AAAK,UAAN,SAAS,mBAC3C,AAAM,sBAAW,AAAW,UAAD,OAAO,AAAW,UAAD;AACnD,cAAkB,eAAX,UAAU;;AAInB,uBAAO,AAAW,AAAM,UAAP,kCACb,AAAW,AAAM,UAAP,kCACV,AAAM,sBAAW,AAAW,AAAK,UAAN,cAAO,IAAI,AAAW,AAAK,UAAN,cAAO;AAC7B,QAA5B,AAAW,AAAM,UAAP,kBAAgB;AACO,QAAjC,AAAW,AAAW,UAAZ,uBAAqB;AACH,QAA5B,AAAW,AAAM,UAAP,kBAAgB;AACO,QAAjC,AAAW,AAAW,UAAZ,uBAAqB;;AAMjC,oBAAI,AAAW,AAAM,UAAP,wBAAqB,AAAW,AAAK,AAAI,UAAV,cAAO,OAAM;AACa,QAArE,WAAM,qCAAc,AAAgD,yCAApB,IAAI,4BAAS,IAAI;;AAEM,MAAzE,AAAW,AAAM,UAAP,mBAAiB,GAAQ,sBAAO,AAAW,AAAM,UAAP,iBAAe;AACtC,MAA7B,AAAW,AAAU,UAAX,mBAAY,GAAK;AAE6C,MADxE,AAAW,AACN,UADK,wBACK,GAAQ,sBAAO,AAAW,AAAM,UAAP,iBAAe,AAAM;AAG7D,oBAAI,AAAW,AAAM,UAAP,mBAAgB,MAAO;AAIrC,UAA4B,aAAxB,AAAW,AAAM,UAAP,mBAAgB,KAAK,AAAW,AAAM,AAAK,UAAZ,kBAAe;AAC7B,QAA7B,AAAW,AAAM,UAAP;AAIC,eAHX,AAAW,UAAD;QACN;QACA;QACA,WAAI;;;AAIU,MAApB,AAAW,UAAD,QAAQ;AACmB,MAArC,AAAW,UAAD;AAEV,YAAkB,eAAX,UAAU;IACnB;aAQqB,QAAe;AAChC,YAAiC,aAAjC,wBAAkB,MAAM,EAAE,KAAK,GAAmB;IAAM;WAOzC,OAAc;AAC7B,YAAgC,aAAhC,wBAAkB,KAAK,EAAE,KAAK,GAAmB;IAAK;wBAMnB,QAAe;AAIhD,6BAAmB,gBAAW,MAAM;AACpC,4BAAkB,gBAAW,KAAK;AACtC,oBAAI,gBAAgB,gBAAK,eAAe;AACf,QAAvB,QAAQ,cAAS,KAAK;AACtB,sBAAI,AAAM,0BAAe,MAAM,IAAG,AAAyB,SAAhB,cAAS,MAAM;YACrD,eAAI,eAAe,gBAAK,gBAAgB;AACpB,QAAzB,SAAS,cAAS,MAAM;AACxB,sBAAI,AAAM,0BAAe,KAAK,IAAG,AAAuB,QAAf,cAAS,KAAK;YAClD,eAAI,eAAe,eAAI,gBAAgB;AACxC,kCAAsB,AAAM,0BAAe,KAAK;AAChD,mCAAuB,AAAM,0BAAe,MAAM;AAEtD,sBAAI,mBAAmB,gBAAK,oBAAoB;AACvB,UAAvB,QAAQ,cAAS,KAAK;cACjB,eAAI,oBAAoB,gBAAK,mBAAmB;AAC5B,UAAzB,SAAS,cAAS,MAAM;;;AAIxB,mBAAS,4BAAsB,MAAM,EAAE,KAAK;AAChD,uBAAI,MAAM,EAAkB,qCAAc,MAAO,OAAM;AAEhD;AACP;AAC+C,QAA7C,WAAW,AAAK,cAAS,KAAK,SAAQ,MAAM;;YACpB;AAAxB;AAGA,gBAAqB;;;;AAGvB,qBAAK,AAAK,gBAAW,QAAQ,IAAG,MAAqB;AACrD,UAAI,AAAS,QAAD,KAAI,KAAK,MAAqB;AAC1C,UAAI,AAAS,QAAD,KAAI,MAAM,MAAqB;AAC3C,YAAQ,AAAS,AAAO,AACU,SADlB,WAAW,KACnB,AAAS,QAAD,cAAY,mBACpB,AAAM,uBAAY,AAAS,QAAD,cAAY,OAC1B,kCACA;IACtB;4BAI2C,QAAe;;AAGxD,UAAI,AAAO,MAAD,KAAI,KAAK,AAAW,SAAF;AAExB,6BAAmB,AAAM,sBAAW,MAAM;AAC1C,4BAAkB,AAAM,sBAAW,KAAK;AAQ5C,UAAI,gBAAgB,IAAI,eAAe,EAAE,MAAqB;AAM9D,eAAS,IAAI,GAAG,AAAE,CAAD,gBAAG,gBAAgB,GAAE,IAAA,AAAC,CAAA;AACjC,6BAAiB,AAAO,MAAD,cAAY,CAAC;AACpC,4BAAgB,AAAM,KAAD,cAAY,CAAC;AACtC,uBAAK,AAAM,0BAAe,cAAc,EAAE,aAAa;AACrD,gBAAqB;;;AAOrB;AAGA;AAGA,wBAAc,gBAAgB;AAC9B,uBAAa,eAAe;AAChC,aAAmB,aAAZ,WAAW,IAAG,AAAO,MAAD,WAAsB,aAAX,UAAU,IAAG,AAAM,KAAD;AAClD,6BAAiB,AAAO,MAAD,cAAY,WAAW;AAC9C,4BAAgB,AAAM,KAAD,cAAY,UAAU;AAC/C,sBAAI,AAAM,0BAAe,cAAc,EAAE,aAAa;AACpD,wBAAI,AAAM,uBAAY,cAAc;AACD,YAAjC,sBAAsB,WAAW;;AAGN,UAA7B,eAAe,cAAc;AAChB,UAAb,cAAW,aAAX,WAAW;AACC,UAAZ,aAAU,aAAV,UAAU;AACV;;AAIF,sBAAI,AAAM,uBAAY,cAAc,gBAChC,AAAM,uBAAY,YAAY;AACC,UAAjC,sBAAsB,WAAW;AACpB,UAAb,cAAW,aAAX,WAAW;AACX;cACK,eAAI,AAAM,uBAAY,aAAa,gBACtC,AAAM,uBAAY,YAAY;AACpB,UAAZ,aAAU,aAAV,UAAU;AACV;;AASF,YAAI,AAAe,cAAD,qBAAoB,AAAM,uBAAY,YAAY;AACrD,UAAb,cAAW,aAAX,WAAW;AAIX,cAAI,AAAY,WAAD,KAAI,AAAO,MAAD,SAAS;AACa,UAA/C,iBAAiB,AAAO,MAAD,cAAY,WAAW;AAG9C,wBAAI,AAAM,uBAAY,cAAc;AACD,YAAjC,sBAAsB,WAAW;AACpB,YAAb,cAAW,aAAX,WAAW;AACX;;AAKF,cAAI,AAAe,cAAD;AACH,YAAb,cAAW,aAAX,WAAW;AACX,gBAAI,AAAY,WAAD,KAAI,AAAO,MAAD,qBACrB,AAAM,uBAAY,AAAO,MAAD,cAAY,WAAW;AACjD,oBAAqB;;;;AAU3B,YAAI,AAAc,aAAD,qBAAoB,AAAM,uBAAY,YAAY;AACrD,UAAZ,aAAU,aAAV,UAAU;AACV,cAAI,AAAW,UAAD,KAAI,AAAM,KAAD,SAAS;AACY,UAA5C,gBAAgB,AAAM,KAAD,cAAY,UAAU;AAE3C,wBAAI,AAAM,uBAAY,aAAa;AACrB,YAAZ,aAAU,aAAV,UAAU;AACV;;AAGF,cAAI,AAAc,aAAD;AACH,YAAZ,aAAU,aAAV,UAAU;AACV,gBAAI,AAAW,UAAD,KAAI,AAAM,KAAD,qBACnB,AAAM,uBAAY,AAAM,KAAD,cAAY,UAAU;AAC/C,oBAAqB;;;;AASvB,6BAAiB,qBAAe,KAAK,EAAE,UAAU;AACrD,yBAAI,cAAc,EAAmB;AACnC,gBAAqB;;AAGnB,8BAAkB,qBAAe,MAAM,EAAE,WAAW;AACxD,yBAAI,eAAe,EAAmB;AACpC,gBAAqB;;AAGvB,cAAqB;;AASvB,UAAI,AAAW,UAAD,KAAI,AAAM,KAAD;AACrB,YAAI,AAAY,WAAD,KAAI,AAAO,MAAD,qBACrB,AAAM,uBAAY,AAAO,MAAD,cAAY,WAAW;AAChB,UAAjC,sBAAsB,WAAW;;AAEwB,UAAzD,AAAoB,mBAAD,IAAC,OAApB,sBAAwB,mBAAS,GAAoB,aAAjB,gBAAgB,IAAG,KAAnC;;AAGlB,wBACA,qBAAe,MAAM,GAAsB,KAApB,mBAAmB,QAAnB,OAAwC,aAAjB,gBAAgB,IAAG;AACrE,YAAc,YAAV,SAAS,EAAmB,gCAAQ,MAAqB;AAC7D,cAAiB,aAAV,SAAS,EAAmB,oCACf,qCACA;;AAMlB,sBAAY,qBAAe,KAAK,EAAE,UAAU;AAShD,UAAc,YAAV,SAAS,EAAmB,gCAAQ,MAAqB;AAQ7D,UAAc,YAAV,SAAS,EAAmB;AAC9B,cAAqB;;AASvB,YAAwD,WAAhD,AAAM,uBAAY,AAAM,KAAD,cAAY,UAAU,iBAC7C,AAAM,uBAAY,YAAY,KAClB,+BACA;IACtB;qBAeqC,MAAU;AACzC,kBAAQ;AACR,wBAAc;AACd,cAAI,KAAK;AACb,aAAS,aAAF,CAAC,IAAG,AAAK,IAAD;AAEb,eAAS,aAAF,CAAC,IAAG,AAAK,IAAD,qBAAW,AAAM,uBAAY,AAAK,IAAD,cAAY,CAAC;AACxD,UAAH,IAAC,aAAD,CAAC;;AAIH,YAAI,AAAE,CAAD,KAAI,AAAK,IAAD,SAAS;AAGlB,oBAAQ,CAAC;AACb,eAAS,aAAF,CAAC,IAAG,AAAK,IAAD,sBAAY,AAAM,uBAAY,AAAK,IAAD,cAAY,CAAC;AACzD,UAAH,IAAC,aAAD,CAAC;;AAIH,YAAM,AAAQ,aAAV,CAAC,iBAAG,KAAK,MAAI,KAAK,AAAK,AAAkB,IAAnB,cAAY,KAAK;cAEpC,KAAM,AAAQ,aAAV,CAAC,iBAAG,KAAK,MAAI,KACpB,AAAK,AAAkB,IAAnB,cAAY,KAAK,YACrB,AAAK,AAAsB,IAAvB,cAAkB,aAAN,KAAK,IAAG;AAEnB,UAAP,QAAA,AAAK,KAAA;AAGL,cAAI,AAAM,KAAD,GAAG,GAAG;AAIf,cAAI,AAAM,KAAD,KAAI,GAAG,AAAkB,cAAJ;;AAGvB,UAAP,QAAA,AAAK,KAAA;;AAIP,YAAI,AAAE,CAAD,KAAI,AAAK,IAAD,SAAS;AAGnB,QAAH,IAAC,aAAD,CAAC;;AAGH,UAAI,AAAM,KAAD,GAAG,GAAG,MAAsB;AACrC,UAAI,AAAM,KAAD,KAAI,GAAG,MAAsB;AACtC,UAAI,WAAW,EAAE,MAAsB;AACvC,YAAsB;IACxB;SAMgB;AAGO,MAArB,OAAO,cAAS,IAAI;AAEhB,mBAAS,gBAAU,IAAI;AAC3B,UAAI,MAAM,IAAI,MAAM,MAAO,OAAM;AAE7B,mBAAS,aAAO,IAAI;AACN,MAAlB,AAAO,MAAD;AACN,YAAO,iBAAiB,cAAP,MAAM;IACzB;gBAMqB;AACf,iBAAO;AACP,sBAAY;AACZ,yBAAe;AACnB,eAAS,IAAI,GAAG,AAAE,CAAD,GAAG,AAAK,IAAD,SAAS,IAAA,AAAC,CAAA;AAC5B,uBAAW,AAAM,gCAAqB,AAAK,IAAD,cAAY,CAAC;AAK3D,sBAAI,AAAM,uBAAY,QAAQ;AACT,UAAnB,eAAe;AACf;;AAGF,YAAI,AAAS,QAAD,WAAoB,YAAY;AAQ1C,cAAI,AAAE,AAAI,CAAL,GAAG,MAAK,AAAK,IAAD,SAAS;AAEtB,qBAAO,AAAK,IAAD,cAAY,AAAE,CAAD,GAAG;AAI/B,wBAAI,AAAM,uBAAY,IAAI,IAAG;AAM7B,eAAK,SAAS,IACV,AAAK,IAAD,YACH,AAAE,AAAI,CAAL,GAAG,MAAK,AAAK,IAAD,qBACV,AAAM,uBAAY,AAAK,IAAD,cAAY,AAAE,CAAD,GAAG;AAC5C,kBAAO;;;AAKM,QAAjB,OAAA,AAAK,IAAD,GAAI;AACE,QAAV,OAAA,AAAK,IAAD,GAAI;AACQ,QAAhB,OAAK,CAAL,IAAI,gBAAI,QAAQ;AACI,QAApB,eAAe;AACE,QAAjB,YAAY;;AAEd,YAAO,KAAI;IACb;qBAK+B;AACzB,mBAAS,aAAO,IAAI;AAExB,eAAS,IAAwB,aAApB,AAAO,AAAM,MAAP,mBAAgB,GAAG,AAAE,CAAD,IAAI,GAAG,IAAA,AAAC,CAAA;AAC7C,YAAI,AAAO,AAAK,AAAI,MAAV,cAAO,CAAC;AACiC,UAAjD,AAAO,AAAK,MAAN,cAAO,CAAC,EAAI,AAAO,MAAD;AACxB;;;AAIJ,YAAc,eAAP,MAAM;IACf;iBAa2B,MAAa;AACpC,YAAuB,cAAvB,sBAAiB,IAAI,kBAAI,SAAS;;YAsBvB;AAAQ,YAAA,AAAM,wBAAY,kBAAU,GAAG;IAAE;UAkBvC;AACf,oBAAI,gBAAW,IAAI;AACjB,cAAO,AAAM,8BAAkB,IAAI;;AAEnC,cAAO,AAAM,8BAAkB,UAAK,cAAS,IAAI;;IAErD;cA2BiB;AACX,qBAAW,kBAAU,GAAG;AAC5B,UAAI,AAAS,AAAO,QAAR,YAAW,UAAgB,YAAN,YAAe;AAC9C,cAAgB,eAAT,QAAQ;YACV,KAAI,AAAS,QAAD,YAAW,UAC1B,AAAS,QAAD,YAAW,mBACnB,YAAe;AACjB,cAAgB,eAAT,QAAQ;;AAGb,iBAAO,eAAU,aAAQ,QAAQ;AACjC,gBAAM,cAAS,IAAI;AAKvB,YAAyB,cAAlB,AAAW,WAAL,GAAG,2BAAW,AAAY,WAAN,IAAI,cAAW,IAAI,GAAG,GAAG;IAC5D;aAEyB;AAAS,YAAW,8BAAM,IAAI,EAAE;IAAM;;;IA9+BnD,gBAAiB,gCAAT;IACL,kBAAE;;EAAI;iCAEN,OAAY;IAAZ;IAAY;;EAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAmiCvB;;;;;;;AAIQ;IAAI;;;IAFC;;EAAK;;;;;;;;;MAflB,gCAAS;;;MAIT,6BAAM;;;MAIN,kCAAW;;;MAGX,gCAAS;;;;;;;;;;IA8BT;;;;;;;AAIQ;IAAI;;;IAFA;;EAAK;;;;;;;;;MAlBjB,4BAAM;;;MAKN,2BAAK;;;MAGL,+BAAS;;;MAMT,kCAAY;;;;;AAnmCC,UAAQ;EAAW;yCAuhCjC;AACZ,QAAQ,OAAJ,GAAG,cAAY,MAAW,gBAAM,GAAG;AACvC,QAAQ,YAAJ,GAAG,GAAS,MAAO,IAAG;AAC8C,IAAxE,WAAoB,6BAAM,GAAG,EAAE,OAAO;EACxC;uDAI6B,QAAqB;AAChD,aAAS,IAAI,GAAG,AAAE,CAAD,gBAAG,AAAK,IAAD,YAAS,IAAA,AAAC,CAAA;AAEhC,UAAI,AAAI,AAAI,IAAJ,QAAC,CAAC,KAAK,QAAQ,AAAI,IAAA,QAAC,AAAE,CAAD,GAAG,MAAM,MAAM;AAExC;AACJ,oBAAK,UAAU,AAAK,IAAD,WAAiB,aAAR,OAAO,KAAI,GAAG,UAAO,aAAP,OAAO;AAC/C,YAAI,AAAI,IAAA,QAAS,aAAR,OAAO,IAAG,MAAM,MAAM;;AAI7B,oBAAU;AACW,MAAzB,AAAQ,OAAD,OAAiB,SAAR,MAAM;AAIN,MAHhB,AAAQ,OAAD,OAAO,AACT,AACA,AACA,IAHa,QACR,OAAO,qBACR,QAAC,OAAQ,AAAI,GAAD,IAAI,OAAO,SAAS,AAAQ,gBAAL,GAAG,oCACrC;AACsD,MAAhE,AAAQ,OAAD,OAAO,AAAiD,sBAAtC,AAAE,CAAD,GAAG,KAAE,kCAAqB,CAAC;AACd,MAAvC,WAAM,2BAAc,AAAQ,OAAD;;EAE/B;qCC37BuB,OACP,cACD,cACA,cACA,cACA,cACA;AACX,UAAA,AAAQ,wBAAS,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK;EAAC;qCAU9C;AAAS,UAAA,AAAQ,wBAAS,IAAI;EAAC;qEAUf;AACnC,UAAA,AAAQ,wCAAyB,IAAI;EAAC;mCAqBpB;AAAS,UAAA,AAAQ,uBAAQ,IAAI;EAAC;uCAe5B;AAAS,UAAA,AAAQ,yBAAU,IAAI;EAAC;yCAkB/B;AAAS,UAAA,AAAQ,0BAAW,IAAI;EAAC;yCAcnC;AAAS,UAAA,AAAQ,0BAAW,IAAI;EAAC;yCAMjC;AAAS,UAAA,AAAQ,0BAAW,IAAI;EAAC;iDAU7B;AAAS,UAAA,AAAQ,8BAAe,IAAI;EAAC;6BAe7C,OACH,cACD,cACA,cACA,cACA,cACA,cACA;AACX,UAAA,AAAQ,oBAAK,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK;EAAC;mCAiBxC;AAAU,UAAA,AAAQ,uBAAQ,KAAK;EAAC;+BAuBtC;AAAS,UAAA,AAAQ,qBAAM,IAAI;EAAC;6CAc3B;AAAS,UAAA,AAAQ,4BAAa,IAAI;EAAC;uCAUtC;AAAS,UAAA,AAAQ,yBAAU,IAAI;EAAC;qCA4BjC;QAAc;AACjC,UAAA,AAAQ,wBAAS,IAAI,SAAQ,IAAI;EAAC;qCAOjB,QAAe;AAAU,UAAA,AAAQ,wBAAS,MAAM,EAAE,KAAK;EAAC;iCAO1D,OAAc;AAAU,UAAA,AAAQ,sBAAO,KAAK,EAAE,KAAK;EAAC;6BAOvD;AAAS,UAAA,AAAQ,oBAAK,IAAI;EAAC;qDAKZ;AAAS,UAAA,AAAQ,gCAAiB,IAAI;EAAC;6CAW3C,MAAa;AACpC,UAAA,AAAQ,4BAAa,IAAI,EAAE,SAAS;EAAC;mCAoB1B;AAAQ,UAAA,AAAQ,uBAAQ,GAAG;EAAC;+BAsB1B;AAAS,UAAA,AAAQ,qBAAM,IAAI;EAAC;uCAsB5B;AAAQ,UAAA,AAAQ,yBAAU,GAAG;EAAC;;;AAlY5B,YAAA,AAAQ;IAAK;;AAU1B;AACJ;AACgB,QAAd,MAAU;;;AACV;AACA,cAAI,kBAAY,MAAM,MAAO;AACtB,UAAP;;;;AAKF,UAAQ,YAAJ,GAAG,EAAI,wBAAiB,MAAO;AACd,MAArB,wBAAkB,GAAG;AAErB,UAAmB,YAAT,uBAAkB;AACY,QAAtC,iBAA4B,cAAjB,AAAI,GAAD,SAAS;AACvB,cAAO;;AAEH,mBAAO,AAAI,GAAD;AAGV,wBAAY,AAAK,AAAO,IAAR,UAAU;AAC9B,cAAO,AAAI,AAAY,AAAO,IAAnB,QAAC,SAAS,MAAK,OAAO,AAAI,AAAY,IAAZ,QAAC,SAAS,MAAK;AACW,QAA/D,iBAAW,AAAU,SAAD,KAAI,IAAI,IAAI,GAAG,AAAK,IAAD,aAAW,GAAG,SAAS;AAC9D,cAAO;;IAEX;;AAewB,YAAA,AAAQ;IAAS;;;MAvE3B,WAAK;YAAG,6BAAqB;;MAG7B,aAAO;YAAG,6BAAqB;;MAM/B,SAAG;YAAG,6BAAqB;;MAO3B,aAAO;YAAG;;MA6CpB,qBAAe;;;;MAMZ,cAAQ","file":"../../../../../../../../../../../packages/path/src/path_set.dart.lib.js"}{"version":3,"sourceRoot":"","sources":["path_exception.dart"],"names":[],"mappings":";;;;;;;;;IAOS;;;;;;;AAIc,YAAA,AAAyB,8BAAR;IAAQ;;;IAF3B;;EAAQ","file":"../../../../../../../../../../../packages/path/src/path_exception.dart.lib.js"}{"version":3,"sourceRoot":"","sources":["characters.dart"],"names":[],"mappings":";;;;;;;;MAKM,eAAI;;;MACJ,gBAAK;;;MACL,iBAAM;;;MACN,gBAAK;;;MACL,eAAI;;;MACJ,eAAI;;;MACJ,gBAAK;;;MACL,iBAAM;;;MACN,iBAAM;;;MACN,iBAAM;;;MACN,iBAAM;;;MACN,oBAAS","file":"../../../../../../../../../../../packages/path/src/characters.dart.lib.js"}{"version":3,"sourceRoot":"","sources":["utils.dart"],"names":[],"mappings":";;;;;;;;6CAQsB;AAClB,UAAM,AAAyC,cAA9C,IAAI,WAAyB,aAAL,IAAI,WACvB,aAAL,IAAI,WAAyB,aAAL,IAAI;EAAiB;uCAG/B;AAAS,UAAK,AAAc,cAAnB,IAAI,WAAuB,aAAL,IAAI;EAAc;+CAI1C,MAAU;AAClC,QAAI,AAAK,AAAO,IAAR,UAAgB,aAAN,KAAK,IAAG,GAAG,MAAO;AACpC,mBAAK,mBAAa,AAAK,IAAD,cAAY,KAAK,KAAI,MAAO;AAClD,QAAI,AAAK,IAAD,cAAkB,aAAN,KAAK,IAAG,WAAmB,MAAO;AACtD,QAAI,AAAK,AAAO,IAAR,YAAiB,aAAN,KAAK,IAAG,GAAG,MAAO;AACrC,UAAO,AAAK,AAAsB,KAAvB,cAAkB,aAAN,KAAK,IAAG;EACjC","file":"../../../../../../../../../../../packages/path/src/utils.dart.lib.js"} \ No newline at end of file diff --git a/example/.vscode/launch.json b/example/.vscode/launch.json deleted file mode 100644 index b26a16f148..0000000000 --- a/example/.vscode/launch.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "name": "Dart Web (Hot Reload)", - "type": "dart", - "request": "launch", - "program": "web/main.dart", // entrypoint - "args": [ - "--web-hot-reload", - ] - } - ] -} \ No newline at end of file From 7b76d7740c29cd8edf2a372f9dad3748a16fb423 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Fri, 14 Aug 2026 17:48:32 -0700 Subject: [PATCH 117/134] Pass useDebuggerModuleNames to TestBuildSettings and restore fixtures --- dwds/test/integration/fixtures/frontend_server_context.dart | 1 + dwds_test_common/lib/fixtures/main.dart.dill.json | 1 + dwds_test_common/lib/fixtures/main.dart.dill.map | 1 + webdev/test/helpers/context.dart | 2 ++ 4 files changed, 5 insertions(+) create mode 100644 dwds_test_common/lib/fixtures/main.dart.dill.json create mode 100644 dwds_test_common/lib/fixtures/main.dart.dill.map diff --git a/dwds/test/integration/fixtures/frontend_server_context.dart b/dwds/test/integration/fixtures/frontend_server_context.dart index 9381de83c8..e6f7b7a05f 100644 --- a/dwds/test/integration/fixtures/frontend_server_context.dart +++ b/dwds/test/integration/fixtures/frontend_server_context.dart @@ -74,6 +74,7 @@ class FrontendServerTestContext extends TestContext { canaryFeatures: testSettings.canaryFeatures, isFlutterApp: testSettings.isFlutterApp, experiments: testSettings.experiments, + useDebuggerModuleNames: testSettings.useDebuggerModuleNames, ); final filePathToServe = webCompatiblePath([ diff --git a/dwds_test_common/lib/fixtures/main.dart.dill.json b/dwds_test_common/lib/fixtures/main.dart.dill.json new file mode 100644 index 0000000000..751bc10b82 --- /dev/null +++ b/dwds_test_common/lib/fixtures/main.dart.dill.json @@ -0,0 +1 @@ +{"/web/main.dart.lib.js":{"code":[0,2929],"sourcemap":[0,373]},"/packages/webdev_example_app/message.dart.lib.js":{"code":[2929,3844],"sourcemap":[373,568]},"/packages/path/src/path_set.dart.lib.js":{"code":[3844,97029],"sourcemap":[568,24042]},"/packages/path/src/path_exception.dart.lib.js":{"code":[97029,98717],"sourcemap":[24042,24277]},"/packages/path/src/characters.dart.lib.js":{"code":[98717,100285],"sourcemap":[24277,24602]},"/packages/path/src/utils.dart.lib.js":{"code":[100285,102035],"sourcemap":[24602,25191]}} \ No newline at end of file diff --git a/dwds_test_common/lib/fixtures/main.dart.dill.map b/dwds_test_common/lib/fixtures/main.dart.dill.map new file mode 100644 index 0000000000..58a3895f1b --- /dev/null +++ b/dwds_test_common/lib/fixtures/main.dart.dill.map @@ -0,0 +1 @@ +{"version":3,"sourceRoot":"","sources":["main.dart"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYwB,IAAtB,WAAM;AAKJ,IAHF,4BAAkB,aAAa,SAAC,GAAG;AACb,MAApB,WAAM;AACN,YAAgC,+CAAO,AAAK,oBAAO,uCAAC,WAAW;IAChE;AACkD,IAAnD,AAAS,AAAK,kCAAO,wBAAe,YAAO;AAEvC,gBAAQ;AAGV,IAFI,kCAAqC,QAAC;AACX,MAA/B,WAAM,AAAwB,0BAAP,QAAF,AAAE,KAAK,GAAP;;EAEzB","file":"main.dart.lib.js"}{"version":3,"sourceRoot":"","sources":["message.dart"],"names":[],"mappings":";;;;;;;;;MAEM,eAAO;YAAG,WAAO,SAAS","file":"../../../../../../../../packages/webdev_example_app/message.dart.lib.js"}{"version":3,"sourceRoot":"","sources":["path_set.dart","path_map.dart","style.dart","internal_style.dart","style/windows.dart","style/url.dart","parsed_path.dart","style/posix.dart","context.dart","../path.dart"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA6BuC;AACd,MAArB,AAAQ,OAAD,IAAC,OAAR,UAAc,gBAAN;AACR,YAAO,sCACK,SAAC,OAAO;AACd,cAAI,AAAM,KAAD,IAAI,MAAM,MAAO,AAAM,MAAD,IAAI;AACnC,cAAI,AAAM,KAAD,IAAI,MAAM,MAAO;AAC1B,gBAAO,AAAQ,QAAD,QAAQ,KAAK,EAAE,KAAK;+CAE1B,QAAC,QAAS,AAAK,IAAD,IAAI,OAAO,IAAI,AAAQ,OAAD,MAAM,IAAI,+BAC5C,QAAC,QAAc,AAAU,OAAf,IAAI,gBAAc,AAAK,IAAD,IAAI;IACtD;;AAMiC,YAAA,AAAO;IAAQ;;AAE9B,YAAA,AAAO;IAAM;;yBAEf;AAAU,YAAA,AAAO,kBAAI,KAAK;IAAC;;gCAEd;AAAa,YAAA,AAAO,qBAAO,QAAQ;IAAC;;AAE7C,YAAA,AAAO;IAAS;;AAEpB,YAAA,AAAO;IAAO;aAET;AAAU,YAAA,AAAO,uBAAS,KAAK;IAAC;gBAEnB;AAAU,YAAA,AAAO,0BAAY,KAAK;IAAC;eAElC;AAAU,YAAA,AAAO,yBAAW,KAAK;IAAC;iBAEhC;AAAU,YAAA,AAAO,2BAAa,KAAK;IAAC;WAEpD;AAAY,YAAA,AAAO,qBAAO,OAAO;IAAC;WAEpC;AAAU,YAAA,AAAO,qBAAO,KAAK;IAAC;cAEjB;AAAa,YAAA,AAAO,wBAAU,QAAQ;IAAC;gBAEjD;AAAyB,YAAA,AAAO,0BAAY,IAAI;IAAC;cAEvC;AAAa,YAAA,AAAO,wBAAU,QAAQ;IAAC;gBAEjD;AAAyB,YAAA,AAAO,0BAAY,IAAI;IAAC;;2BAEzC;AAAU,YAAA,AAAO,oBAAM,KAAK;IAAC;;AAEpC,YAAA,AAAO;IAAO;;;QA9DlB;IAAmB,eAAE,yBAAQ,OAAO;AAAvD;;EAAwD;kCAQ5B;;QAAkB;IACjC,qBAAE,yBAAQ,OAAO,GAAG,UAAO,KAAK;AAD7C;;EAC8C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBCAH;AACpB,QAArB,AAAQ,OAAD,IAAC,OAAR,UAAc,gBAAN;AACR,cAAO,wDACK,SAAC,OAAO;AACd,gBAAI,AAAM,KAAD,IAAI,MAAM,MAAO,AAAM,MAAD,IAAI;AACnC,gBAAI,AAAM,KAAD,IAAI,MAAM,MAAO;AAC1B,kBAAO,AAAQ,QAAD,QAAQ,KAAK,EAAE,KAAK;iDAE1B,QAAC,QAAS,AAAK,IAAD,IAAI,OAAO,IAAI,AAAQ,OAAD,MAAM,IAAI,+BAC5C,QAAC,QAAc,AAAU,OAAf,IAAI,gBAAc,AAAK,IAAD,IAAI;MACtD;;;UAtBmB;AAAY,uCAAM,4BAAQ,OAAO;;IAAE;2BAQ5B;;UAAkB;AACtC,6CAAM,4BAAQ,OAAO,GAAG,YAAO,KAAK;;IAAE;;;;;;;;;;;ACmB1C,UAAQ,AAAK,yBAAU,QAAQ,MAAa;AAC5C,WAAS,AAAK,AAAK,8BAAS,MAAM,MAAa;AAC/C,UAAI,AAAiB,AAAa,qBAApB,yBAAuB,QAAQ,MAAa;AAC1D,YAAa;IACf;;AAMuB,yCAAe;IAAK;;AAgCtB;IAAI;;;;EAC3B;;;;;;;;;MAxEqB,kBAAK;YAAG;;MAOR,oBAAO;YAAG;;MAQV,gBAAG;YAAG;;MAMN,qBAAQ;YAAG;;;;YCSR;AAChB,mBAAS,gBAAW,IAAI;AAC5B,UAAW,aAAP,MAAM,IAAG,GAAG,MAAO,AAAK,KAAD,aAAW,GAAG,MAAM;AAC/C,uBAAO,oBAAe,IAAI,KAAI,AAAI,IAAA,QAAC,KAAK;IAC1C;sBAW6B;AACvB,qBAAW,AAAQ,mBAAM,IAAI;AAIjC,oBAAI,iBAAY,AAAK,IAAD,cAAY,AAAK,AAAO,IAAR,UAAU,MAAK,AAAS,AAAO,QAAR,OAAK;AAChE,YAAO,8BAAkB,QAAQ;IACnC;mBAOwB,WAAe;AAAc,YAAA,AAAU,UAAD,IAAI,SAAS;;eAMpD,OAAc;AAAU,YAAA,AAAM,MAAD,IAAI,KAAK;;yBAEhC;AAAa,qBAAQ;;qBAEnB;AAAS,iBAAI;;;;;EAC9C;;;;;;;;;;;;;;;;;;;;IClEQ;;;;;;IACA;;;;;;IACA;;;;;;IAIA;;;;;;IACA;;;;;;IACA;;;;;;IACA;;;;;;sBAEwB;AAAS,YAAA,AAAK,KAAD,YAAU;IAAI;gBAEpC;AACjB,YAAA,AAAS,AAAe,SAAhB,WAAmB,AAAS,QAAD;IAAmB;mBAE/B;AACzB,UAAI,AAAK,IAAD,YAAU,MAAO;AACzB,YAAO,YAAC,iBAAY,AAAK,IAAD,cAAY,AAAK,AAAO,IAAR,UAAU;IACpD;eAEsB;UAAY;AAChC,UAAI,AAAK,IAAD,YAAU,MAAO;AACzB,UAAI,AAAK,AAAc,IAAf,cAAY,WAAmB,MAAO;AAC9C,UAAI,AAAK,AAAc,IAAf,cAAY;AAClB,YAAI,AAAK,AAAO,IAAR,UAAU,KAAK,AAAK,IAAD,cAAY,WAAuB,MAAO;AAGjE,oBAAQ,AAAK,IAAD,WAAS,MAAM;AAC/B,YAAI,AAAM,KAAD,GAAG;AAC2B,UAArC,QAAQ,AAAK,IAAD,WAAS,MAAM,AAAM,KAAD,GAAG;AACnC,cAAI,AAAM,KAAD,GAAG,GAAG,MAAO,MAAK;;AAE7B,cAAO,AAAK,KAAD;;AAIb,UAAI,AAAK,AAAO,IAAR,UAAU,GAAG,MAAO;AAE5B,qBAAK,mBAAa,AAAK,IAAD,cAAY,MAAK,MAAO;AAE9C,UAAI,AAAK,IAAD,cAAY,WAAmB,MAAO;AAE9C,qBAAK,iBAAY,AAAK,IAAD,cAAY,MAAK,MAAO;AAC7C,YAAO;IACT;mBAE2B;AAAS,YAAA,AAAiB,iBAAN,IAAI,MAAK;IAAC;oBAE3B;AACxB,mBAAS,gBAAW,IAAI;AAC5B,UAAI,AAAO,MAAD,KAAI,GAAG,MAAO,AAAI,KAAA,QAAC;AAC7B,YAAO;IACT;gBAEuB;AACrB,UAAI,AAAI,GAAD,YAAW,MAAM,AAAI,GAAD,YAAW;AACqB,QAAzD,WAAM,2BAAc,AAAoC,kBAA9B,GAAG;;AAG3B,iBAAO,AAAI,GAAD;AACd,UAAI,AAAI,AAAK,GAAN,UAAS;AAId,YAAI,AAAK,AAAO,IAAR,WAAW,KAAK,AAAK,IAAD,cAAY,kBAAQ,oBAAc,IAAI,EAAE;AACjC,UAAjC,OAAO,AAAK,IAAD,gBAAc,KAAK;;;AAIH,QAA7B,OAAO,AAAsB,kBAAf,AAAI,GAAD,kBAAO,IAAI;;AAE9B,YAAW,0BAAgB,AAAK,IAAD,cAAY,KAAK;IAClD;sBAE6B;AACvB,mBAAoB,6BAAM,IAAI,EAAE;AACpC,UAAI,AAAO,AAAK,MAAN,mBAAiB;AAKrB,wBAAY,AAAO,AAAK,AAAY,MAAlB,cAAY,cAAY,QAAC,QAAS,AAAK,IAAD,KAAI;AAC1B,QAAtC,AAAO,AAAM,MAAP,gBAAc,GAAG,AAAU,SAAD;AAEhC,sBAAI,AAAO,MAAD;AAGY,UAApB,AAAO,AAAM,MAAP,aAAW;;AAGnB,cAAO,wBACK,cAAc,AAAU,SAAD,wBAAsB,AAAO,MAAD;;AAQ/D,sBAAI,AAAO,AAAM,MAAP,+BAAkB,AAAO,MAAD;AACZ,UAApB,AAAO,AAAM,MAAP,aAAW;;AAMiD,QADpE,AAAO,AACF,MADC,gBACM,GAAG,AAAO,AAAK,AAAoB,MAA1B,mBAAiB,KAAK,iBAAe,MAAM;AAEhE,cAAO,wBAAY,sBAAsB,AAAO,MAAD;;IAEnD;mBAEwB,WAAe;AACrC,UAAI,AAAU,SAAD,IAAI,SAAS,EAAE,MAAO;AAGnC,UAAI,AAAU,SAAD,SAAiB,MAAO,AAAU,UAAD;AAC9C,UAAI,AAAU,SAAD,SAAqB,MAAO,AAAU,UAAD;AAIlD,UAAc,cAAV,SAAS,iBAAG,SAAS,iBAAmB,MAAO;AAG/C,uBAAuB,cAAV,SAAS;AAC1B,YAAO,AAAW,AAAgB,WAAjB,UAAoB,AAAW,UAAD;IACjD;eAEuB,OAAc;AACnC,UAAI,AAAU,KAAK,IAAE,KAAK,EAAG,MAAO;AACpC,UAAI,AAAM,KAAD,YAAW,AAAM,KAAD,SAAS,MAAO;AACzC,eAAS,IAAI,GAAG,AAAE,CAAD,GAAG,AAAM,KAAD,SAAS,IAAA,AAAC,CAAA;AACjC,uBAAK,oBAAe,AAAM,KAAD,cAAY,CAAC,GAAG,AAAM,KAAD,cAAY,CAAC;AACzD,gBAAO;;;AAGX,YAAO;IACT;yBAE6B;AAC3B,UAAI,AAAS,QAAD,SAAiB;AAC7B,UAAa,aAAT,QAAQ,QAAiB,MAAO,SAAQ;AAC5C,UAAa,aAAT,QAAQ,QAAiB,MAAO,SAAQ;AAC5C,YAAgB,eAAT,QAAQ;IACjB;qBAE+B;AAAS,YAAA,AAAK,KAAD;IAAc;;;IAnJpD,aAAO;IACP,kBAAY;IACZ;IAIA,yBAAmB,gBAAO;IAC1B,8BAAwB,gBAAO;IAC/B,oBAAc,gBAAO;IACrB,4BAAsB,gBAAO;;EAXrB;;;;;;;;;;;;;;;;;;;;;;;;;MAJV,qBAAa;;;;;;;;;;;;;ICCX;;;;;;IACA;;;;;;IACA;;;;;;IAIA;;;;;;IACA;;;;;;IACA;;;;;;IACA;;;;;;sBAEwB;AAAS,YAAA,AAAK,KAAD,YAAU;IAAI;gBAEpC;AAAa,YAAA,AAAS,SAAD;IAAe;mBAE9B;AACzB,UAAI,AAAK,IAAD,YAAU,MAAO;AAGzB,qBAAK,iBAAY,AAAK,IAAD,cAAY,AAAK,AAAO,IAAR,UAAU,MAAK,MAAO;AAI3D,YAAO,AAAK,AAAgB,KAAjB,YAAU,UAAU,AAAiB,gBAAN,IAAI,MAAK,AAAK,IAAD;IACzD;eAEsB;UAAY;AAChC,UAAI,AAAK,IAAD,YAAU,MAAO;AACzB,oBAAI,iBAAY,AAAK,IAAD,cAAY,MAAK,MAAO;AAE5C,eAAS,IAAI,GAAG,AAAE,CAAD,GAAG,AAAK,IAAD,SAAS,IAAA,AAAC,CAAA;AAC5B,uBAAW,AAAK,IAAD,cAAY,CAAC;AAChC,sBAAI,iBAAY,QAAQ,IAAG,MAAO;AAClC,YAAI,AAAS,QAAD;AACV,cAAI,AAAE,CAAD,KAAI,GAAG,MAAO;AAInB,cAAI,AAAK,IAAD,cAAY,MAAM,AAAE,CAAD,GAAG,IAAI,AAAM,IAAN,AAAE,CAAD,GAAI;AACnC,sBAAQ,AAAK,IAAD,WAAS,KAAK,CAAC;AAC/B,cAAI,AAAM,KAAD,IAAI,GAAG,MAAO,AAAK,KAAD;AAI3B,yBAAK,SAAS,KAAI,AAAK,AAAO,IAAR,UAAU,AAAM,KAAD,GAAG,GAAG,MAAO,MAAK;AACvD,eAAK,AAAK,IAAD,cAAY,YAAY,MAAO,MAAK;AAC7C,yBAAK,oBAAc,IAAI,EAAE,AAAM,KAAD,GAAG,KAAI,MAAO,MAAK;AACjD,gBAAO,AAAK,AAAO,KAAR,YAAW,AAAM,KAAD,GAAG,IAAI,AAAM,KAAD,GAAG,IAAI,AAAM,KAAD,GAAG;;;AAI1D,YAAO;IACT;mBAE2B;AACvB,YAAA,AAAK,AAAW,KAAZ,2BAAe,iBAAY,AAAK,IAAD,cAAY;IAAG;oBAExB;AAAS,2CAAe,IAAI,KAAI,MAAM;IAAI;gBAEjD;AAAQ,YAAI,eAAJ,GAAG;IAAW;sBAEhB;AAAS,YAAI,gBAAM,IAAI;IAAC;sBACxB;AAAS,YAAI,gBAAM,IAAI;IAAC;;;IA9D/C,cAAO;IACP,mBAAY;IACZ;IAIA,0BAAmB,gBAAO;IAC1B,+BAAwB,gBAAO;IAC/B,qBAAc,gBAAO;IACrB,6BAAsB,gBAAO;;EAXzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ICDI;;;;;;IAMP;;;;;;IAKF;;;;;;IAIQ;;;;;;IAOA;;;;;;;AAIW,YAAA,AAAiB,gCAAC;IAAE;;AAGrB,YAAA,AAAK,cAAG;IAAI;iBAEH,MAAoB;AAE9C,iBAAO,AAAM,KAAD,SAAS,IAAI;AACzB,2BAAiB,AAAM,KAAD,gBAAgB,IAAI;AAC9C,UAAI,IAAI,IAAI,MAAM,AAAkC,OAA3B,AAAK,IAAD,aAAW,AAAK,IAAD;AAGxC,kBAAgB;AAChB,uBAAqB;AAErB,kBAAQ;AAEZ,UAAI,AAAK,IAAD,2BAAe,AAAM,KAAD,aAAa,AAAK,IAAD,cAAY;AAChC,QAAvB,AAAW,UAAD,OAAK,AAAI,IAAA,QAAC;AACX,QAAT,QAAQ;;AAEU,QAAlB,AAAW,UAAD,OAAK;;AAGjB,eAAS,IAAI,KAAK,EAAE,AAAE,CAAD,GAAG,AAAK,IAAD,SAAS,IAAA,AAAC,CAAA;AACpC,sBAAI,AAAM,KAAD,aAAa,AAAK,IAAD,cAAY,CAAC;AACF,UAAnC,AAAM,KAAD,OAAK,AAAK,IAAD,aAAW,KAAK,EAAE,CAAC;AACV,UAAvB,AAAW,UAAD,OAAK,AAAI,IAAA,QAAC,CAAC;AACR,UAAb,QAAQ,AAAE,CAAD,GAAG;;;AAKhB,UAAI,AAAM,KAAD,GAAG,AAAK,IAAD;AACkB,QAAhC,AAAM,KAAD,OAAK,AAAK,IAAD,aAAW,KAAK;AACZ,QAAlB,AAAW,UAAD,OAAK;;AAGjB,YAAkB,+BAAE,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,UAAU;IACpE;;AAMM,iBAAO,AAAK;AACe,MAA/B,AAAK,IAAD;AACJ,oBAAI,AAAK,AAAM,IAAP,mBAAgB,MAAO,AAAK,cAAG,OAAO,KAAK;AACnD,YAAO,AAAK,AAAM,KAAP;IACb;;AAEuC,YAAA,AAAiB,gCAAC;IAAE;;AAGvD,YAAiB,WAAjB,AAAM,6BAAe,AAAM,AAAK,sBAAG,MAAM,AAAW,2BAAQ;IAAG;;AAGjE,uBAAO,AAAM,4BAAc,AAAM,AAAK,sBAAG;AACrB,QAAlB,AAAM;AACiB,QAAvB,AAAW;;AAEb,oBAAI,AAAW,+BAAY,AAAU,AAA4B,uBAAT,aAAlB,AAAW,4BAAS,GAAK;IACjE;;UAEqB;AAEf,2BAAiB;AACjB,qBAAmB;AACvB,eAAS,OAAQ;AACf,YAAI,AAAK,IAAD,KAAI,OAAO,AAAK,IAAD,KAAI;cAEpB,KAAI,AAAK,IAAD,KAAI;AAEjB,wBAAI,AAAS,QAAD;AACW,YAArB,AAAS,QAAD;;AAGQ,YAAhB,iBAAA,AAAc,cAAA;;;AAGgD,UAAhE,AAAS,QAAD,iBAAK,YAAY,IAAG,AAAM,4BAAiB,IAAI,IAAI,IAAI;;;AAKnE,qBAAK;AACqD,QAAxD,AAAS,QAAD,aAAW,GAAQ,sBAAO,cAAc,EAAE;;AAIpD,oBAAI,AAAS,QAAD,0BAAa;AACN,QAAjB,AAAS,QAAD,OAAK;;AAIX,0BAAc,wBACd,AAAS,QAAD,WAAS,QAAC,KAAM,AAAM,iDACpB;AAKD,MAJb,AAAc,aAAD,UACT,GACkC,UAAlC,8BAAc,AAAS,QAAD,4BAAe,AAAM,0BAAe,cACpD,AAAM,uBACN;AAEM,MAAhB,aAAQ,QAAQ;AACU,MAA1B,kBAAa,aAAa;AAG1B,UAAI,aAAQ,QAAc,YAAN,YAAe;AACjC,sBAAI,YAAY,GAAE,AAAyB,YAAlB,AAAK;AACG,QAAjC,YAAO,AAAK,uBAAW,KAAK;;AAEJ,MAA1B;IACF;;AAGM,oBAAU;AACd,UAAI,aAAQ,MAAM,AAAQ,AAAW,OAAZ,OAAO;AAChC,eAAS,IAAI,GAAG,AAAE,CAAD,gBAAG,AAAM,sBAAQ,IAAA,AAAC,CAAA;AACL,QAA5B,AAAQ,OAAD,OAAO,AAAU,uBAAC,CAAC;AACH,QAAvB,AAAQ,OAAD,OAAO,AAAK,kBAAC,CAAC;;AAEO,MAA9B,AAAQ,OAAD,OAAO,AAAW;AAEzB,YAAO,AAAQ,QAAD;IAChB;;AAQM,iBAAO,AAAM,uBAAU,QAAC,KAAM,AAAE,CAAD,KAAI,8BAAY,cAAM;AAEzD,UAAI,AAAK,IAAD,IAAI,MAAM,MAAO,uBAAC,IAAI;AAC9B,UAAI,AAAK,IAAD,KAAI,MAAM,MAAO,uBAAC,MAAM;AAE5B,oBAAU,AAAK,IAAD,eAAa;AAI/B,UAAI,AAAQ,OAAD,IAAI,GAAG,MAAO,uBAAC,IAAI,EAAE;AAEhC,YAAO,uBAAC,AAAK,IAAD,aAAW,GAAG,OAAO,GAAG,AAAK,IAAD,aAAW,OAAO;IAC5D;;AAEsB,YAAW,+BAC7B,YAAO,WAAM,qBAAqB,oBAAK,aAAa,oBAAK;IAAY;;wCA1GhE,OAAY,MAAW,gBAAqB,OAAY;IAAxD;IAAY;IAAW;IAAqB;IAAY;;EAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ICjEtE;;;;;;IACA;;;;;;IACA;;;;;;IAIA;;;;;;IACA;;;;;;IACA;;;;;;IACA;;;;;;sBAEwB;AAAS,YAAA,AAAK,KAAD,YAAU;IAAI;gBAEpC;AAAa,YAAA,AAAS,SAAD;IAAe;mBAE9B;AACvB,YAAA,AAAK,AAAW,KAAZ,4BAAgB,iBAAY,AAAK,IAAD,cAAY,AAAK,AAAO,IAAR,UAAU;IAAG;eAE/C;UAAY;AAChC,UAAI,AAAK,IAAD,2BAAe,iBAAY,AAAK,IAAD,cAAY,MAAK,MAAO;AAC/D,YAAO;IACT;mBAE2B;AAAS;IAAK;oBAEX;AAAS;IAAI;gBAEpB;AACrB,UAAI,AAAI,AAAO,GAAR,YAAW,MAAM,AAAI,AAAO,GAAR,YAAW;AACpC,cAAW,0BAAgB,AAAI,GAAD;;AAEyB,MAAzD,WAAM,2BAAc,AAAoC,kBAA9B,GAAG;IAC/B;sBAE6B;AACvB,mBAAoB,6BAAM,IAAI,EAAE;AACpC,oBAAI,AAAO,AAAM,MAAP;AAIqB,QAA7B,AAAO,AAAM,MAAP,gBAAc,sBAAC,IAAI;YACpB,eAAI,AAAO,MAAD;AAGK,QAApB,AAAO,AAAM,MAAP,aAAW;;AAGnB,YAAO,wBAAY,sBAAsB,AAAO,MAAD;IACjD;;;IAhDM,eAAO;IACP,oBAAY;IACZ;IAIA,2BAAmB,gBAAO;IAC1B,gCAAwB,gBAAO;IAC/B,sBAAc,gBAAO;IACrB,8BAAsB;;EAXhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IC4CQ;;;;;;;UA3BG;UAAc;AACnC,UAAI,AAAQ,OAAD,IAAI;AACb,YAAI,AAAM,KAAD,IAAI;AACQ,UAAnB,UAAY;;AAEC,UAAb,UAAU;;;AAId,UAAI,AAAM,KAAD,IAAI;AACW,QAAtB,QAAc;YACT,MAAU,gCAAN,KAAK;AAEC,QADf,WAAM,2BAAc,iDAChB;;AAGN,YAAe,wBAAQ,gCAAN,KAAK,GAAmB,OAAO;IAClD;;AAiBsB,YAAA,AAAS,oBAAG,OAAO,kBAAa;IAAO;;AAIrC,YAAA,AAAM;IAAS;aAShB,OACX,cACD,cACA,cACA,cACA,cACA;AAEyD,MADlE,yBACI,YAAY,sBAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK;AAIhE,UAAI,AAAM,KAAD,IAAI,kBAAQ,gBAAW,KAAK,iBAAM,oBAAe,KAAK;AAC7D,cAAO,MAAK;;AAGd,YAAO,WAAK,cAAS,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK;IACtE;aAWuB;AAAS,YAAA,AAAa,cAAN,IAAI;IAAU;6BAUd;AACnC,YAAA,AAAa,cAAN,IAAI;IAA0B;YAUnB;AAChB,mBAAS,aAAO,IAAI;AACS,MAAjC,AAAO,MAAD;AACN,oBAAI,AAAO,AAAM,MAAP,mBAAgB,MAAO,AAAO,AAAK,OAAN,SAAS,OAAO,MAAM,AAAO,MAAD;AACnE,UAAI,AAAO,AAAM,AAAO,MAAd,oBAAiB;AACzB,cAAO,AAAO,AAAK,OAAN,SAAS,OAAO,MAAM,AAAO,MAAD;;AAElB,MAAzB,AAAO,AAAM,MAAP;AACwB,MAA9B,AAAO,AAAW,MAAZ;AAC2B,MAAjC,AAAO,MAAD;AACN,YAAc,eAAP,MAAM;IACf;cAewB;AAAS,YAAA,AAAa,cAAN,IAAI;IAAW;eAkB9B;AAAS,YAAA,AAAK,KAAD,aAAW,GAAG,AAAM,sBAAW,IAAI;IAAE;eAcpD;AAAS,YAAuB,cAAvB,AAAM,sBAAW,IAAI,KAAI;IAAC;eAMnC;AAAS,wBAAC,AAAK,gBAAW,IAAI;IAAC;mBAU3B;AAAS,YAAA,AAAM,2BAAe,IAAI;IAAC;SAe3C,OACP,cACD,cACA,cACA,cACA,cACA,cACA;AACL,kBAAgB,sBAClB,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK;AAEwB,MAA/B,yBAAiB,QAAQ,KAAK;AAC9B,YAAO,cAAQ,AAAM,KAAD,SAAO,QAAC,QAAS,AAAK,IAAD,IAAI;IAC/C;YAgBgC;AAC1B,mBAAS;AACT,2BAAiB;AACjB,yCAA+B;AAEnC,iBAAiB,AAAM,KAAD,SAAO,QAAC,QAAS,AAAK,IAAD,KAAI;eAAtC;AACP,sBAAI,AAAK,oBAAe,IAAI,MAAK,4BAA4B;AAGvD,uBAAS,aAAO,IAAI;AACpB,qBAAO,AAAO,MAAD;AAE6C,UAD9D,AAAO,MAAD,QACF,AAAK,IAAD,aAAW,GAAG,AAAM,sBAAW,IAAI,cAAa;AACxD,wBAAI,AAAM,0BAAe,AAAO,MAAD;AACS,YAAtC,AAAO,AAAU,MAAX,mBAAY,GAAK,AAAM;;AAEjB,UAAd,AAAO,MAAD;AACyB,UAA/B,AAAO,MAAD,OAAc,cAAP,MAAM;cACd,eAAI,AAAK,gBAAW,IAAI;AAC4B,UAAzD,+BAA+B,WAAC,AAAK,oBAAe,IAAI;AAE1C,UAAd,AAAO,MAAD;AACY,UAAlB,AAAO,MAAD,OAAO,IAAI;;AAEjB,cAAI,AAAK,IAAD,2BAAe,AAAM,6BAAkB,AAAI,IAAA,QAAC;gBAE7C,eAAI,cAAc;AACA,YAAvB,AAAO,MAAD,OAAO;;AAGG,UAAlB,AAAO,MAAD,OAAO,IAAI;;AAKwB,QAA3C,iBAAiB,AAAM,0BAAe,IAAI;;AAG5C,YAAO,AAAO,OAAD;IACf;UAoB0B;AACpB,mBAAS,aAAO,IAAI;AAE6C,MAArE,AAAO,MAAD,SAAS,AAAO,AAAM,AAAiC,MAAxC,eAAa,QAAC,QAAS,AAAK,IAAD;AAChD,UAAI,AAAO,MAAD,SAAS,MAAM,AAAO,AAAM,AAAsB,MAA7B,gBAAc,GAAG,AAAO,MAAD;AACtD,YAAO,AAAO,OAAD;IACf;iBAc2B;AACJ,MAArB,OAAO,cAAS,IAAI;AACpB,uBAAI,YAAe,oCAAY,0BAAoB,IAAI,IAAG,MAAO,KAAI;AAEjE,mBAAS,aAAO,IAAI;AACY,MAApC,AAAO,MAAD,0BAAyB;AAC/B,YAAc,eAAP,MAAM;IACf;cAUwB;AACtB,qBAAK,0BAAoB,IAAI,IAAG,MAAO,KAAI;AAEvC,mBAAS,aAAO,IAAI;AACN,MAAlB,AAAO,MAAD;AACN,YAAc,eAAP,MAAM;IACf;0BAGgC;AAC1B,kBAAQ;AACR,sBAAY,AAAK,IAAD;AAChB;AACA;AAKA,iBAAO,AAAM,sBAAW,IAAI;AAChC,UAAI,IAAI,KAAI;AACE,QAAZ,QAAQ,IAAI;AACU,QAAtB;AAIA,YAAU,YAAN,YAAe;AACjB,mBAAS,IAAI,GAAG,AAAE,CAAD,gBAAG,IAAI,GAAE,IAAA,AAAC,CAAA;AACzB,gBAAI,AAAS,AAAI,SAAJ,QAAC,CAAC,UAAkB,MAAO;;;;AAK9C,eAAS,IAAI,KAAK,EAAI,aAAF,CAAC,iBAAG,AAAU,SAAD,YAAS,IAAC,aAAD,CAAC;AACrC,uBAAW,AAAS,SAAA,QAAC,CAAC;AAC1B,sBAAI,AAAM,uBAAY,QAAQ;AAE5B,cAAU,YAAN,YAAe,yBAAW,AAAS,QAAD,SAAiB,MAAO;AAG9D,cAAI,QAAQ,IAAI,kBAAQ,AAAM,uBAAY,QAAQ,IAAG,MAAO;AAM5D,cAAI,AAAS,QAAD,YACP,AAAiB,gBAAD,IAAI,QACjB,AAAiB,gBAAD,qBAChB,AAAM,uBAAY,gBAAgB;AACxC,kBAAO;;;AAIgB,QAA3B,mBAAmB,QAAQ;AACR,QAAnB,WAAW,QAAQ;;AAIrB,UAAI,AAAS,QAAD,IAAI,MAAM,MAAO;AAG7B,oBAAI,AAAM,uBAAY,QAAQ,IAAG,MAAO;AAGxC,UAAI,AAAS,QAAD,YACP,AAAiB,gBAAD,IAAI,kBACjB,AAAM,uBAAY,gBAAgB,MAClC,AAAiB,gBAAD;AACtB,cAAO;;AAGT,YAAO;IACT;aAkCuB;;UAAc;AAEnC,UAAI,AAAK,IAAD,IAAI,kBAAQ,AAAK,gBAAW,IAAI,IAAG,MAAO,AAAK,gBAAU,IAAI;AAEvB,MAA9C,OAAO,AAAK,IAAD,IAAI,OAAO,eAAU,cAAS,IAAI;AAG7C,oBAAI,AAAK,gBAAW,IAAI,gBAAK,AAAK,gBAAW,IAAI;AAC/C,cAAO,AAAK,gBAAU,IAAI;;AAK5B,oBAAI,AAAK,gBAAW,IAAI,gBAAK,AAAK,oBAAe,IAAI;AACzB,QAA1B,OAAO,AAAK,cAAS,IAAI;;AAK3B,oBAAI,AAAK,gBAAW,IAAI,gBAAK,AAAK,gBAAW,IAAI;AACsB,QAArE,WAAM,qCAAc,AAAgD,yCAApB,IAAI,4BAAS,IAAI;;AAG/D,6BAAa,aAAO,IAAI,GAAG;AAC3B,8BAAa,aAAO,IAAI,GAAG;AAE/B,oBAAI,AAAW,AAAM,UAAP,wBAAqB,AAAW,AAAK,AAAI,UAAV,cAAO,OAAM;AACxD,cAAkB,eAAX,UAAU;;AAOnB,UAAI,AAAW,UAAD,SAAS,AAAW,UAAD,UAC3B,AAAW,AAAK,UAAN,SAAS,QAAQ,AAAW,AAAK,UAAN,SAAS,mBAC3C,AAAM,sBAAW,AAAW,UAAD,OAAO,AAAW,UAAD;AACnD,cAAkB,eAAX,UAAU;;AAInB,uBAAO,AAAW,AAAM,UAAP,kCACb,AAAW,AAAM,UAAP,kCACV,AAAM,sBAAW,AAAW,AAAK,UAAN,cAAO,IAAI,AAAW,AAAK,UAAN,cAAO;AAC7B,QAA5B,AAAW,AAAM,UAAP,kBAAgB;AACO,QAAjC,AAAW,AAAW,UAAZ,uBAAqB;AACH,QAA5B,AAAW,AAAM,UAAP,kBAAgB;AACO,QAAjC,AAAW,AAAW,UAAZ,uBAAqB;;AAMjC,oBAAI,AAAW,AAAM,UAAP,wBAAqB,AAAW,AAAK,AAAI,UAAV,cAAO,OAAM;AACa,QAArE,WAAM,qCAAc,AAAgD,yCAApB,IAAI,4BAAS,IAAI;;AAEM,MAAzE,AAAW,AAAM,UAAP,mBAAiB,GAAQ,sBAAO,AAAW,AAAM,UAAP,iBAAe;AACtC,MAA7B,AAAW,AAAU,UAAX,mBAAY,GAAK;AAE6C,MADxE,AAAW,AACN,UADK,wBACK,GAAQ,sBAAO,AAAW,AAAM,UAAP,iBAAe,AAAM;AAG7D,oBAAI,AAAW,AAAM,UAAP,mBAAgB,MAAO;AAIrC,UAA4B,aAAxB,AAAW,AAAM,UAAP,mBAAgB,KAAK,AAAW,AAAM,AAAK,UAAZ,kBAAe;AAC7B,QAA7B,AAAW,AAAM,UAAP;AAIC,eAHX,AAAW,UAAD;QACN;QACA;QACA,WAAI;;;AAIU,MAApB,AAAW,UAAD,QAAQ;AACmB,MAArC,AAAW,UAAD;AAEV,YAAkB,eAAX,UAAU;IACnB;aAQqB,QAAe;AAChC,YAAiC,aAAjC,wBAAkB,MAAM,EAAE,KAAK,GAAmB;IAAM;WAOzC,OAAc;AAC7B,YAAgC,aAAhC,wBAAkB,KAAK,EAAE,KAAK,GAAmB;IAAK;wBAMnB,QAAe;AAIhD,6BAAmB,gBAAW,MAAM;AACpC,4BAAkB,gBAAW,KAAK;AACtC,oBAAI,gBAAgB,gBAAK,eAAe;AACf,QAAvB,QAAQ,cAAS,KAAK;AACtB,sBAAI,AAAM,0BAAe,MAAM,IAAG,AAAyB,SAAhB,cAAS,MAAM;YACrD,eAAI,eAAe,gBAAK,gBAAgB;AACpB,QAAzB,SAAS,cAAS,MAAM;AACxB,sBAAI,AAAM,0BAAe,KAAK,IAAG,AAAuB,QAAf,cAAS,KAAK;YAClD,eAAI,eAAe,eAAI,gBAAgB;AACxC,kCAAsB,AAAM,0BAAe,KAAK;AAChD,mCAAuB,AAAM,0BAAe,MAAM;AAEtD,sBAAI,mBAAmB,gBAAK,oBAAoB;AACvB,UAAvB,QAAQ,cAAS,KAAK;cACjB,eAAI,oBAAoB,gBAAK,mBAAmB;AAC5B,UAAzB,SAAS,cAAS,MAAM;;;AAIxB,mBAAS,4BAAsB,MAAM,EAAE,KAAK;AAChD,uBAAI,MAAM,EAAkB,qCAAc,MAAO,OAAM;AAEhD;AACP;AAC+C,QAA7C,WAAW,AAAK,cAAS,KAAK,SAAQ,MAAM;;YACpB;AAAxB;AAGA,gBAAqB;;;;AAGvB,qBAAK,AAAK,gBAAW,QAAQ,IAAG,MAAqB;AACrD,UAAI,AAAS,QAAD,KAAI,KAAK,MAAqB;AAC1C,UAAI,AAAS,QAAD,KAAI,MAAM,MAAqB;AAC3C,YAAQ,AAAS,AAAO,AACU,SADlB,WAAW,KACnB,AAAS,QAAD,cAAY,mBACpB,AAAM,uBAAY,AAAS,QAAD,cAAY,OAC1B,kCACA;IACtB;4BAI2C,QAAe;;AAGxD,UAAI,AAAO,MAAD,KAAI,KAAK,AAAW,SAAF;AAExB,6BAAmB,AAAM,sBAAW,MAAM;AAC1C,4BAAkB,AAAM,sBAAW,KAAK;AAQ5C,UAAI,gBAAgB,IAAI,eAAe,EAAE,MAAqB;AAM9D,eAAS,IAAI,GAAG,AAAE,CAAD,gBAAG,gBAAgB,GAAE,IAAA,AAAC,CAAA;AACjC,6BAAiB,AAAO,MAAD,cAAY,CAAC;AACpC,4BAAgB,AAAM,KAAD,cAAY,CAAC;AACtC,uBAAK,AAAM,0BAAe,cAAc,EAAE,aAAa;AACrD,gBAAqB;;;AAOrB;AAGA;AAGA,wBAAc,gBAAgB;AAC9B,uBAAa,eAAe;AAChC,aAAmB,aAAZ,WAAW,IAAG,AAAO,MAAD,WAAsB,aAAX,UAAU,IAAG,AAAM,KAAD;AAClD,6BAAiB,AAAO,MAAD,cAAY,WAAW;AAC9C,4BAAgB,AAAM,KAAD,cAAY,UAAU;AAC/C,sBAAI,AAAM,0BAAe,cAAc,EAAE,aAAa;AACpD,wBAAI,AAAM,uBAAY,cAAc;AACD,YAAjC,sBAAsB,WAAW;;AAGN,UAA7B,eAAe,cAAc;AAChB,UAAb,cAAW,aAAX,WAAW;AACC,UAAZ,aAAU,aAAV,UAAU;AACV;;AAIF,sBAAI,AAAM,uBAAY,cAAc,gBAChC,AAAM,uBAAY,YAAY;AACC,UAAjC,sBAAsB,WAAW;AACpB,UAAb,cAAW,aAAX,WAAW;AACX;cACK,eAAI,AAAM,uBAAY,aAAa,gBACtC,AAAM,uBAAY,YAAY;AACpB,UAAZ,aAAU,aAAV,UAAU;AACV;;AASF,YAAI,AAAe,cAAD,qBAAoB,AAAM,uBAAY,YAAY;AACrD,UAAb,cAAW,aAAX,WAAW;AAIX,cAAI,AAAY,WAAD,KAAI,AAAO,MAAD,SAAS;AACa,UAA/C,iBAAiB,AAAO,MAAD,cAAY,WAAW;AAG9C,wBAAI,AAAM,uBAAY,cAAc;AACD,YAAjC,sBAAsB,WAAW;AACpB,YAAb,cAAW,aAAX,WAAW;AACX;;AAKF,cAAI,AAAe,cAAD;AACH,YAAb,cAAW,aAAX,WAAW;AACX,gBAAI,AAAY,WAAD,KAAI,AAAO,MAAD,qBACrB,AAAM,uBAAY,AAAO,MAAD,cAAY,WAAW;AACjD,oBAAqB;;;;AAU3B,YAAI,AAAc,aAAD,qBAAoB,AAAM,uBAAY,YAAY;AACrD,UAAZ,aAAU,aAAV,UAAU;AACV,cAAI,AAAW,UAAD,KAAI,AAAM,KAAD,SAAS;AACY,UAA5C,gBAAgB,AAAM,KAAD,cAAY,UAAU;AAE3C,wBAAI,AAAM,uBAAY,aAAa;AACrB,YAAZ,aAAU,aAAV,UAAU;AACV;;AAGF,cAAI,AAAc,aAAD;AACH,YAAZ,aAAU,aAAV,UAAU;AACV,gBAAI,AAAW,UAAD,KAAI,AAAM,KAAD,qBACnB,AAAM,uBAAY,AAAM,KAAD,cAAY,UAAU;AAC/C,oBAAqB;;;;AASvB,6BAAiB,qBAAe,KAAK,EAAE,UAAU;AACrD,yBAAI,cAAc,EAAmB;AACnC,gBAAqB;;AAGnB,8BAAkB,qBAAe,MAAM,EAAE,WAAW;AACxD,yBAAI,eAAe,EAAmB;AACpC,gBAAqB;;AAGvB,cAAqB;;AASvB,UAAI,AAAW,UAAD,KAAI,AAAM,KAAD;AACrB,YAAI,AAAY,WAAD,KAAI,AAAO,MAAD,qBACrB,AAAM,uBAAY,AAAO,MAAD,cAAY,WAAW;AAChB,UAAjC,sBAAsB,WAAW;;AAEwB,UAAzD,AAAoB,mBAAD,IAAC,OAApB,sBAAwB,mBAAS,GAAoB,aAAjB,gBAAgB,IAAG,KAAnC;;AAGlB,wBACA,qBAAe,MAAM,GAAsB,KAApB,mBAAmB,QAAnB,OAAwC,aAAjB,gBAAgB,IAAG;AACrE,YAAc,YAAV,SAAS,EAAmB,gCAAQ,MAAqB;AAC7D,cAAiB,aAAV,SAAS,EAAmB,oCACf,qCACA;;AAMlB,sBAAY,qBAAe,KAAK,EAAE,UAAU;AAShD,UAAc,YAAV,SAAS,EAAmB,gCAAQ,MAAqB;AAQ7D,UAAc,YAAV,SAAS,EAAmB;AAC9B,cAAqB;;AASvB,YAAwD,WAAhD,AAAM,uBAAY,AAAM,KAAD,cAAY,UAAU,iBAC7C,AAAM,uBAAY,YAAY,KAClB,+BACA;IACtB;qBAeqC,MAAU;AACzC,kBAAQ;AACR,wBAAc;AACd,cAAI,KAAK;AACb,aAAS,aAAF,CAAC,IAAG,AAAK,IAAD;AAEb,eAAS,aAAF,CAAC,IAAG,AAAK,IAAD,qBAAW,AAAM,uBAAY,AAAK,IAAD,cAAY,CAAC;AACxD,UAAH,IAAC,aAAD,CAAC;;AAIH,YAAI,AAAE,CAAD,KAAI,AAAK,IAAD,SAAS;AAGlB,oBAAQ,CAAC;AACb,eAAS,aAAF,CAAC,IAAG,AAAK,IAAD,sBAAY,AAAM,uBAAY,AAAK,IAAD,cAAY,CAAC;AACzD,UAAH,IAAC,aAAD,CAAC;;AAIH,YAAM,AAAQ,aAAV,CAAC,iBAAG,KAAK,MAAI,KAAK,AAAK,AAAkB,IAAnB,cAAY,KAAK;cAEpC,KAAM,AAAQ,aAAV,CAAC,iBAAG,KAAK,MAAI,KACpB,AAAK,AAAkB,IAAnB,cAAY,KAAK,YACrB,AAAK,AAAsB,IAAvB,cAAkB,aAAN,KAAK,IAAG;AAEnB,UAAP,QAAA,AAAK,KAAA;AAGL,cAAI,AAAM,KAAD,GAAG,GAAG;AAIf,cAAI,AAAM,KAAD,KAAI,GAAG,AAAkB,cAAJ;;AAGvB,UAAP,QAAA,AAAK,KAAA;;AAIP,YAAI,AAAE,CAAD,KAAI,AAAK,IAAD,SAAS;AAGnB,QAAH,IAAC,aAAD,CAAC;;AAGH,UAAI,AAAM,KAAD,GAAG,GAAG,MAAsB;AACrC,UAAI,AAAM,KAAD,KAAI,GAAG,MAAsB;AACtC,UAAI,WAAW,EAAE,MAAsB;AACvC,YAAsB;IACxB;SAMgB;AAGO,MAArB,OAAO,cAAS,IAAI;AAEhB,mBAAS,gBAAU,IAAI;AAC3B,UAAI,MAAM,IAAI,MAAM,MAAO,OAAM;AAE7B,mBAAS,aAAO,IAAI;AACN,MAAlB,AAAO,MAAD;AACN,YAAO,iBAAiB,cAAP,MAAM;IACzB;gBAMqB;AACf,iBAAO;AACP,sBAAY;AACZ,yBAAe;AACnB,eAAS,IAAI,GAAG,AAAE,CAAD,GAAG,AAAK,IAAD,SAAS,IAAA,AAAC,CAAA;AAC5B,uBAAW,AAAM,gCAAqB,AAAK,IAAD,cAAY,CAAC;AAK3D,sBAAI,AAAM,uBAAY,QAAQ;AACT,UAAnB,eAAe;AACf;;AAGF,YAAI,AAAS,QAAD,WAAoB,YAAY;AAQ1C,cAAI,AAAE,AAAI,CAAL,GAAG,MAAK,AAAK,IAAD,SAAS;AAEtB,qBAAO,AAAK,IAAD,cAAY,AAAE,CAAD,GAAG;AAI/B,wBAAI,AAAM,uBAAY,IAAI,IAAG;AAM7B,eAAK,SAAS,IACV,AAAK,IAAD,YACH,AAAE,AAAI,CAAL,GAAG,MAAK,AAAK,IAAD,qBACV,AAAM,uBAAY,AAAK,IAAD,cAAY,AAAE,CAAD,GAAG;AAC5C,kBAAO;;;AAKM,QAAjB,OAAA,AAAK,IAAD,GAAI;AACE,QAAV,OAAA,AAAK,IAAD,GAAI;AACQ,QAAhB,OAAK,CAAL,IAAI,gBAAI,QAAQ;AACI,QAApB,eAAe;AACE,QAAjB,YAAY;;AAEd,YAAO,KAAI;IACb;qBAK+B;AACzB,mBAAS,aAAO,IAAI;AAExB,eAAS,IAAwB,aAApB,AAAO,AAAM,MAAP,mBAAgB,GAAG,AAAE,CAAD,IAAI,GAAG,IAAA,AAAC,CAAA;AAC7C,YAAI,AAAO,AAAK,AAAI,MAAV,cAAO,CAAC;AACiC,UAAjD,AAAO,AAAK,MAAN,cAAO,CAAC,EAAI,AAAO,MAAD;AACxB;;;AAIJ,YAAc,eAAP,MAAM;IACf;iBAa2B,MAAa;AACpC,YAAuB,cAAvB,sBAAiB,IAAI,kBAAI,SAAS;;YAsBvB;AAAQ,YAAA,AAAM,wBAAY,kBAAU,GAAG;IAAE;UAkBvC;AACf,oBAAI,gBAAW,IAAI;AACjB,cAAO,AAAM,8BAAkB,IAAI;;AAEnC,cAAO,AAAM,8BAAkB,UAAK,cAAS,IAAI;;IAErD;cA2BiB;AACX,qBAAW,kBAAU,GAAG;AAC5B,UAAI,AAAS,AAAO,QAAR,YAAW,UAAgB,YAAN,YAAe;AAC9C,cAAgB,eAAT,QAAQ;YACV,KAAI,AAAS,QAAD,YAAW,UAC1B,AAAS,QAAD,YAAW,mBACnB,YAAe;AACjB,cAAgB,eAAT,QAAQ;;AAGb,iBAAO,eAAU,aAAQ,QAAQ;AACjC,gBAAM,cAAS,IAAI;AAKvB,YAAyB,cAAlB,AAAW,WAAL,GAAG,2BAAW,AAAY,WAAN,IAAI,cAAW,IAAI,GAAG,GAAG;IAC5D;aAEyB;AAAS,YAAW,8BAAM,IAAI,EAAE;IAAM;;;IA9+BnD,gBAAiB,gCAAT;IACL,kBAAE;;EAAI;iCAEN,OAAY;IAAZ;IAAY;;EAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAmiCvB;;;;;;;AAIQ;IAAI;;;IAFC;;EAAK;;;;;;;;;MAflB,gCAAS;;;MAIT,6BAAM;;;MAIN,kCAAW;;;MAGX,gCAAS;;;;;;;;;;IA8BT;;;;;;;AAIQ;IAAI;;;IAFA;;EAAK;;;;;;;;;MAlBjB,4BAAM;;;MAKN,2BAAK;;;MAGL,+BAAS;;;MAMT,kCAAY;;;;;AAnmCC,UAAQ;EAAW;yCAuhCjC;AACZ,QAAQ,OAAJ,GAAG,cAAY,MAAW,gBAAM,GAAG;AACvC,QAAQ,YAAJ,GAAG,GAAS,MAAO,IAAG;AAC8C,IAAxE,WAAoB,6BAAM,GAAG,EAAE,OAAO;EACxC;uDAI6B,QAAqB;AAChD,aAAS,IAAI,GAAG,AAAE,CAAD,gBAAG,AAAK,IAAD,YAAS,IAAA,AAAC,CAAA;AAEhC,UAAI,AAAI,AAAI,IAAJ,QAAC,CAAC,KAAK,QAAQ,AAAI,IAAA,QAAC,AAAE,CAAD,GAAG,MAAM,MAAM;AAExC;AACJ,oBAAK,UAAU,AAAK,IAAD,WAAiB,aAAR,OAAO,KAAI,GAAG,UAAO,aAAP,OAAO;AAC/C,YAAI,AAAI,IAAA,QAAS,aAAR,OAAO,IAAG,MAAM,MAAM;;AAI7B,oBAAU;AACW,MAAzB,AAAQ,OAAD,OAAiB,SAAR,MAAM;AAIN,MAHhB,AAAQ,OAAD,OAAO,AACT,AACA,AACA,IAHa,QACR,OAAO,qBACR,QAAC,OAAQ,AAAI,GAAD,IAAI,OAAO,SAAS,AAAQ,gBAAL,GAAG,oCACrC;AACsD,MAAhE,AAAQ,OAAD,OAAO,AAAiD,sBAAtC,AAAE,CAAD,GAAG,KAAE,kCAAqB,CAAC;AACd,MAAvC,WAAM,2BAAc,AAAQ,OAAD;;EAE/B;qCC37BuB,OACP,cACD,cACA,cACA,cACA,cACA;AACX,UAAA,AAAQ,wBAAS,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK;EAAC;qCAU9C;AAAS,UAAA,AAAQ,wBAAS,IAAI;EAAC;qEAUf;AACnC,UAAA,AAAQ,wCAAyB,IAAI;EAAC;mCAqBpB;AAAS,UAAA,AAAQ,uBAAQ,IAAI;EAAC;uCAe5B;AAAS,UAAA,AAAQ,yBAAU,IAAI;EAAC;yCAkB/B;AAAS,UAAA,AAAQ,0BAAW,IAAI;EAAC;yCAcnC;AAAS,UAAA,AAAQ,0BAAW,IAAI;EAAC;yCAMjC;AAAS,UAAA,AAAQ,0BAAW,IAAI;EAAC;iDAU7B;AAAS,UAAA,AAAQ,8BAAe,IAAI;EAAC;6BAe7C,OACH,cACD,cACA,cACA,cACA,cACA,cACA;AACX,UAAA,AAAQ,oBAAK,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK;EAAC;mCAiBxC;AAAU,UAAA,AAAQ,uBAAQ,KAAK;EAAC;+BAuBtC;AAAS,UAAA,AAAQ,qBAAM,IAAI;EAAC;6CAc3B;AAAS,UAAA,AAAQ,4BAAa,IAAI;EAAC;uCAUtC;AAAS,UAAA,AAAQ,yBAAU,IAAI;EAAC;qCA4BjC;QAAc;AACjC,UAAA,AAAQ,wBAAS,IAAI,SAAQ,IAAI;EAAC;qCAOjB,QAAe;AAAU,UAAA,AAAQ,wBAAS,MAAM,EAAE,KAAK;EAAC;iCAO1D,OAAc;AAAU,UAAA,AAAQ,sBAAO,KAAK,EAAE,KAAK;EAAC;6BAOvD;AAAS,UAAA,AAAQ,oBAAK,IAAI;EAAC;qDAKZ;AAAS,UAAA,AAAQ,gCAAiB,IAAI;EAAC;6CAW3C,MAAa;AACpC,UAAA,AAAQ,4BAAa,IAAI,EAAE,SAAS;EAAC;mCAoB1B;AAAQ,UAAA,AAAQ,uBAAQ,GAAG;EAAC;+BAsB1B;AAAS,UAAA,AAAQ,qBAAM,IAAI;EAAC;uCAsB5B;AAAQ,UAAA,AAAQ,yBAAU,GAAG;EAAC;;;AAlY5B,YAAA,AAAQ;IAAK;;AAU1B;AACJ;AACgB,QAAd,MAAU;;;AACV;AACA,cAAI,kBAAY,MAAM,MAAO;AACtB,UAAP;;;;AAKF,UAAQ,YAAJ,GAAG,EAAI,wBAAiB,MAAO;AACd,MAArB,wBAAkB,GAAG;AAErB,UAAmB,YAAT,uBAAkB;AACY,QAAtC,iBAA4B,cAAjB,AAAI,GAAD,SAAS;AACvB,cAAO;;AAEH,mBAAO,AAAI,GAAD;AAGV,wBAAY,AAAK,AAAO,IAAR,UAAU;AAC9B,cAAO,AAAI,AAAY,AAAO,IAAnB,QAAC,SAAS,MAAK,OAAO,AAAI,AAAY,IAAZ,QAAC,SAAS,MAAK;AACW,QAA/D,iBAAW,AAAU,SAAD,KAAI,IAAI,IAAI,GAAG,AAAK,IAAD,aAAW,GAAG,SAAS;AAC9D,cAAO;;IAEX;;AAewB,YAAA,AAAQ;IAAS;;;MAvE3B,WAAK;YAAG,6BAAqB;;MAG7B,aAAO;YAAG,6BAAqB;;MAM/B,SAAG;YAAG,6BAAqB;;MAO3B,aAAO;YAAG;;MA6CpB,qBAAe;;;;MAMZ,cAAQ","file":"../../../../../../../../../../../packages/path/src/path_set.dart.lib.js"}{"version":3,"sourceRoot":"","sources":["path_exception.dart"],"names":[],"mappings":";;;;;;;;;IAOS;;;;;;;AAIc,YAAA,AAAyB,8BAAR;IAAQ;;;IAF3B;;EAAQ","file":"../../../../../../../../../../../packages/path/src/path_exception.dart.lib.js"}{"version":3,"sourceRoot":"","sources":["characters.dart"],"names":[],"mappings":";;;;;;;;MAKM,eAAI;;;MACJ,gBAAK;;;MACL,iBAAM;;;MACN,gBAAK;;;MACL,eAAI;;;MACJ,eAAI;;;MACJ,gBAAK;;;MACL,iBAAM;;;MACN,iBAAM;;;MACN,iBAAM;;;MACN,iBAAM;;;MACN,oBAAS","file":"../../../../../../../../../../../packages/path/src/characters.dart.lib.js"}{"version":3,"sourceRoot":"","sources":["utils.dart"],"names":[],"mappings":";;;;;;;;6CAQsB;AAClB,UAAM,AAAyC,cAA9C,IAAI,WAAyB,aAAL,IAAI,WACvB,aAAL,IAAI,WAAyB,aAAL,IAAI;EAAiB;uCAG/B;AAAS,UAAK,AAAc,cAAnB,IAAI,WAAuB,aAAL,IAAI;EAAc;+CAI1C,MAAU;AAClC,QAAI,AAAK,AAAO,IAAR,UAAgB,aAAN,KAAK,IAAG,GAAG,MAAO;AACpC,mBAAK,mBAAa,AAAK,IAAD,cAAY,KAAK,KAAI,MAAO;AAClD,QAAI,AAAK,IAAD,cAAkB,aAAN,KAAK,IAAG,WAAmB,MAAO;AACtD,QAAI,AAAK,AAAO,IAAR,YAAiB,aAAN,KAAK,IAAG,GAAG,MAAO;AACrC,UAAO,AAAK,AAAsB,KAAvB,cAAkB,aAAN,KAAK,IAAG;EACjC","file":"../../../../../../../../../../../packages/path/src/utils.dart.lib.js"} \ No newline at end of file diff --git a/webdev/test/helpers/context.dart b/webdev/test/helpers/context.dart index 40f1a0d48a..9a449aa0ee 100644 --- a/webdev/test/helpers/context.dart +++ b/webdev/test/helpers/context.dart @@ -92,6 +92,7 @@ class BuildDaemonTestContext extends TestContext { canaryFeatures: testSettings.canaryFeatures, isFlutterApp: testSettings.isFlutterApp, experiments: testSettings.experiments, + useDebuggerModuleNames: testSettings.useDebuggerModuleNames, ); final options = [ @@ -329,6 +330,7 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { canaryFeatures: testSettings.canaryFeatures, isFlutterApp: testSettings.isFlutterApp, experiments: testSettings.experiments, + useDebuggerModuleNames: testSettings.useDebuggerModuleNames, ); final options = [ From 1645f8ce9cba917d55c707240f82701874cf61ab Mon Sep 17 00:00:00 2001 From: MarkZ Date: Fri, 14 Aug 2026 19:27:59 -0700 Subject: [PATCH 118/134] Fix duplicate daemon connection in BuildDaemonAndFrontendServerTestContext --- webdev/test/helpers/context.dart | 36 +------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/webdev/test/helpers/context.dart b/webdev/test/helpers/context.dart index 9a449aa0ee..13bff6789e 100644 --- a/webdev/test/helpers/context.dart +++ b/webdev/test/helpers/context.dart @@ -360,42 +360,7 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { '--verbose', '--build-filter=${project.directoryToServe}/**', ]; - daemonClient = await connectClient( - sdkLayout.dartPath, - project.absolutePackageDirectory, - options, - (log) { - final record = log.toLogRecord(); - final name = record.loggerName == '' ? '' : '${record.loggerName}: '; - _logger.log( - record.level, - '$name${record.message}', - record.error, - record.stackTrace, - ); - }, - ); - daemonClient.registerBuildTarget( - DefaultBuildTarget((b) => b..target = project.directoryToServe), - ); - daemonClient.startBuild(); - await waitForSuccessfulBuild(); - - final assetServerPort = daemonPort(project.absolutePackageDirectory); - _assetHandler = createBuildRunnerProxyHandler( - directoryToServe: project.directoryToServe, - client: client, - assetServerPort: assetServerPort, - ); - if (testSettings.moduleFormat == ModuleFormat.ddc && - buildSettings.canaryFeatures) { - _assetHandler = handleReloadedSources(_assetHandler); - } - _assetReader = ProxyServerAssetReader( - assetServerPort, - root: project.directoryToServe, - ); if (testSettings.enableExpressionEvaluation) { _logger.info('Starting Frontend Server Manager'); @@ -576,6 +541,7 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { daemonClient.startBuild(); await buildFuture; + final assetServerPort = daemonPort(project.absolutePackageDirectory); _assetHandler = _createBuildRunnerDdcLibraryBundleAssetHandler( this, From e8c3e7a5acf95374ee65fa3df1c5beaa3b108365 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Fri, 14 Aug 2026 23:06:18 -0700 Subject: [PATCH 119/134] Format files --- .../test/debug_extension_test.dart | 15 +- .../test/puppeteer/extension_common.dart | 241 +++---- .../test/puppeteer/test_utils.dart | 10 +- debug_extension/tool/build_extension.dart | 5 +- dwds_test_common/lib/fixtures/context.dart | 13 +- dwds_test_common/lib/fixtures/project.dart | 6 +- .../lib/frontend_server_common/devfs.dart | 5 +- .../frontend_server_client.dart | 6 +- .../lib/integration/chrome_proxy_service.dart | 655 ++++++++---------- .../lib/integration/debug_service.dart | 10 +- .../lib/integration/hot_restart.dart | 5 +- .../lib/integration/sdk_configuration.dart | 5 +- dwds_test_common/lib/logging.dart | 15 +- dwds_test_common/lib/sdk_asset_generator.dart | 1 + .../src/dartdevc_frontend_server_client.dart | 6 +- .../test/frontend_server_client_test.dart | 6 +- test_uri.dart | 4 +- webdev/lib/src/logging.dart | 15 +- webdev/lib/src/pubspec.dart | 10 +- ...asset_handler_ddc_library_bundle_test.dart | 1 + webdev/test/configuration_test.dart | 13 +- webdev/test/daemon/launch_app_common.dart | 1 + webdev/test/dds_port_amd_test.dart | 1 + .../dds_port_ddc_library_bundle_test.dart | 1 + webdev/test/e2e_common.dart | 6 +- webdev/test/helpers/context.dart | 17 +- .../proxy_server_asset_reader_amd_test.dart | 1 + ..._asset_reader_ddc_library_bundle_test.dart | 1 + 28 files changed, 494 insertions(+), 581 deletions(-) diff --git a/debug_extension/test/debug_extension_test.dart b/debug_extension/test/debug_extension_test.dart index 499bd48771..2856343f38 100644 --- a/debug_extension/test/debug_extension_test.dart +++ b/debug_extension/test/debug_extension_test.dart @@ -62,9 +62,8 @@ void main() async { group('Without encoding', () { setUp(() async { await context.setUp( - debugSettings: TestDebugSettings.withDevToolsLaunch( - context, - ).copyWith(enableDebugExtension: true, useSse: useSse), + debugSettings: TestDebugSettings.withDevToolsLaunch(context) + .copyWith(enableDebugExtension: true, useSse: useSse), ); await context.extensionConnection.sendCommand('Runtime.evaluate', { 'expression': 'fakeClick()', @@ -125,9 +124,8 @@ void main() async { group('With a sharded Dart app', () { setUp(() async { await context.setUp( - debugSettings: TestDebugSettings.withDevToolsLaunch( - context, - ).copyWith(enableDebugExtension: true, useSse: useSse), + debugSettings: TestDebugSettings.withDevToolsLaunch(context) + .copyWith(enableDebugExtension: true, useSse: useSse), ); final htmlTag = await context.webDriver.findElement( const By.tagName('html'), @@ -161,9 +159,8 @@ void main() async { group('With an internal Dart app', () { setUp(() async { await context.setUp( - debugSettings: TestDebugSettings.withDevToolsLaunch( - context, - ).copyWith(enableDebugExtension: true, useSse: false), + debugSettings: TestDebugSettings.withDevToolsLaunch(context) + .copyWith(enableDebugExtension: true, useSse: false), ); final htmlTag = await context.webDriver.findElement( const By.tagName('html'), diff --git a/debug_extension/test/puppeteer/extension_common.dart b/debug_extension/test/puppeteer/extension_common.dart index e9b077c174..1e2d4371f2 100644 --- a/debug_extension/test/puppeteer/extension_common.dart +++ b/debug_extension/test/puppeteer/extension_common.dart @@ -524,40 +524,37 @@ void testAll({required bool isMV3, required bool screenshotsEnabled}) { }, ); - test( - 'the correct extension panels are added to Chrome DevTools', - () async { - final chromeDevToolsPage = await getChromeDevToolsPage(browser); - // There are no hooks for when a panel is added to Chrome DevTools, - // therefore we rely on a slight delay: - await Future.delayed(Duration(seconds: 1)); - if (isFlutterApp) { - await _tabLeft(chromeDevToolsPage); - final inspectorPanelElement = await _getPanelElement( - browser, - panel: Panel.inspector, - elementSelector: '#panelBody', - ); - expect(inspectorPanelElement, isNotNull); - await _takeScreenshot( - chromeDevToolsPage, - screenshotName: 'inspectorPanelLandingPage_flutterApp', - ); - } + test('the correct extension panels are added to Chrome DevTools', () async { + final chromeDevToolsPage = await getChromeDevToolsPage(browser); + // There are no hooks for when a panel is added to Chrome DevTools, + // therefore we rely on a slight delay: + await Future.delayed(Duration(seconds: 1)); + if (isFlutterApp) { await _tabLeft(chromeDevToolsPage); - final debuggerPanelElement = await _getPanelElement( + final inspectorPanelElement = await _getPanelElement( browser, - panel: Panel.debugger, + panel: Panel.inspector, elementSelector: '#panelBody', ); - expect(debuggerPanelElement, isNotNull); + expect(inspectorPanelElement, isNotNull); await _takeScreenshot( chromeDevToolsPage, - screenshotName: - 'debuggerPanelLandingPage_${isFlutterApp ? 'flutterApp' : 'dartApp'}', + screenshotName: 'inspectorPanelLandingPage_flutterApp', ); - }, - ); + } + await _tabLeft(chromeDevToolsPage); + final debuggerPanelElement = await _getPanelElement( + browser, + panel: Panel.debugger, + elementSelector: '#panelBody', + ); + expect(debuggerPanelElement, isNotNull); + await _takeScreenshot( + chromeDevToolsPage, + screenshotName: + 'debuggerPanelLandingPage_${isFlutterApp ? 'flutterApp' : 'dartApp'}', + ); + }); test('Dart DevTools is embedded for debug session lifetime', () async { final chromeDevToolsPage = await getChromeDevToolsPage(browser); @@ -623,104 +620,95 @@ void testAll({required bool isMV3, required bool screenshotsEnabled}) { // origin, and being able to connect to the embedded Dart app. // See https://github.com/dart-lang/webdev/issues/1779 - test( - 'The Dart DevTools IFRAME has the correct query parameters and path', - () async { - final chromeDevToolsPage = await getChromeDevToolsPage(browser); - // There are no hooks for when a panel is added to Chrome DevTools, - // therefore we rely on a slight delay: - await Future.delayed(Duration(seconds: 1)); - // Navigate to the Dart Debugger panel: + test('The Dart DevTools IFRAME has the correct query parameters and path', () async { + final chromeDevToolsPage = await getChromeDevToolsPage(browser); + // There are no hooks for when a panel is added to Chrome DevTools, + // therefore we rely on a slight delay: + await Future.delayed(Duration(seconds: 1)); + // Navigate to the Dart Debugger panel: + await _tabLeft(chromeDevToolsPage); + if (isFlutterApp) { await _tabLeft(chromeDevToolsPage); - if (isFlutterApp) { - await _tabLeft(chromeDevToolsPage); - } - await _clickLaunchButton(browser, panel: Panel.debugger); - // Expect the Dart DevTools IFRAME to be added: - final devToolsUrlFragment = - 'ide=ChromeDevTools&embed=true&page=debugger'; - final iframeTarget = await browser.waitForTarget( - (target) => target.url.contains(devToolsUrlFragment), - ); - final iframeUrl = iframeTarget.url; - // Expect the correct query parameters to be on the IFRAME url: - final uri = Uri.parse(iframeUrl); - final queryParameters = uri.queryParameters; - expect( - queryParameters.keys, - unorderedMatches([ - 'uri', - 'ide', - 'embed', - 'page', - 'backgroundColor', - ]), - ); - expect(queryParameters, containsPair('ide', 'ChromeDevTools')); - expect(queryParameters, containsPair('uri', isNotEmpty)); - expect(queryParameters, containsPair('page', isNotEmpty)); - expect( - queryParameters, - containsPair('backgroundColor', isNotEmpty), - ); - expect(uri.path, equals('/')); - }, - ); + } + await _clickLaunchButton(browser, panel: Panel.debugger); + // Expect the Dart DevTools IFRAME to be added: + final devToolsUrlFragment = + 'ide=ChromeDevTools&embed=true&page=debugger'; + final iframeTarget = await browser.waitForTarget( + (target) => target.url.contains(devToolsUrlFragment), + ); + final iframeUrl = iframeTarget.url; + // Expect the correct query parameters to be on the IFRAME url: + final uri = Uri.parse(iframeUrl); + final queryParameters = uri.queryParameters; + expect( + queryParameters.keys, + unorderedMatches([ + 'uri', + 'ide', + 'embed', + 'page', + 'backgroundColor', + ]), + ); + expect(queryParameters, containsPair('ide', 'ChromeDevTools')); + expect(queryParameters, containsPair('uri', isNotEmpty)); + expect(queryParameters, containsPair('page', isNotEmpty)); + expect( + queryParameters, + containsPair('backgroundColor', isNotEmpty), + ); + expect(uri.path, equals('/')); + }); - test( - 'Trying to debug a page with multiple Dart apps shows warning', - () async { - final chromeDevToolsPage = await getChromeDevToolsPage(browser); - // There are no hooks for when a panel is added to Chrome DevTools, - // therefore we rely on a slight delay: - await Future.delayed(Duration(seconds: 1)); - // Navigate to the Dart Debugger panel: + test('Trying to debug a page with multiple Dart apps shows warning', () async { + final chromeDevToolsPage = await getChromeDevToolsPage(browser); + // There are no hooks for when a panel is added to Chrome DevTools, + // therefore we rely on a slight delay: + await Future.delayed(Duration(seconds: 1)); + // Navigate to the Dart Debugger panel: + await _tabLeft(chromeDevToolsPage); + if (isFlutterApp) { await _tabLeft(chromeDevToolsPage); - if (isFlutterApp) { - await _tabLeft(chromeDevToolsPage); - } - // Expect there to be no warning banner: - var warningMsg = await _evaluateInPanel( - browser, - panel: Panel.debugger, - jsExpression: 'document.querySelector("#warningMsg").innerHTML', - ); - expect( - warningMsg == 'Cannot debug multiple apps in a page.', - isFalse, - ); - // Set the 'data-multiple-dart-apps' attribute on the DOM. - await appTab.evaluate(_setMultipleAppsAttributeJs); - final appTabId = await _getCurrentTabId( - worker: worker, - backgroundPage: backgroundPage, - ); - // Expect multiple apps info to be saved in storage: - final storageKey = '$appTabId-multipleAppsDetected'; - final multipleAppsDetected = await _fetchStorageObj( - storageKey, - storageArea: 'session', - worker: worker, - backgroundPage: backgroundPage, - ); - expect(multipleAppsDetected, equals('true')); - // Expect there to be a warning banner: - warningMsg = await _evaluateInPanel( - browser, - panel: Panel.debugger, - jsExpression: 'document.querySelector("#warningMsg").innerHTML', - ); - await _takeScreenshot( - chromeDevToolsPage, - screenshotName: - 'debuggerMultipleAppsDetected_${isFlutterApp ? 'flutterApp' : 'dartApp'}', - ); - expect( - warningMsg, - equals('Cannot debug multiple apps in a page.'), - ); - }, - ); + } + // Expect there to be no warning banner: + var warningMsg = await _evaluateInPanel( + browser, + panel: Panel.debugger, + jsExpression: 'document.querySelector("#warningMsg").innerHTML', + ); + expect( + warningMsg == 'Cannot debug multiple apps in a page.', + isFalse, + ); + // Set the 'data-multiple-dart-apps' attribute on the DOM. + await appTab.evaluate(_setMultipleAppsAttributeJs); + final appTabId = await _getCurrentTabId( + worker: worker, + backgroundPage: backgroundPage, + ); + // Expect multiple apps info to be saved in storage: + final storageKey = '$appTabId-multipleAppsDetected'; + final multipleAppsDetected = await _fetchStorageObj( + storageKey, + storageArea: 'session', + worker: worker, + backgroundPage: backgroundPage, + ); + expect(multipleAppsDetected, equals('true')); + // Expect there to be a warning banner: + warningMsg = await _evaluateInPanel( + browser, + panel: Panel.debugger, + jsExpression: 'document.querySelector("#warningMsg").innerHTML', + ); + await _takeScreenshot( + chromeDevToolsPage, + screenshotName: + 'debuggerMultipleAppsDetected_${isFlutterApp ? 'flutterApp' : 'dartApp'}', + ); + expect(warningMsg, equals('Cannot debug multiple apps in a page.')); + }); }); } }); @@ -928,11 +916,10 @@ Future _tabLeft(Page chromeDevToolsPage) async { Future _getCurrentTabId({Worker? worker, Page? backgroundPage}) async { return (await evaluate( - _currentTabIdJs, - worker: worker, - backgroundPage: backgroundPage, - )) - as int; + _currentTabIdJs, + worker: worker, + backgroundPage: backgroundPage, + )) as int; } Future _fetchStorageObj( diff --git a/debug_extension/test/puppeteer/test_utils.dart b/debug_extension/test/puppeteer/test_utils.dart index e001cbc7e5..c8b09bcc46 100644 --- a/debug_extension/test/puppeteer/test_utils.dart +++ b/debug_extension/test/puppeteer/test_utils.dart @@ -46,9 +46,8 @@ Future setUpExtensionTest( workspaceName: workspaceName, ), debugSettings: serveDevTools - ? TestDebugSettings.withDevToolsLaunch( - context, - ).copyWith(enableDebugExtension: true, useSse: useSse) + ? TestDebugSettings.withDevToolsLaunch(context) + .copyWith(enableDebugExtension: true, useSse: useSse) : TestDebugSettings.noDevToolsLaunch().copyWith( enableDebugExtension: true, useSse: useSse, @@ -181,9 +180,8 @@ Future navigateToPage( String getExtensionOrigin(Browser browser) { final chromeExtension = 'chrome-extension:'; - final extensionUrl = _getUrlsInBrowser( - browser, - ).firstWhere((url) => url.contains(chromeExtension)); + final extensionUrl = _getUrlsInBrowser(browser) + .firstWhere((url) => url.contains(chromeExtension)); final urlSegments = p.split(extensionUrl); final extensionId = urlSegments[urlSegments.indexOf(chromeExtension) + 1]; return '$chromeExtension//$extensionId'; diff --git a/debug_extension/tool/build_extension.dart b/debug_extension/tool/build_extension.dart index f5c1d7a01d..c856281ad6 100644 --- a/debug_extension/tool/build_extension.dart +++ b/debug_extension/tool/build_extension.dart @@ -49,9 +49,8 @@ Future run({required bool isProd}) async { } _logInfo('Copying manifest.json to /compiled directory'); try { - File( - p.join('web', 'manifest.json'), - ).copySync(p.join('compiled', 'manifest.json')); + File(p.join('web', 'manifest.json')) + .copySync(p.join('compiled', 'manifest.json')); } catch (error) { _logWarning('Copying manifest file failed: $error'); // Return non-zero exit code to indicate failure: diff --git a/dwds_test_common/lib/fixtures/context.dart b/dwds_test_common/lib/fixtures/context.dart index bc88dc220e..ad264c5229 100644 --- a/dwds_test_common/lib/fixtures/context.dart +++ b/dwds_test_common/lib/fixtures/context.dart @@ -55,8 +55,10 @@ Matcher isRPCErrorWithCode(int code) => isA().having((RPCError e) => e.code, 'code', equals(code)); Matcher throwsRPCErrorWithCode(int code) => throwsA(isRPCErrorWithCode(code)); -typedef TestContextFactory = - TestContext Function(TestProject, TestSdkConfigurationProvider); +typedef TestContextFactory = TestContext Function( + TestProject, + TestSdkConfigurationProvider, +); abstract class TestContext { static const reloadedSourcesFileName = 'reloaded_sources.json'; @@ -624,9 +626,10 @@ abstract 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_common/lib/fixtures/project.dart b/dwds_test_common/lib/fixtures/project.dart index f05df37357..4552cc738e 100644 --- a/dwds_test_common/lib/fixtures/project.dart +++ b/dwds_test_common/lib/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')) { diff --git a/dwds_test_common/lib/frontend_server_common/devfs.dart b/dwds_test_common/lib/frontend_server_common/devfs.dart index a9991f4736..dc566dba2a 100644 --- a/dwds_test_common/lib/frontend_server_common/devfs.dart +++ b/dwds_test_common/lib/frontend_server_common/devfs.dart @@ -266,9 +266,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_common/lib/frontend_server_common/frontend_server_client.dart b/dwds_test_common/lib/frontend_server_common/frontend_server_client.dart index ccfce39b3a..7c486ed687 100644 --- a/dwds_test_common/lib/frontend_server_common/frontend_server_client.dart +++ b/dwds_test_common/lib/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_common/lib/integration/chrome_proxy_service.dart b/dwds_test_common/lib/integration/chrome_proxy_service.dart index 23dada420d..d3d3e1f3a1 100644 --- a/dwds_test_common/lib/integration/chrome_proxy_service.dart +++ b/dwds_test_common/lib/integration/chrome_proxy_service.dart @@ -468,11 +468,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 { @@ -636,12 +635,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([ @@ -683,42 +680,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); @@ -731,9 +727,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); @@ -748,13 +746,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'); @@ -762,9 +758,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'); @@ -789,21 +787,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); @@ -815,21 +809,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); @@ -842,21 +832,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); @@ -866,21 +852,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); @@ -894,21 +876,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); @@ -921,21 +899,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); @@ -947,21 +921,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); @@ -971,17 +941,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); @@ -996,17 +966,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); @@ -1017,17 +987,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); @@ -1041,12 +1011,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); @@ -1062,21 +1037,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); @@ -1090,21 +1061,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); @@ -1114,21 +1081,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); @@ -1138,21 +1101,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); @@ -1164,21 +1123,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); @@ -1190,21 +1145,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); @@ -1215,14 +1166,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([ @@ -1271,14 +1220,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([ @@ -1325,63 +1272,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'); @@ -1741,9 +1676,8 @@ void runTests({ }); test('break on exceptions with setIsolatePauseMode', () async { - final oldPauseMode = (await service.getIsolate( - isolateId!, - )).exceptionPauseMode; + final oldPauseMode = (await service.getIsolate(isolateId!)) + .exceptionPauseMode; await service.setIsolatePauseMode( isolateId!, exceptionPauseMode: ExceptionPauseMode.kAll, @@ -1811,9 +1745,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 { @@ -2076,12 +2012,14 @@ void runTests({ final vm = await service.getVM(); final isolateId = vm.isolates!.first.id!; - final resolvedUris = await service - .lookupResolvedPackageUris(isolateId, [ - 'package:does/not/exist.dart', - 'dart:does_not_exist', - 'file:///does_not_exist.dart', - ]); + final resolvedUris = await service.lookupResolvedPackageUris( + isolateId, + [ + 'package:does/not/exist.dart', + 'dart:does_not_exist', + 'file:///does_not_exist.dart', + ], + ); expect(resolvedUris.uris, [null, null, null]); }, ); @@ -2577,9 +2515,8 @@ void runTests({ predicate( (Event event) => event.kind == EventKind.kWriteEvent && - String.fromCharCodes( - base64.decode(event.bytes!), - ).contains('hello'), + String.fromCharCodes(base64.decode(event.bytes!)) + .contains('hello'), ), ), ); @@ -2595,9 +2532,8 @@ void runTests({ predicate( (Event event) => event.kind == EventKind.kWriteEvent && - String.fromCharCodes( - base64.decode(event.bytes!), - ).contains('Error'), + String.fromCharCodes(base64.decode(event.bytes!)) + .contains('Error'), ), ), ); @@ -2613,9 +2549,8 @@ void runTests({ predicate( (Event event) => event.kind == EventKind.kWriteEvent && - String.fromCharCodes( - base64.decode(event.bytes!), - ).contains('main.dart'), + String.fromCharCodes(base64.decode(event.bytes!)) + .contains('main.dart'), ), ), ); diff --git a/dwds_test_common/lib/integration/debug_service.dart b/dwds_test_common/lib/integration/debug_service.dart index 2cf62dc5f4..f3de241881 100644 --- a/dwds_test_common/lib/integration/debug_service.dart +++ b/dwds_test_common/lib/integration/debug_service.dart @@ -49,9 +49,8 @@ void testAll({ test('Accepts connections with the auth token', () async { expect( - vmServiceConnectUri( - '${context.debugConnection.uri}/ws', - ).then((client) => client.dispose()), + vmServiceConnectUri('${context.debugConnection.uri}/ws') + .then((client) => client.dispose()), completes, ); }); @@ -75,9 +74,8 @@ void testAll({ // However, once DDS is disconnected, additional clients can connect again. await fakeDds.dispose(); expect( - vmServiceConnectUri( - '${context.debugConnection.uri}/ws', - ).then((client) => client.dispose()), + vmServiceConnectUri('${context.debugConnection.uri}/ws') + .then((client) => client.dispose()), completes, ); }); diff --git a/dwds_test_common/lib/integration/hot_restart.dart b/dwds_test_common/lib/integration/hot_restart.dart index 96597cfaf3..19290380dd 100644 --- a/dwds_test_common/lib/integration/hot_restart.dart +++ b/dwds_test_common/lib/integration/hot_restart.dart @@ -313,9 +313,8 @@ void runTests({ final eventsDone = expectLater( client.onIsolateEvent, emitsThrough( - _hasKind( - EventKind.kServiceExtensionAdded, - ).having((e) => e.extensionRPC, 'service', 'ext.bar'), + _hasKind(EventKind.kServiceExtensionAdded) + .having((e) => e.extensionRPC, 'service', 'ext.bar'), ), ); diff --git a/dwds_test_common/lib/integration/sdk_configuration.dart b/dwds_test_common/lib/integration/sdk_configuration.dart index 5d30e29ae2..2cd8dc213b 100644 --- a/dwds_test_common/lib/integration/sdk_configuration.dart +++ b/dwds_test_common/lib/integration/sdk_configuration.dart @@ -65,9 +65,8 @@ void runIndependentTests() { final workerDir = p.dirname(compilerWorkerPath); Directory(workerDir).createSync(recursive: true); - File( - defaultSdkConfiguration.compilerWorkerPath!, - ).copySync(compilerWorkerPath); + File(defaultSdkConfiguration.compilerWorkerPath!) + .copySync(compilerWorkerPath); expect(sdkConfiguration.sdkDirectory, equals(sdkDirectory)); expect(sdkConfiguration.sdkSummaryPath, equals(sdkSummaryPath)); diff --git a/dwds_test_common/lib/logging.dart b/dwds_test_common/lib/logging.dart index 1d870b0859..a6b868d8a9 100644 --- a/dwds_test_common/lib/logging.dart +++ b/dwds_test_common/lib/logging.dart @@ -7,14 +7,13 @@ import 'dart:async'; import 'package:logging/logging.dart'; import 'package:test/test.dart'; -typedef LogWriter = - void Function( - Level level, - String message, { - String? error, - String? loggerName, - String? stackTrace, - }); +typedef LogWriter = void Function( + Level level, + String message, { + String? error, + String? loggerName, + String? stackTrace, +}); StreamSubscription? _loggerSub; diff --git a/dwds_test_common/lib/sdk_asset_generator.dart b/dwds_test_common/lib/sdk_asset_generator.dart index ea1f06ed01..ec3b4f273d 100644 --- a/dwds_test_common/lib/sdk_asset_generator.dart +++ b/dwds_test_common/lib/sdk_asset_generator.dart @@ -6,6 +6,7 @@ import 'package:file/file.dart'; import 'package:file/local.dart'; import 'package:logging/logging.dart'; import 'package:path/path.dart' as p; + import 'test_sdk_layout.dart'; /// Generates sdk.js, sdk.map, files. diff --git a/frontend_server_client/lib/src/dartdevc_frontend_server_client.dart b/frontend_server_client/lib/src/dartdevc_frontend_server_client.dart index 8403226c2f..d86fc3d4ac 100644 --- a/frontend_server_client/lib/src/dartdevc_frontend_server_client.dart +++ b/frontend_server_client/lib/src/dartdevc_frontend_server_client.dart @@ -120,9 +120,9 @@ class DartDevcFrontendServerClient implements FrontendServerClient { if (result.dillOutput == null) { return; } - final manifest = - jsonDecode(File(result.jsManifestOutput!).readAsStringSync()) - as Map; + final manifest = jsonDecode( + File(result.jsManifestOutput!).readAsStringSync(), + ) as Map; final sourceBytes = File(result.jsSourcesOutput!).readAsBytesSync(); final sourceMapBytes = File(result.jsSourceMapsOutput!).readAsBytesSync(); diff --git a/frontend_server_client/test/frontend_server_client_test.dart b/frontend_server_client/test/frontend_server_client_test.dart index 7e3d4752b3..e48d310d02 100644 --- a/frontend_server_client/test/frontend_server_client_test.dart +++ b/frontend_server_client/test/frontend_server_client_test.dart @@ -340,9 +340,9 @@ void main() { test('can support custom librariesSpec', () async { final defaultLibrariesJson = File(p.join(sdkDir, 'lib', 'libraries.json')); - final libraries = - jsonDecode(defaultLibrariesJson.readAsStringSync()) - as Map; + final libraries = jsonDecode( + defaultLibrariesJson.readAsStringSync(), + ) as Map; // Create the custom library file final customLibFile = File(p.join(packageRoot, 'bin', 'custom_lib.dart')); diff --git a/test_uri.dart b/test_uri.dart index 985727269f..65c3e86721 100644 --- a/test_uri.dart +++ b/test_uri.dart @@ -1,7 +1,9 @@ import 'dart:io'; void main() { - final uri = Uri.parse('file:///Users/markzipan/Projects/webdev/dwds_test_common/lib/fixtures/context.dart'); + final uri = Uri.parse( + 'file:///Users/markzipan/Projects/webdev/dwds_test_common/lib/fixtures/context.dart', + ); print('Base: $uri'); print('..: ${uri.resolve('..')}'); print('../..: ${uri.resolve('../..')}'); diff --git a/webdev/lib/src/logging.dart b/webdev/lib/src/logging.dart index 6e65dff6d0..ea0ed8553f 100644 --- a/webdev/lib/src/logging.dart +++ b/webdev/lib/src/logging.dart @@ -8,14 +8,13 @@ import 'dart:io'; import 'package:io/ansi.dart'; import 'package:logging/logging.dart'; -typedef LogWriter = - void Function( - Level level, - String message, { - String? error, - String? loggerName, - String? stackTrace, - }); +typedef LogWriter = void Function( + Level level, + String message, { + String? error, + String? loggerName, + String? stackTrace, +}); var _verbose = false; StreamSubscription? _subscription; diff --git a/webdev/lib/src/pubspec.dart b/webdev/lib/src/pubspec.dart index c2bc6ec53d..f5c885731c 100644 --- a/webdev/lib/src/pubspec.dart +++ b/webdev/lib/src/pubspec.dart @@ -91,13 +91,9 @@ class PubspecLock { dir = next; } - final pubspecLock = - loadYaml( - await File( - p.relative(p.join(dir, 'pubspec.lock')), - ).readAsString(), - ) - as YamlMap; + final pubspecLock = loadYaml( + await File(p.relative(p.join(dir, 'pubspec.lock'))).readAsString(), + ) as YamlMap; final packages = pubspecLock['packages'] as YamlMap?; return PubspecLock(packages); diff --git a/webdev/test/asset_handler_ddc_library_bundle_test.dart b/webdev/test/asset_handler_ddc_library_bundle_test.dart index aaa97ad92a..367d8ce9f6 100644 --- a/webdev/test/asset_handler_ddc_library_bundle_test.dart +++ b/webdev/test/asset_handler_ddc_library_bundle_test.dart @@ -9,6 +9,7 @@ import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/integration/asset_handler.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'helpers/context.dart'; void main() { diff --git a/webdev/test/configuration_test.dart b/webdev/test/configuration_test.dart index a9d46c721d..3e7a379c88 100644 --- a/webdev/test/configuration_test.dart +++ b/webdev/test/configuration_test.dart @@ -130,14 +130,11 @@ void main() { ); }); - test( - 'webHotReload coerces canaryFeatures to true and moduleFormat to ddc if not set', - () { - final configuration = Configuration(webHotReload: true); - expect(configuration.canaryFeatures, isTrue); - expect(configuration.moduleFormat, equals('ddc')); - }, - ); + test('webHotReload coerces canaryFeatures to true and moduleFormat to ddc if not set', () { + final configuration = Configuration(webHotReload: true); + expect(configuration.canaryFeatures, isTrue); + expect(configuration.moduleFormat, equals('ddc')); + }); test('webHotReload + canaryFeatures false throws', () { expect( diff --git a/webdev/test/daemon/launch_app_common.dart b/webdev/test/daemon/launch_app_common.dart index 43b68556b0..e8af6b7f29 100644 --- a/webdev/test/daemon/launch_app_common.dart +++ b/webdev/test/daemon/launch_app_common.dart @@ -6,6 +6,7 @@ library; import 'dart:io'; + import 'package:path/path.dart' as p; import 'package:test/test.dart'; diff --git a/webdev/test/dds_port_amd_test.dart b/webdev/test/dds_port_amd_test.dart index 7d3b381f14..7fe4ce6425 100644 --- a/webdev/test/dds_port_amd_test.dart +++ b/webdev/test/dds_port_amd_test.dart @@ -9,6 +9,7 @@ library; import 'package:dwds_test_common/integration/dds_port.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'helpers/context.dart'; void main() { diff --git a/webdev/test/dds_port_ddc_library_bundle_test.dart b/webdev/test/dds_port_ddc_library_bundle_test.dart index 77a8e025d5..77f0e9883c 100644 --- a/webdev/test/dds_port_ddc_library_bundle_test.dart +++ b/webdev/test/dds_port_ddc_library_bundle_test.dart @@ -10,6 +10,7 @@ import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/integration/dds_port.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'helpers/context.dart'; void main() { diff --git a/webdev/test/e2e_common.dart b/webdev/test/e2e_common.dart index b7c2205a53..0d665400d8 100644 --- a/webdev/test/e2e_common.dart +++ b/webdev/test/e2e_common.dart @@ -61,9 +61,9 @@ void e2eTests({required TestRunner testRunner}) { tearDownAll(testRunner.tearDownAll); test('smoke test is configured properly', () async { - final smokeYaml = - loadYaml(await File('$exampleDirectory/pubspec.yaml').readAsString()) - as YamlMap; + final smokeYaml = loadYaml( + await File('$exampleDirectory/pubspec.yaml').readAsString(), + ) as YamlMap; final webdevYaml = loadYaml(await File('pubspec.yaml').readAsString()) as YamlMap; expect( diff --git a/webdev/test/helpers/context.dart b/webdev/test/helpers/context.dart index 13bff6789e..19ea0628f6 100644 --- a/webdev/test/helpers/context.dart +++ b/webdev/test/helpers/context.dart @@ -361,7 +361,6 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { '--build-filter=${project.directoryToServe}/**', ]; - if (testSettings.enableExpressionEvaluation) { _logger.info('Starting Frontend Server Manager'); final sdkDir = p.dirname(p.dirname(sdkLayout.dartPath)); @@ -389,9 +388,9 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { ); packagesFile.parent.createSync(recursive: true); - final originalJson = - jsonDecode(sourcePackagesFile.readAsStringSync()) - as Map; + final originalJson = jsonDecode( + sourcePackagesFile.readAsStringSync(), + ) as Map; final packagesList = originalJson['packages'] as List; for (final package in packagesList) { final packageMap = package as Map; @@ -414,12 +413,10 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { 'fes_manager.snapshot', ); - final buildWebCompilers = - packagesList.firstWhere( - (pkg) => (pkg as Map)['name'] == 'build_web_compilers', - orElse: () => null, - ) - as Map?; + final buildWebCompilers = packagesList.firstWhere( + (pkg) => (pkg as Map)['name'] == 'build_web_compilers', + orElse: () => null, + ) as Map?; String fesManagerPath; if (buildWebCompilers != null) { final pkgRootUri = Uri.parse(buildWebCompilers['rootUri'] as String); diff --git a/webdev/test/proxy_server_asset_reader_amd_test.dart b/webdev/test/proxy_server_asset_reader_amd_test.dart index 5005fdf085..88b2339b4a 100644 --- a/webdev/test/proxy_server_asset_reader_amd_test.dart +++ b/webdev/test/proxy_server_asset_reader_amd_test.dart @@ -9,6 +9,7 @@ import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/integration/readers/proxy_server_asset_reader.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'helpers/context.dart'; void main() { diff --git a/webdev/test/proxy_server_asset_reader_ddc_library_bundle_test.dart b/webdev/test/proxy_server_asset_reader_ddc_library_bundle_test.dart index 43d7b398dc..5791aee05c 100644 --- a/webdev/test/proxy_server_asset_reader_ddc_library_bundle_test.dart +++ b/webdev/test/proxy_server_asset_reader_ddc_library_bundle_test.dart @@ -9,6 +9,7 @@ import 'package:dwds/expression_compiler.dart'; import 'package:dwds_test_common/integration/readers/proxy_server_asset_reader.dart'; import 'package:dwds_test_common/test_sdk_configuration.dart'; import 'package:test/test.dart'; + import 'helpers/context.dart'; void main() { From e7efd9e1a5aee087990cf749de3ca1de4ee88423 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Sat, 15 Aug 2026 00:38:49 -0700 Subject: [PATCH 120/134] Resolve standard Windows Chrome installation paths in context.dart --- dwds_test_common/lib/fixtures/context.dart | 46 +++++++++++++++++++--- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/dwds_test_common/lib/fixtures/context.dart b/dwds_test_common/lib/fixtures/context.dart index ad264c5229..d02a254105 100644 --- a/dwds_test_common/lib/fixtures/context.dart +++ b/dwds_test_common/lib/fixtures/context.dart @@ -702,8 +702,44 @@ String _resolveChromeDriverExecutable() => _resolveExecutable( fallbackName: _chromeDriverName, ); -String _resolveChromeExecutable() => _resolveExecutable( - environmentKeys: const ['CHROME_EXECUTABLE', 'CHROME_PATH'], - sdkRelativePath: 'third_party/browsers/chrome/chrome/$_chromeExecutableName', - fallbackName: _chromeExecutableName, -); +String _resolveChromeExecutable() { + for (final env in const ['CHROME_EXECUTABLE', 'CHROME_PATH']) { + if (Platform.environment.containsKey(env)) { + return Platform.environment[env]!; + } + } + final sdkPath = _sdkRoot + .resolve('third_party/browsers/chrome/chrome/$_chromeExecutableName') + .toFilePath(); + if (File(sdkPath).existsSync()) { + return sdkPath; + } + if (Platform.isWindows) { + final defaultWindowsPaths = [ + if (Platform.environment.containsKey('PROGRAMFILES')) + p.join( + Platform.environment['PROGRAMFILES']!, + r'Google\Chrome\Application\chrome.exe', + ), + if (Platform.environment.containsKey('PROGRAMFILES(X86)')) + p.join( + Platform.environment['PROGRAMFILES(X86)']!, + r'Google\Chrome\Application\chrome.exe', + ), + if (Platform.environment.containsKey('LOCALAPPDATA')) + p.join( + Platform.environment['LOCALAPPDATA']!, + r'Google\Chrome\Application\chrome.exe', + ), + r'C:\Program Files\Google\Chrome\Application\chrome.exe', + r'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe', + ]; + for (final path in defaultWindowsPaths) { + if (File(path).existsSync()) { + return path; + } + } + return 'chrome.exe'; + } + return _chromeExecutableName; +} From 33293422731f33f2e414f785bb661fd4c73d3f18 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Sat, 15 Aug 2026 01:49:18 -0700 Subject: [PATCH 121/134] Pass provider moduleFormat and canaryFeatures to TestSettings in dart_uri_file_uri tests --- dwds_test_common/lib/fixtures/context.dart | 7 +++++++ dwds_test_common/lib/integration/dart_uri_file_uri.dart | 4 +++- .../dart_uri_file_uri_debugger_module_names.dart | 4 +++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/dwds_test_common/lib/fixtures/context.dart b/dwds_test_common/lib/fixtures/context.dart index d02a254105..11267c7cfa 100644 --- a/dwds_test_common/lib/fixtures/context.dart +++ b/dwds_test_common/lib/fixtures/context.dart @@ -741,5 +741,12 @@ String _resolveChromeExecutable() { } return 'chrome.exe'; } + if (Platform.isMacOS) { + const defaultMacPath = + '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'; + if (File(defaultMacPath).existsSync()) { + return defaultMacPath; + } + } return _chromeExecutableName; } diff --git a/dwds_test_common/lib/integration/dart_uri_file_uri.dart b/dwds_test_common/lib/integration/dart_uri_file_uri.dart index 9d9fa57cbf..dd00b126d8 100644 --- a/dwds_test_common/lib/integration/dart_uri_file_uri.dart +++ b/dwds_test_common/lib/integration/dart_uri_file_uri.dart @@ -32,7 +32,9 @@ void testAll({ setUpAll(() async { await context.setUp( - testSettings: const TestSettings( + testSettings: TestSettings( + canaryFeatures: provider.canaryFeatures, + moduleFormat: provider.ddcModuleFormat, useDebuggerModuleNames: useDebuggerModuleNames, ), ); diff --git a/dwds_test_common/lib/integration/dart_uri_file_uri_debugger_module_names.dart b/dwds_test_common/lib/integration/dart_uri_file_uri_debugger_module_names.dart index 9e1c30d0a6..ec9b3264d6 100644 --- a/dwds_test_common/lib/integration/dart_uri_file_uri_debugger_module_names.dart +++ b/dwds_test_common/lib/integration/dart_uri_file_uri_debugger_module_names.dart @@ -32,7 +32,9 @@ void testAll({ setUpAll(() async { await context.setUp( - testSettings: const TestSettings( + testSettings: TestSettings( + canaryFeatures: provider.canaryFeatures, + moduleFormat: provider.ddcModuleFormat, useDebuggerModuleNames: useDebuggerModuleNames, ), ); From 7da81798b57defa77da4eeb850856fc82f39cdf0 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Sat, 15 Aug 2026 02:09:39 -0700 Subject: [PATCH 122/134] Improve waitForAppId error reporting and diagnostic output --- webdev/test/daemon/utils.dart | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/webdev/test/daemon/utils.dart b/webdev/test/daemon/utils.dart index b760eabc44..6909191bb8 100644 --- a/webdev/test/daemon/utils.dart +++ b/webdev/test/daemon/utils.dart @@ -19,18 +19,26 @@ Future exitWebdev(TestProcess webdev) async { } Future waitForAppId(TestProcess webdev) async { - var appId = ''; + final stdoutLines = []; while (await webdev.stdout.hasNext) { var line = await webdev.stdout.next; + stdoutLines.add(line); if (line.startsWith('[{"event":"app.started"')) { line = line.substring(1, line.length - 1); final message = json.decode(line) as Map; - appId = message['params']['appId'] as String; - break; + final appId = message['params']['appId'] as String; + if (appId.isNotEmpty) return appId; } } - assert(appId.isNotEmpty); - return appId; + final stderrLines = []; + while (await webdev.stderr.hasNext) { + stderrLines.add(await webdev.stderr.next); + } + throw StateError( + 'Failed to receive "app.started" event before process stdout closed.\n' + 'Captured stdout:\n${stdoutLines.join('\n')}\n' + 'Captured stderr:\n${stderrLines.join('\n')}', + ); } String? getDebugServiceUri(String line) { From c6d1b4eb0e29f3c0ffd04d167bd63ccd8063ba01 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Sat, 15 Aug 2026 03:24:11 -0700 Subject: [PATCH 123/134] Fix appServerPath in dart_uri_file_uri and reset _expressionCompiler in BuildDaemonTestContext --- dwds_test_common/lib/integration/dart_uri_file_uri.dart | 6 +++--- .../dart_uri_file_uri_debugger_module_names.dart | 6 +++--- webdev/test/helpers/context.dart | 4 ++++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/dwds_test_common/lib/integration/dart_uri_file_uri.dart b/dwds_test_common/lib/integration/dart_uri_file_uri.dart index dd00b126d8..b57027dd59 100644 --- a/dwds_test_common/lib/integration/dart_uri_file_uri.dart +++ b/dwds_test_common/lib/integration/dart_uri_file_uri.dart @@ -22,9 +22,9 @@ void testAll({ group('Debugger module names: false |', () { const useDebuggerModuleNames = false; - final appServerPath = context.usesFrontendServer - ? 'web/main.dart' - : 'main.dart'; + final appServerPath = context.usesBuildDaemon + ? 'main.dart' + : 'web/main.dart'; final serverPath = 'packages/${testPackageProject.packageName}/test_library.dart'; final anotherServerPath = diff --git a/dwds_test_common/lib/integration/dart_uri_file_uri_debugger_module_names.dart b/dwds_test_common/lib/integration/dart_uri_file_uri_debugger_module_names.dart index ec9b3264d6..2dd5aea437 100644 --- a/dwds_test_common/lib/integration/dart_uri_file_uri_debugger_module_names.dart +++ b/dwds_test_common/lib/integration/dart_uri_file_uri_debugger_module_names.dart @@ -22,9 +22,9 @@ void testAll({ group('Debugger module names: true |', () { const useDebuggerModuleNames = true; - final appServerPath = context.usesFrontendServer - ? 'web/main.dart' - : 'main.dart'; + final appServerPath = context.usesBuildDaemon + ? 'main.dart' + : 'web/main.dart'; final serverPath = 'packages/${testPackageProject.packageDirectory}/lib/test_library.dart'; final anotherServerPath = diff --git a/webdev/test/helpers/context.dart b/webdev/test/helpers/context.dart index 19ea0628f6..2e724f65e2 100644 --- a/webdev/test/helpers/context.dart +++ b/webdev/test/helpers/context.dart @@ -168,6 +168,8 @@ class BuildDaemonTestContext extends TestContext { sdkConfigurationProvider: sdkConfigurationProvider, ); _expressionCompiler = ddcService; + } else { + _expressionCompiler = null; } _loadStrategy = switch (( @@ -210,6 +212,8 @@ class BuildDaemonTestContext extends TestContext { @override Future modeTearDown() async { await ddcService?.stop(); + ddcService = null; + _expressionCompiler = null; await daemonClient.close(); } From 33001a33f94c798e5cf85b1ce10374da7534a62b Mon Sep 17 00:00:00 2001 From: MarkZ Date: Sat, 15 Aug 2026 10:14:26 -0700 Subject: [PATCH 124/134] Format code with dart format --- dwds_test_common/lib/fixtures/context.dart | 13 +- dwds_test_common/lib/fixtures/project.dart | 6 +- .../lib/frontend_server_common/devfs.dart | 5 +- .../frontend_server_client.dart | 6 +- .../lib/integration/chrome_proxy_service.dart | 655 ++++++++++-------- .../lib/integration/debug_service.dart | 10 +- .../lib/integration/hot_restart.dart | 5 +- .../lib/integration/sdk_configuration.dart | 5 +- dwds_test_common/lib/logging.dart | 15 +- .../src/dartdevc_frontend_server_client.dart | 6 +- .../test/frontend_server_client_test.dart | 6 +- webdev/lib/src/logging.dart | 15 +- webdev/lib/src/pubspec.dart | 10 +- webdev/test/configuration_test.dart | 13 +- webdev/test/e2e_common.dart | 6 +- webdev/test/helpers/context.dart | 16 +- 16 files changed, 434 insertions(+), 358 deletions(-) diff --git a/dwds_test_common/lib/fixtures/context.dart b/dwds_test_common/lib/fixtures/context.dart index 11267c7cfa..64ac2fb007 100644 --- a/dwds_test_common/lib/fixtures/context.dart +++ b/dwds_test_common/lib/fixtures/context.dart @@ -55,10 +55,8 @@ Matcher isRPCErrorWithCode(int code) => isA().having((RPCError e) => e.code, 'code', equals(code)); Matcher throwsRPCErrorWithCode(int code) => throwsA(isRPCErrorWithCode(code)); -typedef TestContextFactory = TestContext Function( - TestProject, - TestSdkConfigurationProvider, -); +typedef TestContextFactory = + TestContext Function(TestProject, TestSdkConfigurationProvider); abstract class TestContext { static const reloadedSourcesFileName = 'reloaded_sources.json'; @@ -626,10 +624,9 @@ abstract 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_common/lib/fixtures/project.dart b/dwds_test_common/lib/fixtures/project.dart index 4552cc738e..f05df37357 100644 --- a/dwds_test_common/lib/fixtures/project.dart +++ b/dwds_test_common/lib/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')) { diff --git a/dwds_test_common/lib/frontend_server_common/devfs.dart b/dwds_test_common/lib/frontend_server_common/devfs.dart index dc566dba2a..a9991f4736 100644 --- a/dwds_test_common/lib/frontend_server_common/devfs.dart +++ b/dwds_test_common/lib/frontend_server_common/devfs.dart @@ -266,8 +266,9 @@ 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_common/lib/frontend_server_common/frontend_server_client.dart b/dwds_test_common/lib/frontend_server_common/frontend_server_client.dart index 7c486ed687..ccfce39b3a 100644 --- a/dwds_test_common/lib/frontend_server_common/frontend_server_client.dart +++ b/dwds_test_common/lib/frontend_server_common/frontend_server_client.dart @@ -24,10 +24,8 @@ 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_common/lib/integration/chrome_proxy_service.dart b/dwds_test_common/lib/integration/chrome_proxy_service.dart index d3d3e1f3a1..23dada420d 100644 --- a/dwds_test_common/lib/integration/chrome_proxy_service.dart +++ b/dwds_test_common/lib/integration/chrome_proxy_service.dart @@ -468,10 +468,11 @@ 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 { @@ -635,10 +636,12 @@ 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([ @@ -680,41 +683,42 @@ 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); @@ -727,11 +731,9 @@ 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); @@ -746,11 +748,13 @@ 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'); @@ -758,11 +762,9 @@ 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'); @@ -787,17 +789,21 @@ 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); @@ -809,17 +815,21 @@ 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); @@ -832,17 +842,21 @@ 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); @@ -852,17 +866,21 @@ 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); @@ -876,17 +894,21 @@ 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); @@ -899,17 +921,21 @@ 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); @@ -921,17 +947,21 @@ 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); @@ -941,17 +971,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); @@ -966,17 +996,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); @@ -987,17 +1017,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); @@ -1011,17 +1041,12 @@ 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); @@ -1037,17 +1062,21 @@ 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); @@ -1061,17 +1090,21 @@ 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); @@ -1081,17 +1114,21 @@ 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); @@ -1101,17 +1138,21 @@ 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); @@ -1123,17 +1164,21 @@ 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); @@ -1145,17 +1190,21 @@ 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); @@ -1166,12 +1215,14 @@ 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([ @@ -1220,12 +1271,14 @@ 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([ @@ -1272,51 +1325,63 @@ 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'); @@ -1676,8 +1741,9 @@ void runTests({ }); test('break on exceptions with setIsolatePauseMode', () async { - final oldPauseMode = (await service.getIsolate(isolateId!)) - .exceptionPauseMode; + final oldPauseMode = (await service.getIsolate( + isolateId!, + )).exceptionPauseMode; await service.setIsolatePauseMode( isolateId!, exceptionPauseMode: ExceptionPauseMode.kAll, @@ -1745,11 +1811,9 @@ 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 { @@ -2012,14 +2076,12 @@ void runTests({ final vm = await service.getVM(); final isolateId = vm.isolates!.first.id!; - final resolvedUris = await service.lookupResolvedPackageUris( - isolateId, - [ - 'package:does/not/exist.dart', - 'dart:does_not_exist', - 'file:///does_not_exist.dart', - ], - ); + final resolvedUris = await service + .lookupResolvedPackageUris(isolateId, [ + 'package:does/not/exist.dart', + 'dart:does_not_exist', + 'file:///does_not_exist.dart', + ]); expect(resolvedUris.uris, [null, null, null]); }, ); @@ -2515,8 +2577,9 @@ void runTests({ predicate( (Event event) => event.kind == EventKind.kWriteEvent && - String.fromCharCodes(base64.decode(event.bytes!)) - .contains('hello'), + String.fromCharCodes( + base64.decode(event.bytes!), + ).contains('hello'), ), ), ); @@ -2532,8 +2595,9 @@ void runTests({ predicate( (Event event) => event.kind == EventKind.kWriteEvent && - String.fromCharCodes(base64.decode(event.bytes!)) - .contains('Error'), + String.fromCharCodes( + base64.decode(event.bytes!), + ).contains('Error'), ), ), ); @@ -2549,8 +2613,9 @@ void runTests({ predicate( (Event event) => event.kind == EventKind.kWriteEvent && - String.fromCharCodes(base64.decode(event.bytes!)) - .contains('main.dart'), + String.fromCharCodes( + base64.decode(event.bytes!), + ).contains('main.dart'), ), ), ); diff --git a/dwds_test_common/lib/integration/debug_service.dart b/dwds_test_common/lib/integration/debug_service.dart index f3de241881..2cf62dc5f4 100644 --- a/dwds_test_common/lib/integration/debug_service.dart +++ b/dwds_test_common/lib/integration/debug_service.dart @@ -49,8 +49,9 @@ void testAll({ test('Accepts connections with the auth token', () async { expect( - vmServiceConnectUri('${context.debugConnection.uri}/ws') - .then((client) => client.dispose()), + vmServiceConnectUri( + '${context.debugConnection.uri}/ws', + ).then((client) => client.dispose()), completes, ); }); @@ -74,8 +75,9 @@ void testAll({ // However, once DDS is disconnected, additional clients can connect again. await fakeDds.dispose(); expect( - vmServiceConnectUri('${context.debugConnection.uri}/ws') - .then((client) => client.dispose()), + vmServiceConnectUri( + '${context.debugConnection.uri}/ws', + ).then((client) => client.dispose()), completes, ); }); diff --git a/dwds_test_common/lib/integration/hot_restart.dart b/dwds_test_common/lib/integration/hot_restart.dart index 19290380dd..96597cfaf3 100644 --- a/dwds_test_common/lib/integration/hot_restart.dart +++ b/dwds_test_common/lib/integration/hot_restart.dart @@ -313,8 +313,9 @@ void runTests({ final eventsDone = expectLater( client.onIsolateEvent, emitsThrough( - _hasKind(EventKind.kServiceExtensionAdded) - .having((e) => e.extensionRPC, 'service', 'ext.bar'), + _hasKind( + EventKind.kServiceExtensionAdded, + ).having((e) => e.extensionRPC, 'service', 'ext.bar'), ), ); diff --git a/dwds_test_common/lib/integration/sdk_configuration.dart b/dwds_test_common/lib/integration/sdk_configuration.dart index 2cd8dc213b..5d30e29ae2 100644 --- a/dwds_test_common/lib/integration/sdk_configuration.dart +++ b/dwds_test_common/lib/integration/sdk_configuration.dart @@ -65,8 +65,9 @@ void runIndependentTests() { final workerDir = p.dirname(compilerWorkerPath); Directory(workerDir).createSync(recursive: true); - File(defaultSdkConfiguration.compilerWorkerPath!) - .copySync(compilerWorkerPath); + File( + defaultSdkConfiguration.compilerWorkerPath!, + ).copySync(compilerWorkerPath); expect(sdkConfiguration.sdkDirectory, equals(sdkDirectory)); expect(sdkConfiguration.sdkSummaryPath, equals(sdkSummaryPath)); diff --git a/dwds_test_common/lib/logging.dart b/dwds_test_common/lib/logging.dart index a6b868d8a9..1d870b0859 100644 --- a/dwds_test_common/lib/logging.dart +++ b/dwds_test_common/lib/logging.dart @@ -7,13 +7,14 @@ import 'dart:async'; import 'package:logging/logging.dart'; import 'package:test/test.dart'; -typedef LogWriter = void Function( - Level level, - String message, { - String? error, - String? loggerName, - String? stackTrace, -}); +typedef LogWriter = + void Function( + Level level, + String message, { + String? error, + String? loggerName, + String? stackTrace, + }); StreamSubscription? _loggerSub; diff --git a/frontend_server_client/lib/src/dartdevc_frontend_server_client.dart b/frontend_server_client/lib/src/dartdevc_frontend_server_client.dart index d86fc3d4ac..8403226c2f 100644 --- a/frontend_server_client/lib/src/dartdevc_frontend_server_client.dart +++ b/frontend_server_client/lib/src/dartdevc_frontend_server_client.dart @@ -120,9 +120,9 @@ class DartDevcFrontendServerClient implements FrontendServerClient { if (result.dillOutput == null) { return; } - final manifest = jsonDecode( - File(result.jsManifestOutput!).readAsStringSync(), - ) as Map; + final manifest = + jsonDecode(File(result.jsManifestOutput!).readAsStringSync()) + as Map; final sourceBytes = File(result.jsSourcesOutput!).readAsBytesSync(); final sourceMapBytes = File(result.jsSourceMapsOutput!).readAsBytesSync(); diff --git a/frontend_server_client/test/frontend_server_client_test.dart b/frontend_server_client/test/frontend_server_client_test.dart index e48d310d02..7e3d4752b3 100644 --- a/frontend_server_client/test/frontend_server_client_test.dart +++ b/frontend_server_client/test/frontend_server_client_test.dart @@ -340,9 +340,9 @@ void main() { test('can support custom librariesSpec', () async { final defaultLibrariesJson = File(p.join(sdkDir, 'lib', 'libraries.json')); - final libraries = jsonDecode( - defaultLibrariesJson.readAsStringSync(), - ) as Map; + final libraries = + jsonDecode(defaultLibrariesJson.readAsStringSync()) + as Map; // Create the custom library file final customLibFile = File(p.join(packageRoot, 'bin', 'custom_lib.dart')); diff --git a/webdev/lib/src/logging.dart b/webdev/lib/src/logging.dart index ea0ed8553f..6e65dff6d0 100644 --- a/webdev/lib/src/logging.dart +++ b/webdev/lib/src/logging.dart @@ -8,13 +8,14 @@ import 'dart:io'; import 'package:io/ansi.dart'; import 'package:logging/logging.dart'; -typedef LogWriter = void Function( - Level level, - String message, { - String? error, - String? loggerName, - String? stackTrace, -}); +typedef LogWriter = + void Function( + Level level, + String message, { + String? error, + String? loggerName, + String? stackTrace, + }); var _verbose = false; StreamSubscription? _subscription; diff --git a/webdev/lib/src/pubspec.dart b/webdev/lib/src/pubspec.dart index f5c885731c..c2bc6ec53d 100644 --- a/webdev/lib/src/pubspec.dart +++ b/webdev/lib/src/pubspec.dart @@ -91,9 +91,13 @@ class PubspecLock { dir = next; } - final pubspecLock = loadYaml( - await File(p.relative(p.join(dir, 'pubspec.lock'))).readAsString(), - ) as YamlMap; + final pubspecLock = + loadYaml( + await File( + p.relative(p.join(dir, 'pubspec.lock')), + ).readAsString(), + ) + as YamlMap; final packages = pubspecLock['packages'] as YamlMap?; return PubspecLock(packages); diff --git a/webdev/test/configuration_test.dart b/webdev/test/configuration_test.dart index 3e7a379c88..a9d46c721d 100644 --- a/webdev/test/configuration_test.dart +++ b/webdev/test/configuration_test.dart @@ -130,11 +130,14 @@ void main() { ); }); - test('webHotReload coerces canaryFeatures to true and moduleFormat to ddc if not set', () { - final configuration = Configuration(webHotReload: true); - expect(configuration.canaryFeatures, isTrue); - expect(configuration.moduleFormat, equals('ddc')); - }); + test( + 'webHotReload coerces canaryFeatures to true and moduleFormat to ddc if not set', + () { + final configuration = Configuration(webHotReload: true); + expect(configuration.canaryFeatures, isTrue); + expect(configuration.moduleFormat, equals('ddc')); + }, + ); test('webHotReload + canaryFeatures false throws', () { expect( diff --git a/webdev/test/e2e_common.dart b/webdev/test/e2e_common.dart index 0d665400d8..b7c2205a53 100644 --- a/webdev/test/e2e_common.dart +++ b/webdev/test/e2e_common.dart @@ -61,9 +61,9 @@ void e2eTests({required TestRunner testRunner}) { tearDownAll(testRunner.tearDownAll); test('smoke test is configured properly', () async { - final smokeYaml = loadYaml( - await File('$exampleDirectory/pubspec.yaml').readAsString(), - ) as YamlMap; + final smokeYaml = + loadYaml(await File('$exampleDirectory/pubspec.yaml').readAsString()) + as YamlMap; final webdevYaml = loadYaml(await File('pubspec.yaml').readAsString()) as YamlMap; expect( diff --git a/webdev/test/helpers/context.dart b/webdev/test/helpers/context.dart index 2e724f65e2..9803817aa3 100644 --- a/webdev/test/helpers/context.dart +++ b/webdev/test/helpers/context.dart @@ -392,9 +392,9 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { ); packagesFile.parent.createSync(recursive: true); - final originalJson = jsonDecode( - sourcePackagesFile.readAsStringSync(), - ) as Map; + final originalJson = + jsonDecode(sourcePackagesFile.readAsStringSync()) + as Map; final packagesList = originalJson['packages'] as List; for (final package in packagesList) { final packageMap = package as Map; @@ -417,10 +417,12 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { 'fes_manager.snapshot', ); - final buildWebCompilers = packagesList.firstWhere( - (pkg) => (pkg as Map)['name'] == 'build_web_compilers', - orElse: () => null, - ) as Map?; + final buildWebCompilers = + packagesList.firstWhere( + (pkg) => (pkg as Map)['name'] == 'build_web_compilers', + orElse: () => null, + ) + as Map?; String fesManagerPath; if (buildWebCompilers != null) { final pkgRootUri = Uri.parse(buildWebCompilers['rootUri'] as String); From 4d2a44ded6ac2a7d9b1ea442c58eccf908463540 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Mon, 17 Aug 2026 10:23:45 -0700 Subject: [PATCH 125/134] Format code with dart format --- dwds_test_common/lib/fixtures/context.dart | 13 +- dwds_test_common/lib/fixtures/project.dart | 6 +- .../lib/frontend_server_common/devfs.dart | 5 +- .../frontend_server_client.dart | 6 +- .../lib/integration/chrome_proxy_service.dart | 655 ++++++++---------- .../lib/integration/debug_service.dart | 10 +- .../lib/integration/hot_restart.dart | 5 +- .../lib/integration/sdk_configuration.dart | 5 +- dwds_test_common/lib/logging.dart | 15 +- .../src/dartdevc_frontend_server_client.dart | 6 +- .../test/frontend_server_client_test.dart | 6 +- webdev/lib/src/logging.dart | 15 +- webdev/lib/src/pubspec.dart | 10 +- webdev/test/configuration_test.dart | 13 +- webdev/test/e2e_common.dart | 6 +- webdev/test/helpers/context.dart | 16 +- 16 files changed, 358 insertions(+), 434 deletions(-) diff --git a/dwds_test_common/lib/fixtures/context.dart b/dwds_test_common/lib/fixtures/context.dart index 64ac2fb007..11267c7cfa 100644 --- a/dwds_test_common/lib/fixtures/context.dart +++ b/dwds_test_common/lib/fixtures/context.dart @@ -55,8 +55,10 @@ Matcher isRPCErrorWithCode(int code) => isA().having((RPCError e) => e.code, 'code', equals(code)); Matcher throwsRPCErrorWithCode(int code) => throwsA(isRPCErrorWithCode(code)); -typedef TestContextFactory = - TestContext Function(TestProject, TestSdkConfigurationProvider); +typedef TestContextFactory = TestContext Function( + TestProject, + TestSdkConfigurationProvider, +); abstract class TestContext { static const reloadedSourcesFileName = 'reloaded_sources.json'; @@ -624,9 +626,10 @@ abstract 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_common/lib/fixtures/project.dart b/dwds_test_common/lib/fixtures/project.dart index f05df37357..4552cc738e 100644 --- a/dwds_test_common/lib/fixtures/project.dart +++ b/dwds_test_common/lib/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')) { diff --git a/dwds_test_common/lib/frontend_server_common/devfs.dart b/dwds_test_common/lib/frontend_server_common/devfs.dart index a9991f4736..dc566dba2a 100644 --- a/dwds_test_common/lib/frontend_server_common/devfs.dart +++ b/dwds_test_common/lib/frontend_server_common/devfs.dart @@ -266,9 +266,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_common/lib/frontend_server_common/frontend_server_client.dart b/dwds_test_common/lib/frontend_server_common/frontend_server_client.dart index ccfce39b3a..7c486ed687 100644 --- a/dwds_test_common/lib/frontend_server_common/frontend_server_client.dart +++ b/dwds_test_common/lib/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_common/lib/integration/chrome_proxy_service.dart b/dwds_test_common/lib/integration/chrome_proxy_service.dart index 23dada420d..d3d3e1f3a1 100644 --- a/dwds_test_common/lib/integration/chrome_proxy_service.dart +++ b/dwds_test_common/lib/integration/chrome_proxy_service.dart @@ -468,11 +468,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 { @@ -636,12 +635,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([ @@ -683,42 +680,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); @@ -731,9 +727,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); @@ -748,13 +746,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'); @@ -762,9 +758,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'); @@ -789,21 +787,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); @@ -815,21 +809,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); @@ -842,21 +832,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); @@ -866,21 +852,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); @@ -894,21 +876,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); @@ -921,21 +899,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); @@ -947,21 +921,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); @@ -971,17 +941,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); @@ -996,17 +966,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); @@ -1017,17 +987,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); @@ -1041,12 +1011,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); @@ -1062,21 +1037,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); @@ -1090,21 +1061,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); @@ -1114,21 +1081,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); @@ -1138,21 +1101,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); @@ -1164,21 +1123,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); @@ -1190,21 +1145,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); @@ -1215,14 +1166,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([ @@ -1271,14 +1220,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([ @@ -1325,63 +1272,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'); @@ -1741,9 +1676,8 @@ void runTests({ }); test('break on exceptions with setIsolatePauseMode', () async { - final oldPauseMode = (await service.getIsolate( - isolateId!, - )).exceptionPauseMode; + final oldPauseMode = (await service.getIsolate(isolateId!)) + .exceptionPauseMode; await service.setIsolatePauseMode( isolateId!, exceptionPauseMode: ExceptionPauseMode.kAll, @@ -1811,9 +1745,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 { @@ -2076,12 +2012,14 @@ void runTests({ final vm = await service.getVM(); final isolateId = vm.isolates!.first.id!; - final resolvedUris = await service - .lookupResolvedPackageUris(isolateId, [ - 'package:does/not/exist.dart', - 'dart:does_not_exist', - 'file:///does_not_exist.dart', - ]); + final resolvedUris = await service.lookupResolvedPackageUris( + isolateId, + [ + 'package:does/not/exist.dart', + 'dart:does_not_exist', + 'file:///does_not_exist.dart', + ], + ); expect(resolvedUris.uris, [null, null, null]); }, ); @@ -2577,9 +2515,8 @@ void runTests({ predicate( (Event event) => event.kind == EventKind.kWriteEvent && - String.fromCharCodes( - base64.decode(event.bytes!), - ).contains('hello'), + String.fromCharCodes(base64.decode(event.bytes!)) + .contains('hello'), ), ), ); @@ -2595,9 +2532,8 @@ void runTests({ predicate( (Event event) => event.kind == EventKind.kWriteEvent && - String.fromCharCodes( - base64.decode(event.bytes!), - ).contains('Error'), + String.fromCharCodes(base64.decode(event.bytes!)) + .contains('Error'), ), ), ); @@ -2613,9 +2549,8 @@ void runTests({ predicate( (Event event) => event.kind == EventKind.kWriteEvent && - String.fromCharCodes( - base64.decode(event.bytes!), - ).contains('main.dart'), + String.fromCharCodes(base64.decode(event.bytes!)) + .contains('main.dart'), ), ), ); diff --git a/dwds_test_common/lib/integration/debug_service.dart b/dwds_test_common/lib/integration/debug_service.dart index 2cf62dc5f4..f3de241881 100644 --- a/dwds_test_common/lib/integration/debug_service.dart +++ b/dwds_test_common/lib/integration/debug_service.dart @@ -49,9 +49,8 @@ void testAll({ test('Accepts connections with the auth token', () async { expect( - vmServiceConnectUri( - '${context.debugConnection.uri}/ws', - ).then((client) => client.dispose()), + vmServiceConnectUri('${context.debugConnection.uri}/ws') + .then((client) => client.dispose()), completes, ); }); @@ -75,9 +74,8 @@ void testAll({ // However, once DDS is disconnected, additional clients can connect again. await fakeDds.dispose(); expect( - vmServiceConnectUri( - '${context.debugConnection.uri}/ws', - ).then((client) => client.dispose()), + vmServiceConnectUri('${context.debugConnection.uri}/ws') + .then((client) => client.dispose()), completes, ); }); diff --git a/dwds_test_common/lib/integration/hot_restart.dart b/dwds_test_common/lib/integration/hot_restart.dart index 96597cfaf3..19290380dd 100644 --- a/dwds_test_common/lib/integration/hot_restart.dart +++ b/dwds_test_common/lib/integration/hot_restart.dart @@ -313,9 +313,8 @@ void runTests({ final eventsDone = expectLater( client.onIsolateEvent, emitsThrough( - _hasKind( - EventKind.kServiceExtensionAdded, - ).having((e) => e.extensionRPC, 'service', 'ext.bar'), + _hasKind(EventKind.kServiceExtensionAdded) + .having((e) => e.extensionRPC, 'service', 'ext.bar'), ), ); diff --git a/dwds_test_common/lib/integration/sdk_configuration.dart b/dwds_test_common/lib/integration/sdk_configuration.dart index 5d30e29ae2..2cd8dc213b 100644 --- a/dwds_test_common/lib/integration/sdk_configuration.dart +++ b/dwds_test_common/lib/integration/sdk_configuration.dart @@ -65,9 +65,8 @@ void runIndependentTests() { final workerDir = p.dirname(compilerWorkerPath); Directory(workerDir).createSync(recursive: true); - File( - defaultSdkConfiguration.compilerWorkerPath!, - ).copySync(compilerWorkerPath); + File(defaultSdkConfiguration.compilerWorkerPath!) + .copySync(compilerWorkerPath); expect(sdkConfiguration.sdkDirectory, equals(sdkDirectory)); expect(sdkConfiguration.sdkSummaryPath, equals(sdkSummaryPath)); diff --git a/dwds_test_common/lib/logging.dart b/dwds_test_common/lib/logging.dart index 1d870b0859..a6b868d8a9 100644 --- a/dwds_test_common/lib/logging.dart +++ b/dwds_test_common/lib/logging.dart @@ -7,14 +7,13 @@ import 'dart:async'; import 'package:logging/logging.dart'; import 'package:test/test.dart'; -typedef LogWriter = - void Function( - Level level, - String message, { - String? error, - String? loggerName, - String? stackTrace, - }); +typedef LogWriter = void Function( + Level level, + String message, { + String? error, + String? loggerName, + String? stackTrace, +}); StreamSubscription? _loggerSub; diff --git a/frontend_server_client/lib/src/dartdevc_frontend_server_client.dart b/frontend_server_client/lib/src/dartdevc_frontend_server_client.dart index 8403226c2f..d86fc3d4ac 100644 --- a/frontend_server_client/lib/src/dartdevc_frontend_server_client.dart +++ b/frontend_server_client/lib/src/dartdevc_frontend_server_client.dart @@ -120,9 +120,9 @@ class DartDevcFrontendServerClient implements FrontendServerClient { if (result.dillOutput == null) { return; } - final manifest = - jsonDecode(File(result.jsManifestOutput!).readAsStringSync()) - as Map; + final manifest = jsonDecode( + File(result.jsManifestOutput!).readAsStringSync(), + ) as Map; final sourceBytes = File(result.jsSourcesOutput!).readAsBytesSync(); final sourceMapBytes = File(result.jsSourceMapsOutput!).readAsBytesSync(); diff --git a/frontend_server_client/test/frontend_server_client_test.dart b/frontend_server_client/test/frontend_server_client_test.dart index 7e3d4752b3..e48d310d02 100644 --- a/frontend_server_client/test/frontend_server_client_test.dart +++ b/frontend_server_client/test/frontend_server_client_test.dart @@ -340,9 +340,9 @@ void main() { test('can support custom librariesSpec', () async { final defaultLibrariesJson = File(p.join(sdkDir, 'lib', 'libraries.json')); - final libraries = - jsonDecode(defaultLibrariesJson.readAsStringSync()) - as Map; + final libraries = jsonDecode( + defaultLibrariesJson.readAsStringSync(), + ) as Map; // Create the custom library file final customLibFile = File(p.join(packageRoot, 'bin', 'custom_lib.dart')); diff --git a/webdev/lib/src/logging.dart b/webdev/lib/src/logging.dart index 6e65dff6d0..ea0ed8553f 100644 --- a/webdev/lib/src/logging.dart +++ b/webdev/lib/src/logging.dart @@ -8,14 +8,13 @@ import 'dart:io'; import 'package:io/ansi.dart'; import 'package:logging/logging.dart'; -typedef LogWriter = - void Function( - Level level, - String message, { - String? error, - String? loggerName, - String? stackTrace, - }); +typedef LogWriter = void Function( + Level level, + String message, { + String? error, + String? loggerName, + String? stackTrace, +}); var _verbose = false; StreamSubscription? _subscription; diff --git a/webdev/lib/src/pubspec.dart b/webdev/lib/src/pubspec.dart index c2bc6ec53d..f5c885731c 100644 --- a/webdev/lib/src/pubspec.dart +++ b/webdev/lib/src/pubspec.dart @@ -91,13 +91,9 @@ class PubspecLock { dir = next; } - final pubspecLock = - loadYaml( - await File( - p.relative(p.join(dir, 'pubspec.lock')), - ).readAsString(), - ) - as YamlMap; + final pubspecLock = loadYaml( + await File(p.relative(p.join(dir, 'pubspec.lock'))).readAsString(), + ) as YamlMap; final packages = pubspecLock['packages'] as YamlMap?; return PubspecLock(packages); diff --git a/webdev/test/configuration_test.dart b/webdev/test/configuration_test.dart index a9d46c721d..3e7a379c88 100644 --- a/webdev/test/configuration_test.dart +++ b/webdev/test/configuration_test.dart @@ -130,14 +130,11 @@ void main() { ); }); - test( - 'webHotReload coerces canaryFeatures to true and moduleFormat to ddc if not set', - () { - final configuration = Configuration(webHotReload: true); - expect(configuration.canaryFeatures, isTrue); - expect(configuration.moduleFormat, equals('ddc')); - }, - ); + test('webHotReload coerces canaryFeatures to true and moduleFormat to ddc if not set', () { + final configuration = Configuration(webHotReload: true); + expect(configuration.canaryFeatures, isTrue); + expect(configuration.moduleFormat, equals('ddc')); + }); test('webHotReload + canaryFeatures false throws', () { expect( diff --git a/webdev/test/e2e_common.dart b/webdev/test/e2e_common.dart index b7c2205a53..0d665400d8 100644 --- a/webdev/test/e2e_common.dart +++ b/webdev/test/e2e_common.dart @@ -61,9 +61,9 @@ void e2eTests({required TestRunner testRunner}) { tearDownAll(testRunner.tearDownAll); test('smoke test is configured properly', () async { - final smokeYaml = - loadYaml(await File('$exampleDirectory/pubspec.yaml').readAsString()) - as YamlMap; + final smokeYaml = loadYaml( + await File('$exampleDirectory/pubspec.yaml').readAsString(), + ) as YamlMap; final webdevYaml = loadYaml(await File('pubspec.yaml').readAsString()) as YamlMap; expect( diff --git a/webdev/test/helpers/context.dart b/webdev/test/helpers/context.dart index 9803817aa3..2e724f65e2 100644 --- a/webdev/test/helpers/context.dart +++ b/webdev/test/helpers/context.dart @@ -392,9 +392,9 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { ); packagesFile.parent.createSync(recursive: true); - final originalJson = - jsonDecode(sourcePackagesFile.readAsStringSync()) - as Map; + final originalJson = jsonDecode( + sourcePackagesFile.readAsStringSync(), + ) as Map; final packagesList = originalJson['packages'] as List; for (final package in packagesList) { final packageMap = package as Map; @@ -417,12 +417,10 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { 'fes_manager.snapshot', ); - final buildWebCompilers = - packagesList.firstWhere( - (pkg) => (pkg as Map)['name'] == 'build_web_compilers', - orElse: () => null, - ) - as Map?; + final buildWebCompilers = packagesList.firstWhere( + (pkg) => (pkg as Map)['name'] == 'build_web_compilers', + orElse: () => null, + ) as Map?; String fesManagerPath; if (buildWebCompilers != null) { final pkgRootUri = Uri.parse(buildWebCompilers['rootUri'] as String); From 4cf2aab1e5734e6398aae134036537d6de3f5a03 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Mon, 17 Aug 2026 10:52:13 -0700 Subject: [PATCH 126/134] Format code with modern dart format --- dwds_test_common/lib/fixtures/context.dart | 13 +- dwds_test_common/lib/fixtures/project.dart | 6 +- .../lib/frontend_server_common/devfs.dart | 5 +- .../frontend_server_client.dart | 6 +- .../lib/integration/chrome_proxy_service.dart | 655 ++++++++++-------- .../lib/integration/debug_service.dart | 10 +- .../lib/integration/hot_restart.dart | 5 +- .../lib/integration/sdk_configuration.dart | 5 +- dwds_test_common/lib/logging.dart | 15 +- .../src/dartdevc_frontend_server_client.dart | 6 +- .../test/frontend_server_client_test.dart | 6 +- webdev/lib/src/logging.dart | 15 +- webdev/lib/src/pubspec.dart | 10 +- webdev/test/configuration_test.dart | 13 +- webdev/test/e2e_common.dart | 6 +- webdev/test/helpers/context.dart | 16 +- 16 files changed, 434 insertions(+), 358 deletions(-) diff --git a/dwds_test_common/lib/fixtures/context.dart b/dwds_test_common/lib/fixtures/context.dart index 11267c7cfa..64ac2fb007 100644 --- a/dwds_test_common/lib/fixtures/context.dart +++ b/dwds_test_common/lib/fixtures/context.dart @@ -55,10 +55,8 @@ Matcher isRPCErrorWithCode(int code) => isA().having((RPCError e) => e.code, 'code', equals(code)); Matcher throwsRPCErrorWithCode(int code) => throwsA(isRPCErrorWithCode(code)); -typedef TestContextFactory = TestContext Function( - TestProject, - TestSdkConfigurationProvider, -); +typedef TestContextFactory = + TestContext Function(TestProject, TestSdkConfigurationProvider); abstract class TestContext { static const reloadedSourcesFileName = 'reloaded_sources.json'; @@ -626,10 +624,9 @@ abstract 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_common/lib/fixtures/project.dart b/dwds_test_common/lib/fixtures/project.dart index 4552cc738e..f05df37357 100644 --- a/dwds_test_common/lib/fixtures/project.dart +++ b/dwds_test_common/lib/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')) { diff --git a/dwds_test_common/lib/frontend_server_common/devfs.dart b/dwds_test_common/lib/frontend_server_common/devfs.dart index dc566dba2a..a9991f4736 100644 --- a/dwds_test_common/lib/frontend_server_common/devfs.dart +++ b/dwds_test_common/lib/frontend_server_common/devfs.dart @@ -266,8 +266,9 @@ 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_common/lib/frontend_server_common/frontend_server_client.dart b/dwds_test_common/lib/frontend_server_common/frontend_server_client.dart index 7c486ed687..ccfce39b3a 100644 --- a/dwds_test_common/lib/frontend_server_common/frontend_server_client.dart +++ b/dwds_test_common/lib/frontend_server_common/frontend_server_client.dart @@ -24,10 +24,8 @@ 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_common/lib/integration/chrome_proxy_service.dart b/dwds_test_common/lib/integration/chrome_proxy_service.dart index d3d3e1f3a1..23dada420d 100644 --- a/dwds_test_common/lib/integration/chrome_proxy_service.dart +++ b/dwds_test_common/lib/integration/chrome_proxy_service.dart @@ -468,10 +468,11 @@ 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 { @@ -635,10 +636,12 @@ 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([ @@ -680,41 +683,42 @@ 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); @@ -727,11 +731,9 @@ 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); @@ -746,11 +748,13 @@ 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'); @@ -758,11 +762,9 @@ 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'); @@ -787,17 +789,21 @@ 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); @@ -809,17 +815,21 @@ 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); @@ -832,17 +842,21 @@ 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); @@ -852,17 +866,21 @@ 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); @@ -876,17 +894,21 @@ 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); @@ -899,17 +921,21 @@ 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); @@ -921,17 +947,21 @@ 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); @@ -941,17 +971,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); @@ -966,17 +996,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); @@ -987,17 +1017,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); @@ -1011,17 +1041,12 @@ 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); @@ -1037,17 +1062,21 @@ 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); @@ -1061,17 +1090,21 @@ 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); @@ -1081,17 +1114,21 @@ 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); @@ -1101,17 +1138,21 @@ 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); @@ -1123,17 +1164,21 @@ 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); @@ -1145,17 +1190,21 @@ 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); @@ -1166,12 +1215,14 @@ 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([ @@ -1220,12 +1271,14 @@ 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([ @@ -1272,51 +1325,63 @@ 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'); @@ -1676,8 +1741,9 @@ void runTests({ }); test('break on exceptions with setIsolatePauseMode', () async { - final oldPauseMode = (await service.getIsolate(isolateId!)) - .exceptionPauseMode; + final oldPauseMode = (await service.getIsolate( + isolateId!, + )).exceptionPauseMode; await service.setIsolatePauseMode( isolateId!, exceptionPauseMode: ExceptionPauseMode.kAll, @@ -1745,11 +1811,9 @@ 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 { @@ -2012,14 +2076,12 @@ void runTests({ final vm = await service.getVM(); final isolateId = vm.isolates!.first.id!; - final resolvedUris = await service.lookupResolvedPackageUris( - isolateId, - [ - 'package:does/not/exist.dart', - 'dart:does_not_exist', - 'file:///does_not_exist.dart', - ], - ); + final resolvedUris = await service + .lookupResolvedPackageUris(isolateId, [ + 'package:does/not/exist.dart', + 'dart:does_not_exist', + 'file:///does_not_exist.dart', + ]); expect(resolvedUris.uris, [null, null, null]); }, ); @@ -2515,8 +2577,9 @@ void runTests({ predicate( (Event event) => event.kind == EventKind.kWriteEvent && - String.fromCharCodes(base64.decode(event.bytes!)) - .contains('hello'), + String.fromCharCodes( + base64.decode(event.bytes!), + ).contains('hello'), ), ), ); @@ -2532,8 +2595,9 @@ void runTests({ predicate( (Event event) => event.kind == EventKind.kWriteEvent && - String.fromCharCodes(base64.decode(event.bytes!)) - .contains('Error'), + String.fromCharCodes( + base64.decode(event.bytes!), + ).contains('Error'), ), ), ); @@ -2549,8 +2613,9 @@ void runTests({ predicate( (Event event) => event.kind == EventKind.kWriteEvent && - String.fromCharCodes(base64.decode(event.bytes!)) - .contains('main.dart'), + String.fromCharCodes( + base64.decode(event.bytes!), + ).contains('main.dart'), ), ), ); diff --git a/dwds_test_common/lib/integration/debug_service.dart b/dwds_test_common/lib/integration/debug_service.dart index f3de241881..2cf62dc5f4 100644 --- a/dwds_test_common/lib/integration/debug_service.dart +++ b/dwds_test_common/lib/integration/debug_service.dart @@ -49,8 +49,9 @@ void testAll({ test('Accepts connections with the auth token', () async { expect( - vmServiceConnectUri('${context.debugConnection.uri}/ws') - .then((client) => client.dispose()), + vmServiceConnectUri( + '${context.debugConnection.uri}/ws', + ).then((client) => client.dispose()), completes, ); }); @@ -74,8 +75,9 @@ void testAll({ // However, once DDS is disconnected, additional clients can connect again. await fakeDds.dispose(); expect( - vmServiceConnectUri('${context.debugConnection.uri}/ws') - .then((client) => client.dispose()), + vmServiceConnectUri( + '${context.debugConnection.uri}/ws', + ).then((client) => client.dispose()), completes, ); }); diff --git a/dwds_test_common/lib/integration/hot_restart.dart b/dwds_test_common/lib/integration/hot_restart.dart index 19290380dd..96597cfaf3 100644 --- a/dwds_test_common/lib/integration/hot_restart.dart +++ b/dwds_test_common/lib/integration/hot_restart.dart @@ -313,8 +313,9 @@ void runTests({ final eventsDone = expectLater( client.onIsolateEvent, emitsThrough( - _hasKind(EventKind.kServiceExtensionAdded) - .having((e) => e.extensionRPC, 'service', 'ext.bar'), + _hasKind( + EventKind.kServiceExtensionAdded, + ).having((e) => e.extensionRPC, 'service', 'ext.bar'), ), ); diff --git a/dwds_test_common/lib/integration/sdk_configuration.dart b/dwds_test_common/lib/integration/sdk_configuration.dart index 2cd8dc213b..5d30e29ae2 100644 --- a/dwds_test_common/lib/integration/sdk_configuration.dart +++ b/dwds_test_common/lib/integration/sdk_configuration.dart @@ -65,8 +65,9 @@ void runIndependentTests() { final workerDir = p.dirname(compilerWorkerPath); Directory(workerDir).createSync(recursive: true); - File(defaultSdkConfiguration.compilerWorkerPath!) - .copySync(compilerWorkerPath); + File( + defaultSdkConfiguration.compilerWorkerPath!, + ).copySync(compilerWorkerPath); expect(sdkConfiguration.sdkDirectory, equals(sdkDirectory)); expect(sdkConfiguration.sdkSummaryPath, equals(sdkSummaryPath)); diff --git a/dwds_test_common/lib/logging.dart b/dwds_test_common/lib/logging.dart index a6b868d8a9..1d870b0859 100644 --- a/dwds_test_common/lib/logging.dart +++ b/dwds_test_common/lib/logging.dart @@ -7,13 +7,14 @@ import 'dart:async'; import 'package:logging/logging.dart'; import 'package:test/test.dart'; -typedef LogWriter = void Function( - Level level, - String message, { - String? error, - String? loggerName, - String? stackTrace, -}); +typedef LogWriter = + void Function( + Level level, + String message, { + String? error, + String? loggerName, + String? stackTrace, + }); StreamSubscription? _loggerSub; diff --git a/frontend_server_client/lib/src/dartdevc_frontend_server_client.dart b/frontend_server_client/lib/src/dartdevc_frontend_server_client.dart index d86fc3d4ac..8403226c2f 100644 --- a/frontend_server_client/lib/src/dartdevc_frontend_server_client.dart +++ b/frontend_server_client/lib/src/dartdevc_frontend_server_client.dart @@ -120,9 +120,9 @@ class DartDevcFrontendServerClient implements FrontendServerClient { if (result.dillOutput == null) { return; } - final manifest = jsonDecode( - File(result.jsManifestOutput!).readAsStringSync(), - ) as Map; + final manifest = + jsonDecode(File(result.jsManifestOutput!).readAsStringSync()) + as Map; final sourceBytes = File(result.jsSourcesOutput!).readAsBytesSync(); final sourceMapBytes = File(result.jsSourceMapsOutput!).readAsBytesSync(); diff --git a/frontend_server_client/test/frontend_server_client_test.dart b/frontend_server_client/test/frontend_server_client_test.dart index e48d310d02..7e3d4752b3 100644 --- a/frontend_server_client/test/frontend_server_client_test.dart +++ b/frontend_server_client/test/frontend_server_client_test.dart @@ -340,9 +340,9 @@ void main() { test('can support custom librariesSpec', () async { final defaultLibrariesJson = File(p.join(sdkDir, 'lib', 'libraries.json')); - final libraries = jsonDecode( - defaultLibrariesJson.readAsStringSync(), - ) as Map; + final libraries = + jsonDecode(defaultLibrariesJson.readAsStringSync()) + as Map; // Create the custom library file final customLibFile = File(p.join(packageRoot, 'bin', 'custom_lib.dart')); diff --git a/webdev/lib/src/logging.dart b/webdev/lib/src/logging.dart index ea0ed8553f..6e65dff6d0 100644 --- a/webdev/lib/src/logging.dart +++ b/webdev/lib/src/logging.dart @@ -8,13 +8,14 @@ import 'dart:io'; import 'package:io/ansi.dart'; import 'package:logging/logging.dart'; -typedef LogWriter = void Function( - Level level, - String message, { - String? error, - String? loggerName, - String? stackTrace, -}); +typedef LogWriter = + void Function( + Level level, + String message, { + String? error, + String? loggerName, + String? stackTrace, + }); var _verbose = false; StreamSubscription? _subscription; diff --git a/webdev/lib/src/pubspec.dart b/webdev/lib/src/pubspec.dart index f5c885731c..c2bc6ec53d 100644 --- a/webdev/lib/src/pubspec.dart +++ b/webdev/lib/src/pubspec.dart @@ -91,9 +91,13 @@ class PubspecLock { dir = next; } - final pubspecLock = loadYaml( - await File(p.relative(p.join(dir, 'pubspec.lock'))).readAsString(), - ) as YamlMap; + final pubspecLock = + loadYaml( + await File( + p.relative(p.join(dir, 'pubspec.lock')), + ).readAsString(), + ) + as YamlMap; final packages = pubspecLock['packages'] as YamlMap?; return PubspecLock(packages); diff --git a/webdev/test/configuration_test.dart b/webdev/test/configuration_test.dart index 3e7a379c88..a9d46c721d 100644 --- a/webdev/test/configuration_test.dart +++ b/webdev/test/configuration_test.dart @@ -130,11 +130,14 @@ void main() { ); }); - test('webHotReload coerces canaryFeatures to true and moduleFormat to ddc if not set', () { - final configuration = Configuration(webHotReload: true); - expect(configuration.canaryFeatures, isTrue); - expect(configuration.moduleFormat, equals('ddc')); - }); + test( + 'webHotReload coerces canaryFeatures to true and moduleFormat to ddc if not set', + () { + final configuration = Configuration(webHotReload: true); + expect(configuration.canaryFeatures, isTrue); + expect(configuration.moduleFormat, equals('ddc')); + }, + ); test('webHotReload + canaryFeatures false throws', () { expect( diff --git a/webdev/test/e2e_common.dart b/webdev/test/e2e_common.dart index 0d665400d8..b7c2205a53 100644 --- a/webdev/test/e2e_common.dart +++ b/webdev/test/e2e_common.dart @@ -61,9 +61,9 @@ void e2eTests({required TestRunner testRunner}) { tearDownAll(testRunner.tearDownAll); test('smoke test is configured properly', () async { - final smokeYaml = loadYaml( - await File('$exampleDirectory/pubspec.yaml').readAsString(), - ) as YamlMap; + final smokeYaml = + loadYaml(await File('$exampleDirectory/pubspec.yaml').readAsString()) + as YamlMap; final webdevYaml = loadYaml(await File('pubspec.yaml').readAsString()) as YamlMap; expect( diff --git a/webdev/test/helpers/context.dart b/webdev/test/helpers/context.dart index 2e724f65e2..9803817aa3 100644 --- a/webdev/test/helpers/context.dart +++ b/webdev/test/helpers/context.dart @@ -392,9 +392,9 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { ); packagesFile.parent.createSync(recursive: true); - final originalJson = jsonDecode( - sourcePackagesFile.readAsStringSync(), - ) as Map; + final originalJson = + jsonDecode(sourcePackagesFile.readAsStringSync()) + as Map; final packagesList = originalJson['packages'] as List; for (final package in packagesList) { final packageMap = package as Map; @@ -417,10 +417,12 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { 'fes_manager.snapshot', ); - final buildWebCompilers = packagesList.firstWhere( - (pkg) => (pkg as Map)['name'] == 'build_web_compilers', - orElse: () => null, - ) as Map?; + final buildWebCompilers = + packagesList.firstWhere( + (pkg) => (pkg as Map)['name'] == 'build_web_compilers', + orElse: () => null, + ) + as Map?; String fesManagerPath; if (buildWebCompilers != null) { final pkgRootUri = Uri.parse(buildWebCompilers['rootUri'] as String); From 842c7911a7c72a1ee87d3046235589b55cde5531 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Mon, 17 Aug 2026 11:44:29 -0700 Subject: [PATCH 127/134] Format debug_extension with modern dart format --- .../test/debug_extension_test.dart | 15 +- .../test/puppeteer/extension_common.dart | 241 +++++++++--------- .../test/puppeteer/test_utils.dart | 10 +- debug_extension/tool/build_extension.dart | 5 +- 4 files changed, 145 insertions(+), 126 deletions(-) diff --git a/debug_extension/test/debug_extension_test.dart b/debug_extension/test/debug_extension_test.dart index 2856343f38..499bd48771 100644 --- a/debug_extension/test/debug_extension_test.dart +++ b/debug_extension/test/debug_extension_test.dart @@ -62,8 +62,9 @@ void main() async { group('Without encoding', () { setUp(() async { await context.setUp( - debugSettings: TestDebugSettings.withDevToolsLaunch(context) - .copyWith(enableDebugExtension: true, useSse: useSse), + debugSettings: TestDebugSettings.withDevToolsLaunch( + context, + ).copyWith(enableDebugExtension: true, useSse: useSse), ); await context.extensionConnection.sendCommand('Runtime.evaluate', { 'expression': 'fakeClick()', @@ -124,8 +125,9 @@ void main() async { group('With a sharded Dart app', () { setUp(() async { await context.setUp( - debugSettings: TestDebugSettings.withDevToolsLaunch(context) - .copyWith(enableDebugExtension: true, useSse: useSse), + debugSettings: TestDebugSettings.withDevToolsLaunch( + context, + ).copyWith(enableDebugExtension: true, useSse: useSse), ); final htmlTag = await context.webDriver.findElement( const By.tagName('html'), @@ -159,8 +161,9 @@ void main() async { group('With an internal Dart app', () { setUp(() async { await context.setUp( - debugSettings: TestDebugSettings.withDevToolsLaunch(context) - .copyWith(enableDebugExtension: true, useSse: false), + debugSettings: TestDebugSettings.withDevToolsLaunch( + context, + ).copyWith(enableDebugExtension: true, useSse: false), ); final htmlTag = await context.webDriver.findElement( const By.tagName('html'), diff --git a/debug_extension/test/puppeteer/extension_common.dart b/debug_extension/test/puppeteer/extension_common.dart index 1e2d4371f2..e9b077c174 100644 --- a/debug_extension/test/puppeteer/extension_common.dart +++ b/debug_extension/test/puppeteer/extension_common.dart @@ -524,37 +524,40 @@ void testAll({required bool isMV3, required bool screenshotsEnabled}) { }, ); - test('the correct extension panels are added to Chrome DevTools', () async { - final chromeDevToolsPage = await getChromeDevToolsPage(browser); - // There are no hooks for when a panel is added to Chrome DevTools, - // therefore we rely on a slight delay: - await Future.delayed(Duration(seconds: 1)); - if (isFlutterApp) { + test( + 'the correct extension panels are added to Chrome DevTools', + () async { + final chromeDevToolsPage = await getChromeDevToolsPage(browser); + // There are no hooks for when a panel is added to Chrome DevTools, + // therefore we rely on a slight delay: + await Future.delayed(Duration(seconds: 1)); + if (isFlutterApp) { + await _tabLeft(chromeDevToolsPage); + final inspectorPanelElement = await _getPanelElement( + browser, + panel: Panel.inspector, + elementSelector: '#panelBody', + ); + expect(inspectorPanelElement, isNotNull); + await _takeScreenshot( + chromeDevToolsPage, + screenshotName: 'inspectorPanelLandingPage_flutterApp', + ); + } await _tabLeft(chromeDevToolsPage); - final inspectorPanelElement = await _getPanelElement( + final debuggerPanelElement = await _getPanelElement( browser, - panel: Panel.inspector, + panel: Panel.debugger, elementSelector: '#panelBody', ); - expect(inspectorPanelElement, isNotNull); + expect(debuggerPanelElement, isNotNull); await _takeScreenshot( chromeDevToolsPage, - screenshotName: 'inspectorPanelLandingPage_flutterApp', + screenshotName: + 'debuggerPanelLandingPage_${isFlutterApp ? 'flutterApp' : 'dartApp'}', ); - } - await _tabLeft(chromeDevToolsPage); - final debuggerPanelElement = await _getPanelElement( - browser, - panel: Panel.debugger, - elementSelector: '#panelBody', - ); - expect(debuggerPanelElement, isNotNull); - await _takeScreenshot( - chromeDevToolsPage, - screenshotName: - 'debuggerPanelLandingPage_${isFlutterApp ? 'flutterApp' : 'dartApp'}', - ); - }); + }, + ); test('Dart DevTools is embedded for debug session lifetime', () async { final chromeDevToolsPage = await getChromeDevToolsPage(browser); @@ -620,95 +623,104 @@ void testAll({required bool isMV3, required bool screenshotsEnabled}) { // origin, and being able to connect to the embedded Dart app. // See https://github.com/dart-lang/webdev/issues/1779 - test('The Dart DevTools IFRAME has the correct query parameters and path', () async { - final chromeDevToolsPage = await getChromeDevToolsPage(browser); - // There are no hooks for when a panel is added to Chrome DevTools, - // therefore we rely on a slight delay: - await Future.delayed(Duration(seconds: 1)); - // Navigate to the Dart Debugger panel: - await _tabLeft(chromeDevToolsPage); - if (isFlutterApp) { + test( + 'The Dart DevTools IFRAME has the correct query parameters and path', + () async { + final chromeDevToolsPage = await getChromeDevToolsPage(browser); + // There are no hooks for when a panel is added to Chrome DevTools, + // therefore we rely on a slight delay: + await Future.delayed(Duration(seconds: 1)); + // Navigate to the Dart Debugger panel: await _tabLeft(chromeDevToolsPage); - } - await _clickLaunchButton(browser, panel: Panel.debugger); - // Expect the Dart DevTools IFRAME to be added: - final devToolsUrlFragment = - 'ide=ChromeDevTools&embed=true&page=debugger'; - final iframeTarget = await browser.waitForTarget( - (target) => target.url.contains(devToolsUrlFragment), - ); - final iframeUrl = iframeTarget.url; - // Expect the correct query parameters to be on the IFRAME url: - final uri = Uri.parse(iframeUrl); - final queryParameters = uri.queryParameters; - expect( - queryParameters.keys, - unorderedMatches([ - 'uri', - 'ide', - 'embed', - 'page', - 'backgroundColor', - ]), - ); - expect(queryParameters, containsPair('ide', 'ChromeDevTools')); - expect(queryParameters, containsPair('uri', isNotEmpty)); - expect(queryParameters, containsPair('page', isNotEmpty)); - expect( - queryParameters, - containsPair('backgroundColor', isNotEmpty), - ); - expect(uri.path, equals('/')); - }); + if (isFlutterApp) { + await _tabLeft(chromeDevToolsPage); + } + await _clickLaunchButton(browser, panel: Panel.debugger); + // Expect the Dart DevTools IFRAME to be added: + final devToolsUrlFragment = + 'ide=ChromeDevTools&embed=true&page=debugger'; + final iframeTarget = await browser.waitForTarget( + (target) => target.url.contains(devToolsUrlFragment), + ); + final iframeUrl = iframeTarget.url; + // Expect the correct query parameters to be on the IFRAME url: + final uri = Uri.parse(iframeUrl); + final queryParameters = uri.queryParameters; + expect( + queryParameters.keys, + unorderedMatches([ + 'uri', + 'ide', + 'embed', + 'page', + 'backgroundColor', + ]), + ); + expect(queryParameters, containsPair('ide', 'ChromeDevTools')); + expect(queryParameters, containsPair('uri', isNotEmpty)); + expect(queryParameters, containsPair('page', isNotEmpty)); + expect( + queryParameters, + containsPair('backgroundColor', isNotEmpty), + ); + expect(uri.path, equals('/')); + }, + ); - test('Trying to debug a page with multiple Dart apps shows warning', () async { - final chromeDevToolsPage = await getChromeDevToolsPage(browser); - // There are no hooks for when a panel is added to Chrome DevTools, - // therefore we rely on a slight delay: - await Future.delayed(Duration(seconds: 1)); - // Navigate to the Dart Debugger panel: - await _tabLeft(chromeDevToolsPage); - if (isFlutterApp) { + test( + 'Trying to debug a page with multiple Dart apps shows warning', + () async { + final chromeDevToolsPage = await getChromeDevToolsPage(browser); + // There are no hooks for when a panel is added to Chrome DevTools, + // therefore we rely on a slight delay: + await Future.delayed(Duration(seconds: 1)); + // Navigate to the Dart Debugger panel: await _tabLeft(chromeDevToolsPage); - } - // Expect there to be no warning banner: - var warningMsg = await _evaluateInPanel( - browser, - panel: Panel.debugger, - jsExpression: 'document.querySelector("#warningMsg").innerHTML', - ); - expect( - warningMsg == 'Cannot debug multiple apps in a page.', - isFalse, - ); - // Set the 'data-multiple-dart-apps' attribute on the DOM. - await appTab.evaluate(_setMultipleAppsAttributeJs); - final appTabId = await _getCurrentTabId( - worker: worker, - backgroundPage: backgroundPage, - ); - // Expect multiple apps info to be saved in storage: - final storageKey = '$appTabId-multipleAppsDetected'; - final multipleAppsDetected = await _fetchStorageObj( - storageKey, - storageArea: 'session', - worker: worker, - backgroundPage: backgroundPage, - ); - expect(multipleAppsDetected, equals('true')); - // Expect there to be a warning banner: - warningMsg = await _evaluateInPanel( - browser, - panel: Panel.debugger, - jsExpression: 'document.querySelector("#warningMsg").innerHTML', - ); - await _takeScreenshot( - chromeDevToolsPage, - screenshotName: - 'debuggerMultipleAppsDetected_${isFlutterApp ? 'flutterApp' : 'dartApp'}', - ); - expect(warningMsg, equals('Cannot debug multiple apps in a page.')); - }); + if (isFlutterApp) { + await _tabLeft(chromeDevToolsPage); + } + // Expect there to be no warning banner: + var warningMsg = await _evaluateInPanel( + browser, + panel: Panel.debugger, + jsExpression: 'document.querySelector("#warningMsg").innerHTML', + ); + expect( + warningMsg == 'Cannot debug multiple apps in a page.', + isFalse, + ); + // Set the 'data-multiple-dart-apps' attribute on the DOM. + await appTab.evaluate(_setMultipleAppsAttributeJs); + final appTabId = await _getCurrentTabId( + worker: worker, + backgroundPage: backgroundPage, + ); + // Expect multiple apps info to be saved in storage: + final storageKey = '$appTabId-multipleAppsDetected'; + final multipleAppsDetected = await _fetchStorageObj( + storageKey, + storageArea: 'session', + worker: worker, + backgroundPage: backgroundPage, + ); + expect(multipleAppsDetected, equals('true')); + // Expect there to be a warning banner: + warningMsg = await _evaluateInPanel( + browser, + panel: Panel.debugger, + jsExpression: 'document.querySelector("#warningMsg").innerHTML', + ); + await _takeScreenshot( + chromeDevToolsPage, + screenshotName: + 'debuggerMultipleAppsDetected_${isFlutterApp ? 'flutterApp' : 'dartApp'}', + ); + expect( + warningMsg, + equals('Cannot debug multiple apps in a page.'), + ); + }, + ); }); } }); @@ -916,10 +928,11 @@ Future _tabLeft(Page chromeDevToolsPage) async { Future _getCurrentTabId({Worker? worker, Page? backgroundPage}) async { return (await evaluate( - _currentTabIdJs, - worker: worker, - backgroundPage: backgroundPage, - )) as int; + _currentTabIdJs, + worker: worker, + backgroundPage: backgroundPage, + )) + as int; } Future _fetchStorageObj( diff --git a/debug_extension/test/puppeteer/test_utils.dart b/debug_extension/test/puppeteer/test_utils.dart index c8b09bcc46..e001cbc7e5 100644 --- a/debug_extension/test/puppeteer/test_utils.dart +++ b/debug_extension/test/puppeteer/test_utils.dart @@ -46,8 +46,9 @@ Future setUpExtensionTest( workspaceName: workspaceName, ), debugSettings: serveDevTools - ? TestDebugSettings.withDevToolsLaunch(context) - .copyWith(enableDebugExtension: true, useSse: useSse) + ? TestDebugSettings.withDevToolsLaunch( + context, + ).copyWith(enableDebugExtension: true, useSse: useSse) : TestDebugSettings.noDevToolsLaunch().copyWith( enableDebugExtension: true, useSse: useSse, @@ -180,8 +181,9 @@ Future navigateToPage( String getExtensionOrigin(Browser browser) { final chromeExtension = 'chrome-extension:'; - final extensionUrl = _getUrlsInBrowser(browser) - .firstWhere((url) => url.contains(chromeExtension)); + final extensionUrl = _getUrlsInBrowser( + browser, + ).firstWhere((url) => url.contains(chromeExtension)); final urlSegments = p.split(extensionUrl); final extensionId = urlSegments[urlSegments.indexOf(chromeExtension) + 1]; return '$chromeExtension//$extensionId'; diff --git a/debug_extension/tool/build_extension.dart b/debug_extension/tool/build_extension.dart index c856281ad6..f5c1d7a01d 100644 --- a/debug_extension/tool/build_extension.dart +++ b/debug_extension/tool/build_extension.dart @@ -49,8 +49,9 @@ Future run({required bool isProd}) async { } _logInfo('Copying manifest.json to /compiled directory'); try { - File(p.join('web', 'manifest.json')) - .copySync(p.join('compiled', 'manifest.json')); + File( + p.join('web', 'manifest.json'), + ).copySync(p.join('compiled', 'manifest.json')); } catch (error) { _logWarning('Copying manifest file failed: $error'); // Return non-zero exit code to indicate failure: From 36fbb6f4fa46df255c64821ddab7b1c02477b736 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Mon, 17 Aug 2026 14:19:03 -0700 Subject: [PATCH 128/134] Prepare 4.0.2 release (#2866) Fixes our daily stable tests (they were resolved in daily but not pushed to stable). --- webdev/CHANGELOG.md | 4 ++++ webdev/lib/src/version.dart | 2 +- webdev/pubspec.yaml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/webdev/CHANGELOG.md b/webdev/CHANGELOG.md index 6fc01eb8e3..fa314c8ce6 100644 --- a/webdev/CHANGELOG.md +++ b/webdev/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.0.2 + +- **Internal**: Resolve Chrome test flakes. + ## 4.0.1 - Catch and report version skew errors when incompatible versions of `build_daemon` are used. diff --git a/webdev/lib/src/version.dart b/webdev/lib/src/version.dart index b42025ea15..1d7ed1f372 100644 --- a/webdev/lib/src/version.dart +++ b/webdev/lib/src/version.dart @@ -1,2 +1,2 @@ // Generated code. Do not modify. -const packageVersion = '4.0.1'; +const packageVersion = '4.0.2'; diff --git a/webdev/pubspec.yaml b/webdev/pubspec.yaml index d0dfe8e8fb..f8d1f6c791 100644 --- a/webdev/pubspec.yaml +++ b/webdev/pubspec.yaml @@ -1,6 +1,6 @@ name: webdev # Every time this changes you need to run `dart run build_runner build`. -version: 4.0.1 +version: 4.0.2 # We should not depend on a dev SDK before publishing. # publish_to: none description: >- From 9b1d5a2b552eadcdb6b952078de6252084f5d782 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Mon, 17 Aug 2026 14:22:18 -0700 Subject: [PATCH 129/134] Remove test_uri.dart scratch file --- test_uri.dart | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 test_uri.dart diff --git a/test_uri.dart b/test_uri.dart deleted file mode 100644 index 65c3e86721..0000000000 --- a/test_uri.dart +++ /dev/null @@ -1,12 +0,0 @@ -import 'dart:io'; - -void main() { - final uri = Uri.parse( - 'file:///Users/markzipan/Projects/webdev/dwds_test_common/lib/fixtures/context.dart', - ); - print('Base: $uri'); - print('..: ${uri.resolve('..')}'); - print('../..: ${uri.resolve('../..')}'); - print('../../../: ${uri.resolve('../../../')}'); - print('../../../..: ${uri.resolve('../../../../')}'); -} From 2487c8a0079b1d2ac27face0447be9d6fbdcef8a Mon Sep 17 00:00:00 2001 From: MarkZ Date: Tue, 18 Aug 2026 12:59:49 -0700 Subject: [PATCH 130/134] Implement waitForSuccessfulBuild in BuildDaemonContextMixin --- webdev/test/helpers/context.dart | 138 ++++++++++++++++++++++--------- 1 file changed, 101 insertions(+), 37 deletions(-) diff --git a/webdev/test/helpers/context.dart b/webdev/test/helpers/context.dart index 9803817aa3..6038bfb5fc 100644 --- a/webdev/test/helpers/context.dart +++ b/webdev/test/helpers/context.dart @@ -1,7 +1,6 @@ // Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. - import 'dart:async'; import 'dart:convert'; import 'dart:io'; @@ -45,7 +44,97 @@ Handler createBuildRunnerProxyHandler({ ); } -class BuildDaemonTestContext extends TestContext { +mixin BuildDaemonContextMixin on TestContext { + BuildDaemonClient get daemonClient; + + @override + Future waitForSuccessfulBuild({ + Duration? timeout, + bool propagateToBrowser = false, + bool allowFailure = false, + }) async { + final buildStartCompleter = Completer(); + final buildSuccessCompleter = Completer(); + final subscription = daemonClient.buildResults.listen((results) { + final isStartedEvent = results.results.any( + (r) => r.status == daemon.BuildStatus.started, + ); + final isSucceededEvent = results.results.any( + (r) => r.status == daemon.BuildStatus.succeeded, + ); + final isFailedEvent = results.results.any( + (r) => r.status == daemon.BuildStatus.failed, + ); + + if (isStartedEvent) { + if (!buildStartCompleter.isCompleted) buildStartCompleter.complete(); + } + if (isFailedEvent) { + if (!buildSuccessCompleter.isCompleted) { + final failedResult = results.results.firstWhere( + (r) => r.status == daemon.BuildStatus.failed, + ); + final daemonError = + failedResult.error ?? 'Unknown daemon compilation error'; + if (allowFailure) { + buildSuccessCompleter.complete(); + } else { + buildSuccessCompleter.completeError( + StateError('Build daemon build failed.\nError: $daemonError'), + ); + } + } + } + if (buildStartCompleter.isCompleted && isSucceededEvent) { + if (!buildSuccessCompleter.isCompleted) { + buildSuccessCompleter.complete(); + } + } + }); + + var isWaitingForSuccess = false; + try { + var timedOutWaitingForStart = false; + await buildStartCompleter.future.timeout( + const Duration(seconds: 5), + onTimeout: () { + timedOutWaitingForStart = true; + }, + ); + + if (timedOutWaitingForStart) { + return; + } + + isWaitingForSuccess = true; + await buildSuccessCompleter.future.timeout( + timeout ?? const Duration(seconds: 60), + ); + } catch (e) { + if (e is TimeoutException) { + // Return if an edit did not trigger a rebuild/recompile. + if (!isWaitingForSuccess) { + return; + } + // If the build started but never finished, the test has likely hung. + rethrow; + } + rethrow; + } finally { + await subscription.cancel(); + } + + if (propagateToBrowser) { + final delay = Platform.isWindows + ? const Duration(seconds: 5) + : const Duration(seconds: 2); + await Future.delayed(delay); + } + } +} + +class BuildDaemonTestContext extends TestContext with BuildDaemonContextMixin { + final _logger = logging.Logger('BuildDaemonTestContext'); BuildDaemonTestContext(super.project, super.sdkConfigurationProvider) : super.protected(); @@ -55,6 +144,7 @@ class BuildDaemonTestContext extends TestContext { late Stream _buildResults; ExpressionCompiler? _expressionCompiler; + @override late BuildDaemonClient daemonClient; ExpressionCompilerService? ddcService; @@ -128,7 +218,12 @@ class BuildDaemonTestContext extends TestContext { (log) { final record = log.toLogRecord(); final name = record.loggerName == '' ? '' : '${record.loggerName}: '; - print('${record.level.name}: $name${record.message}'); + _logger.log( + record.level, + '$name${record.message}', + record.error, + record.stackTrace, + ); }, ); daemonClient.registerBuildTarget( @@ -216,42 +311,10 @@ class BuildDaemonTestContext extends TestContext { _expressionCompiler = null; await daemonClient.close(); } - - @override - Future waitForSuccessfulBuild({ - Duration? timeout, - bool propagateToBrowser = false, - bool allowFailure = false, - }) async { - lastBuildFailed = false; - // Wait for the build until the timeout is reached: - final results = await daemonClient.buildResults - .firstWhere( - (daemon.BuildResults results) => results.results.any( - (daemon.BuildResult result) => - result.status == daemon.BuildStatus.succeeded || - (allowFailure && result.status == daemon.BuildStatus.failed), - ), - ) - .timeout(timeout ?? const Duration(seconds: 60)); - - lastBuildFailed = results.results.any( - (daemon.BuildResult result) => result.status == daemon.BuildStatus.failed, - ); - - if (propagateToBrowser) { - // Allow change to propagate to the browser. - // Windows, or at least Travis on Windows, seems to need more time. - // TODO: Wait for an explicit finish signal instead of adding this delay. - final delay = Platform.isWindows - ? const Duration(seconds: 5) - : const Duration(seconds: 2); - await Future.delayed(delay); - } - } } -class BuildDaemonAndFrontendServerTestContext extends TestContext { +class BuildDaemonAndFrontendServerTestContext extends TestContext + with BuildDaemonContextMixin { final _logger = logging.Logger('BuildDaemonAndFrontendServerTestContext'); BuildDaemonAndFrontendServerTestContext( @@ -265,6 +328,7 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext { late Stream _buildResults; ExpressionCompiler? _expressionCompiler; + @override late BuildDaemonClient daemonClient; ExpressionCompilerService? ddcService; late LocalFileSystem frontendServerFileSystem; From 66e618ba144dd9c1959467606fca95a323305c6b Mon Sep 17 00:00:00 2001 From: MarkZ Date: Tue, 18 Aug 2026 14:56:27 -0700 Subject: [PATCH 131/134] Fix appServerPath in dart_uri_file_uri to check usesFrontendServer --- dwds_test_common/lib/integration/dart_uri_file_uri.dart | 6 +++--- .../dart_uri_file_uri_debugger_module_names.dart | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dwds_test_common/lib/integration/dart_uri_file_uri.dart b/dwds_test_common/lib/integration/dart_uri_file_uri.dart index b57027dd59..dd00b126d8 100644 --- a/dwds_test_common/lib/integration/dart_uri_file_uri.dart +++ b/dwds_test_common/lib/integration/dart_uri_file_uri.dart @@ -22,9 +22,9 @@ void testAll({ group('Debugger module names: false |', () { const useDebuggerModuleNames = false; - final appServerPath = context.usesBuildDaemon - ? 'main.dart' - : 'web/main.dart'; + final appServerPath = context.usesFrontendServer + ? 'web/main.dart' + : 'main.dart'; final serverPath = 'packages/${testPackageProject.packageName}/test_library.dart'; final anotherServerPath = diff --git a/dwds_test_common/lib/integration/dart_uri_file_uri_debugger_module_names.dart b/dwds_test_common/lib/integration/dart_uri_file_uri_debugger_module_names.dart index 2dd5aea437..ec9b3264d6 100644 --- a/dwds_test_common/lib/integration/dart_uri_file_uri_debugger_module_names.dart +++ b/dwds_test_common/lib/integration/dart_uri_file_uri_debugger_module_names.dart @@ -22,9 +22,9 @@ void testAll({ group('Debugger module names: true |', () { const useDebuggerModuleNames = true; - final appServerPath = context.usesBuildDaemon - ? 'main.dart' - : 'web/main.dart'; + final appServerPath = context.usesFrontendServer + ? 'web/main.dart' + : 'main.dart'; final serverPath = 'packages/${testPackageProject.packageDirectory}/lib/test_library.dart'; final anotherServerPath = From 869d651497aad188835b0f6ff236271641e9d4d1 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Tue, 18 Aug 2026 16:22:45 -0700 Subject: [PATCH 132/134] Reduce concurrency in asset_handler test to prevent socket exhaustion and add safe daemonClient closing --- dwds_test_common/lib/integration/asset_handler.dart | 2 +- webdev/test/helpers/context.dart | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dwds_test_common/lib/integration/asset_handler.dart b/dwds_test_common/lib/integration/asset_handler.dart index 00716cab91..a0a4497538 100644 --- a/dwds_test_common/lib/integration/asset_handler.dart +++ b/dwds_test_common/lib/integration/asset_handler.dart @@ -65,7 +65,7 @@ void testAll({ }); test('can read large number of resources simultaneously', () async { - final n = 1000; + final n = 100; final futures = [ for (var i = 0; i < n; i++) readAsString('hello_world/main.ddc.js.map'), for (var i = 0; i < n; i++) readAsString('hello_world/main.ddc.js'), diff --git a/webdev/test/helpers/context.dart b/webdev/test/helpers/context.dart index 6038bfb5fc..d26d567029 100644 --- a/webdev/test/helpers/context.dart +++ b/webdev/test/helpers/context.dart @@ -309,7 +309,9 @@ class BuildDaemonTestContext extends TestContext with BuildDaemonContextMixin { await ddcService?.stop(); ddcService = null; _expressionCompiler = null; - await daemonClient.close(); + try { + await daemonClient.close(); + } catch (_) {} } } @@ -680,7 +682,9 @@ class BuildDaemonAndFrontendServerTestContext extends TestContext @override Future modeTearDown() async { await ddcService?.stop(); - await daemonClient.close(); + try { + await daemonClient.close(); + } catch (_) {} } @override From 19fb8d1f56b1dd50633753e55c25ae5e291769fb Mon Sep 17 00:00:00 2001 From: MarkZ Date: Tue, 18 Aug 2026 16:27:07 -0700 Subject: [PATCH 133/134] Wrap test IOClient with RetryClient to handle intermittent TCP connection resets under high load --- dwds_test_common/lib/fixtures/context.dart | 14 +++++++++----- .../lib/integration/asset_handler.dart | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/dwds_test_common/lib/fixtures/context.dart b/dwds_test_common/lib/fixtures/context.dart index 64ac2fb007..d2001a3d98 100644 --- a/dwds_test_common/lib/fixtures/context.dart +++ b/dwds_test_common/lib/fixtures/context.dart @@ -20,6 +20,7 @@ import 'package:dwds/src/utilities/dart_uri.dart'; import 'package:dwds/src/utilities/server.dart'; import 'package:http/http.dart'; import 'package:http/io_client.dart'; +import 'package:http/retry.dart'; import 'package:logging/logging.dart' as logging; import 'package:path/path.dart' as p; import 'package:shelf/shelf.dart' as shelf; @@ -164,11 +165,14 @@ abstract class TestContext { configureLogWriter(); - _client = IOClient( - HttpClient() - ..maxConnectionsPerHost = 200 - ..idleTimeout = const Duration(seconds: 30) - ..connectionTimeout = const Duration(seconds: 30), + _client = RetryClient( + IOClient( + HttpClient() + ..maxConnectionsPerHost = 200 + ..idleTimeout = const Duration(seconds: 30) + ..connectionTimeout = const Duration(seconds: 30), + ), + whenError: (error, stackTrace) => true, ); final systemTempDir = Directory.systemTemp; diff --git a/dwds_test_common/lib/integration/asset_handler.dart b/dwds_test_common/lib/integration/asset_handler.dart index a0a4497538..00716cab91 100644 --- a/dwds_test_common/lib/integration/asset_handler.dart +++ b/dwds_test_common/lib/integration/asset_handler.dart @@ -65,7 +65,7 @@ void testAll({ }); test('can read large number of resources simultaneously', () async { - final n = 100; + final n = 1000; final futures = [ for (var i = 0; i < n; i++) readAsString('hello_world/main.ddc.js.map'), for (var i = 0; i < n; i++) readAsString('hello_world/main.ddc.js'), From 68f01859cdb4c02a002197a58b6d4aec5faa041a Mon Sep 17 00:00:00 2001 From: MarkZ Date: Tue, 18 Aug 2026 16:33:02 -0700 Subject: [PATCH 134/134] Log warning when retrying request on network error in RetryClient --- dwds_test_common/lib/fixtures/context.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dwds_test_common/lib/fixtures/context.dart b/dwds_test_common/lib/fixtures/context.dart index d2001a3d98..e4c502bb63 100644 --- a/dwds_test_common/lib/fixtures/context.dart +++ b/dwds_test_common/lib/fixtures/context.dart @@ -172,7 +172,10 @@ abstract class TestContext { ..idleTimeout = const Duration(seconds: 30) ..connectionTimeout = const Duration(seconds: 30), ), - whenError: (error, stackTrace) => true, + whenError: (error, stackTrace) { + _logger.warning('Retrying request due to network error: $error'); + return true; + }, ); final systemTempDir = Directory.systemTemp;