From 826fc477008c4fb3f35a38ccbb5fcfea26d6b5d0 Mon Sep 17 00:00:00 2001 From: Jens Johansen Date: Fri, 22 Aug 2025 13:18:21 +0200 Subject: [PATCH 01/17] Pass the script uri for expression compilation; add test for expression compilation in parts. --- dwds/lib/src/debugging/modules.dart | 42 ++- .../lib/src/services/expression_compiler.dart | 1 + .../services/expression_compiler_service.dart | 4 + .../src/services/expression_evaluator.dart | 6 + .../build_daemon_parts_evaluate_test.dart | 27 ++ dwds/test/evaluate_parts_common.dart | 239 ++++++++++++++++++ .../expression_compiler_service_common.dart | 5 + dwds/test/fixtures/fakes.dart | 5 + dwds/test/fixtures/project.dart | 10 + .../frontend_server_parts_evaluate_test.dart | 44 ++++ fixtures/_test_parts/lib/library.dart | 13 + fixtures/_test_parts/lib/part1.dart | 13 + fixtures/_test_parts/lib/part2.dart | 16 ++ fixtures/_test_parts/lib/part3.dart | 21 ++ fixtures/_test_parts/pubspec.yaml | 16 ++ fixtures/_test_parts/web/base_index.html | 8 + fixtures/_test_parts/web/index.html | 7 + fixtures/_test_parts/web/main.dart | 23 ++ frontend_server_client/example/vm_client.dart | 6 +- .../lib/src/frontend_server_client.dart | 127 +++++----- 20 files changed, 557 insertions(+), 76 deletions(-) create mode 100644 dwds/test/build_daemon_parts_evaluate_test.dart create mode 100644 dwds/test/evaluate_parts_common.dart create mode 100644 dwds/test/frontend_server_parts_evaluate_test.dart create mode 100644 fixtures/_test_parts/lib/library.dart create mode 100644 fixtures/_test_parts/lib/part1.dart create mode 100644 fixtures/_test_parts/lib/part2.dart create mode 100644 fixtures/_test_parts/lib/part3.dart create mode 100644 fixtures/_test_parts/pubspec.yaml create mode 100644 fixtures/_test_parts/web/base_index.html create mode 100644 fixtures/_test_parts/web/index.html create mode 100644 fixtures/_test_parts/web/main.dart diff --git a/dwds/lib/src/debugging/modules.dart b/dwds/lib/src/debugging/modules.dart index b6b6b92a3..f31c99ba9 100644 --- a/dwds/lib/src/debugging/modules.dart +++ b/dwds/lib/src/debugging/modules.dart @@ -22,6 +22,14 @@ class Modules { // The Dart server path to library import uri final _sourceToLibrary = {}; + + // The Dart server path to library/part import uri + final _sourceToLibraryOrPart = {}; + + // Library import uri to list of script (parts) dart server path for the + // library. + final _scriptsForLibrary = >{}; + var _moduleMemoizer = AsyncMemoizer(); final Map _libraryToModule = {}; @@ -45,7 +53,18 @@ class Modules { assert(_entrypoint == entrypoint); for (final library in modifiedModuleReport.modifiedLibraries) { final libraryServerPath = _getLibraryServerPath(library); - _sourceToLibrary.remove(libraryServerPath); + final libraryUri = _sourceToLibrary.remove(libraryServerPath); + _sourceToLibraryOrPart.remove(libraryServerPath); + if (libraryUri != null) { + final scriptServerPaths = _scriptsForLibrary[libraryUri]; + if (scriptServerPaths != null) { + for(final scriptServerPath in scriptServerPaths) { + _sourceToLibraryOrPart.remove(scriptServerPath); + _sourceToLibrary.remove(scriptServerPath); + } + _scriptsForLibrary.remove(libraryUri); + } + } _sourceToModule.remove(libraryServerPath); _libraryToModule.remove(library); } @@ -57,6 +76,8 @@ class Modules { } _entrypoint = entrypoint; _sourceToLibrary.clear(); + _sourceToLibraryOrPart.clear(); + _scriptsForLibrary.clear(); _sourceToModule.clear(); _libraryToModule.clear(); _moduleToSources.clear(); @@ -81,6 +102,13 @@ class Modules { return _sourceToLibrary[serverPath]; } + /// Returns the importUri of the library or part for the provided Dart server + /// path. + Future libraryOrPartForSource(String serverPath) async { + await _moduleMemoizer.runOnce(_initializeMapping); + return _sourceToLibraryOrPart[serverPath]; + } + Future moduleForLibrary(String libraryUri) async { await _moduleMemoizer.runOnce(_initializeMapping); return _libraryToModule[libraryUri]; @@ -105,7 +133,8 @@ class Modules { ? library : DartUri(library, _root).serverPath; - /// Initializes [_sourceToModule], [_moduleToSources], and [_sourceToLibrary]. + /// Initializes [_sourceToModule], [_moduleToSources], [_sourceToLibrary] and + /// [_sourceToLibraryOrPart]. /// /// If [modifiedModuleReport] is not null, only updates the maps for the /// modified libraries in the report. @@ -125,6 +154,7 @@ class Modules { // it, so it's okay to only process the modified libraries. continue; } + final libraryUri = Uri.parse(library); final scripts = libraryToScripts[library]!; final libraryServerPath = _getLibraryServerPath(library); @@ -133,15 +163,17 @@ class Modules { _sourceToModule[libraryServerPath] = module; _moduleToSources.putIfAbsent(module, () => {}).add(libraryServerPath); - _sourceToLibrary[libraryServerPath] = Uri.parse(library); + _sourceToLibrary[libraryServerPath] = libraryUri; + _sourceToLibraryOrPart[libraryServerPath] = libraryUri; _libraryToModule[library] = module; for (final script in scripts) { final scriptServerPath = _getLibraryServerPath(script); - _sourceToModule[scriptServerPath] = module; _moduleToSources[module]!.add(scriptServerPath); - _sourceToLibrary[scriptServerPath] = Uri.parse(library); + _sourceToLibrary[scriptServerPath] = libraryUri; + _sourceToLibraryOrPart[scriptServerPath] = Uri.parse(script); + (_scriptsForLibrary[libraryUri] ??= []).add(scriptServerPath); } } else { _logger.warning('No module found for library $library'); diff --git a/dwds/lib/src/services/expression_compiler.dart b/dwds/lib/src/services/expression_compiler.dart index 175a5b857..2d7803a41 100644 --- a/dwds/lib/src/services/expression_compiler.dart +++ b/dwds/lib/src/services/expression_compiler.dart @@ -63,6 +63,7 @@ abstract class ExpressionCompiler { Future compileExpressionToJs( String isolateId, String libraryUri, + String scriptUri, int line, int column, Map jsModules, diff --git a/dwds/lib/src/services/expression_compiler_service.dart b/dwds/lib/src/services/expression_compiler_service.dart index 5b690f2a1..85d6a0e75 100644 --- a/dwds/lib/src/services/expression_compiler_service.dart +++ b/dwds/lib/src/services/expression_compiler_service.dart @@ -144,6 +144,7 @@ class _Compiler { Future compileExpressionToJs( String libraryUri, + String scriptUri, int line, int column, Map jsModules, @@ -171,6 +172,7 @@ class _Compiler { 'jsModules': jsModules, 'jsScope': jsFrameValues, 'libraryUri': libraryUri, + 'scriptUri': scriptUri, 'moduleName': moduleName, }); @@ -241,6 +243,7 @@ class ExpressionCompilerService implements ExpressionCompiler { Future compileExpressionToJs( String isolateId, String libraryUri, + String scriptUri, int line, int column, Map jsModules, @@ -249,6 +252,7 @@ class ExpressionCompilerService implements ExpressionCompiler { String expression, ) async => (await _compiler.future).compileExpressionToJs( libraryUri, + scriptUri, line, column, jsModules, diff --git a/dwds/lib/src/services/expression_evaluator.dart b/dwds/lib/src/services/expression_evaluator.dart index 1b6c38551..cd1607dce 100644 --- a/dwds/lib/src/services/expression_evaluator.dart +++ b/dwds/lib/src/services/expression_evaluator.dart @@ -125,6 +125,9 @@ class ExpressionEvaluator { final compilationResult = await _compiler.compileExpressionToJs( isolateId, libraryUri.toString(), + // Evaluating at "the library level" (and passing line 0 column 0) we'll + // also just pass the library uri as the script uri. + libraryUri.toString(), 0, 0, {}, @@ -280,6 +283,7 @@ class ExpressionEvaluator { final dartLocation = locationMap.dartLocation; final dartSourcePath = dartLocation.uri.serverPath; final libraryUri = await _modules.libraryForSource(dartSourcePath); + final scriptUri = await _modules.libraryOrPartForSource(dartSourcePath); if (libraryUri == null) { return createError( EvaluationErrorKind.internal, @@ -298,6 +302,7 @@ class ExpressionEvaluator { _logger.finest( 'Evaluating "$expression" at $module, ' '$libraryUri:${dartLocation.line}:${dartLocation.column} ' + 'or rather $scriptUri:${dartLocation.line}:${dartLocation.column} ' 'with scope: $scope', ); @@ -317,6 +322,7 @@ class ExpressionEvaluator { final compilationResult = await _compiler.compileExpressionToJs( isolateId, libraryUri.toString(), + scriptUri.toString(), dartLocation.line, dartLocation.column, {}, diff --git a/dwds/test/build_daemon_parts_evaluate_test.dart b/dwds/test/build_daemon_parts_evaluate_test.dart new file mode 100644 index 000000000..fab3fbae5 --- /dev/null +++ b/dwds/test/build_daemon_parts_evaluate_test.dart @@ -0,0 +1,27 @@ +// 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') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:test/test.dart'; +import 'package:test_common/test_sdk_configuration.dart'; + +import 'evaluate_parts_common.dart'; +import 'fixtures/context.dart'; + +void main() async { + // Enable verbose logging for debugging. + const debug = false; + + final provider = TestSdkConfigurationProvider(verbose: debug); + tearDownAll(provider.dispose); + + testAll( + provider: provider, + compilationMode: CompilationMode.buildDaemon, + debug: debug, + ); +} diff --git a/dwds/test/evaluate_parts_common.dart b/dwds/test/evaluate_parts_common.dart new file mode 100644 index 000000000..2c4be6e8c --- /dev/null +++ b/dwds/test/evaluate_parts_common.dart @@ -0,0 +1,239 @@ +// 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') +@Timeout(Duration(minutes: 2)) +library; + +import 'package:test/test.dart'; +import 'package:test_common/logging.dart'; +import 'package:test_common/test_sdk_configuration.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'; + +void testAll({ + required TestSdkConfigurationProvider provider, + CompilationMode compilationMode = CompilationMode.buildDaemon, + IndexBaseMode indexBaseMode = IndexBaseMode.noBase, + bool useDebuggerModuleNames = false, + bool debug = false, +}) { + if (compilationMode == CompilationMode.buildDaemon && + indexBaseMode == IndexBaseMode.base) { + throw StateError( + 'build daemon scenario does not support non-empty base in index file', + ); + } + + final testParts = TestProject.testParts(baseMode: indexBaseMode); + + final context = TestContext(testParts, provider); + + Future onBreakPoint( + String isolate, + ScriptRef script, + String breakPointId, + Future Function() body, + ) async { + Breakpoint? bp; + try { + final line = await context.findBreakpointLine( + breakPointId, + isolate, + script, + ); + bp = await context.service.addBreakpointWithScriptUri( + isolate, + script.uri!, + line, + ); + await body(); + } finally { + // Remove breakpoint so it doesn't impact other tests or retries. + if (bp != null) { + await context.service.removeBreakpoint(isolate, bp.id!); + } + } + } + + group('shared context with evaluation', () { + setUpAll(() async { + setCurrentLogWriter(debug: debug); + await context.setUp( + testSettings: TestSettings( + compilationMode: compilationMode, + enableExpressionEvaluation: true, + useDebuggerModuleNames: useDebuggerModuleNames, + verboseCompiler: debug, + ), + ); + }); + + tearDownAll(() async { + await context.tearDown(); + }); + + setUp(() => setCurrentLogWriter(debug: debug)); + + group('evaluateInFrame', () { + late VmServiceInterface service; + VM vm; + late Isolate isolate; + late String isolateId; + ScriptList scripts; + late ScriptRef mainScript; + late ScriptRef part1Script; + late ScriptRef part2Script; + late ScriptRef part3Script; + late Stream stream; + + setUp(() async { + setCurrentLogWriter(debug: debug); + service = context.service; + vm = await service.getVM(); + isolate = await service.getIsolate(vm.isolates!.first.id!); + isolateId = isolate.id!; + scripts = await service.getScripts(isolateId); + + await service.streamListen('Debug'); + stream = service.onEvent('Debug'); + + final packageName = testParts.packageName; + + mainScript = scripts.scripts!.firstWhere( + (each) => each.uri!.contains('package:$packageName/library.dart'), + ); + part1Script = scripts.scripts!.firstWhere( + (each) => each.uri!.contains('package:$packageName/part1.dart'), + ); + part2Script = scripts.scripts!.firstWhere( + (each) => each.uri!.contains('package:$packageName/part2.dart'), + ); + part3Script = scripts.scripts!.firstWhere( + (each) => each.uri!.contains('package:$packageName/part3.dart'), + ); + }); + + tearDown(() async { + await service.resume(isolateId); + }); + + test('evaluate expression in main library', () async { + await onBreakPoint( + isolateId, + mainScript, + 'Concatenate1', + () async { + final event = await stream.firstWhere( + (event) => event.kind == EventKind.kPauseBreakpoint, + ); + + final result = await context.service.evaluateInFrame( + isolateId, + event.topFrame!.index!, + 'a.substring(2, 4)', + ); + + expect( + result, + isA().having( + (instance) => instance.valueAsString, + 'valueAsString', + 'll', + ), + ); + }, + ); + }); + + test('evaluate expression in part1', () async { + await onBreakPoint( + isolateId, + part1Script, + 'Concatenate2', + () async { + final event = await stream.firstWhere( + (event) => event.kind == EventKind.kPauseBreakpoint, + ); + + final result = await context.service.evaluateInFrame( + isolateId, + event.topFrame!.index!, + 'a + b + 37', + ); + + expect( + result, + isA().having( + (instance) => instance.valueAsString, + 'valueAsString', + '42', + ), + ); + }, + ); + }); + + test('evaluate expression in part2', () async { + await onBreakPoint( + isolateId, + part2Script, + 'Concatenate3', + () async { + final event = await stream.firstWhere( + (event) => event.kind == EventKind.kPauseBreakpoint, + ); + + final result = await context.service.evaluateInFrame( + isolateId, + event.topFrame!.index!, + 'a.length + b + 1', + ); + + expect( + result, + isA().having( + (instance) => instance.valueAsString, + 'valueAsString', + '42.42', + ), + ); + }, + ); + }); + + test('evaluate expression in part3', () async { + await onBreakPoint( + isolateId, + part3Script, + 'Concatenate4', + () async { + final event = await stream.firstWhere( + (event) => event.kind == EventKind.kPauseBreakpoint, + ); + + final result = await context.service.evaluateInFrame( + isolateId, + event.topFrame!.index!, + '(List.of(a)..add(b.keys.first)).toString()', + ); + + expect( + result, + isA().having( + (instance) => instance.valueAsString, + 'valueAsString', + '[hello, world, foo]', + ), + ); + }, + ); + }); + }); + }); +} diff --git a/dwds/test/expression_compiler_service_common.dart b/dwds/test/expression_compiler_service_common.dart index e1e7f7c76..bb6f267e9 100644 --- a/dwds/test/expression_compiler_service_common.dart +++ b/dwds/test/expression_compiler_service_common.dart @@ -188,6 +188,7 @@ void testAll({required CompilerOptions compilerOptions}) { final compilationResult = await service.compileExpressionToJs( '0', 'org-dartlang-app:/try.dart', + 'org-dartlang-app:/try.dart', 2, 1, {}, @@ -235,6 +236,7 @@ void testAll({required CompilerOptions compilerOptions}) { final compilationResult1 = await service.compileExpressionToJs( '0', 'org-dartlang-app:/try.dart', + 'org-dartlang-app:/try.dart', 2, 1, {}, @@ -245,6 +247,7 @@ void testAll({required CompilerOptions compilerOptions}) { final compilationResult2 = await service.compileExpressionToJs( '0', 'org-dartlang-app:/try.dart', + 'org-dartlang-app:/try.dart', 2, 1, {}, @@ -299,6 +302,7 @@ void testAll({required CompilerOptions compilerOptions}) { final compilationResult1 = service.compileExpressionToJs( '0', 'org-dartlang-app:/try.dart', + 'org-dartlang-app:/try.dart', 2, 1, {}, @@ -309,6 +313,7 @@ void testAll({required CompilerOptions compilerOptions}) { final compilationResult2 = service.compileExpressionToJs( '0', 'org-dartlang-app:/try.dart', + 'org-dartlang-app:/try.dart', 2, 1, {}, diff --git a/dwds/test/fixtures/fakes.dart b/dwds/test/fixtures/fakes.dart index e53c8e26c..e9bc4ef29 100644 --- a/dwds/test/fixtures/fakes.dart +++ b/dwds/test/fixtures/fakes.dart @@ -165,6 +165,10 @@ class FakeModules implements Modules { @override Future libraryForSource(String serverPath) async => Uri(path: _library); + @override + Future libraryOrPartForSource(String serverPath) async => + Uri(path: _library); + @override Future moduleForSource(String serverPath) async => _module; @@ -450,6 +454,7 @@ class FakeExpressionCompiler implements ExpressionCompiler { Future compileExpressionToJs( String isolateId, String libraryUri, + String scriptUri, int line, int column, Map jsModules, diff --git a/dwds/test/fixtures/project.dart b/dwds/test/fixtures/project.dart index 78f5efdd9..370c0db52 100644 --- a/dwds/test/fixtures/project.dart +++ b/dwds/test/fixtures/project.dart @@ -89,6 +89,16 @@ class TestProject { : 'index.html', ); + TestProject.testParts({IndexBaseMode baseMode = IndexBaseMode.noBase}) + : this._( + packageName: '_test_parts', + packageDirectory: '_test_parts', + webAssetsPath: 'web', + dartEntryFileName: 'main.dart', + htmlEntryFileName: + baseMode == IndexBaseMode.base ? 'base_index.html' : 'index.html', + ); + static final test = TestProject._( packageName: '_test', packageDirectory: '_test', diff --git a/dwds/test/frontend_server_parts_evaluate_test.dart b/dwds/test/frontend_server_parts_evaluate_test.dart new file mode 100644 index 000000000..9d8b7a035 --- /dev/null +++ b/dwds/test/frontend_server_parts_evaluate_test.dart @@ -0,0 +1,44 @@ +// 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') +@Timeout(Duration(minutes: 2)) +library; + +import 'dart:io'; + +import 'package:test/test.dart'; +import 'package:test_common/test_sdk_configuration.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; + + final provider = TestSdkConfigurationProvider(verbose: debug); + tearDownAll(provider.dispose); + + group('Context with parts |', () { + for (final indexBaseMode in IndexBaseMode.values) { + group( + 'with ${indexBaseMode.name} |', + () { + testAll( + provider: provider, + compilationMode: CompilationMode.frontendServer, + indexBaseMode: indexBaseMode, + useDebuggerModuleNames: true, + debug: debug, + ); + }, + skip: + // https://github.com/dart-lang/sdk/issues/49277 + indexBaseMode == IndexBaseMode.base && Platform.isWindows, + ); + } + }); +} diff --git a/fixtures/_test_parts/lib/library.dart b/fixtures/_test_parts/lib/library.dart new file mode 100644 index 000000000..5dcccc6d9 --- /dev/null +++ b/fixtures/_test_parts/lib/library.dart @@ -0,0 +1,13 @@ +// 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. + +part 'part1.dart'; +part 'part2.dart'; +part 'part3.dart'; + +String concatenate1(String a, String b) { + // Padding........................... + // 'return' is at line 12, column 3, offset 410. + return '$a$b'; // Breakpoint: Concatenate1 +} diff --git a/fixtures/_test_parts/lib/part1.dart b/fixtures/_test_parts/lib/part1.dart new file mode 100644 index 000000000..ba8524742 --- /dev/null +++ b/fixtures/_test_parts/lib/part1.dart @@ -0,0 +1,13 @@ +// 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. + +part of 'library.dart'; + +String concatenate2(int a, int b) { + // Padding............ + // Padding.............. + // Padding.............. + // 'return' is at line 12, column 3, offset 410. + return '$a$b'; // Breakpoint: Concatenate2 +} diff --git a/fixtures/_test_parts/lib/part2.dart b/fixtures/_test_parts/lib/part2.dart new file mode 100644 index 000000000..956fcee27 --- /dev/null +++ b/fixtures/_test_parts/lib/part2.dart @@ -0,0 +1,16 @@ +// 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. + +part of 'library.dart'; + +// Padding.... +// +// +// 'return' below is at line that doesn't exist in the previous files, +// but still at offset 410. +// + +String concatenate3(String a, double b) { + return '$a$b'; // Breakpoint: Concatenate3 +} diff --git a/fixtures/_test_parts/lib/part3.dart b/fixtures/_test_parts/lib/part3.dart new file mode 100644 index 000000000..f44084ea8 --- /dev/null +++ b/fixtures/_test_parts/lib/part3.dart @@ -0,0 +1,21 @@ +// 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. + +part of 'library.dart'; + +// Padding +// Padding +// Padding +// Padding +// Padding +// Padding +// Padding +// Padding +// Padding +// 'return' below is at line that doesn't exist in the other files, +// and at offset that doesn't exist in the other files. + +String concatenate4(List a, Map b) { + return '$a$b'; // Breakpoint: Concatenate4 +} diff --git a/fixtures/_test_parts/pubspec.yaml b/fixtures/_test_parts/pubspec.yaml new file mode 100644 index 000000000..4d294c637 --- /dev/null +++ b/fixtures/_test_parts/pubspec.yaml @@ -0,0 +1,16 @@ +name: _test_parts +version: 1.0.0 +description: >- + A fake package used for testing parts. +publish_to: none + +environment: + sdk: ^3.2.0 + +dependencies: + intl: ^0.17.0 + path: ^1.6.1 + +dev_dependencies: + build_runner: ^2.5.0 + build_web_compilers: ^4.0.4 diff --git a/fixtures/_test_parts/web/base_index.html b/fixtures/_test_parts/web/base_index.html new file mode 100644 index 000000000..affdbcb5c --- /dev/null +++ b/fixtures/_test_parts/web/base_index.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/fixtures/_test_parts/web/index.html b/fixtures/_test_parts/web/index.html new file mode 100644 index 000000000..d93440a94 --- /dev/null +++ b/fixtures/_test_parts/web/index.html @@ -0,0 +1,7 @@ + + + + + + + diff --git a/fixtures/_test_parts/web/main.dart b/fixtures/_test_parts/web/main.dart new file mode 100644 index 000000000..4e489d3b5 --- /dev/null +++ b/fixtures/_test_parts/web/main.dart @@ -0,0 +1,23 @@ +// 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. + +import 'dart:async'; +import 'dart:core'; +// TODO: https://github.com/dart-lang/webdev/issues/2508 +// ignore: deprecated_member_use +import 'dart:html'; + +import 'package:_test_parts/library.dart'; + +void main() { + // For setting breakpoints. + Timer.periodic(const Duration(seconds: 1), (_) { + concatenate1('hello', 'world'); + concatenate2(2, 3); + concatenate3('hello', 36.42); + concatenate4(['hello', 'world'], {'foo': 'bar'}); + }); + + document.body!.appendText(concatenate1('Program', ' is running!')); +} diff --git a/frontend_server_client/example/vm_client.dart b/frontend_server_client/example/vm_client.dart index d10cd4db1..d557f7910 100644 --- a/frontend_server_client/example/vm_client.dart +++ b/frontend_server_client/example/vm_client.dart @@ -34,10 +34,8 @@ void main(List args) async { Process appProcess; final vmServiceCompleter = Completer(); - appProcess = await Process.start(Platform.resolvedExecutable, [ - '--enable-vm-service', - result.dillOutput!, - ]); + appProcess = await Process.start(Platform.resolvedExecutable, + ['--enable-vm-service=0', result.dillOutput!]); final sawHelloWorld = Completer(); appProcess.stdout .transform(utf8.decoder) diff --git a/frontend_server_common/lib/src/frontend_server_client.dart b/frontend_server_common/lib/src/frontend_server_client.dart index d7e23f8f5..85cd94c6d 100644 --- a/frontend_server_common/lib/src/frontend_server_client.dart +++ b/frontend_server_common/lib/src/frontend_server_client.dart @@ -201,6 +201,7 @@ class _CompileExpressionRequest extends _CompilationRequest { this.definitions, this.typeDefinitions, this.libraryUri, + this.scriptUri, this.klass, this.isStatic, ); @@ -209,6 +210,7 @@ class _CompileExpressionRequest extends _CompilationRequest { List definitions; List typeDefinitions; String? libraryUri; + String? scriptUri; String? klass; bool? isStatic; @@ -219,17 +221,18 @@ class _CompileExpressionRequest extends _CompilationRequest { class _CompileExpressionToJsRequest extends _CompilationRequest { _CompileExpressionToJsRequest( - super.completer, - this.libraryUri, - this.line, - this.column, - this.jsModules, - this.jsFrameValues, - this.moduleName, - this.expression, - ); + super.completer, + this.libraryUri, + this.scriptUri, + this.line, + this.column, + this.jsModules, + this.jsFrameValues, + this.moduleName, + this.expression); String libraryUri; + String scriptUri; int line; int column; Map jsModules; @@ -458,6 +461,7 @@ class ResidentCompiler { List definitions, List typeDefinitions, String libraryUri, + String scriptUri, String klass, bool isStatic, ) { @@ -466,17 +470,8 @@ class ResidentCompiler { } final completer = Completer(); - _controller.add( - _CompileExpressionRequest( - completer, - expression, - definitions, - typeDefinitions, - libraryUri, - klass, - isStatic, - ), - ); + _controller.add(_CompileExpressionRequest(completer, expression, + definitions, typeDefinitions, libraryUri, scriptUri, klass, isStatic)); return completer.future; } @@ -493,6 +488,7 @@ class ResidentCompiler { final server = _server!; final inputKey = generateV4UUID(); + if (1 + 1 == 2) throw 'hello #2'; server.stdin.writeln('compile-expression $inputKey'); server.stdin.writeln(request.expression); request.definitions.forEach(server.stdin.writeln); @@ -508,31 +504,29 @@ class ResidentCompiler { /// Compiles dart expression to JavaScript. Future compileExpressionToJs( - String libraryUri, - int line, - int column, - Map jsModules, - Map jsFrameValues, - String moduleName, - String expression, - ) { + String libraryUri, + String scriptUri, + int line, + int column, + Map jsModules, + Map jsFrameValues, + String moduleName, + String expression) { if (!_controller.hasListener) { _controller.stream.listen(_handleCompilationRequest); } final completer = Completer(); - _controller.add( - _CompileExpressionToJsRequest( + _controller.add(_CompileExpressionToJsRequest( completer, libraryUri, + scriptUri, line, column, jsModules, jsFrameValues, moduleName, - expression, - ), - ); + expression)); return completer.future; } @@ -544,28 +538,27 @@ class ResidentCompiler { expectSources: false, ); - // 'compile-expression-to-js' should be invoked after compiler has been started, - // program was compiled. + // Compiling an expression should happen after the compiler has been + // started and the program was compiled. if (_server == null) { return null; } final server = _server!; - final inputKey = generateV4UUID(); - server.stdin.writeln('compile-expression-to-js $inputKey'); - server.stdin.writeln(request.libraryUri); - server.stdin.writeln(request.line); - server.stdin.writeln(request.column); - request.jsModules.forEach((k, v) { - server.stdin.writeln('$k:$v'); - }); - server.stdin.writeln(inputKey); - request.jsFrameValues.forEach((k, v) { - server.stdin.writeln('$k:$v'); - }); - server.stdin.writeln(inputKey); - server.stdin.writeln(request.moduleName); - server.stdin.writeln(request.expression); + server.stdin.writeln('JSON_INPUT'); + server.stdin.writeln(json.encode({ + 'type': 'COMPILE_EXPRESSION_JS', + 'data': { + 'expression': request.expression, + 'libraryUri': request.libraryUri, + 'scriptUri': request.scriptUri, + 'line': request.line, + 'column': request.column, + 'jsModules': request.jsModules, + 'jsFrameValues': request.jsFrameValues, + 'moduleName': request.moduleName, + }, + })); return _stdoutHandler.compilerOutput.future; } @@ -654,24 +647,24 @@ class TestExpressionCompiler implements ExpressionCompiler { @override Future compileExpressionToJs( - String isolateId, - String libraryUri, - int line, - int column, - Map jsModules, - Map jsFrameValues, - String moduleName, - String expression, - ) async { + String isolateId, + String libraryUri, + String scriptUri, + int line, + int column, + Map jsModules, + Map jsFrameValues, + String moduleName, + String expression) async { final compilerOutput = await _generator.compileExpressionToJs( - libraryUri, - line, - column, - jsModules, - jsFrameValues, - moduleName, - expression, - ); + libraryUri, + scriptUri, + line, + column, + jsModules, + jsFrameValues, + moduleName, + expression); if (compilerOutput != null) { final content = utf8.decode( From 0649d29ccc3d46b6382ea26e2ad72d2c253064d6 Mon Sep 17 00:00:00 2001 From: Jens Johansen Date: Wed, 27 Aug 2025 14:10:02 +0200 Subject: [PATCH 02/17] formatting --- dwds/lib/src/debugging/modules.dart | 2 +- dwds/test/evaluate_parts_common.dart | 180 ++++++++++++--------------- 2 files changed, 81 insertions(+), 101 deletions(-) diff --git a/dwds/lib/src/debugging/modules.dart b/dwds/lib/src/debugging/modules.dart index f31c99ba9..7c676c99b 100644 --- a/dwds/lib/src/debugging/modules.dart +++ b/dwds/lib/src/debugging/modules.dart @@ -58,7 +58,7 @@ class Modules { if (libraryUri != null) { final scriptServerPaths = _scriptsForLibrary[libraryUri]; if (scriptServerPaths != null) { - for(final scriptServerPath in scriptServerPaths) { + for (final scriptServerPath in scriptServerPaths) { _sourceToLibraryOrPart.remove(scriptServerPath); _sourceToLibrary.remove(scriptServerPath); } diff --git a/dwds/test/evaluate_parts_common.dart b/dwds/test/evaluate_parts_common.dart index 2c4be6e8c..c7922adc5 100644 --- a/dwds/test/evaluate_parts_common.dart +++ b/dwds/test/evaluate_parts_common.dart @@ -124,115 +124,95 @@ void testAll({ }); test('evaluate expression in main library', () async { - await onBreakPoint( - isolateId, - mainScript, - 'Concatenate1', - () async { - final event = await stream.firstWhere( - (event) => event.kind == EventKind.kPauseBreakpoint, - ); - - final result = await context.service.evaluateInFrame( - isolateId, - event.topFrame!.index!, - 'a.substring(2, 4)', - ); - - expect( - result, - isA().having( - (instance) => instance.valueAsString, - 'valueAsString', - 'll', - ), - ); - }, - ); + await onBreakPoint(isolateId, mainScript, 'Concatenate1', () async { + final event = await stream.firstWhere( + (event) => event.kind == EventKind.kPauseBreakpoint, + ); + + final result = await context.service.evaluateInFrame( + isolateId, + event.topFrame!.index!, + 'a.substring(2, 4)', + ); + + expect( + result, + isA().having( + (instance) => instance.valueAsString, + 'valueAsString', + 'll', + ), + ); + }); }); test('evaluate expression in part1', () async { - await onBreakPoint( - isolateId, - part1Script, - 'Concatenate2', - () async { - final event = await stream.firstWhere( - (event) => event.kind == EventKind.kPauseBreakpoint, - ); - - final result = await context.service.evaluateInFrame( - isolateId, - event.topFrame!.index!, - 'a + b + 37', - ); - - expect( - result, - isA().having( - (instance) => instance.valueAsString, - 'valueAsString', - '42', - ), - ); - }, - ); + await onBreakPoint(isolateId, part1Script, 'Concatenate2', () async { + final event = await stream.firstWhere( + (event) => event.kind == EventKind.kPauseBreakpoint, + ); + + final result = await context.service.evaluateInFrame( + isolateId, + event.topFrame!.index!, + 'a + b + 37', + ); + + expect( + result, + isA().having( + (instance) => instance.valueAsString, + 'valueAsString', + '42', + ), + ); + }); }); test('evaluate expression in part2', () async { - await onBreakPoint( - isolateId, - part2Script, - 'Concatenate3', - () async { - final event = await stream.firstWhere( - (event) => event.kind == EventKind.kPauseBreakpoint, - ); - - final result = await context.service.evaluateInFrame( - isolateId, - event.topFrame!.index!, - 'a.length + b + 1', - ); - - expect( - result, - isA().having( - (instance) => instance.valueAsString, - 'valueAsString', - '42.42', - ), - ); - }, - ); + await onBreakPoint(isolateId, part2Script, 'Concatenate3', () async { + final event = await stream.firstWhere( + (event) => event.kind == EventKind.kPauseBreakpoint, + ); + + final result = await context.service.evaluateInFrame( + isolateId, + event.topFrame!.index!, + 'a.length + b + 1', + ); + + expect( + result, + isA().having( + (instance) => instance.valueAsString, + 'valueAsString', + '42.42', + ), + ); + }); }); test('evaluate expression in part3', () async { - await onBreakPoint( - isolateId, - part3Script, - 'Concatenate4', - () async { - final event = await stream.firstWhere( - (event) => event.kind == EventKind.kPauseBreakpoint, - ); - - final result = await context.service.evaluateInFrame( - isolateId, - event.topFrame!.index!, - '(List.of(a)..add(b.keys.first)).toString()', - ); - - expect( - result, - isA().having( - (instance) => instance.valueAsString, - 'valueAsString', - '[hello, world, foo]', - ), - ); - }, - ); + await onBreakPoint(isolateId, part3Script, 'Concatenate4', () async { + final event = await stream.firstWhere( + (event) => event.kind == EventKind.kPauseBreakpoint, + ); + + final result = await context.service.evaluateInFrame( + isolateId, + event.topFrame!.index!, + '(List.of(a)..add(b.keys.first)).toString()', + ); + + expect( + result, + isA().having( + (instance) => instance.valueAsString, + 'valueAsString', + '[hello, world, foo]', + ), + ); + }); }); }); }); From 515652fc6ba40b4273a39e8f3655f78ee2cde090 Mon Sep 17 00:00:00 2001 From: Jens Johansen Date: Wed, 27 Aug 2025 14:21:21 +0200 Subject: [PATCH 03/17] Insert comment about _compileExpression not working --- frontend_server_common/lib/src/frontend_server_client.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend_server_common/lib/src/frontend_server_client.dart b/frontend_server_common/lib/src/frontend_server_client.dart index 85cd94c6d..c314a31fa 100644 --- a/frontend_server_common/lib/src/frontend_server_client.dart +++ b/frontend_server_common/lib/src/frontend_server_client.dart @@ -480,6 +480,10 @@ class ResidentCompiler { ) async { _stdoutHandler.reset(suppressCompilerMessages: true, expectSources: false); + // This hasn't been updated for years and will not work with current + // versions of Dart (anything including + // https://github.com/dart-lang/sdk/commit/17781dbc3645). + // 'compile-expression' should be invoked after compiler has been started, // program was compiled. if (_server == null) { @@ -488,7 +492,6 @@ class ResidentCompiler { final server = _server!; final inputKey = generateV4UUID(); - if (1 + 1 == 2) throw 'hello #2'; server.stdin.writeln('compile-expression $inputKey'); server.stdin.writeln(request.expression); request.definitions.forEach(server.stdin.writeln); From 7f7781d98b4566d4040edd1a0e4ae3aab90187a5 Mon Sep 17 00:00:00 2001 From: Jens Johansen Date: Tue, 2 Sep 2025 09:04:36 +0200 Subject: [PATCH 04/17] Try to bump min sdk version to dev release --- dwds/pubspec.yaml | 2 +- frontend_server_client/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dwds/pubspec.yaml b/dwds/pubspec.yaml index d4d4f6376..1b1fd4082 100644 --- a/dwds/pubspec.yaml +++ b/dwds/pubspec.yaml @@ -7,7 +7,7 @@ description: >- service protocol. repository: https://github.com/dart-lang/webdev/tree/main/dwds environment: - sdk: ^3.10.0-0.0.dev + sdk: ">=3.10.0-149.0.dev <4.0.0" dependencies: async: ^2.9.0 diff --git a/frontend_server_client/pubspec.yaml b/frontend_server_client/pubspec.yaml index 08a816764..4eb795382 100644 --- a/frontend_server_client/pubspec.yaml +++ b/frontend_server_client/pubspec.yaml @@ -5,7 +5,7 @@ description: >- Dart SDK. repository: https://github.com/dart-lang/webdev/tree/main/frontend_server_client environment: - sdk: ^3.10.0-0.0.dev + sdk: ">=3.10.0-149.0.dev <4.0.0" dependencies: async: ^2.5.0 From eeefd77b4664a0342231ab91ba721669ea38b8de Mon Sep 17 00:00:00 2001 From: Jens Johansen Date: Tue, 2 Sep 2025 09:55:12 +0200 Subject: [PATCH 05/17] Attempt to bump version of dwds; format after sdk bump --- dwds/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/dwds/CHANGELOG.md b/dwds/CHANGELOG.md index 5af9ce63b..c1074ae8e 100644 --- a/dwds/CHANGELOG.md +++ b/dwds/CHANGELOG.md @@ -1,6 +1,7 @@ ## 25.1.1-wip - Bump SDK constraint to ^3.10.0 +- Added 'scriptUri' parameter to compileExpressionToJs ## 25.1.0 From 03c8ed5a2ae847b49a756d30ab57b3370d65b36c Mon Sep 17 00:00:00 2001 From: Jens Johansen Date: Tue, 2 Sep 2025 10:21:41 +0200 Subject: [PATCH 06/17] Undid some stuff --- frontend_server_client/pubspec.yaml | 2 +- frontend_server_common/CHANGELOG.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend_server_client/pubspec.yaml b/frontend_server_client/pubspec.yaml index 4eb795382..9675d720e 100644 --- a/frontend_server_client/pubspec.yaml +++ b/frontend_server_client/pubspec.yaml @@ -5,7 +5,7 @@ description: >- Dart SDK. repository: https://github.com/dart-lang/webdev/tree/main/frontend_server_client environment: - sdk: ">=3.10.0-149.0.dev <4.0.0" + sdk: ^3.1.0 dependencies: async: ^2.5.0 diff --git a/frontend_server_common/CHANGELOG.md b/frontend_server_common/CHANGELOG.md index cc6d0bedc..4d19bbe27 100644 --- a/frontend_server_common/CHANGELOG.md +++ b/frontend_server_common/CHANGELOG.md @@ -2,6 +2,8 @@ - Update minimum SDK constraint to 3.8.0. - Add bootstrapping code for DDC library bundle format. +- Added scriptUri to compileExpression*Request +- Updated Dart SDK constraints to ">=3.10.0-149.0.dev <4.0.0" ## 0.2.2 From 4f05d7a56ab3f51bb4e75ab30650e2e8599c8022 Mon Sep 17 00:00:00 2001 From: Jens Johansen Date: Tue, 2 Sep 2025 11:00:01 +0200 Subject: [PATCH 07/17] Remove comment in frontend_server_common again --- it's not used by anthing and not release --- frontend_server_common/lib/src/frontend_server_client.dart | 4 ---- 1 file changed, 4 deletions(-) diff --git a/frontend_server_common/lib/src/frontend_server_client.dart b/frontend_server_common/lib/src/frontend_server_client.dart index c314a31fa..d58b3d1ed 100644 --- a/frontend_server_common/lib/src/frontend_server_client.dart +++ b/frontend_server_common/lib/src/frontend_server_client.dart @@ -480,10 +480,6 @@ class ResidentCompiler { ) async { _stdoutHandler.reset(suppressCompilerMessages: true, expectSources: false); - // This hasn't been updated for years and will not work with current - // versions of Dart (anything including - // https://github.com/dart-lang/sdk/commit/17781dbc3645). - // 'compile-expression' should be invoked after compiler has been started, // program was compiled. if (_server == null) { From 60870529b81a4590b343a54d12d779c80caca5f7 Mon Sep 17 00:00:00 2001 From: Jens Johansen Date: Tue, 2 Sep 2025 11:04:25 +0200 Subject: [PATCH 08/17] More formatting --- dwds/test/fixtures/project.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dwds/test/fixtures/project.dart b/dwds/test/fixtures/project.dart index 370c0db52..2df97a4fa 100644 --- a/dwds/test/fixtures/project.dart +++ b/dwds/test/fixtures/project.dart @@ -95,8 +95,9 @@ class TestProject { packageDirectory: '_test_parts', webAssetsPath: 'web', dartEntryFileName: 'main.dart', - htmlEntryFileName: - baseMode == IndexBaseMode.base ? 'base_index.html' : 'index.html', + htmlEntryFileName: baseMode == IndexBaseMode.base + ? 'base_index.html' + : 'index.html', ); static final test = TestProject._( From 392000d6e4feb66c6e8aee77917f8838767f3925 Mon Sep 17 00:00:00 2001 From: Jens Johansen Date: Tue, 2 Sep 2025 11:05:06 +0200 Subject: [PATCH 09/17] Even more formatting --- .../lib/src/frontend_server_client.dart | 121 ++++++++++-------- 1 file changed, 70 insertions(+), 51 deletions(-) diff --git a/frontend_server_common/lib/src/frontend_server_client.dart b/frontend_server_common/lib/src/frontend_server_client.dart index d58b3d1ed..f97d15d92 100644 --- a/frontend_server_common/lib/src/frontend_server_client.dart +++ b/frontend_server_common/lib/src/frontend_server_client.dart @@ -221,15 +221,16 @@ class _CompileExpressionRequest extends _CompilationRequest { class _CompileExpressionToJsRequest extends _CompilationRequest { _CompileExpressionToJsRequest( - super.completer, - this.libraryUri, - this.scriptUri, - this.line, - this.column, - this.jsModules, - this.jsFrameValues, - this.moduleName, - this.expression); + super.completer, + this.libraryUri, + this.scriptUri, + this.line, + this.column, + this.jsModules, + this.jsFrameValues, + this.moduleName, + this.expression, + ); String libraryUri; String scriptUri; @@ -470,8 +471,18 @@ class ResidentCompiler { } final completer = Completer(); - _controller.add(_CompileExpressionRequest(completer, expression, - definitions, typeDefinitions, libraryUri, scriptUri, klass, isStatic)); + _controller.add( + _CompileExpressionRequest( + completer, + expression, + definitions, + typeDefinitions, + libraryUri, + scriptUri, + klass, + isStatic, + ), + ); return completer.future; } @@ -503,20 +514,22 @@ class ResidentCompiler { /// Compiles dart expression to JavaScript. Future compileExpressionToJs( - String libraryUri, - String scriptUri, - int line, - int column, - Map jsModules, - Map jsFrameValues, - String moduleName, - String expression) { + String libraryUri, + String scriptUri, + int line, + int column, + Map jsModules, + Map jsFrameValues, + String moduleName, + String expression, + ) { if (!_controller.hasListener) { _controller.stream.listen(_handleCompilationRequest); } final completer = Completer(); - _controller.add(_CompileExpressionToJsRequest( + _controller.add( + _CompileExpressionToJsRequest( completer, libraryUri, scriptUri, @@ -525,7 +538,9 @@ class ResidentCompiler { jsModules, jsFrameValues, moduleName, - expression)); + expression, + ), + ); return completer.future; } @@ -545,19 +560,21 @@ class ResidentCompiler { final server = _server!; server.stdin.writeln('JSON_INPUT'); - server.stdin.writeln(json.encode({ - 'type': 'COMPILE_EXPRESSION_JS', - 'data': { - 'expression': request.expression, - 'libraryUri': request.libraryUri, - 'scriptUri': request.scriptUri, - 'line': request.line, - 'column': request.column, - 'jsModules': request.jsModules, - 'jsFrameValues': request.jsFrameValues, - 'moduleName': request.moduleName, - }, - })); + server.stdin.writeln( + json.encode({ + 'type': 'COMPILE_EXPRESSION_JS', + 'data': { + 'expression': request.expression, + 'libraryUri': request.libraryUri, + 'scriptUri': request.scriptUri, + 'line': request.line, + 'column': request.column, + 'jsModules': request.jsModules, + 'jsFrameValues': request.jsFrameValues, + 'moduleName': request.moduleName, + }, + }), + ); return _stdoutHandler.compilerOutput.future; } @@ -646,24 +663,26 @@ class TestExpressionCompiler implements ExpressionCompiler { @override Future compileExpressionToJs( - String isolateId, - String libraryUri, - String scriptUri, - int line, - int column, - Map jsModules, - Map jsFrameValues, - String moduleName, - String expression) async { + String isolateId, + String libraryUri, + String scriptUri, + int line, + int column, + Map jsModules, + Map jsFrameValues, + String moduleName, + String expression, + ) async { final compilerOutput = await _generator.compileExpressionToJs( - libraryUri, - scriptUri, - line, - column, - jsModules, - jsFrameValues, - moduleName, - expression); + libraryUri, + scriptUri, + line, + column, + jsModules, + jsFrameValues, + moduleName, + expression, + ); if (compilerOutput != null) { final content = utf8.decode( From 406f08cefae095b0a31f76365c5c2358cf3e2173 Mon Sep 17 00:00:00 2001 From: Jens Johansen Date: Fri, 26 Sep 2025 12:10:33 +0200 Subject: [PATCH 10/17] more formatting still --- frontend_server_client/example/vm_client.dart | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/frontend_server_client/example/vm_client.dart b/frontend_server_client/example/vm_client.dart index d557f7910..6cf050aab 100644 --- a/frontend_server_client/example/vm_client.dart +++ b/frontend_server_client/example/vm_client.dart @@ -41,24 +41,24 @@ void main(List args) async { .transform(utf8.decoder) .transform(const LineSplitter()) .listen((line) { - stdout.writeln('APP -> $line'); - if (line == 'hello/world') { - sawHelloWorld.complete(); - } - if (line.startsWith( - 'The Dart DevTools debugger and profiler is available at:', - )) { - final observatoryUri = - '${line.split(' ').last.replaceFirst('http', 'ws')}ws'; - vmServiceCompleter.complete(vmServiceConnectUri(observatoryUri)); - } - }); + stdout.writeln('APP -> $line'); + if (line == 'hello/world') { + sawHelloWorld.complete(); + } + if (line.startsWith( + 'The Dart DevTools debugger and profiler is available at:', + )) { + final observatoryUri = + '${line.split(' ').last.replaceFirst('http', 'ws')}ws'; + vmServiceCompleter.complete(vmServiceConnectUri(observatoryUri)); + } + }); appProcess.stderr .transform(utf8.decoder) .transform(const LineSplitter()) .listen((line) { - stderr.writeln('APP -> $line'); - }); + stderr.writeln('APP -> $line'); + }); final vmService = await vmServiceCompleter.future; await sawHelloWorld.future; From 90831fad09f9d002388600529e0005adb7f124c0 Mon Sep 17 00:00:00 2001 From: Jens Johansen Date: Fri, 26 Sep 2025 12:18:47 +0200 Subject: [PATCH 11/17] formatting after rebase --- frontend_server_client/example/vm_client.dart | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/frontend_server_client/example/vm_client.dart b/frontend_server_client/example/vm_client.dart index 6cf050aab..9499a7ce5 100644 --- a/frontend_server_client/example/vm_client.dart +++ b/frontend_server_client/example/vm_client.dart @@ -34,31 +34,33 @@ void main(List args) async { Process appProcess; final vmServiceCompleter = Completer(); - appProcess = await Process.start(Platform.resolvedExecutable, - ['--enable-vm-service=0', result.dillOutput!]); + appProcess = await Process.start(Platform.resolvedExecutable, [ + '--enable-vm-service=0', + result.dillOutput!, + ]); final sawHelloWorld = Completer(); appProcess.stdout .transform(utf8.decoder) .transform(const LineSplitter()) .listen((line) { - stdout.writeln('APP -> $line'); - if (line == 'hello/world') { - sawHelloWorld.complete(); - } - if (line.startsWith( - 'The Dart DevTools debugger and profiler is available at:', - )) { - final observatoryUri = - '${line.split(' ').last.replaceFirst('http', 'ws')}ws'; - vmServiceCompleter.complete(vmServiceConnectUri(observatoryUri)); - } - }); + stdout.writeln('APP -> $line'); + if (line == 'hello/world') { + sawHelloWorld.complete(); + } + if (line.startsWith( + 'The Dart DevTools debugger and profiler is available at:', + )) { + final observatoryUri = + '${line.split(' ').last.replaceFirst('http', 'ws')}ws'; + vmServiceCompleter.complete(vmServiceConnectUri(observatoryUri)); + } + }); appProcess.stderr .transform(utf8.decoder) .transform(const LineSplitter()) .listen((line) { - stderr.writeln('APP -> $line'); - }); + stderr.writeln('APP -> $line'); + }); final vmService = await vmServiceCompleter.future; await sawHelloWorld.future; From 14c827fba281a9ebf2bdd6211af3c990ca57f153 Mon Sep 17 00:00:00 2001 From: Jens Johansen Date: Fri, 26 Sep 2025 12:15:14 +0200 Subject: [PATCH 12/17] fixes after rebase --- dwds/pubspec.yaml | 2 +- frontend_server_client/pubspec.yaml | 2 +- frontend_server_common/CHANGELOG.md | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/dwds/pubspec.yaml b/dwds/pubspec.yaml index 1b1fd4082..d4d4f6376 100644 --- a/dwds/pubspec.yaml +++ b/dwds/pubspec.yaml @@ -7,7 +7,7 @@ description: >- service protocol. repository: https://github.com/dart-lang/webdev/tree/main/dwds environment: - sdk: ">=3.10.0-149.0.dev <4.0.0" + sdk: ^3.10.0-0.0.dev dependencies: async: ^2.9.0 diff --git a/frontend_server_client/pubspec.yaml b/frontend_server_client/pubspec.yaml index 9675d720e..08a816764 100644 --- a/frontend_server_client/pubspec.yaml +++ b/frontend_server_client/pubspec.yaml @@ -5,7 +5,7 @@ description: >- Dart SDK. repository: https://github.com/dart-lang/webdev/tree/main/frontend_server_client environment: - sdk: ^3.1.0 + sdk: ^3.10.0-0.0.dev dependencies: async: ^2.5.0 diff --git a/frontend_server_common/CHANGELOG.md b/frontend_server_common/CHANGELOG.md index 4d19bbe27..211c985c5 100644 --- a/frontend_server_common/CHANGELOG.md +++ b/frontend_server_common/CHANGELOG.md @@ -1,9 +1,8 @@ ## 0.2.3-wip -- Update minimum SDK constraint to 3.8.0. - Add bootstrapping code for DDC library bundle format. - Added scriptUri to compileExpression*Request -- Updated Dart SDK constraints to ">=3.10.0-149.0.dev <4.0.0" +- Updated Dart SDK constraints to ^3.10.0-0.0.dev ## 0.2.2 From b0c141b5a61adc8916d8820b77ce6b3e5d5a1822 Mon Sep 17 00:00:00 2001 From: Jens Johansen Date: Fri, 26 Sep 2025 12:27:21 +0200 Subject: [PATCH 13/17] Bump version to 26 after rebase --- dwds/CHANGELOG.md | 2 +- dwds/lib/src/injected/client.js | 696 +++++++++++++++------------- dwds/lib/src/version.dart | 2 +- dwds/pubspec.yaml | 2 +- frontend_server_common/CHANGELOG.md | 2 +- 5 files changed, 373 insertions(+), 331 deletions(-) diff --git a/dwds/CHANGELOG.md b/dwds/CHANGELOG.md index c1074ae8e..5f2975aa3 100644 --- a/dwds/CHANGELOG.md +++ b/dwds/CHANGELOG.md @@ -1,4 +1,4 @@ -## 25.1.1-wip +## 26.0.0-wip - Bump SDK constraint to ^3.10.0 - Added 'scriptUri' parameter to compileExpressionToJs diff --git a/dwds/lib/src/injected/client.js b/dwds/lib/src/injected/client.js index f4be48ffd..d63b1dac2 100644 --- a/dwds/lib/src/injected/client.js +++ b/dwds/lib/src/injected/client.js @@ -1,4 +1,4 @@ -// Generated by dart2js (, csp, intern-composite-values), the Dart to JavaScript compiler version: 3.10.0-74.0.dev. +// Generated by dart2js (, csp, intern-composite-values), the Dart to JavaScript compiler version: 3.10.0-edge. // The code supports the following hooks: // dartPrint(message): // if this function is defined it is called instead of the Dart [print] @@ -640,7 +640,7 @@ for (i = left + 1, t1 = J.getInterceptor$asx(a); i <= right; ++i) { el = t1.$index(a, i); j = i; - while (true) { + for (;;) { if (j > left) { t2 = compare.call$2(t1.$index(a, j - 1), el); if (typeof t2 !== "number") @@ -764,7 +764,7 @@ } ++less; } else - for (; true;) { + for (;;) { comp = compare.call$2(t1.$index(a, great), el2); if (comp > 0) { --great; @@ -798,7 +798,7 @@ } ++less; } else if (compare.call$2(ak, el4) > 0) - for (; true;) + for (;;) if (compare.call$2(t1.$index(a, great), el4) > 0) { --great; if (great < k) @@ -831,9 +831,9 @@ if (pivots_are_equal) return; if (less < index1 && great > index5) { - for (; J.$eq$(compare.call$2(t1.$index(a, less), el2), 0);) + while (J.$eq$(compare.call$2(t1.$index(a, less), el2), 0)) ++less; - for (; J.$eq$(compare.call$2(t1.$index(a, great), el4), 0);) + while (J.$eq$(compare.call$2(t1.$index(a, great), el4), 0)) --great; for (k = less; k <= great; ++k) { ak = t1.$index(a, k); @@ -844,7 +844,7 @@ } ++less; } else if (compare.call$2(ak, el4) === 0) - for (; true;) + for (;;) if (compare.call$2(t1.$index(a, great), el4) === 0) { --great; if (great < k) @@ -2996,7 +2996,7 @@ }, _Universe_findRule(universe, targetType) { var rule = universe.tR[targetType]; - for (; typeof rule == "string";) + while (typeof rule == "string") rule = universe.tR[rule]; return rule; }, @@ -3696,7 +3696,7 @@ tNamedLength = tNamed.length; for (sIndex = 0, tIndex = 0; tIndex < tNamedLength; tIndex += 3) { tName = tNamed[tIndex]; - for (; true;) { + for (;;) { if (sIndex >= sNamedLength) return false; sName = sNamed[sIndex]; @@ -3718,7 +3718,7 @@ break; } } - for (; sIndex < sNamedLength;) { + while (sIndex < sNamedLength) { if (sNamed[sIndex + 1]) return false; sIndex += 3; @@ -3729,7 +3729,7 @@ var rule, recipes, $length, supertypeArgs, i, sName = s._primary, tName = t._primary; - for (; sName !== tName;) { + while (sName !== tName) { rule = universe.tR[sName]; if (rule == null) return false; @@ -4099,7 +4099,7 @@ _Future__propagateToListeners(source, listeners) { var t2, t3, _box_0, t4, t5, hasError, asyncError, nextListener, nextListener0, sourceResult, t6, zone, oldZone, result, current, _box_1 = {}, t1 = _box_1.source = source; - for (t2 = type$.AsyncError, t3 = type$.nullable__FutureListener_dynamic_dynamic; true;) { + for (t2 = type$.AsyncError, t3 = type$.nullable__FutureListener_dynamic_dynamic;;) { _box_0 = {}; t4 = t1._state; t5 = (t4 & 16) === 0; @@ -5485,7 +5485,7 @@ newEnd = end, index = newEnd, padding = 0; - while (true) { + for (;;) { if (!(index > start && padding < 2)) break; c$0: { @@ -5817,7 +5817,7 @@ _BigIntImpl__normalize(used, digits) { var t2, t1 = digits.length; - while (true) { + for (;;) { if (used > 0) { t2 = used - 1; if (!(t2 < t1)) @@ -6191,7 +6191,7 @@ while (iterator.moveNext$0()); } else { string += A.S(iterator.get$current()); - for (; iterator.moveNext$0();) + while (iterator.moveNext$0()) string = string + separator + A.S(iterator.get$current()); } return string; @@ -6377,7 +6377,7 @@ var next, ultimateString, penultimateString, penultimate, ultimate, ultimate0, elision, it = J.get$iterator$ax(iterable), $length = 0, count = 0; - while (true) { + for (;;) { if (!($length < 80 || count < 3)) break; if (!it.moveNext$0()) @@ -6416,7 +6416,7 @@ ultimate0 = it.get$current(); ++count; if (count > 100) { - while (true) { + for (;;) { if (!($length > 75 && count > 3)) break; if (0 >= parts.length) @@ -6438,7 +6438,7 @@ elision = "..."; } else elision = null; - while (true) { + for (;;) { if (!($length > 80 && parts.length > 3)) break; if (0 >= parts.length) @@ -6628,42 +6628,62 @@ A._asString(encodedComponent); return A._Uri__uriDecode(encodedComponent, 0, encodedComponent.length, B.C_Utf8Codec, false); }, - Uri__parseIPv4Address(host, start, end) { - var t1, i, partStart, partIndex, char, part, partIndex0, - _s43_ = "IPv4 address should contain exactly 4 parts", - _s37_ = "each part must be in the range 0..255", - error = new A.Uri__parseIPv4Address_error(host), - result = new Uint8Array(4); - for (t1 = host.length, i = start, partStart = i, partIndex = 0; i < end; ++i) { - if (!(i >= 0 && i < t1)) - return A.ioore(host, i); - char = host.charCodeAt(i); - if (char !== 46) { - if ((char ^ 48) > 9) - error.call$2("invalid character", i); - } else { - if (partIndex === 3) - error.call$2(_s43_, i); - part = A.int_parse(B.JSString_methods.substring$2(host, partStart, i), null); - if (part > 255) - error.call$2(_s37_, partStart); - partIndex0 = partIndex + 1; - if (!(partIndex < 4)) - return A.ioore(result, partIndex); - result[partIndex] = part; - partStart = i + 1; - partIndex = partIndex0; + Uri__ipv4FormatError(msg, source, position) { + throw A.wrapException(A.FormatException$("Illegal IPv4 address, " + msg, source, position)); + }, + Uri__parseIPv4Address(host, start, end, target, targetOffset) { + var t1, octetStart, cursor, octetIndex, octetValue, char, digit, octetIndex0, t2, + _s17_ = "invalid character"; + for (t1 = host.length, octetStart = start, cursor = octetStart, octetIndex = 0, octetValue = 0;;) { + if (cursor >= end) + char = 0; + else { + if (!(cursor >= 0 && cursor < t1)) + return A.ioore(host, cursor); + char = host.charCodeAt(cursor); + } + digit = char ^ 48; + if (digit <= 9) { + if (octetValue !== 0 || cursor === octetStart) { + octetValue = octetValue * 10 + digit; + if (octetValue <= 255) { + ++cursor; + continue; + } + A.Uri__ipv4FormatError("each part must be in the range 0..255", host, octetStart); + } + A.Uri__ipv4FormatError("parts must not have leading zeros", host, octetStart); } + if (cursor === octetStart) { + if (cursor === end) + break; + A.Uri__ipv4FormatError(_s17_, host, cursor); + } + octetIndex0 = octetIndex + 1; + t2 = targetOffset + octetIndex; + target.$flags & 2 && A.throwUnsupportedOperation(target); + if (!(t2 < 16)) + return A.ioore(target, t2); + target[t2] = octetValue; + if (char === 46) { + if (octetIndex0 < 4) { + ++cursor; + octetIndex = octetIndex0; + octetStart = cursor; + octetValue = 0; + continue; + } + break; + } + if (cursor === end) { + if (octetIndex0 === 4) + return; + break; + } + A.Uri__ipv4FormatError(_s17_, host, cursor); + octetIndex = octetIndex0; } - if (partIndex !== 3) - error.call$2(_s43_, end); - part = A.int_parse(B.JSString_methods.substring$2(host, partStart, end), null); - if (part > 255) - error.call$2(_s37_, partStart); - if (!(partIndex < 4)) - return A.ioore(result, partIndex); - result[partIndex] = part; - return result; + A.Uri__ipv4FormatError("IPv4 address should contain exactly 4 parts", host, cursor); }, Uri__validateIPvAddress(host, start, end) { var error; @@ -6685,7 +6705,7 @@ _s38_ = "Missing hex-digit in IPvFuture address", _s128_ = string$.x00_____; ++start; - for (t1 = host.length, cursor = start; true; cursor = cursor0) { + for (t1 = host.length, cursor = start;; cursor = cursor0) { if (cursor < end) { cursor0 = cursor + 1; if (!(cursor >= 0 && cursor < t1)) @@ -6710,7 +6730,7 @@ } if (cursor === end) return new A.FormatException("Missing address in IPvFuture address, host, cursor", null, null); - for (; true;) { + for (;;) { if (!(cursor >= 0 && cursor < t1)) return A.ioore(host, cursor); char = host.charCodeAt(cursor); @@ -6726,83 +6746,128 @@ } }, Uri_parseIPv6Address(host, start, end) { - var parts, i, partStart, wildcardSeen, seenDot, char, atEnd, last, bytes, wildCardLength, index, value, j, t2, _null = null, - error = new A.Uri_parseIPv6Address_error(host), - parseHex = new A.Uri_parseIPv6Address_parseHex(error, host), - t1 = host.length; - if (t1 < 2) - error.call$2("address is too short", _null); - parts = A._setArrayType([], type$.JSArray_int); - for (i = start, partStart = i, wildcardSeen = false, seenDot = false; i < end; ++i) { - if (!(i >= 0 && i < t1)) - return A.ioore(host, i); - char = host.charCodeAt(i); - if (char === 58) { - if (i === start) { - ++i; - if (!(i < t1)) - return A.ioore(host, i); - if (host.charCodeAt(i) !== 58) - error.call$2("invalid start colon.", i); - partStart = i; - } - if (i === partStart) { - if (wildcardSeen) - error.call$2("only one wildcard `::` is allowed", i); - B.JSArray_methods.add$1(parts, -1); - wildcardSeen = true; - } else - B.JSArray_methods.add$1(parts, parseHex.call$2(partStart, i)); - partStart = i + 1; - } else if (char === 46) - seenDot = true; - } - if (parts.length === 0) - error.call$2("too few parts", _null); - atEnd = partStart === end; - t1 = B.JSArray_methods.get$last(parts); - if (atEnd && t1 !== -1) - error.call$2("expected a part after last `:`", end); - if (!atEnd) - if (!seenDot) - B.JSArray_methods.add$1(parts, parseHex.call$2(partStart, end)); + var result, t1, wildcardAt, partCount, t2, cursor, partStart, hexValue, decValue, char, _0_0, decValue0, hexDigit, _1_0, t3, partCount0, partAfterWildcard, partsAfterWildcard, positionAfterWildcard, newPositionAfterWildcard, + _s39_ = "an address must contain at most 8 parts", + error = new A.Uri_parseIPv6Address_error(host); + if (end - start < 2) + error.call$2("address is too short", null); + result = new Uint8Array(16); + t1 = host.length; + if (!(start >= 0 && start < t1)) + return A.ioore(host, start); + wildcardAt = -1; + partCount = 0; + if (host.charCodeAt(start) === 58) { + t2 = start + 1; + if (!(t2 < t1)) + return A.ioore(host, t2); + if (host.charCodeAt(t2) === 58) { + cursor = start + 2; + partStart = cursor; + wildcardAt = 0; + partCount = 1; + } else { + error.call$2("invalid start colon", start); + cursor = start; + partStart = cursor; + } + } else { + cursor = start; + partStart = cursor; + } + for (hexValue = 0, decValue = true;;) { + if (cursor >= end) + char = 0; else { - last = A.Uri__parseIPv4Address(host, partStart, end); - B.JSArray_methods.add$1(parts, (last[0] << 8 | last[1]) >>> 0); - B.JSArray_methods.add$1(parts, (last[2] << 8 | last[3]) >>> 0); + if (!(cursor < t1)) + return A.ioore(host, cursor); + char = host.charCodeAt(cursor); } - if (wildcardSeen) { - if (parts.length > 7) - error.call$2("an address with a wildcard must have less than 7 parts", _null); - } else if (parts.length !== 8) - error.call$2("an address without a wildcard must contain exactly 8 parts", _null); - bytes = new Uint8Array(16); - for (t1 = parts.length, wildCardLength = 9 - t1, i = 0, index = 0; i < t1; ++i) { - value = parts[i]; - if (value === -1) - for (j = 0; j < wildCardLength; ++j) { - if (!(index >= 0 && index < 16)) - return A.ioore(bytes, index); - bytes[index] = 0; - t2 = index + 1; - if (!(t2 < 16)) - return A.ioore(bytes, t2); - bytes[t2] = 0; - index += 2; + $label0$0: { + _0_0 = char ^ 48; + decValue0 = false; + if (_0_0 <= 9) + hexDigit = _0_0; + else { + _1_0 = char | 32; + if (_1_0 >= 97 && _1_0 <= 102) + hexDigit = _1_0 - 87; + else + break $label0$0; + decValue = decValue0; } - else { - t2 = B.JSInt_methods._shrOtherPositive$1(value, 8); - if (!(index >= 0 && index < 16)) - return A.ioore(bytes, index); - bytes[index] = t2; - t2 = index + 1; + if (cursor < partStart + 4) { + hexValue = hexValue * 16 + hexDigit; + ++cursor; + continue; + } + error.call$2("an IPv6 part can contain a maximum of 4 hex digits", partStart); + } + if (cursor > partStart) { + if (char === 46) { + if (decValue) { + if (partCount <= 6) { + A.Uri__parseIPv4Address(host, partStart, end, result, partCount * 2); + partCount += 2; + cursor = end; + break; + } + error.call$2(_s39_, partStart); + } + break; + } + t2 = partCount * 2; + t3 = B.JSInt_methods._shrOtherPositive$1(hexValue, 8); + if (!(t2 < 16)) + return A.ioore(result, t2); + result[t2] = t3; + ++t2; if (!(t2 < 16)) - return A.ioore(bytes, t2); - bytes[t2] = value & 255; - index += 2; + return A.ioore(result, t2); + result[t2] = hexValue & 255; + ++partCount; + if (char === 58) { + if (partCount < 8) { + ++cursor; + partStart = cursor; + hexValue = 0; + decValue = true; + continue; + } + error.call$2(_s39_, cursor); + } + break; + } + if (char === 58) { + if (wildcardAt < 0) { + partCount0 = partCount + 1; + ++cursor; + wildcardAt = partCount; + partCount = partCount0; + partStart = cursor; + continue; + } + error.call$2("only one wildcard `::` is allowed", cursor); + } + if (wildcardAt !== partCount - 1) + error.call$2("missing part", cursor); + break; + } + if (cursor < end) + error.call$2("invalid character", cursor); + if (partCount < 8) { + if (wildcardAt < 0) + error.call$2("an address without a wildcard must contain exactly 8 parts", end); + partAfterWildcard = wildcardAt + 1; + partsAfterWildcard = partCount - partAfterWildcard; + if (partsAfterWildcard > 0) { + positionAfterWildcard = partAfterWildcard * 2; + newPositionAfterWildcard = 16 - partsAfterWildcard * 2; + B.NativeUint8List_methods.setRange$4(result, newPositionAfterWildcard, 16, result, positionAfterWildcard); + B.NativeUint8List_methods.fillRange$3(result, positionAfterWildcard, newPositionAfterWildcard, 0); } } - return bytes; + return result; }, _Uri$_internal(scheme, _userInfo, _host, _port, path, _query, _fragment) { return new A._Uri(scheme, _userInfo, _host, _port, path, _query, _fragment); @@ -7401,7 +7466,7 @@ var simple, codeUnit, t2, bytes, t1 = text.length, i = start; - while (true) { + for (;;) { if (!(i < end)) { simple = true; break; @@ -7465,7 +7530,7 @@ } if (slashIndex < 0 && i > start) throw A.wrapException(A.FormatException$(_s17_, text, i)); - for (; char !== 44;) { + while (char !== 44) { B.JSArray_methods.add$1(indices, i); ++i; for (equalsIndex = -1; i < t1; ++i) { @@ -7647,16 +7712,9 @@ StringBuffer: function StringBuffer(t0) { this._contents = t0; }, - Uri__parseIPv4Address_error: function Uri__parseIPv4Address_error(t0) { - this.host = t0; - }, Uri_parseIPv6Address_error: function Uri_parseIPv6Address_error(t0) { this.host = t0; }, - Uri_parseIPv6Address_parseHex: function Uri_parseIPv6Address_parseHex(t0, t1) { - this.error = t0; - this.host = t1; - }, _Uri: function _Uri(t0, t1, t2, t3, t4, t5, t6) { var _ = this; _.scheme = t0; @@ -8417,7 +8475,7 @@ QueueList__nextPowerOf2(number) { var nextNumber; number = (number << 1 >>> 0) - 1; - for (; true; number = nextNumber) { + for (;; number = nextNumber) { nextNumber = (number & number - 1) >>> 0; if (nextNumber === 0) return number; @@ -8845,7 +8903,7 @@ chunk1 = ""; chunk2 = ""; chunk3 = ""; - while (true) { + for (;;) { if (!!(d4 === 0 && d3 === 0)) break; q = B.JSInt_methods.$tdiv(d4, fatRadix); @@ -9000,7 +9058,7 @@ $async$errorStack.push($async$result); $async$goto = $async$handler; } - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -9164,7 +9222,7 @@ var $async$Response_fromStream = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -9862,7 +9920,7 @@ var $async$BrowserWebSocket_connect = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -10038,7 +10096,7 @@ var $async$_authenticateUser = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -10078,7 +10136,7 @@ $async$errorStack.push($async$result); $async$goto = $async$handler; } - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -10137,7 +10195,7 @@ $async$errorStack.push($async$result); $async$goto = $async$handler; } - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -10216,7 +10274,7 @@ $async$errorStack.push($async$result); $async$goto = $async$handler; } - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -10347,7 +10405,7 @@ var $async$_Debugger_maybeInvokeFlutterDisassemble = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -10375,7 +10433,7 @@ var $async$_Debugger_maybeInvokeFlutterReassemble = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -10428,7 +10486,7 @@ var $async$SdkDeveloperExtension_maybeInvokeFlutterDisassemble = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -10458,7 +10516,7 @@ var $async$RequireRestarter_create = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -10726,7 +10784,7 @@ findLineStart(context, text, column) { var beginningOfLine, index, lineStart; if (text.length === 0) - for (beginningOfLine = 0; true;) { + for (beginningOfLine = 0;;) { index = B.JSString_methods.indexOf$2(context, "\n", beginningOfLine); if (index === -1) return context.length - beginningOfLine >= column ? beginningOfLine : null; @@ -10735,7 +10793,7 @@ beginningOfLine = index + 1; } index = B.JSString_methods.indexOf$1(context, text); - for (; index !== -1;) { + while (index !== -1) { lineStart = index === 0 ? 0 : B.JSString_methods.lastIndexOf$2(context, "\n", index - 1) + 1; if (column === index - lineStart) return lineStart; @@ -11568,7 +11626,7 @@ return receiver; if (times !== times >>> 0) throw A.wrapException(B.C_OutOfMemoryError); - for (s = receiver, result = ""; true;) { + for (s = receiver, result = "";;) { if ((times & 1) === 1) result = s + result; times = times >>> 1; @@ -12699,7 +12757,7 @@ A._instanceType(_this)._eval$1("~(1,2)")._as(action); cell = _this._first; modifications = _this._modifications; - for (; cell != null;) { + while (cell != null) { action.call$2(cell.hashMapCellKey, cell.hashMapCellValue); if (modifications !== _this._modifications) throw A.wrapException(A.ConcurrentModificationError$(_this)); @@ -12928,13 +12986,13 @@ call$2(o, tag) { return this.getUnknownTag(o, tag); }, - $signature: 93 + $signature: 92 }; A.initHooks_closure1.prototype = { call$1(tag) { return this.prototypeForTag(A._asString(tag)); }, - $signature: 86 + $signature: 85 }; A._Record.prototype = { get$runtimeType(_) { @@ -12967,7 +13025,7 @@ _fieldKeys$0() { var t1, shapeTag = this.$shape; - for (; $._Record__computedFieldKeys.length <= shapeTag;) + while ($._Record__computedFieldKeys.length <= shapeTag) B.JSArray_methods.add$1($._Record__computedFieldKeys, null); t1 = $._Record__computedFieldKeys[shapeTag]; if (t1 == null) { @@ -13523,7 +13581,7 @@ t2 = this.span; t1.firstChild ? t1.removeChild(t2) : t1.appendChild(t2); }, - $signature: 69 + $signature: 68 }; A._AsyncRun__scheduleImmediateJsOverride_internalCallback.prototype = { call$0() { @@ -13629,13 +13687,13 @@ call$2(error, stackTrace) { this.bodyFunction.call$2(1, new A.ExceptionAndStackTrace(error, type$.StackTrace._as(stackTrace))); }, - $signature: 66 + $signature: 65 }; A._wrapJsFunctionForAsync_closure.prototype = { call$2(errorCode, result) { this.$protected(A._asInt(errorCode), result); }, - $signature: 64 + $signature: 63 }; A._asyncStarHelper_closure.prototype = { call$0() { @@ -13709,7 +13767,7 @@ return t1.cancelationFuture; } }, - $signature: 59 + $signature: 58 }; A._AsyncStarStreamController__closure.prototype = { call$0() { @@ -14794,7 +14852,7 @@ _this._state = t1; } } - for (; true; wasInputPaused = isInputPaused) { + for (;; wasInputPaused = isInputPaused) { if ((t1 & 8) !== 0) { _this._pending = null; return; @@ -15598,7 +15656,7 @@ t2._processUncaughtError$3(zone, A._asObject(e), t1._as(s)); } }, - $signature: 55 + $signature: 54 }; A._HashMap.prototype = { get$length(_) { @@ -16323,11 +16381,13 @@ return A.SubListIterable$(receiver, start, end, A.instanceType(receiver)._eval$1("ListBase.E")); }, fillRange$3(receiver, start, end, fill) { - var i; - A.instanceType(receiver)._eval$1("ListBase.E")._as(fill); + var value, i, + t1 = A.instanceType(receiver); + t1._eval$1("ListBase.E?")._as(fill); + value = fill == null ? t1._eval$1("ListBase.E")._as(fill) : fill; A.RangeError_checkValidRange(start, end, this.get$length(receiver)); for (i = start; i < end; ++i) - this.$indexSet(receiver, i, fill); + this.$indexSet(receiver, i, value); }, setRange$4(receiver, start, end, iterable, skipCount) { var $length, otherStart, otherList, t1, i; @@ -16686,7 +16746,7 @@ return -1; } compare = _this._compare; - for (comparison = _null, current = root, newTreeLeft = comparison, left = newTreeLeft, newTreeRight = left, right = newTreeRight; true;) { + for (comparison = _null, current = root, newTreeLeft = comparison, left = newTreeLeft, newTreeRight = left, right = newTreeRight;;) { comparison = compare.call$2(current.key, key); if (comparison > 0) { currentLeft = current._left; @@ -16754,7 +16814,7 @@ _splayMin$1(node) { var current, modified, left; this.$ti._eval$1("_SplayTree.1")._as(node); - for (current = node, modified = 0; true; current = left, modified = 1) { + for (current = node, modified = 0;; current = left, modified = 1) { left = current._left; if (left != null) { current.set$_left(left._right); @@ -16768,7 +16828,7 @@ _splayMax$1(node) { var current, modified, right; this.$ti._eval$1("_SplayTree.1")._as(node); - for (current = node, modified = 0; true; current = right, modified = 1) { + for (current = node, modified = 0;; current = right, modified = 1) { right = current._right; if (right != null) { current.set$_right(right._left); @@ -16836,7 +16896,7 @@ node = B.JSArray_methods.get$last(t1); next = node._right; if (next != null) { - for (; next != null;) { + while (next != null) { B.JSArray_methods.add$1(t1, next); next = next._left; } @@ -16845,7 +16905,7 @@ if (0 >= t1.length) return A.ioore(t1, -1); t1.pop(); - while (true) { + for (;;) { if (!(t1.length !== 0 && B.JSArray_methods.get$last(t1)._right === node)) break; if (0 >= t1.length) @@ -17242,7 +17302,7 @@ endLength = B.JSInt_methods.$mod(t2 - 1, 4) + 1; if (endLength === 1) throw A.wrapException(A.FormatException$(_s31_, source, end)); - for (; endLength < 4;) { + while (endLength < 4) { t1 += "="; buffer._contents = t1; ++endLength; @@ -17850,8 +17910,8 @@ return A.ioore(bytes, start); byte = bytes[start]; $label0$0: - for (t2 = _this.allowMalformed; true;) { - for (; true; i = i0) { + for (t2 = _this.allowMalformed;;) { + for (;; i = i0) { if (!(byte >= 0 && byte < 256)) return A.ioore(_s256_, byte); type = _s256_.charCodeAt(byte) & 31; @@ -17903,7 +17963,7 @@ return A.ioore(bytes, i); byte = bytes[i]; if (byte < 128) { - while (true) { + for (;;) { if (!(i0 < end)) { markEnd = end; break; @@ -18199,7 +18259,7 @@ if (resultDigits[i] < estimatedQuotientDigit) { tmpUsed = A._BigIntImpl__dlShiftDigits(nyDigits, yUsed0, j, tmpDigits); A._BigIntImpl__absSub(resultDigits, resultUsed1, tmpDigits, tmpUsed, resultDigits); - for (; --estimatedQuotientDigit, resultDigits[i] < estimatedQuotientDigit;) + while (--estimatedQuotientDigit, resultDigits[i] < estimatedQuotientDigit) A._BigIntImpl__absSub(resultDigits, resultUsed1, tmpDigits, tmpUsed, resultDigits); } --i; @@ -18252,7 +18312,7 @@ decimalDigitChunks = A._setArrayType([], type$.JSArray_String); t1 = _this._isNegative; rest = t1 ? _this.$negate(0) : _this; - for (; rest._used > 1;) { + while (rest._used > 1) { t2 = $.$get$_BigIntImpl__bigInt10000(); if (t2._used === 0) A.throwExpression(B.C_IntegerDivisionByZeroException); @@ -18284,7 +18344,7 @@ hash = hash + ((hash & 524287) << 10) & 536870911; return hash ^ hash >>> 6; }, - $signature: 27 + $signature: 52 }; A._BigIntImpl_hashCode_finish.prototype = { call$1(hash) { @@ -18292,7 +18352,7 @@ hash ^= hash >>> 11; return hash + ((hash & 16383) << 15) & 536870911; }, - $signature: 53 + $signature: 43 }; A.DateTime.prototype = { $eq(_, other) { @@ -18706,29 +18766,11 @@ }, $isStringSink: 1 }; - A.Uri__parseIPv4Address_error.prototype = { - call$2(msg, position) { - throw A.wrapException(A.FormatException$("Illegal IPv4 address, " + msg, this.host, position)); - }, - $signature: 44 - }; A.Uri_parseIPv6Address_error.prototype = { call$2(msg, position) { throw A.wrapException(A.FormatException$("Illegal IPv6 address, " + msg, this.host, position)); }, - $signature: 40 - }; - A.Uri_parseIPv6Address_parseHex.prototype = { - call$2(start, end) { - var value; - if (end - start > 4) - this.error.call$2("an IPv6 part can only contain a maximum of 4 hex digits", start); - value = A.int_parse(B.JSString_methods.substring$2(this.host, start, end), 16); - if (value < 0 || value > 65535) - this.error.call$2("each part must be in the range of `0x0..0xFFFF`", start); - return value; - }, - $signature: 27 + $signature: 39 }; A._Uri.prototype = { get$_text() { @@ -18870,7 +18912,7 @@ } baseEnd = B.JSString_methods.lastIndexOf$1(base, "/"); t1 = base.length; - while (true) { + for (;;) { if (!(baseEnd > 0 && backCount > 0)) break; newEnd = B.JSString_methods.lastIndexOf$2(base, "/", baseEnd - 1); @@ -19257,7 +19299,7 @@ baseStart = base._pathStart; baseEnd = base._queryStart; if (baseStart === baseEnd && base._hostStart > 0) { - for (; B.JSString_methods.startsWith$2(t2, "../", refStart);) + while (B.JSString_methods.startsWith$2(t2, "../", refStart)) refStart += 3; delta = baseStart - refStart + 1; return new A._SimpleUri(B.JSString_methods.substring$2(base._uri, 0, baseStart) + "/" + B.JSString_methods.substring$1(t2, refStart), base._schemeEnd, base._hostStart, base._portStart, baseStart, t1 + delta, ref._fragmentStart + delta, base._schemeCache); @@ -19270,7 +19312,7 @@ for (baseStart0 = baseStart; B.JSString_methods.startsWith$2(baseUri, "../", baseStart0);) baseStart0 += 3; backCount = 0; - while (true) { + for (;;) { refStart0 = refStart + 3; if (!(refStart0 <= t1 && B.JSString_methods.startsWith$2(t2, "../", refStart))) break; @@ -19354,7 +19396,7 @@ var t1 = type$.JavaScriptFunction; 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); }, - $signature: 30 + $signature: 29 }; A.FutureOfJSAnyToJSPromise_get_toJS__closure.prototype = { call$1(value) { @@ -19380,21 +19422,21 @@ t1.call(t1, wrapper); return wrapper; }, - $signature: 39 + $signature: 38 }; A.FutureOfVoidToJSPromise_get_toJS_closure.prototype = { call$2(resolve, reject) { var t1 = type$.JavaScriptFunction; 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); }, - $signature: 30 + $signature: 29 }; A.FutureOfVoidToJSPromise_get_toJS__closure.prototype = { call$1(__wc0_formal) { var t1 = this.resolve; return t1.call(t1); }, - $signature: 38 + $signature: 37 }; A.FutureOfVoidToJSPromise_get_toJS__closure0.prototype = { call$2(error, stackTrace) { @@ -19471,7 +19513,7 @@ } if (o instanceof RegExp) throw A.wrapException(A.ArgumentError$("structured clone of RegExp", null)); - if (typeof Promise != "undefined" && o instanceof Promise) + if (o instanceof Promise) return A.promiseToFuture(o, type$.nullable_Object); proto = Object.getPrototypeOf(o); if (proto === Object.prototype || proto === null) { @@ -19542,7 +19584,7 @@ t1.setUint32(0, 0, false); start = 4 - byteCount; randomLimit = A._asInt(Math.pow(256, byteCount)); - for (t2 = max - 1, t3 = (max & t2) >>> 0 === 0; true;) { + for (t2 = max - 1, t3 = (max & t2) >>> 0 === 0;;) { crypto.getRandomValues(J.asUint8List$2$x(B.NativeByteData_methods.get$buffer(t1), start, byteCount)); random = t1.getUint32(0, false); if (t3) @@ -19714,7 +19756,7 @@ call$2(h, i) { return A._combine(A._asInt(h), J.get$hashCode$(i)); }, - $signature: 37 + $signature: 36 }; A.BuiltList.prototype = { toBuilder$0() { @@ -19960,7 +20002,7 @@ t1 = _this.__ListMultimapBuilder__builderMap_A; t1 === $ && A.throwLateFieldNI("_builderMap"); t1 = new A.LinkedHashMapKeyIterator(t1, t1._modifications, t1._first, A._instanceType(t1)._eval$1("LinkedHashMapKeyIterator<1>")); - for (; t1.moveNext$0();) { + while (t1.moveNext$0()) { key = t1.__js_helper$_current; t2 = _this.__ListMultimapBuilder__builderMap_A.$index(0, key); builtList = t2._listOwner; @@ -20515,7 +20557,7 @@ t1 = _this.__SetMultimapBuilder__builderMap_A; t1 === $ && A.throwLateFieldNI("_builderMap"); t1 = new A.LinkedHashMapKeyIterator(t1, t1._modifications, t1._first, A._instanceType(t1)._eval$1("LinkedHashMapKeyIterator<1>")); - for (; t1.moveNext$0();) { + while (t1.moveNext$0()) { key = t1.__js_helper$_current; t2 = _this.__SetMultimapBuilder__builderMap_A.$index(0, key); builtSet = t2._setOwner; @@ -20645,7 +20687,7 @@ $._indentingBuiltValueToStringHelperIndent = $._indentingBuiltValueToStringHelperIndent + 2; return new A.IndentingBuiltValueToStringHelper(t1); }, - $signature: 84 + $signature: 83 }; A.IndentingBuiltValueToStringHelper.prototype = { add$2(_, field, value) { @@ -20776,34 +20818,34 @@ call$0() { return A.ListBuilder_ListBuilder(B.List_empty0, type$.Object); }, - $signature: 58 + $signature: 57 }; A.Serializers_Serializers_closure0.prototype = { call$0() { var t1 = type$.Object; return A.ListMultimapBuilder_ListMultimapBuilder(t1, t1); }, - $signature: 34 + $signature: 33 }; A.Serializers_Serializers_closure1.prototype = { call$0() { var t1 = type$.Object; return A.MapBuilder_MapBuilder(t1, t1); }, - $signature: 35 + $signature: 34 }; A.Serializers_Serializers_closure2.prototype = { call$0() { return A.SetBuilder_SetBuilder(type$.Object); }, - $signature: 36 + $signature: 35 }; A.Serializers_Serializers_closure3.prototype = { call$0() { var t1 = type$.Object; return A.SetMultimapBuilder_SetMultimapBuilder(t1, t1); }, - $signature: 92 + $signature: 91 }; A.FullType.prototype = { $eq(_, other) { @@ -22202,7 +22244,7 @@ return true; it1 = J.get$iterator$ax(elements1); it2 = J.get$iterator$ax(elements2); - for (t1 = this._elementEquality; true;) { + for (t1 = this._elementEquality;;) { hasNext = it1.moveNext$0(); if (hasNext !== it2.moveNext$0()) return false; @@ -22625,7 +22667,7 @@ var t1, value, result = new A.ConnectRequestBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -22724,7 +22766,7 @@ var t1, value, result = new A.DebugEventBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -23025,7 +23067,7 @@ var t1, value, result = new A.DebugInfoBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -23197,7 +23239,7 @@ var t1, value, result = new A.DevToolsRequestBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -23268,7 +23310,7 @@ _s16_ = "DevToolsResponse", result = new A.DevToolsResponseBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -23415,7 +23457,7 @@ _s13_ = "ErrorResponse", result = new A.ErrorResponseBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -23522,7 +23564,7 @@ _s16_ = "ExtensionRequest", result = new A.ExtensionRequestBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -23582,7 +23624,7 @@ _s17_ = "ExtensionResponse", result = new A.ExtensionResponseBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -23641,7 +23683,7 @@ _s14_ = "ExtensionEvent", result = new A.ExtensionEventBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -23949,7 +23991,7 @@ var t1, value, $$v, _$result, result = new A.HotReloadRequestBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -24036,7 +24078,7 @@ var t1, value, result = new A.HotReloadResponseBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -24136,7 +24178,7 @@ var t1, value, $$v, _$result, result = new A.HotRestartRequestBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -24223,7 +24265,7 @@ var t1, value, result = new A.HotRestartResponseBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -24416,7 +24458,7 @@ var t1, value, $$v, result = new A.RegisterEventBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -24544,13 +24586,13 @@ call$0() { return A.ListBuilder_ListBuilder(B.List_empty0, type$.DebugEvent); }, - $signature: 41 + $signature: 40 }; A._$serializers_closure0.prototype = { call$0() { return A.ListBuilder_ListBuilder(B.List_empty0, type$.ExtensionEvent); }, - $signature: 42 + $signature: 41 }; A.ServiceExtensionRequest.prototype = {}; A._$ServiceExtensionRequestSerializer.prototype = { @@ -24566,7 +24608,7 @@ _s23_ = "ServiceExtensionRequest", result = new A.ServiceExtensionRequestBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -24662,7 +24704,7 @@ b.get$_service_extension_response$_$this()._service_extension_response$_errorMessage = _this.errorMessage; return b; }, - $signature: 43 + $signature: 42 }; A._$ServiceExtensionResponseSerializer.prototype = { serialize$3$specifiedType(serializers, object, specifiedType) { @@ -24693,7 +24735,7 @@ var t1, value, result = new A.ServiceExtensionResponseBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -24803,7 +24845,7 @@ var $async$_batchAndSendEvents$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -24901,13 +24943,13 @@ call$0() { return true; }, - $signature: 29 + $signature: 28 }; A.BatchedStreamController__hasEventDuring_closure.prototype = { call$0() { return false; }, - $signature: 29 + $signature: 28 }; A.SocketClient.prototype = {}; A.SseSocketClient.prototype = { @@ -24948,7 +24990,7 @@ call$1(o) { return J.toString$0$(o); }, - $signature: 45 + $signature: 44 }; A.safeUnawaited_closure.prototype = { call$2(error, stackTrace) { @@ -25088,7 +25130,7 @@ var $async$_sendUnstreamed$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -25125,13 +25167,13 @@ call$2(key1, key2) { return A._asString(key1).toLowerCase() === A._asString(key2).toLowerCase(); }, - $signature: 46 + $signature: 45 }; A.BaseRequest_closure0.prototype = { call$1(key) { return B.JSString_methods.get$hashCode(A._asString(key).toLowerCase()); }, - $signature: 47 + $signature: 46 }; A.BaseResponse.prototype = { BaseResponse$7$contentLength$headers$isRedirect$persistentConnection$reasonPhrase$request(statusCode, contentLength, headers, isRedirect, persistentConnection, reasonPhrase, request) { @@ -25158,7 +25200,7 @@ $async$errorStack.push($async$result); $async$goto = $async$handler; } - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -25290,7 +25332,7 @@ $defaultValues() { return [null]; }, - $signature: 48 + $signature: 47 }; A._readBody_closure.prototype = { call$1(_) { @@ -25303,7 +25345,7 @@ A._asObject(_); return this._box_0.isError; }, - $signature: 49 + $signature: 48 }; A.ByteStream.prototype = { toBytes$0() { @@ -25318,7 +25360,7 @@ call$1(bytes) { return this.completer.complete$1(new Uint8Array(A._ensureNativeList(type$.List_int._as(bytes)))); }, - $signature: 50 + $signature: 49 }; A.ClientException.prototype = { toString$0(_) { @@ -25364,7 +25406,7 @@ scanner.scan$1(t2); t6 = type$.String; parameters = A.LinkedHashMap_LinkedHashMap$_empty(t6, t6); - while (true) { + for (;;) { t6 = scanner._lastMatch = B.JSString_methods.matchAsPrefix$2(";", t1, scanner._string_scanner$_position); t7 = scanner._lastMatchPosition = scanner._string_scanner$_position; success = t6 != null; @@ -25406,7 +25448,7 @@ scanner.expectDone$0(); return A.MediaType$(t4, t5, parameters); }, - $signature: 51 + $signature: 50 }; A.MediaType_toString_closure.prototype = { call$2(attribute, value) { @@ -25425,13 +25467,13 @@ } else t1._contents = t3 + value; }, - $signature: 52 + $signature: 51 }; A.MediaType_toString__closure.prototype = { call$1(match) { return "\\" + A.S(match.$index(0, 0)); }, - $signature: 28 + $signature: 27 }; A.expectQuotedString_closure.prototype = { call$1(match) { @@ -25439,7 +25481,7 @@ t1.toString; return t1; }, - $signature: 28 + $signature: 27 }; A.Level.prototype = { $eq(_, other) { @@ -25528,7 +25570,7 @@ $parent._children.$indexSet(0, thisName, t1); return t1; }, - $signature: 54 + $signature: 53 }; A.Context.prototype = { absolute$15(part1, part2, part3, part4, part5, part6, part7, part8, part9, part10, part11, part12, part13, part14, part15) { @@ -25687,7 +25729,7 @@ t2 = false; if (t2) return pathParsed.toString$0(0); - while (true) { + for (;;) { t2 = fromParsed.parts; t3 = t2.length; t4 = false; @@ -25775,7 +25817,7 @@ A._asStringQ(arg); return arg == null ? "null" : '"' + arg + '"'; }, - $signature: 56 + $signature: 55 }; A.InternalStyle.prototype = { getRoot$1(path) { @@ -25798,7 +25840,7 @@ A.ParsedPath.prototype = { removeTrailingSeparators$0() { var t1, t2, _this = this; - while (true) { + for (;;) { t1 = _this.parts; if (!(t1.length !== 0 && B.JSArray_methods.get$last(t1) === "")) break; @@ -26140,7 +26182,7 @@ $async$errorStack.push($async$result); $async$goto = $async$handler; } - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -26669,7 +26711,7 @@ call$0() { return this.color; }, - $signature: 57 + $signature: 56 }; A.Highlighter$__closure.prototype = { call$1(line) { @@ -26677,7 +26719,7 @@ t2 = A._arrayInstanceType(t1); return new A.WhereIterable(t1, t2._eval$1("bool(1)")._as(new A.Highlighter$___closure()), t2._eval$1("WhereIterable<1>")).get$length(0); }, - $signature: 33 + $signature: 32 }; A.Highlighter$___closure.prototype = { call$1(highlight) { @@ -26690,21 +26732,21 @@ call$1(line) { return type$._Line._as(line).url; }, - $signature: 60 + $signature: 59 }; A.Highlighter__collateLines_closure.prototype = { call$1(highlight) { var t1 = type$._Highlight._as(highlight).span.get$sourceUrl(); return t1 == null ? new A.Object() : t1; }, - $signature: 61 + $signature: 60 }; A.Highlighter__collateLines_closure0.prototype = { call$2(highlight1, highlight2) { var t1 = type$._Highlight; return t1._as(highlight1).span.compareTo$1(0, t1._as(highlight2).span); }, - $signature: 62 + $signature: 61 }; A.Highlighter__collateLines_closure1.prototype = { call$1(entry) { @@ -26747,7 +26789,7 @@ } return lines; }, - $signature: 63 + $signature: 62 }; A.Highlighter__collateLines__closure.prototype = { call$1(highlight) { @@ -26914,7 +26956,7 @@ } return A._Highlight__normalizeEndOfLine(A._Highlight__normalizeTrailingNewline(A._Highlight__normalizeNewlines(newSpan))); }, - $signature: 65 + $signature: 64 }; A._Line.prototype = { toString$0(_) { @@ -27157,7 +27199,7 @@ var $async$_onOutgoingMessage$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -27218,7 +27260,7 @@ $async$errorStack.push($async$result); $async$goto = $async$handler; } - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -27282,7 +27324,7 @@ }); return A._asyncStartSync($async$call$0, $async$completer); }, - $signature: 68 + $signature: 67 }; A.GuaranteeChannel.prototype = { GuaranteeChannel$3$allowSinkErrors(innerSink, allowSinkErrors, _box_0, $T) { @@ -27672,7 +27714,7 @@ var $async$close$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -27825,7 +27867,7 @@ A._asString(webSocket._webSocket.protocol); t2._readyCompleter.complete$0(); }, - $signature: 70 + $signature: 69 }; A.AdapterWebSocketChannel__closure.prototype = { call$1($event) { @@ -27861,7 +27903,7 @@ } } }, - $signature: 71 + $signature: 70 }; A.AdapterWebSocketChannel__closure0.prototype = { call$1(obj) { @@ -27919,7 +27961,7 @@ $async$errorStack.push($async$result); $async$goto = $async$handler; } - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -27976,7 +28018,7 @@ t1 === $ && A.throwLateFieldNI("_sink"); t1.close$0(); }, - $signature: 72 + $signature: 71 }; A._WebSocketSink.prototype = {$isWebSocketSink: 1}; A.WebSocketChannelException.prototype = { @@ -27996,7 +28038,7 @@ var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -28118,7 +28160,7 @@ $defaultValues() { return [null]; }, - $signature: 74 + $signature: 73 }; A.main__closure2.prototype = { call$0() { @@ -28145,7 +28187,7 @@ A._trySendEvent(t1, B.C_JsonCodec.encode$2$toEncodable(t2.serialize$1(t3._debug_event$_build$0()), null), type$.dynamic); } }, - $signature: 75 + $signature: 74 }; A.main___closure2.prototype = { call$1(b) { @@ -28154,7 +28196,7 @@ b.get$_debug_event$_$this().set$_events(t1); return t1; }, - $signature: 76 + $signature: 75 }; A.main__closure4.prototype = { call$2(kind, eventData) { @@ -28168,7 +28210,7 @@ A._trySendEvent(new A._StreamSinkWrapper(t1, A._instanceType(t1)._eval$1("_StreamSinkWrapper<1>")), t2._debug_event$_build$0(), type$.DebugEvent); } }, - $signature: 77 + $signature: 76 }; A.main___closure1.prototype = { call$1(b) { @@ -28178,7 +28220,7 @@ b.get$_debug_event$_$this()._eventData = this.eventData; return b; }, - $signature: 78 + $signature: 77 }; A.main__closure5.prototype = { call$1(eventData) { @@ -28190,7 +28232,7 @@ type$.nullable_void_Function_RegisterEventBuilder._as(new A.main___closure0(eventData)).call$1(t3); A._trySendEvent(t1, B.C_JsonCodec.encode$2$toEncodable(t2.serialize$1(t3._register_event$_build$0()), null), type$.dynamic); }, - $signature: 79 + $signature: 78 }; A.main___closure0.prototype = { call$1(b) { @@ -28199,7 +28241,7 @@ b.get$_register_event$_$this()._register_event$_eventData = this.eventData; return b; }, - $signature: 80 + $signature: 79 }; A.main__closure6.prototype = { call$0() { @@ -28225,7 +28267,7 @@ b.get$_devtools_request$_$this()._devtools_request$_instanceId = t1; return b; }, - $signature: 81 + $signature: 80 }; A.main__closure7.prototype = { call$1(serialized) { @@ -28238,7 +28280,7 @@ var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -28389,7 +28431,7 @@ }); return A._asyncStartSync($async$call$1, $async$completer); }, - $signature: 82 + $signature: 81 }; A.main__closure8.prototype = { call$1(error) { @@ -28426,7 +28468,7 @@ b.get$_connect_request$_$this()._entrypointPath = t1; return b; }, - $signature: 83 + $signature: 82 }; A._launchCommunicationWithDebugExtension_closure.prototype = { call$1(b) { @@ -28455,13 +28497,13 @@ b.get$_$this()._workspaceName = t1; return b; }, - $signature: 110 + $signature: 109 }; A._handleAuthRequest_closure.prototype = { call$1(isAuthenticated) { return A._dispatchEvent("dart-auth-response", "" + A._asBool(isAuthenticated)); }, - $signature: 85 + $signature: 84 }; A._sendResponse_closure.prototype = { call$1(b) { @@ -28481,7 +28523,7 @@ var $async$_runMainWhenReady$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -28509,7 +28551,7 @@ var $async$_getSrcModuleLibraries$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -28544,7 +28586,7 @@ var $async$restart$3$readyToRunMain$reloadedSourcesPath$runId = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -28583,7 +28625,7 @@ var $async$hotReloadStart$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -28627,7 +28669,7 @@ var $async$hotReloadEnd$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -28650,7 +28692,7 @@ var $async$handleServiceExtension$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -28741,7 +28783,7 @@ var $async$restart$3$readyToRunMain$reloadedSourcesPath$runId = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -28789,7 +28831,7 @@ this.sub.cancel$0(); return value; }, - $signature: 87 + $signature: 86 }; A.ReloadingManager.prototype = { hotRestart$3$readyToRunMain$reloadedSourcesPath$runId(readyToRunMain, reloadedSourcesPath, runId) { @@ -28799,7 +28841,7 @@ var $async$hotRestart$3$readyToRunMain$reloadedSourcesPath$runId = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -28836,7 +28878,7 @@ var $async$hotReloadEnd$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -28860,7 +28902,7 @@ var $async$handleServiceExtension$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -28913,7 +28955,7 @@ var $async$restart$3$readyToRunMain$reloadedSourcesPath$runId = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -29000,7 +29042,7 @@ var $async$_require_restarter$_runMainWhenReady$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -29028,7 +29070,7 @@ var $async$_getDigests$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -29056,7 +29098,7 @@ var $async$_initialize$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -29114,7 +29156,7 @@ $async$errorStack.push($async$result); $async$goto = $async$handler; } - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -29295,7 +29337,7 @@ call$1(e) { this.completer.completeError$2(new A.HotReloadFailedException(A._asString(type$.JavaScriptObject._as(e).message)), this.stackTrace); }, - $signature: 90 + $signature: 89 }; A._createScript_closure.prototype = { call$0() { @@ -29304,7 +29346,7 @@ return new A._createScript__closure(); return new A._createScript__closure0(nonce); }, - $signature: 91 + $signature: 90 }; A._createScript__closure.prototype = { call$0() { @@ -29367,7 +29409,7 @@ _instance_1_i = hunkHelpers._instance_1i, _instance_1_u = hunkHelpers._instance_1u, _instance_0_u = hunkHelpers._instance_0u; - _static_2(J, "_interceptors_JSArray__compareAny$closure", "JSArray__compareAny", 32); + _static_2(J, "_interceptors_JSArray__compareAny$closure", "JSArray__compareAny", 31); _static_1(A, "async__AsyncRun__scheduleImmediateJsOverride$closure", "_AsyncRun__scheduleImmediateJsOverride", 13); _static_1(A, "async__AsyncRun__scheduleImmediateWithSetImmediate$closure", "_AsyncRun__scheduleImmediateWithSetImmediate", 13); _static_1(A, "async__AsyncRun__scheduleImmediateWithTimer$closure", "_AsyncRun__scheduleImmediateWithTimer", 13); @@ -29375,45 +29417,45 @@ _static_1(A, "async___nullDataHandler$closure", "_nullDataHandler", 7); _static_2(A, "async___nullErrorHandler$closure", "_nullErrorHandler", 9); _static_0(A, "async___nullDoneHandler$closure", "_nullDoneHandler", 0); - _static(A, "async___rootHandleUncaughtError$closure", 5, null, ["call$5"], ["_rootHandleUncaughtError"], 94, 0); + _static(A, "async___rootHandleUncaughtError$closure", 5, null, ["call$5"], ["_rootHandleUncaughtError"], 93, 0); _static(A, "async___rootRun$closure", 4, null, ["call$1$4", "call$4"], ["_rootRun", function($self, $parent, zone, f) { return A._rootRun($self, $parent, zone, f, type$.dynamic); - }], 95, 1); + }], 94, 1); _static(A, "async___rootRunUnary$closure", 5, null, ["call$2$5", "call$5"], ["_rootRunUnary", function($self, $parent, zone, f, arg) { var t1 = type$.dynamic; return A._rootRunUnary($self, $parent, zone, f, arg, t1, t1); - }], 96, 1); + }], 95, 1); _static(A, "async___rootRunBinary$closure", 6, null, ["call$3$6", "call$6"], ["_rootRunBinary", function($self, $parent, zone, f, arg1, arg2) { var t1 = type$.dynamic; return A._rootRunBinary($self, $parent, zone, f, arg1, arg2, t1, t1, t1); - }], 97, 1); + }], 96, 1); _static(A, "async___rootRegisterCallback$closure", 4, null, ["call$1$4", "call$4"], ["_rootRegisterCallback", function($self, $parent, zone, f) { return A._rootRegisterCallback($self, $parent, zone, f, type$.dynamic); - }], 98, 0); + }], 97, 0); _static(A, "async___rootRegisterUnaryCallback$closure", 4, null, ["call$2$4", "call$4"], ["_rootRegisterUnaryCallback", function($self, $parent, zone, f) { var t1 = type$.dynamic; return A._rootRegisterUnaryCallback($self, $parent, zone, f, t1, t1); - }], 99, 0); + }], 98, 0); _static(A, "async___rootRegisterBinaryCallback$closure", 4, null, ["call$3$4", "call$4"], ["_rootRegisterBinaryCallback", function($self, $parent, zone, f) { var t1 = type$.dynamic; return A._rootRegisterBinaryCallback($self, $parent, zone, f, t1, t1, t1); - }], 100, 0); - _static(A, "async___rootErrorCallback$closure", 5, null, ["call$5"], ["_rootErrorCallback"], 101, 0); - _static(A, "async___rootScheduleMicrotask$closure", 4, null, ["call$4"], ["_rootScheduleMicrotask"], 102, 0); - _static(A, "async___rootCreateTimer$closure", 5, null, ["call$5"], ["_rootCreateTimer"], 103, 0); - _static(A, "async___rootCreatePeriodicTimer$closure", 5, null, ["call$5"], ["_rootCreatePeriodicTimer"], 104, 0); - _static(A, "async___rootPrint$closure", 4, null, ["call$4"], ["_rootPrint"], 105, 0); - _static_1(A, "async___printToZone$closure", "_printToZone", 106); - _static(A, "async___rootFork$closure", 5, null, ["call$5"], ["_rootFork"], 107, 0); + }], 99, 0); + _static(A, "async___rootErrorCallback$closure", 5, null, ["call$5"], ["_rootErrorCallback"], 100, 0); + _static(A, "async___rootScheduleMicrotask$closure", 4, null, ["call$4"], ["_rootScheduleMicrotask"], 101, 0); + _static(A, "async___rootCreateTimer$closure", 5, null, ["call$5"], ["_rootCreateTimer"], 102, 0); + _static(A, "async___rootCreatePeriodicTimer$closure", 5, null, ["call$5"], ["_rootCreatePeriodicTimer"], 103, 0); + _static(A, "async___rootPrint$closure", 4, null, ["call$4"], ["_rootPrint"], 104, 0); + _static_1(A, "async___printToZone$closure", "_printToZone", 105); + _static(A, "async___rootFork$closure", 5, null, ["call$5"], ["_rootFork"], 106, 0); _instance(A._Completer.prototype, "get$completeError", 0, 1, function() { return [null]; - }, ["call$2", "call$1"], ["completeError$2", "completeError$1"], 31, 0, 0); + }, ["call$2", "call$1"], ["completeError$2", "completeError$1"], 30, 0, 0); _instance_2_u(A._Future.prototype, "get$_completeError", "_completeError$2", 9); var _; _instance_1_i(_ = A._StreamController.prototype, "get$add", "add$1", 8); _instance(_, "get$addError", 0, 1, function() { return [null]; - }, ["call$2", "call$1"], ["addError$2", "addError$1"], 31, 0, 0); + }, ["call$2", "call$1"], ["addError$2", "addError$1"], 30, 0, 0); _instance_1_u(_, "get$_add", "_add$1", 8); _instance_2_u(_, "get$_addError", "_addError$2", 9); _instance_0_u(_, "get$_close", "_close$0", 0); @@ -29429,7 +29471,7 @@ _instance_0_u(_, "get$_handleDone", "_handleDone$0", 0); _static_2(A, "collection___defaultEquals$closure", "_defaultEquals0", 18); _static_1(A, "collection___defaultHashCode$closure", "_defaultHashCode", 15); - _static_2(A, "collection_ListBase__compareAny$closure", "ListBase__compareAny", 32); + _static_2(A, "collection_ListBase__compareAny$closure", "ListBase__compareAny", 31); _static_1(A, "convert___defaultToEncodable$closure", "_defaultToEncodable", 6); _instance_1_i(_ = A._ByteCallbackSink.prototype, "get$add", "add$1", 8); _instance_0_u(_, "get$close", "close$0", 0); @@ -29438,24 +29480,24 @@ _static_1(A, "core_Uri_decodeComponent$closure", "Uri_decodeComponent", 16); _static(A, "math__max$closure", 2, null, ["call$1$2", "call$2"], ["max", function(a, b) { return A.max(a, b, type$.num); - }], 108, 1); + }], 107, 1); _instance_2_u(_ = A.DeepCollectionEquality.prototype, "get$equals", "equals$2", 18); _instance_1_u(_, "get$hash", "hash$1", 15); _instance_1_u(_, "get$isValidKey", "isValidKey$1", 12); _static(A, "hot_reload_response_HotReloadResponse___new_tearOff$closure", 0, null, ["call$1", "call$0"], ["HotReloadResponse___new_tearOff", function() { return A.HotReloadResponse___new_tearOff(null); - }], 109, 0); + }], 108, 0); _static(A, "hot_restart_response_HotRestartResponse___new_tearOff$closure", 0, null, ["call$1", "call$0"], ["HotRestartResponse___new_tearOff", function() { return A.HotRestartResponse___new_tearOff(null); - }], 73, 0); + }], 72, 0); _static_1(A, "case_insensitive_map_CaseInsensitiveMap__canonicalizer$closure", "CaseInsensitiveMap__canonicalizer", 16); _instance_1_u(_ = A.SseClient.prototype, "get$_onIncomingControlMessage", "_onIncomingControlMessage$1", 2); _instance_1_u(_, "get$_onIncomingMessage", "_onIncomingMessage$1", 2); _instance_0_u(_, "get$_onOutgoingDone", "_onOutgoingDone$0", 0); - _instance_1_u(_, "get$_onOutgoingMessage", "_onOutgoingMessage$1", 67); + _instance_1_u(_, "get$_onOutgoingMessage", "_onOutgoingMessage$1", 66); _static_1(A, "client___handleAuthRequest$closure", "_handleAuthRequest", 2); - _instance_1_u(_ = A.RequireRestarter.prototype, "get$_moduleParents", "_moduleParents$1", 88); - _instance_2_u(_, "get$_moduleTopologicalCompare", "_moduleTopologicalCompare$2", 89); + _instance_1_u(_ = A.RequireRestarter.prototype, "get$_moduleParents", "_moduleParents$1", 87); + _instance_2_u(_, "get$_moduleTopologicalCompare", "_moduleTopologicalCompare$2", 88); })(); (function inheritance() { var _mixin = hunkHelpers.mixin, @@ -29474,7 +29516,7 @@ _inherit(A._EfficientLengthCastIterable, A.CastIterable); _inherit(A._CastListBase, A.__CastListBase__CastIterableBase_ListMixin); _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._CustomHashMap_closure, A._LinkedCustomHashMap_closure, A._BigIntImpl_hashCode_finish, 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.BuiltListMultimap_BuiltListMultimap_closure, A.BuiltListMultimap_hashCode_closure, A.ListMultimapBuilder_replace_closure, A.BuiltMap_BuiltMap_closure, A.BuiltMap_hashCode_closure, A.BuiltSet_hashCode_closure, A.BuiltSetMultimap_hashCode_closure, A.SetMultimapBuilder_replace_closure, A.newBuiltValueToStringHelper_closure, A.BuiltListMultimapSerializer_serialize_closure, A.BuiltListMultimapSerializer_deserialize_closure, A.BuiltListSerializer_serialize_closure, A.BuiltListSerializer_deserialize_closure, A.BuiltSetMultimapSerializer_serialize_closure, A.BuiltSetMultimapSerializer_deserialize_closure, A.BuiltSetSerializer_serialize_closure, A.BuiltSetSerializer_deserialize_closure, A.ListSerializer_serialize_closure, A.SetSerializer_serialize_closure, A.CanonicalizedMap_keys_closure, A.ServiceExtensionResponse_ServiceExtensionResponse$fromResult_closure, A.WebSocketClient_stream_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._GuaranteeSink__addError_closure, A._EventStreamSubscription_closure, A._EventStreamSubscription_onData_closure, A.BrowserWebSocket_connect_closure, A.BrowserWebSocket_connect_closure0, A.BrowserWebSocket_connect_closure1, A.BrowserWebSocket_connect_closure2, A.AdapterWebSocketChannel_closure, A.AdapterWebSocketChannel__closure, A.AdapterWebSocketChannel__closure0, A.AdapterWebSocketChannel_closure0, A.main__closure1, A.main__closure3, A.main___closure2, A.main___closure1, A.main__closure5, A.main___closure0, A.main___closure, A.main__closure7, A.main__closure8, A.main__closure9, A._sendConnectRequest_closure, A._launchCommunicationWithDebugExtension_closure, A._handleAuthRequest_closure, A._sendResponse_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]); - _inheritMany(A.Closure2Args, [A._CastListBase_sort_closure, A.CastMap_forEach_closure, A.ConstantMap_map_closure, A.JsLinkedHashMap_addAll_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.LinkedHashMap_LinkedHashMap$from_closure, A.MapBase_mapToString_closure, A._JsonStringifier_writeMap_closure, A._BigIntImpl_hashCode_combine, A.Uri__parseIPv4Address_error, A.Uri_parseIPv6Address_error, A.Uri_parseIPv6Address_parseHex, 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.hashObjects_closure, A.MapBuilder_replace_closure, A.CanonicalizedMap_addAll_closure, A.CanonicalizedMap_forEach_closure, A.CanonicalizedMap_map_closure, A.safeUnawaited_closure, A.BaseRequest_closure, A.MediaType_toString_closure, A.Pool__runOnRelease_closure0, A.Highlighter__collateLines_closure0, A.main__closure4, A.main_closure0]); + _inheritMany(A.Closure2Args, [A._CastListBase_sort_closure, A.CastMap_forEach_closure, A.ConstantMap_map_closure, A.JsLinkedHashMap_addAll_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.LinkedHashMap_LinkedHashMap$from_closure, A.MapBase_mapToString_closure, A._JsonStringifier_writeMap_closure, A._BigIntImpl_hashCode_combine, 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.hashObjects_closure, A.MapBuilder_replace_closure, A.CanonicalizedMap_addAll_closure, A.CanonicalizedMap_forEach_closure, A.CanonicalizedMap_map_closure, A.safeUnawaited_closure, A.BaseRequest_closure, A.MediaType_toString_closure, A.Pool__runOnRelease_closure0, A.Highlighter__collateLines_closure0, A.main__closure4, A.main_closure0]); _inherit(A.CastList, A._CastListBase); _inheritMany(A.MapBase, [A.CastMap, A.JsLinkedHashMap, A._HashMap, A._JsonMap]); _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, A.BuiltValueNullFieldError, A.BuiltValueNestedFieldError, A.DeserializationError]); @@ -29602,7 +29644,7 @@ typeUniverse: {eC: new Map(), tR: {}, eT: {}, tPV: {}, sEA: []}, mangledGlobalNames: {int: "int", double: "double", num: "num", String: "String", bool: "bool", Null: "Null", List: "List", Object: "Object", Map: "Map", JSObject: "JSObject"}, mangledNames: {}, - types: ["~()", "Null()", "~(JSObject)", "Object?(@)", "Null(@)", "Null(Object,StackTrace)", "@(@)", "~(@)", "~(Object?)", "~(Object,StackTrace)", "JSObject()", "Object?(Object?)", "bool(Object?)", "~(~())", "Null(JSObject)", "int(Object?)", "String(String)", "bool(_Highlight)", "bool(Object?,Object?)", "Future<~>()", "Null(JavaScriptFunction)", "~(@,StackTrace)", "bool(String)", "int()", "~(@,@)", "~(Object?,Object?)", "@()", "int(int,int)", "String(Match)", "bool()", "Null(JavaScriptFunction,JavaScriptFunction)", "~(Object[StackTrace?])", "int(@,@)", "int(_Line)", "ListMultimapBuilder()", "MapBuilder()", "SetBuilder()", "int(int,@)", "Object?(~)", "JSObject(Object,StackTrace)", "~(String,int?)", "ListBuilder()", "ListBuilder()", "~(ServiceExtensionResponseBuilder)", "~(String,int)", "String(@)", "bool(String,String)", "int(String)", "Null(String,String[Object?])", "bool(Object)", "~(List)", "MediaType()", "~(String,String)", "int(int)", "Logger()", "~(Zone,ZoneDelegate,Zone,Object,StackTrace)", "String(String?)", "String?()", "ListBuilder()", "_Future<@>?()", "Object(_Line)", "Object(_Highlight)", "int(_Highlight,_Highlight)", "List<_Line>(MapEntry>)", "~(int,@)", "SourceSpanWithContext()", "Null(@,StackTrace)", "~(String?)", "Future()", "Null(~())", "Null(WebSocket)", "~(WebSocketEvent)", "Null(Object)", "HotRestartResponse([~(HotRestartResponseBuilder)])", "JSObject(String[bool?])", "~(List)", "ListBuilder(BatchedDebugEventsBuilder)", "Null(String,String)", "DebugEventBuilder(DebugEventBuilder)", "Null(String)", "RegisterEventBuilder(RegisterEventBuilder)", "DevToolsRequestBuilder(DevToolsRequestBuilder)", "Future<~>(String)", "ConnectRequestBuilder(ConnectRequestBuilder)", "IndentingBuiltValueToStringHelper(String)", "~(bool)", "@(String)", "bool(bool)", "List(String)", "int(String,String)", "Null(JavaScriptObject)", "JSObject()()", "SetMultimapBuilder()", "@(@,String)", "~(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^(0^,0^)", "HotReloadResponse([~(HotReloadResponseBuilder)])", "DebugInfoBuilder(DebugInfoBuilder)"], + types: ["~()", "Null()", "~(JSObject)", "Object?(@)", "Null(@)", "Null(Object,StackTrace)", "@(@)", "~(@)", "~(Object?)", "~(Object,StackTrace)", "JSObject()", "Object?(Object?)", "bool(Object?)", "~(~())", "Null(JSObject)", "int(Object?)", "String(String)", "bool(_Highlight)", "bool(Object?,Object?)", "Future<~>()", "Null(JavaScriptFunction)", "~(@,StackTrace)", "bool(String)", "int()", "~(@,@)", "~(Object?,Object?)", "@()", "String(Match)", "bool()", "Null(JavaScriptFunction,JavaScriptFunction)", "~(Object[StackTrace?])", "int(@,@)", "int(_Line)", "ListMultimapBuilder()", "MapBuilder()", "SetBuilder()", "int(int,@)", "Object?(~)", "JSObject(Object,StackTrace)", "0&(String,int?)", "ListBuilder()", "ListBuilder()", "~(ServiceExtensionResponseBuilder)", "int(int)", "String(@)", "bool(String,String)", "int(String)", "Null(String,String[Object?])", "bool(Object)", "~(List)", "MediaType()", "~(String,String)", "int(int,int)", "Logger()", "~(Zone,ZoneDelegate,Zone,Object,StackTrace)", "String(String?)", "String?()", "ListBuilder()", "_Future<@>?()", "Object(_Line)", "Object(_Highlight)", "int(_Highlight,_Highlight)", "List<_Line>(MapEntry>)", "~(int,@)", "SourceSpanWithContext()", "Null(@,StackTrace)", "~(String?)", "Future()", "Null(~())", "Null(WebSocket)", "~(WebSocketEvent)", "Null(Object)", "HotRestartResponse([~(HotRestartResponseBuilder)])", "JSObject(String[bool?])", "~(List)", "ListBuilder(BatchedDebugEventsBuilder)", "Null(String,String)", "DebugEventBuilder(DebugEventBuilder)", "Null(String)", "RegisterEventBuilder(RegisterEventBuilder)", "DevToolsRequestBuilder(DevToolsRequestBuilder)", "Future<~>(String)", "ConnectRequestBuilder(ConnectRequestBuilder)", "IndentingBuiltValueToStringHelper(String)", "~(bool)", "@(String)", "bool(bool)", "List(String)", "int(String,String)", "Null(JavaScriptObject)", "JSObject()()", "SetMultimapBuilder()", "@(@,String)", "~(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^(0^,0^)", "HotReloadResponse([~(HotReloadResponseBuilder)])", "DebugInfoBuilder(DebugInfoBuilder)"], interceptorsByTag: null, leafTags: null, arrayRti: Symbol("$ti"), diff --git a/dwds/lib/src/version.dart b/dwds/lib/src/version.dart index 7a0c2501c..747caf41d 100644 --- a/dwds/lib/src/version.dart +++ b/dwds/lib/src/version.dart @@ -1,2 +1,2 @@ // Generated code. Do not modify. -const packageVersion = '25.1.1-wip'; +const packageVersion = '26.0.0-wip'; diff --git a/dwds/pubspec.yaml b/dwds/pubspec.yaml index d4d4f6376..ecee355b5 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 build_runner build`. -version: 25.1.1-wip +version: 26.0.0-wip description: >- A service that proxies between the Chrome debug protocol and the Dart VM diff --git a/frontend_server_common/CHANGELOG.md b/frontend_server_common/CHANGELOG.md index 211c985c5..5abea6d12 100644 --- a/frontend_server_common/CHANGELOG.md +++ b/frontend_server_common/CHANGELOG.md @@ -1,8 +1,8 @@ ## 0.2.3-wip +- Update Dart SDK constraint to `^3.10.0`. - Add bootstrapping code for DDC library bundle format. - Added scriptUri to compileExpression*Request -- Updated Dart SDK constraints to ^3.10.0-0.0.dev ## 0.2.2 From d591e52a7e4110c8ea47cbb3e5a897e88647f9b3 Mon Sep 17 00:00:00 2001 From: Jens Johansen Date: Mon, 29 Sep 2025 14:00:17 +0200 Subject: [PATCH 14/17] Feedback --- dwds/test/evaluate_parts_common.dart | 236 +++++++++++++-------------- 1 file changed, 111 insertions(+), 125 deletions(-) diff --git a/dwds/test/evaluate_parts_common.dart b/dwds/test/evaluate_parts_common.dart index c7922adc5..20e900784 100644 --- a/dwds/test/evaluate_parts_common.dart +++ b/dwds/test/evaluate_parts_common.dart @@ -61,7 +61,15 @@ void testAll({ } } - group('shared context with evaluation', () { + group('shared context with evaluation - evaluateInFrame', () { + late VmServiceInterface service; + late String isolateId; + late ScriptRef mainScript; + late ScriptRef part1Script; + late ScriptRef part2Script; + late ScriptRef part3Script; + late Stream stream; + setUpAll(() async { setCurrentLogWriter(debug: debug); await context.setUp( @@ -72,147 +80,125 @@ void testAll({ verboseCompiler: debug, ), ); + + service = context.service; + final vm = await service.getVM(); + final isolate = await service.getIsolate(vm.isolates!.first.id!); + isolateId = isolate.id!; + final scripts = await service.getScripts(isolateId); + + ScriptRef findScript(String path) { + return scripts.scripts!.firstWhere((e) => e.uri!.contains(path)); + } + + await service.streamListen('Debug'); + stream = service.onEvent('Debug'); + + final packageName = testParts.packageName; + + mainScript = findScript('package:$packageName/library.dart'); + part1Script = findScript('package:$packageName/part1.dart'); + part2Script = findScript('package:$packageName/part2.dart'); + part3Script = findScript('package:$packageName/part3.dart'); }); tearDownAll(() async { await context.tearDown(); }); - setUp(() => setCurrentLogWriter(debug: debug)); - - group('evaluateInFrame', () { - late VmServiceInterface service; - VM vm; - late Isolate isolate; - late String isolateId; - ScriptList scripts; - late ScriptRef mainScript; - late ScriptRef part1Script; - late ScriptRef part2Script; - late ScriptRef part3Script; - late Stream stream; - - setUp(() async { - setCurrentLogWriter(debug: debug); - service = context.service; - vm = await service.getVM(); - isolate = await service.getIsolate(vm.isolates!.first.id!); - isolateId = isolate.id!; - scripts = await service.getScripts(isolateId); - - await service.streamListen('Debug'); - stream = service.onEvent('Debug'); - - final packageName = testParts.packageName; - - mainScript = scripts.scripts!.firstWhere( - (each) => each.uri!.contains('package:$packageName/library.dart'), - ); - part1Script = scripts.scripts!.firstWhere( - (each) => each.uri!.contains('package:$packageName/part1.dart'), + tearDown(() async { + await service.resume(isolateId); + }); + + test('evaluate expression in main library', () async { + await onBreakPoint(isolateId, mainScript, 'Concatenate1', () async { + final event = await stream.firstWhere( + (event) => event.kind == EventKind.kPauseBreakpoint, ); - part2Script = scripts.scripts!.firstWhere( - (each) => each.uri!.contains('package:$packageName/part2.dart'), + + final result = await context.service.evaluateInFrame( + isolateId, + event.topFrame!.index!, + 'a.substring(2, 4)', ); - part3Script = scripts.scripts!.firstWhere( - (each) => each.uri!.contains('package:$packageName/part3.dart'), + + expect( + result, + isA().having( + (instance) => instance.valueAsString, + 'valueAsString', + 'll', + ), ); }); + }); - tearDown(() async { - await service.resume(isolateId); - }); + test('evaluate expression in part1', () async { + await onBreakPoint(isolateId, part1Script, 'Concatenate2', () async { + final event = await stream.firstWhere( + (event) => event.kind == EventKind.kPauseBreakpoint, + ); - test('evaluate expression in main library', () async { - await onBreakPoint(isolateId, mainScript, 'Concatenate1', () async { - final event = await stream.firstWhere( - (event) => event.kind == EventKind.kPauseBreakpoint, - ); - - final result = await context.service.evaluateInFrame( - isolateId, - event.topFrame!.index!, - 'a.substring(2, 4)', - ); - - expect( - result, - isA().having( - (instance) => instance.valueAsString, - 'valueAsString', - 'll', - ), - ); - }); - }); + final result = await context.service.evaluateInFrame( + isolateId, + event.topFrame!.index!, + 'a + b + 37', + ); - test('evaluate expression in part1', () async { - await onBreakPoint(isolateId, part1Script, 'Concatenate2', () async { - final event = await stream.firstWhere( - (event) => event.kind == EventKind.kPauseBreakpoint, - ); - - final result = await context.service.evaluateInFrame( - isolateId, - event.topFrame!.index!, - 'a + b + 37', - ); - - expect( - result, - isA().having( - (instance) => instance.valueAsString, - 'valueAsString', - '42', - ), - ); - }); + expect( + result, + isA().having( + (instance) => instance.valueAsString, + 'valueAsString', + '42', + ), + ); }); + }); + + test('evaluate expression in part2', () async { + await onBreakPoint(isolateId, part2Script, 'Concatenate3', () async { + final event = await stream.firstWhere( + (event) => event.kind == EventKind.kPauseBreakpoint, + ); + + final result = await context.service.evaluateInFrame( + isolateId, + event.topFrame!.index!, + 'a.length + b + 1', + ); - test('evaluate expression in part2', () async { - await onBreakPoint(isolateId, part2Script, 'Concatenate3', () async { - final event = await stream.firstWhere( - (event) => event.kind == EventKind.kPauseBreakpoint, - ); - - final result = await context.service.evaluateInFrame( - isolateId, - event.topFrame!.index!, - 'a.length + b + 1', - ); - - expect( - result, - isA().having( - (instance) => instance.valueAsString, - 'valueAsString', - '42.42', - ), - ); - }); + expect( + result, + isA().having( + (instance) => instance.valueAsString, + 'valueAsString', + '42.42', + ), + ); }); + }); + + test('evaluate expression in part3', () async { + await onBreakPoint(isolateId, part3Script, 'Concatenate4', () async { + final event = await stream.firstWhere( + (event) => event.kind == EventKind.kPauseBreakpoint, + ); - test('evaluate expression in part3', () async { - await onBreakPoint(isolateId, part3Script, 'Concatenate4', () async { - final event = await stream.firstWhere( - (event) => event.kind == EventKind.kPauseBreakpoint, - ); - - final result = await context.service.evaluateInFrame( - isolateId, - event.topFrame!.index!, - '(List.of(a)..add(b.keys.first)).toString()', - ); - - expect( - result, - isA().having( - (instance) => instance.valueAsString, - 'valueAsString', - '[hello, world, foo]', - ), - ); - }); + final result = await context.service.evaluateInFrame( + isolateId, + event.topFrame!.index!, + '(List.of(a)..add(b.keys.first)).toString()', + ); + + expect( + result, + isA().having( + (instance) => instance.valueAsString, + 'valueAsString', + '[hello, world, foo]', + ), + ); }); }); }); From d4bdae1686b082d705875ff908c6469246d830fe Mon Sep 17 00:00:00 2001 From: Jens Johansen Date: Mon, 29 Sep 2025 14:55:26 +0200 Subject: [PATCH 15/17] Attempt to remove probably unneeded stuff --- dwds/test/evaluate_parts_common.dart | 2 -- 1 file changed, 2 deletions(-) diff --git a/dwds/test/evaluate_parts_common.dart b/dwds/test/evaluate_parts_common.dart index 20e900784..5b53a04a5 100644 --- a/dwds/test/evaluate_parts_common.dart +++ b/dwds/test/evaluate_parts_common.dart @@ -2,8 +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 'package:test/test.dart'; From 9e99dd13d8df9abb98b78a2adeabc93de79587ad Mon Sep 17 00:00:00 2001 From: Jens Johansen Date: Mon, 29 Sep 2025 16:21:34 +0200 Subject: [PATCH 16/17] Feedback --- dwds/test/evaluate_parts_common.dart | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/dwds/test/evaluate_parts_common.dart b/dwds/test/evaluate_parts_common.dart index 5b53a04a5..04a5777df 100644 --- a/dwds/test/evaluate_parts_common.dart +++ b/dwds/test/evaluate_parts_common.dart @@ -68,7 +68,7 @@ void testAll({ late ScriptRef part3Script; late Stream stream; - setUpAll(() async { + setUp(() async { setCurrentLogWriter(debug: debug); await context.setUp( testSettings: TestSettings( @@ -100,15 +100,12 @@ void testAll({ part3Script = findScript('package:$packageName/part3.dart'); }); - tearDownAll(() async { - await context.tearDown(); - }); - tearDown(() async { - await service.resume(isolateId); + await context.tearDown(); }); - test('evaluate expression in main library', () async { + test('evaluate expression in main library and parts', () async { + // Main library. await onBreakPoint(isolateId, mainScript, 'Concatenate1', () async { final event = await stream.firstWhere( (event) => event.kind == EventKind.kPauseBreakpoint, @@ -129,9 +126,9 @@ void testAll({ ), ); }); - }); + await service.resume(isolateId); - test('evaluate expression in part1', () async { + // Part 1. await onBreakPoint(isolateId, part1Script, 'Concatenate2', () async { final event = await stream.firstWhere( (event) => event.kind == EventKind.kPauseBreakpoint, @@ -152,9 +149,9 @@ void testAll({ ), ); }); - }); + await service.resume(isolateId); - test('evaluate expression in part2', () async { + // Part 2. await onBreakPoint(isolateId, part2Script, 'Concatenate3', () async { final event = await stream.firstWhere( (event) => event.kind == EventKind.kPauseBreakpoint, @@ -175,9 +172,9 @@ void testAll({ ), ); }); - }); + await service.resume(isolateId); - test('evaluate expression in part3', () async { + // Part 3. await onBreakPoint(isolateId, part3Script, 'Concatenate4', () async { final event = await stream.firstWhere( (event) => event.kind == EventKind.kPauseBreakpoint, @@ -198,6 +195,7 @@ void testAll({ ), ); }); + await service.resume(isolateId); }); }); } From 727b326416b0d968dc60e66d349690d7207c0fdc Mon Sep 17 00:00:00 2001 From: Jens Johansen Date: Mon, 29 Sep 2025 16:24:59 +0200 Subject: [PATCH 17/17] Feedback --- dwds/test/evaluate_parts_common.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dwds/test/evaluate_parts_common.dart b/dwds/test/evaluate_parts_common.dart index 04a5777df..e417164eb 100644 --- a/dwds/test/evaluate_parts_common.dart +++ b/dwds/test/evaluate_parts_common.dart @@ -89,8 +89,8 @@ void testAll({ return scripts.scripts!.firstWhere((e) => e.uri!.contains(path)); } - await service.streamListen('Debug'); - stream = service.onEvent('Debug'); + await service.streamListen(EventStreams.kDebug); + stream = service.onEvent(EventStreams.kDebug); final packageName = testParts.packageName;