From 6bbc231cc8204e9335b3bcfa5c150c9263ea7bd5 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Mon, 21 Apr 2025 16:59:59 -0700 Subject: [PATCH 01/50] Defer execution of main until resume for hot restart with DDC library bundle format pause_isolates_on_start tells DWDS and the client that during a hot restart or a hot reload, the VM service will pause and is actively waiting for the client to remove existing breakpoints, reregister them, and then resume. It lets the client know by sending a kPausePostRequest event. In order to do this in DWDS, we need to defer the execution of main until that resume. So, like we do with the require restarter, we wait for a completer to finish before we call main after a hot restart. This completer is only provided when the flag is enabled. Fixes existing code that marks the completer as completed before running main. The previous code canceled the subscription in an unawaited Future. This may result in us recalling main because the event stream could still have a listener. An example is if we hit a breakpoint immediately after main and call resume. Also fixes an issue where metadata information isn't recomputed on a hot restart. This is needed when new files are added. Adds tests for: - Modifying a line with a breakpoint and restarting. - Adding a line before a breakpoint and restarting. - Removing a line before a breakpoint and restarting. - Adding a file and putting a breakpoint in it before restarting. --- dwds/lib/src/dwds_vm_client.dart | 17 +- dwds/lib/src/handlers/dev_handler.dart | 13 +- dwds/lib/src/injected/client.js | 799 ++++++++---------- .../src/services/chrome_proxy_service.dart | 14 +- dwds/test/common/hot_restart_common.dart | 204 ++--- dwds/test/fixtures/context.dart | 10 + dwds/test/fixtures/project.dart | 8 + dwds/test/hot_restart_breakpoints_test.dart | 312 +++++++ .../ddc_library_bundle_restarter.dart | 24 + .../_testHotRestartBreakpoints/pubspec.yaml | 9 + .../_testHotRestartBreakpoints/web/index.html | 7 + .../_testHotRestartBreakpoints/web/main.dart | 12 + 12 files changed, 844 insertions(+), 585 deletions(-) create mode 100644 dwds/test/hot_restart_breakpoints_test.dart create mode 100644 fixtures/_testHotRestartBreakpoints/pubspec.yaml create mode 100644 fixtures/_testHotRestartBreakpoints/web/index.html create mode 100644 fixtures/_testHotRestartBreakpoints/web/main.dart diff --git a/dwds/lib/src/dwds_vm_client.dart b/dwds/lib/src/dwds_vm_client.dart index 3498b5c34..34285c718 100644 --- a/dwds/lib/src/dwds_vm_client.dart +++ b/dwds/lib/src/dwds_vm_client.dart @@ -9,7 +9,6 @@ import 'package:dwds/src/events.dart'; import 'package:dwds/src/services/chrome_debug_exception.dart'; import 'package:dwds/src/services/chrome_proxy_service.dart'; import 'package:dwds/src/services/debug_service.dart'; -import 'package:dwds/src/utilities/shared.dart'; import 'package:dwds/src/utilities/synchronized.dart'; import 'package:logging/logging.dart'; import 'package:uuid/uuid.dart'; @@ -443,24 +442,14 @@ Future> _hotRestart( } void _waitForResumeEventToRunMain(ChromeProxyService chromeProxyService) { - final issuedReadyToRunMainCompleter = Completer(); - - final resumeEventsSubscription = chromeProxyService - .resumeAfterRestartEventsStream + StreamSubscription? resumeEventsSubscription; + resumeEventsSubscription = chromeProxyService.resumeAfterRestartEventsStream .listen((_) async { + await resumeEventsSubscription!.cancel(); await chromeProxyService.inspector.jsEvaluate( '\$dartReadyToRunMain();', ); - if (!issuedReadyToRunMainCompleter.isCompleted) { - issuedReadyToRunMainCompleter.complete(); - } }); - - safeUnawaited( - issuedReadyToRunMainCompleter.future.then((_) { - resumeEventsSubscription.cancel(); - }), - ); } Future> _fullReload( diff --git a/dwds/lib/src/handlers/dev_handler.dart b/dwds/lib/src/handlers/dev_handler.dart index 0f1f6d435..329777540 100644 --- a/dwds/lib/src/handlers/dev_handler.dart +++ b/dwds/lib/src/handlers/dev_handler.dart @@ -538,18 +538,11 @@ class DevHandler { Stream resumeEventsStream, Completer readyToRunMainCompleter, ) { - final resumeEventsSubscription = resumeEventsStream.listen((_) { + StreamSubscription? resumeEventsSubscription; + resumeEventsSubscription = resumeEventsStream.listen((_) async { + await resumeEventsSubscription!.cancel(); readyToRunMainCompleter.complete(); - if (!readyToRunMainCompleter.isCompleted) { - readyToRunMainCompleter.complete(); - } }); - - safeUnawaited( - readyToRunMainCompleter.future.then((_) { - resumeEventsSubscription.cancel(); - }), - ); } void _handleIsolateExit(AppConnection appConnection) { diff --git a/dwds/lib/src/injected/client.js b/dwds/lib/src/injected/client.js index e4aabe827..e1e788f3c 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.9.0-97.0.dev. +// Generated by dart2js (, csp, intern-composite-values), the Dart to JavaScript compiler version: 3.9.0-152.0.dev. // The code supports the following hooks: // dartPrint(message): // if this function is defined it is called instead of the Dart [print] @@ -125,7 +125,9 @@ return finalValue; }; } - function makeConstList(list) { + function makeConstList(list, rti) { + if (rti != null) + A._setArrayType(list, rti); list.$flags = 7; return list; } @@ -386,22 +388,6 @@ return J.UnknownJavaScriptObject.prototype; return receiver; }, - getInterceptor$x(receiver) { - if (receiver == null) - return receiver; - if (typeof receiver != "object") { - if (typeof receiver == "function") - return J.JavaScriptFunction.prototype; - if (typeof receiver == "symbol") - return J.JavaScriptSymbol.prototype; - if (typeof receiver == "bigint") - return J.JavaScriptBigInt.prototype; - return receiver; - } - if (receiver instanceof A.Object) - return receiver; - return J.getNativeInterceptor(receiver); - }, set$length$asx(receiver, value) { return J.getInterceptor$asx(receiver).set$length(receiver, value); }, @@ -452,9 +438,6 @@ allMatches$2$s(receiver, a0, a1) { return J.getInterceptor$s(receiver).allMatches$2(receiver, a0, a1); }, - asUint8List$2$x(receiver, a0, a1) { - return J.getInterceptor$x(receiver).asUint8List$2(receiver, a0, a1); - }, cast$1$0$ax(receiver, $T1) { return J.getInterceptor$ax(receiver).cast$1$0(receiver, $T1); }, @@ -1754,6 +1737,9 @@ getIsolateAffinityTag($name) { return init.getIsolateTag($name); }, + staticInteropGlobalContext() { + return init.G; + }, defineProperty(obj, property, value) { Object.defineProperty(obj, property, {value: value, enumerable: false, writable: true, configurable: true}); }, @@ -1975,8 +1961,7 @@ if (receiver === "") return replacement; $length = receiver.length; - t1 = "" + replacement; - for (i = 0; i < $length; ++i) + for (t1 = replacement, i = 0; i < $length; ++i) t1 = t1 + receiver[i] + replacement; return t1.charCodeAt(0) == 0 ? t1 : t1; } @@ -2232,9 +2217,6 @@ this._name = t0; this.__late_helper$_value = null; }, - _checkLength($length) { - return $length; - }, _ensureNativeList(list) { var t1, result, i; if (type$.JSIndexable_dynamic._is(list)) @@ -2277,9 +2259,6 @@ }, NativeTypedData: function NativeTypedData() { }, - _UnmodifiableNativeByteBufferView: function _UnmodifiableNativeByteBufferView(t0) { - this.__native_typed_data$_data = t0; - }, NativeByteData: function NativeByteData() { }, NativeTypedArray: function NativeTypedArray() { @@ -2573,47 +2552,56 @@ return A.createRuntimeType(A._Universe_eval(init.typeUniverse, recipe, false)); }, _installSpecializedIsTest(object) { - var kind, isFn, $name, predicate, testRti = this; - if (testRti === type$.Object) - return A._finishIsFn(testRti, object, A._isObject); + var testRti = this; + testRti._is = A._specializedIsTest(testRti); + return testRti._is(object); + }, + _specializedIsTest(testRti) { + var kind, simpleIsFn, $name, predicate, t2, + t1 = type$.Object; + if (testRti === t1) + return A._isObject; if (A.isTopType(testRti)) - return A._finishIsFn(testRti, object, A._isTop); + return A._isTop; kind = testRti._kind; if (kind === 6) - return A._finishIsFn(testRti, object, A._generalNullableIsTestImplementation); + return A._generalNullableIsTestImplementation; if (kind === 1) - return A._finishIsFn(testRti, object, A._isNever); + return A._isNever; if (kind === 7) - return A._finishIsFn(testRti, object, A._isFutureOr); - if (testRti === type$.int) - isFn = A._isInt; - else if (testRti === type$.double || testRti === type$.num) - isFn = A._isNum; - else if (testRti === type$.String) - isFn = A._isString; - else - isFn = testRti === type$.bool ? A._isBool : null; - if (isFn != null) - return A._finishIsFn(testRti, object, isFn); + return A._isFutureOr; + simpleIsFn = A._simpleSpecializedIsTest(testRti); + if (simpleIsFn != null) + return simpleIsFn; if (kind === 8) { $name = testRti._primary; if (testRti._rest.every(A.isTopType)) { testRti._specializedTestResource = "$is" + $name; if ($name === "List") - return A._finishIsFn(testRti, object, A._isListTestViaProperty); + return A._isListTestViaProperty; if (testRti === type$.JSObject) - return A._finishIsFn(testRti, object, A._isJSObject); - return A._finishIsFn(testRti, object, A._isTestViaProperty); + return A._isJSObject; + return A._isTestViaProperty; } } else if (kind === 10) { predicate = A.createRecordTypePredicate(testRti._primary, testRti._rest); - return A._finishIsFn(testRti, object, predicate == null ? A._isNever : predicate); + t2 = predicate == null ? A._isNever : predicate; + return t2 == null ? t1._as(t2) : t2; + } + return A._generalIsTestImplementation; + }, + _simpleSpecializedIsTest(testRti) { + if (testRti._kind === 8) { + if (testRti === type$.int) + return A._isInt; + if (testRti === type$.double || testRti === type$.num) + return A._isNum; + if (testRti === type$.String) + return A._isString; + if (testRti === type$.bool) + return A._isBool; } - return A._finishIsFn(testRti, object, A._generalIsTestImplementation); - }, - _finishIsFn(testRti, object, isFn) { - testRti._is = isFn; - return testRti._is(object); + return null; }, _installSpecializedAsCheck(object) { var testRti = this, @@ -2622,28 +2610,28 @@ asFn = A._asTop; else if (testRti === type$.Object) asFn = A._asObject; - else if (A.isNullable(testRti)) + else if (A.isNullable(testRti)) { asFn = A._generalNullableAsCheckImplementation; - if (testRti === type$.int) + if (testRti === type$.nullable_int) + asFn = A._asIntQ; + else if (testRti === type$.nullable_String) + asFn = A._asStringQ; + else if (testRti === type$.nullable_bool) + asFn = A._asBoolQ; + else if (testRti === type$.nullable_num) + asFn = A._asNumQ; + else if (testRti === type$.nullable_double) + asFn = A._asDoubleQ; + } else if (testRti === type$.int) asFn = A._asInt; - else if (testRti === type$.nullable_int) - asFn = A._asIntQ; else if (testRti === type$.String) asFn = A._asString; - else if (testRti === type$.nullable_String) - asFn = A._asStringQ; else if (testRti === type$.bool) asFn = A._asBool; - else if (testRti === type$.nullable_bool) - asFn = A._asBoolQ; else if (testRti === type$.num) asFn = A._asNum; - else if (testRti === type$.nullable_num) - asFn = A._asNumQ; else if (testRti === type$.double) asFn = A._asDouble; - else if (testRti === type$.nullable_double) - asFn = A._asDoubleQ; testRti._as = asFn; return testRti._as(object); }, @@ -2962,8 +2950,8 @@ }, _Universe_findErasedType(universe, cls) { var $length, erased, $arguments, i, $interface, - t1 = universe.eT, - probe = t1[cls]; + metadata = universe.eT, + probe = metadata[cls]; if (probe == null) return A._Universe_eval(universe, cls, false); else if (typeof probe == "number") { @@ -2973,7 +2961,7 @@ for (i = 0; i < $length; ++i) $arguments[i] = erased; $interface = A._Universe__lookupInterfaceRti(universe, cls, $arguments); - t1[cls] = $interface; + metadata[cls] = $interface; return $interface; } else return probe; @@ -2986,12 +2974,12 @@ }, _Universe_eval(universe, recipe, normalize) { var rti, - t1 = universe.eC, - probe = t1.get(recipe); + cache = universe.eC, + probe = cache.get(recipe); if (probe != null) return probe; rti = A._Parser_parse(A._Parser_create(universe, null, recipe, false)); - t1.set(recipe, rti); + cache.set(recipe, rti); return rti; }, _Universe_evalInEnvironment(universe, environment, recipe) { @@ -3250,97 +3238,97 @@ return {u: universe, e: environment, r: recipe, s: [], p: 0, n: normalize}; }, _Parser_parse(parser) { - var t2, i, ch, t3, array, end, item, + var t1, i, ch, u, array, end, item, source = parser.r, - t1 = parser.s; - for (t2 = source.length, i = 0; i < t2;) { + stack = parser.s; + for (t1 = source.length, i = 0; i < t1;) { ch = source.charCodeAt(i); if (ch >= 48 && ch <= 57) - i = A._Parser_handleDigit(i + 1, ch, source, t1); + i = A._Parser_handleDigit(i + 1, ch, source, stack); else if ((((ch | 32) >>> 0) - 97 & 65535) < 26 || ch === 95 || ch === 36 || ch === 124) - i = A._Parser_handleIdentifier(parser, i, source, t1, false); + i = A._Parser_handleIdentifier(parser, i, source, stack, false); else if (ch === 46) - i = A._Parser_handleIdentifier(parser, i, source, t1, true); + i = A._Parser_handleIdentifier(parser, i, source, stack, true); else { ++i; switch (ch) { case 44: break; case 58: - t1.push(false); + stack.push(false); break; case 33: - t1.push(true); + stack.push(true); break; case 59: - t1.push(A._Parser_toType(parser.u, parser.e, t1.pop())); + stack.push(A._Parser_toType(parser.u, parser.e, stack.pop())); break; case 94: - t1.push(A._Universe__lookupGenericFunctionParameterRti(parser.u, t1.pop())); + stack.push(A._Universe__lookupGenericFunctionParameterRti(parser.u, stack.pop())); break; case 35: - t1.push(A._Universe__lookupTerminalRti(parser.u, 5, "#")); + stack.push(A._Universe__lookupTerminalRti(parser.u, 5, "#")); break; case 64: - t1.push(A._Universe__lookupTerminalRti(parser.u, 2, "@")); + stack.push(A._Universe__lookupTerminalRti(parser.u, 2, "@")); break; case 126: - t1.push(A._Universe__lookupTerminalRti(parser.u, 3, "~")); + stack.push(A._Universe__lookupTerminalRti(parser.u, 3, "~")); break; case 60: - t1.push(parser.p); - parser.p = t1.length; + stack.push(parser.p); + parser.p = stack.length; break; case 62: - A._Parser_handleTypeArguments(parser, t1); + A._Parser_handleTypeArguments(parser, stack); break; case 38: - A._Parser_handleExtendedOperations(parser, t1); + A._Parser_handleExtendedOperations(parser, stack); break; case 63: - t3 = parser.u; - t1.push(A._Universe__lookupQuestionRti(t3, A._Parser_toType(t3, parser.e, t1.pop()), parser.n)); + u = parser.u; + stack.push(A._Universe__lookupQuestionRti(u, A._Parser_toType(u, parser.e, stack.pop()), parser.n)); break; case 47: - t3 = parser.u; - t1.push(A._Universe__lookupFutureOrRti(t3, A._Parser_toType(t3, parser.e, t1.pop()), parser.n)); + u = parser.u; + stack.push(A._Universe__lookupFutureOrRti(u, A._Parser_toType(u, parser.e, stack.pop()), parser.n)); break; case 40: - t1.push(-3); - t1.push(parser.p); - parser.p = t1.length; + stack.push(-3); + stack.push(parser.p); + parser.p = stack.length; break; case 41: - A._Parser_handleArguments(parser, t1); + A._Parser_handleArguments(parser, stack); break; case 91: - t1.push(parser.p); - parser.p = t1.length; + stack.push(parser.p); + parser.p = stack.length; break; case 93: - array = t1.splice(parser.p); + array = stack.splice(parser.p); A._Parser_toTypes(parser.u, parser.e, array); - parser.p = t1.pop(); - t1.push(array); - t1.push(-1); + parser.p = stack.pop(); + stack.push(array); + stack.push(-1); break; case 123: - t1.push(parser.p); - parser.p = t1.length; + stack.push(parser.p); + parser.p = stack.length; break; case 125: - array = t1.splice(parser.p); + array = stack.splice(parser.p); A._Parser_toTypesNamed(parser.u, parser.e, array); - parser.p = t1.pop(); - t1.push(array); - t1.push(-2); + parser.p = stack.pop(); + stack.push(array); + stack.push(-2); break; case 43: end = source.indexOf("(", i); - t1.push(source.substring(i, end)); - t1.push(-4); - t1.push(parser.p); - parser.p = t1.length; + stack.push(source.substring(i, end)); + stack.push(-4); + stack.push(parser.p); + parser.p = stack.length; i = end + 1; break; default: @@ -3348,7 +3336,7 @@ } } } - item = t1.pop(); + item = stack.pop(); return A._Parser_toType(parser.u, parser.e, item); }, _Parser_handleDigit(i, digit, source, stack) { @@ -3397,26 +3385,26 @@ }, _Parser_handleTypeArguments(parser, stack) { var base, - t1 = parser.u, + universe = parser.u, $arguments = A._Parser_collectArray(parser, stack), head = stack.pop(); if (typeof head == "string") - stack.push(A._Universe__lookupInterfaceRti(t1, head, $arguments)); + stack.push(A._Universe__lookupInterfaceRti(universe, head, $arguments)); else { - base = A._Parser_toType(t1, parser.e, head); + base = A._Parser_toType(universe, parser.e, head); switch (base._kind) { case 11: - stack.push(A._Universe__lookupGenericFunctionRti(t1, base, $arguments, parser.n)); + stack.push(A._Universe__lookupGenericFunctionRti(universe, base, $arguments, parser.n)); break; default: - stack.push(A._Universe__lookupBindingRti(t1, base, $arguments)); + stack.push(A._Universe__lookupBindingRti(universe, base, $arguments)); break; } } }, _Parser_handleArguments(parser, stack) { var requiredPositional, returnType, parameters, - t1 = parser.u, + universe = parser.u, head = stack.pop(), optionalPositional = null, named = null; if (typeof head == "number") @@ -3439,18 +3427,18 @@ case -3: head = stack.pop(); if (optionalPositional == null) - optionalPositional = t1.sEA; + optionalPositional = universe.sEA; if (named == null) - named = t1.sEA; - returnType = A._Parser_toType(t1, parser.e, head); + named = universe.sEA; + returnType = A._Parser_toType(universe, parser.e, head); parameters = new A._FunctionParameters(); parameters._requiredPositional = requiredPositional; parameters._optionalPositional = optionalPositional; parameters._named = named; - stack.push(A._Universe__lookupFunctionRti(t1, returnType, parameters)); + stack.push(A._Universe__lookupFunctionRti(universe, returnType, parameters)); return; case -4: - stack.push(A._Universe__lookupRecordRti(t1, stack.pop(), requiredPositional)); + stack.push(A._Universe__lookupRecordRti(universe, stack.pop(), requiredPositional)); return; default: throw A.wrapException(A.AssertionError$("Unexpected state under `()`: " + A.S(head))); @@ -3821,7 +3809,6 @@ return completer._future; }, _asyncAwait(object, bodyFunction) { - bodyFunction.toString; A._awaitOnObject(object, bodyFunction); }, _asyncReturn(object, completer) { @@ -7540,15 +7527,15 @@ _.___Uri_hashCode_FI = _.___Uri_pathSegments_FI = _.___Uri__text_FI = $; }, JSAnyUtilityExtension_instanceOfString(_this, constructorName) { - var parts, $constructor, t1, t2, _i, part; + var parts, $constructor, t1, t2, _i, t3; if (constructorName.length === 0) return false; parts = constructorName.split("."); $constructor = init.G; - for (t1 = parts.length, t2 = type$.nullable_JSObject, _i = 0; _i < t1; ++_i) { - part = parts[_i]; - $constructor = t2._as($constructor[part]); - if ($constructor == null) + for (t1 = parts.length, t2 = type$.nullable_JSObject, _i = 0; _i < t1; ++_i, $constructor = t3) { + t3 = $constructor[parts[_i]]; + t2._as(t3); + if (t3 == null) return false; } return _this instanceof type$.JavaScriptFunction._as($constructor); @@ -7639,6 +7626,9 @@ return object; return new A.jsify__convert(new A._IdentityHashMap(type$._IdentityHashMap_of_nullable_Object_and_nullable_Object)).call$1(object); }, + getProperty(o, $name, $T) { + return $T._as(o[$name]); + }, callConstructor(constr, $arguments, $T) { var args, factoryFunction; if ($arguments == null) @@ -7696,10 +7686,10 @@ A.checkTypeBound($T, type$.num, "T", "max"); return Math.max($T._as(a), $T._as(b)); }, - _JSRandom: function _JSRandom() { + Random_Random(seed) { + return B.C__JSRandom; }, - _JSSecureRandom: function _JSSecureRandom(t0) { - this._math$_buffer = t0; + _JSRandom: function _JSRandom() { }, AsyncMemoizer: function AsyncMemoizer(t0, t1) { this._async_memoizer$_completer = t0; @@ -8765,9 +8755,6 @@ _._finalized = false; }, Response_fromStream(response) { - return A.Response_fromStream$body(response); - }, - Response_fromStream$body(response) { var $async$goto = 0, $async$completer = A._makeAsyncAwaitCompleter(type$.Response), $async$returnValue, body, t1, t2, t3, t4, t5, t6; @@ -8910,7 +8897,7 @@ break; } message = new A.StringBuffer(""); - t1 = "" + (method + "("); + t1 = method + "("; message._contents = t1; t2 = A._arrayInstanceType(args); t3 = t2._eval$1("SubListIterable<1>"); @@ -9431,7 +9418,8 @@ }, RNG: function RNG() { }, - CryptoRNG: function CryptoRNG() { + MathRNG: function MathRNG(t0) { + this._rnd = t0; }, UuidV1: function UuidV1(t0) { this.goptions = t0; @@ -9481,9 +9469,6 @@ this.handleData = t0; }, BrowserWebSocket_connect(url, protocols) { - return A.BrowserWebSocket_connect$body(url, protocols); - }, - BrowserWebSocket_connect$body(url, protocols) { var $async$goto = 0, $async$completer = A._makeAsyncAwaitCompleter(type$.BrowserWebSocket), $async$returnValue, t1, t2, t3, t4, webSocket, browserSocket, webSocketConnected; @@ -9499,7 +9484,8 @@ t1 = init.G; t2 = t1.WebSocket; t3 = url.toString$0(0); - t1 = type$.JSArray_nullable_Object._as(new t1.Array()); + t1 = t1.Array; + t1 = type$.JSArray_nullable_Object._as(new t1()); t4 = type$.JSObject; webSocket = t4._as(new t2(t3, t1)); webSocket.binaryType = "arraybuffer"; @@ -9654,9 +9640,6 @@ } }, _authenticateUser(authUrl) { - return A._authenticateUser$body(authUrl); - }, - _authenticateUser$body(authUrl) { var $async$goto = 0, $async$completer = A._makeAsyncAwaitCompleter(type$.bool), $async$returnValue, response, client; @@ -9745,15 +9728,16 @@ }); return A._asyncStartSync($async$handleWebSocketHotReloadRequest, $async$completer); }, - dartModuleStrategy() { - return A._asString(init.G.$dartModuleStrategy); - }, hotReloadSourcesPath() { var path = A._asStringQ(init.G.$hotReloadSourcesPath); if (path == null) throw A.wrapException(A.StateError$("Expected 'hotReloadSourcePath' to not be null in a hot reload.")); return path; }, + _isChromium() { + var t1 = type$.JSObject; + return B.JSString_methods.contains$1(A._asString(t1._as(t1._as(init.G.window).navigator).vendor), "Google"); + }, _authUrl() { var authUrl, extensionUrl = A._asStringQ(type$.JavaScriptObject._as(init.G.window).$dartExtensionUri); @@ -9830,9 +9814,6 @@ this.errorMessage = t2; }, _Debugger_maybeInvokeFlutterDisassemble(_this) { - return A._Debugger_maybeInvokeFlutterDisassemble$body(_this); - }, - _Debugger_maybeInvokeFlutterDisassemble$body(_this) { var $async$goto = 0, $async$completer = A._makeAsyncAwaitCompleter(type$.void), t1; @@ -9863,6 +9844,10 @@ DdcLibraryBundleRestarter: function DdcLibraryBundleRestarter() { this.__DdcLibraryBundleRestarter__sourcesAndLibrariesToReload_A = $; }, + DdcLibraryBundleRestarter_restart_closure: function DdcLibraryBundleRestarter_restart_closure(t0, t1) { + this.$this = t0; + this.readyToRunMain = t1; + }, DdcLibraryBundleRestarter_fetchLibrariesForHotReload_closure: function DdcLibraryBundleRestarter_fetchLibrariesForHotReload_closure(t0, t1) { this.xhr = t0; this.completer = t1; @@ -9880,9 +9865,6 @@ this._restarter = t1; }, SdkDeveloperExtension_maybeInvokeFlutterDisassemble(_this) { - return A.SdkDeveloperExtension_maybeInvokeFlutterDisassemble$body(_this); - }, - SdkDeveloperExtension_maybeInvokeFlutterDisassemble$body(_this) { var $async$goto = 0, $async$completer = A._makeAsyncAwaitCompleter(type$.void); var $async$SdkDeveloperExtension_maybeInvokeFlutterDisassemble = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { @@ -10019,8 +10001,7 @@ throw "Unable to print message: " + String(string); }, JSFunctionUnsafeUtilExtension_callAsConstructor(_this, arg1, $R) { - var t1 = [arg1]; - return $R._as(A.callConstructor(_this, t1, type$.JSObject)); + return $R._as(A.callConstructor(_this, [arg1], type$.JSObject)); }, groupBy(values, key, $S, $T) { var t1, _i, element, t2, t3, @@ -10381,7 +10362,6 @@ return new A.MappedListIterable(receiver, t1._bind$1($T)._eval$1("1(2)")._as(f), t1._eval$1("@<1>")._bind$1($T)._eval$1("MappedListIterable<1,2>")); }, map$1(receiver, f) { - f.toString; return this.map$1$1(receiver, f, type$.dynamic); }, join$1(receiver, separator) { @@ -10603,7 +10583,6 @@ return -1; }, indexWhere$1(receiver, test) { - test.toString; return this.indexWhere$2(receiver, test, 0); }, get$runtimeType(receiver) { @@ -11187,7 +11166,7 @@ call$0() { return A.Future_Future$value(null, type$.void); }, - $signature: 16 + $signature: 19 }; A.SentinelValue.prototype = {}; A.EfficientLengthIterable.prototype = {}; @@ -11247,7 +11226,6 @@ return new A.MappedListIterable(this, t1._bind$1($T)._eval$1("1(ListIterable.E)")._as(toElement), t1._eval$1("@")._bind$1($T)._eval$1("MappedListIterable<1,2>")); }, map$1(_, toElement) { - toElement.toString; return this.map$1$1(0, toElement, type$.dynamic); }, reduce$1(_, combine) { @@ -11443,7 +11421,6 @@ return new A.MappedIterable(this, t1._bind$1($T)._eval$1("1(2)")._as(toElement), t1._eval$1("@<1>")._bind$1($T)._eval$1("MappedIterable<1,2>")); }, map$1(_, toElement) { - toElement.toString; return this.map$1$1(0, toElement, type$.dynamic); } }; @@ -11581,7 +11558,6 @@ return new A.EmptyIterable($T._eval$1("EmptyIterable<0>")); }, map$1(_, toElement) { - toElement.toString; return this.map$1$1(0, toElement, type$.dynamic); }, skip$1(_, count) { @@ -11690,7 +11666,6 @@ }, map$1(_, transform) { var t1 = type$.dynamic; - transform.toString; return this.map$2$1(0, transform, t1, t1); }, $isMap: 1 @@ -12289,13 +12264,13 @@ call$2(o, tag) { return this.getUnknownTag(o, tag); }, - $signature: 37 + $signature: 66 }; A.initHooks_closure1.prototype = { call$1(tag) { return this.prototypeForTag(A._asString(tag)); }, - $signature: 35 + $signature: 90 }; A._Record.prototype = { get$runtimeType(_) { @@ -12311,7 +12286,7 @@ var t2, separator, i, key, value, keys = this._fieldKeys$0(), values = this._getFieldValues$0(), - t1 = (safe ? "" + "Record " : "") + "("; + t1 = (safe ? "Record " : "") + "("; for (t2 = keys.length, separator = "", i = 0; i < t2; ++i, separator = ", ") { t1 += separator; key = keys[i]; @@ -12589,20 +12564,11 @@ get$runtimeType(receiver) { return B.Type_ByteBuffer_rqD; }, - asUint8List$2(receiver, offsetInBytes, $length) { - return $length == null ? new Uint8Array(receiver, offsetInBytes) : new Uint8Array(receiver, offsetInBytes, $length); - }, $isTrustedGetRuntimeType: 1, $isNativeByteBuffer: 1, $isByteBuffer: 1 }; A.NativeTypedData.prototype = { - get$buffer(receiver) { - if (((receiver.$flags | 0) & 2) !== 0) - return new A._UnmodifiableNativeByteBufferView(receiver.buffer); - else - return receiver.buffer; - }, _invalidPosition$3(receiver, position, $length, $name) { var t1 = A.RangeError$range(position, 0, $length, $name, null); throw A.wrapException(t1); @@ -12612,14 +12578,6 @@ this._invalidPosition$3(receiver, position, $length, $name); } }; - A._UnmodifiableNativeByteBufferView.prototype = { - asUint8List$2(_, offsetInBytes, $length) { - var result = A.NativeUint8List_NativeUint8List$view(this.__native_typed_data$_data, offsetInBytes, $length); - result.$flags = 3; - return result; - }, - $isByteBuffer: 1 - }; A.NativeByteData.prototype = { get$runtimeType(receiver) { return B.Type_ByteData_9dB; @@ -12883,7 +12841,7 @@ t2 = this.span; t1.firstChild ? t1.removeChild(t2) : t1.appendChild(t2); }, - $signature: 38 + $signature: 61 }; A._AsyncRun__scheduleImmediateJsOverride_internalCallback.prototype = { call$0() { @@ -12989,13 +12947,13 @@ call$2(error, stackTrace) { this.bodyFunction.call$2(1, new A.ExceptionAndStackTrace(error, type$.StackTrace._as(stackTrace))); }, - $signature: 56 + $signature: 52 }; A._wrapJsFunctionForAsync_closure.prototype = { call$2(errorCode, result) { this.$protected(A._asInt(errorCode), result); }, - $signature: 39 + $signature: 37 }; A.AsyncError.prototype = { toString$0(_) { @@ -13124,7 +13082,6 @@ return result; }, then$1$1(f, $R) { - f.toString; return this.then$1$2$onError(f, null, $R); }, _thenAwait$1$2(f, onError, $E) { @@ -13503,7 +13460,6 @@ return new A._MapStream(t1._bind$1($S)._eval$1("1(Stream.T)")._as(convert), this, t1._eval$1("@")._bind$1($S)._eval$1("_MapStream<1,2>")); }, map$1(_, convert) { - convert.toString; return this.map$1$1(0, convert, type$.dynamic); }, get$length(_) { @@ -14806,7 +14762,7 @@ t2._processUncaughtError$3(zone, type$.Object._as(e), t1._as(s)); } }, - $signature: 46 + $signature: 63 }; A._HashMap.prototype = { get$length(_) { @@ -15028,7 +14984,7 @@ call$1(v) { return this.K._is(v); }, - $signature: 14 + $signature: 12 }; A._HashMapKeyIterable.prototype = { get$length(_) { @@ -15109,7 +15065,7 @@ call$1(v) { return this.K._is(v); }, - $signature: 14 + $signature: 12 }; A._HashSet.prototype = { get$iterator(_) { @@ -15477,7 +15433,7 @@ call$2(k, v) { this.result.$indexSet(0, this.K._as(k), this.V._as(v)); }, - $signature: 31 + $signature: 23 }; A.ListBase.prototype = { get$iterator(receiver) { @@ -15513,7 +15469,6 @@ return new A.MappedListIterable(receiver, t1._bind$1($T)._eval$1("1(ListBase.E)")._as(f), t1._eval$1("@")._bind$1($T)._eval$1("MappedListIterable<1,2>")); }, map$1(receiver, f) { - f.toString; return this.map$1$1(receiver, f, type$.dynamic); }, skip$1(receiver, count) { @@ -15639,7 +15594,6 @@ }, map$1(_, transform) { var t1 = type$.dynamic; - transform.toString; return this.map$2$1(0, transform, t1, t1); }, containsKey$1(key) { @@ -15671,7 +15625,7 @@ t2 = A.S(v); t1._contents += t2; }, - $signature: 33 + $signature: 24 }; A._UnmodifiableMapMixin.prototype = { $indexSet(_, key, value) { @@ -15717,7 +15671,6 @@ }, map$1(_, transform) { var t1 = type$.dynamic; - transform.toString; return this.map$2$1(0, transform, t1, t1); }, $isMap: 1 @@ -15876,7 +15829,6 @@ return new A.EfficientLengthMappedIterable(this, t1._bind$1($T)._eval$1("1(2)")._as(f), t1._eval$1("@<1>")._bind$1($T)._eval$1("EfficientLengthMappedIterable<1,2>")); }, map$1(_, f) { - f.toString; return this.map$1$1(0, f, type$.dynamic); }, toString$0(_) { @@ -16324,7 +16276,7 @@ } return null; }, - $signature: 21 + $signature: 25 }; A._Utf8Decoder__decoderNonfatal_closure.prototype = { call$0() { @@ -16336,7 +16288,7 @@ } return null; }, - $signature: 21 + $signature: 25 }; A.AsciiCodec.prototype = { encode$1(source) { @@ -16839,7 +16791,7 @@ B.JSArray_methods.$indexSet(t1, t2.i++, key); B.JSArray_methods.$indexSet(t1, t2.i++, value); }, - $signature: 33 + $signature: 24 }; A._JsonStringStringifier.prototype = { get$_partialResult() { @@ -17521,7 +17473,7 @@ hash = hash + ((hash & 524287) << 10) & 536870911; return hash ^ hash >>> 6; }, - $signature: 27 + $signature: 26 }; A._BigIntImpl_hashCode_finish.prototype = { call$1(hash) { @@ -17529,7 +17481,7 @@ hash ^= hash >>> 11; return hash + ((hash & 16383) << 15) & 536870911; }, - $signature: 22 + $signature: 27 }; A.DateTime.prototype = { $eq(_, other) { @@ -17826,7 +17778,6 @@ return A.MappedIterable_MappedIterable(this, t1._bind$1($T)._eval$1("1(Iterable.E)")._as(toElement), t1._eval$1("Iterable.E"), $T); }, map$1(_, toElement) { - toElement.toString; return this.map$1$1(0, toElement, type$.dynamic); }, contains$1(_, element) { @@ -17948,13 +17899,13 @@ call$2(msg, position) { throw A.wrapException(A.FormatException$("Illegal IPv4 address, " + msg, this.host, position)); }, - $signature: 42 + $signature: 56 }; A.Uri_parseIPv6Address_error.prototype = { call$2(msg, position) { throw A.wrapException(A.FormatException$("Illegal IPv6 address, " + msg, this.host, position)); }, - $signature: 48 + $signature: 53 }; A.Uri_parseIPv6Address_parseHex.prototype = { call$2(start, end) { @@ -17966,7 +17917,7 @@ this.error.call$2("each part must be in the range of `0x0..0xFFFF`", start); return value; }, - $signature: 27 + $signature: 26 }; A._Uri.prototype = { get$_text() { @@ -17974,7 +17925,7 @@ value = _this.___Uri__text_FI; if (value === $) { t1 = _this.scheme; - t2 = t1.length !== 0 ? "" + t1 + ":" : ""; + t2 = t1.length !== 0 ? t1 + ":" : ""; t3 = _this._host; t4 = t3 == null; if (!t4 || t1 === "file") { @@ -18217,7 +18168,7 @@ A.throwExpression(A.UnsupportedError$(string$.Cannotn)); pathSegments = _this.get$pathSegments(); A._Uri__checkNonWindowsPathReservedCharacters(pathSegments, false); - t1 = A.StringBuffer__writeAll(B.JSString_methods.startsWith$1(_this.path, "/") ? "" + "/" : "", pathSegments, "/"); + t1 = A.StringBuffer__writeAll(B.JSString_methods.startsWith$1(_this.path, "/") ? "/" : "", pathSegments, "/"); t1 = t1.charCodeAt(0) == 0 ? t1 : t1; return t1; }, @@ -18267,7 +18218,7 @@ call$1(s) { return A._Uri__uriEncode(64, A._asString(s), B.C_Utf8Codec, false); }, - $signature: 15 + $signature: 13 }; A.UriData.prototype = { get$uri() { @@ -18593,7 +18544,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: 23 + $signature: 29 }; A.FutureOfJSAnyToJSPromise_get_toJS__closure.prototype = { call$1(value) { @@ -18601,7 +18552,7 @@ t1.call(t1, value); return value; }, - $signature: 10 + $signature: 11 }; A.FutureOfJSAnyToJSPromise_get_toJS__closure0.prototype = { call$2(error, stackTrace) { @@ -18626,14 +18577,14 @@ 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: 23 + $signature: 29 }; A.FutureOfVoidToJSPromise_get_toJS__closure.prototype = { call$1(__wc0_formal) { var t1 = this.resolve; return t1.call(t1); }, - $signature: 52 + $signature: 46 }; A.FutureOfVoidToJSPromise_get_toJS__closure0.prototype = { call$2(error, stackTrace) { @@ -18676,7 +18627,7 @@ } else return o; }, - $signature: 10 + $signature: 11 }; A.promiseToFuture_closure.prototype = { call$1(r) { @@ -18742,7 +18693,7 @@ } return o; }, - $signature: 10 + $signature: 11 }; A.NullRejectionException.prototype = { toString$0(_) { @@ -18753,44 +18704,10 @@ A._JSRandom.prototype = { nextInt$1(max) { if (max <= 0 || max > 4294967296) - throw A.wrapException(A.RangeError$(string$.max_mu + max)); + throw A.wrapException(A.RangeError$("max must be in range 0 < max \u2264 2^32, was " + max)); return Math.random() * max >>> 0; - } - }; - A._JSSecureRandom.prototype = { - _JSSecureRandom$0() { - var $crypto = self.crypto; - if ($crypto != null) - if ($crypto.getRandomValues != null) - return; - throw A.wrapException(A.UnsupportedError$("No source of cryptographically secure random numbers available.")); }, - nextInt$1(max) { - var byteCount, t1, start, randomLimit, t2, t3, random, result; - if (max <= 0 || max > 4294967296) - throw A.wrapException(A.RangeError$(string$.max_mu + max)); - if (max > 255) - if (max > 65535) - byteCount = max > 16777215 ? 4 : 3; - else - byteCount = 2; - else - byteCount = 1; - t1 = this._math$_buffer; - t1.$flags & 2 && A.throwUnsupportedOperation(t1, 11); - 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;) { - crypto.getRandomValues(J.asUint8List$2$x(B.NativeByteData_methods.get$buffer(t1), start, byteCount)); - random = t1.getUint32(0, false); - if (t3) - return (random & t2) >>> 0; - result = random % max; - if (random - result + max < randomLimit) - return result; - } - } + $isRandom: 1 }; A.AsyncMemoizer.prototype = {}; A.DelegatingStreamSink.prototype = { @@ -18953,7 +18870,7 @@ call$2(h, i) { return A._combine(A._asInt(h), J.get$hashCode$(i)); }, - $signature: 61 + $signature: 42 }; A.BuiltList.prototype = { toBuilder$0() { @@ -19004,7 +18921,6 @@ return new A.MappedListIterable(t1, t2._bind$1($T)._eval$1("1(2)")._as(this.$ti._bind$1($T)._eval$1("1(2)")._as(f)), t2._eval$1("@<1>")._bind$1($T)._eval$1("MappedListIterable<1,2>")); }, map$1(_, f) { - f.toString; return this.map$1$1(0, f, type$.dynamic); }, contains$1(_, element) { @@ -19506,7 +19422,7 @@ var t1 = this.$this.$ti; this.replacement.$indexSet(0, t1._precomputed1._as(key), t1._rest[1]._as(value)); }, - $signature: 31 + $signature: 23 }; A.BuiltSet.prototype = { get$hashCode(_) { @@ -19555,7 +19471,6 @@ return new A.EfficientLengthMappedIterable(t1, t2._bind$1($T)._eval$1("1(2)")._as(this.$ti._bind$1($T)._eval$1("1(2)")._as(f)), t2._eval$1("@<1>")._bind$1($T)._eval$1("EfficientLengthMappedIterable<1,2>")); }, map$1(_, f) { - f.toString; return this.map$1$1(0, f, type$.dynamic); }, contains$1(_, element) { @@ -19880,14 +19795,13 @@ }; A.newBuiltValueToStringHelper_closure.prototype = { call$1(className) { - var t1 = new A.StringBuffer(""), - t2 = "" + className; - t1._contents = t2; - t1._contents = t2 + " {\n"; + var t1 = new A.StringBuffer(""); + t1._contents = className; + t1._contents = className + " {\n"; $._indentingBuiltValueToStringHelperIndent = $._indentingBuiltValueToStringHelperIndent + 2; return new A.IndentingBuiltValueToStringHelper(t1); }, - $signature: 63 + $signature: 39 }; A.IndentingBuiltValueToStringHelper.prototype = { add$2(_, field, value) { @@ -20020,34 +19934,34 @@ call$0() { return A.ListBuilder_ListBuilder(B.List_empty0, type$.Object); }, - $signature: 66 + $signature: 38 }; A.Serializers_Serializers_closure0.prototype = { call$0() { var t1 = type$.Object; return A.ListMultimapBuilder_ListMultimapBuilder(t1, t1); }, - $signature: 70 + $signature: 36 }; A.Serializers_Serializers_closure1.prototype = { call$0() { var t1 = type$.Object; return A.MapBuilder_MapBuilder(t1, t1); }, - $signature: 89 + $signature: 34 }; A.Serializers_Serializers_closure2.prototype = { call$0() { return A.SetBuilder_SetBuilder(type$.Object); }, - $signature: 105 + $signature: 35 }; A.Serializers_Serializers_closure3.prototype = { call$0() { var t1 = type$.Object; return A.SetMultimapBuilder_SetMultimapBuilder(t1, t1); }, - $signature: 36 + $signature: 89 }; A.FullType.prototype = { $eq(_, other) { @@ -20468,7 +20382,7 @@ call$1(value) { return this.serializers.deserialize$2$specifiedType(value, this.valueType); }, - $signature: 10 + $signature: 11 }; A.BuiltListSerializer.prototype = { serialize$3$specifiedType(serializers, builtList, specifiedType) { @@ -21185,7 +21099,6 @@ }, map$1(_, transform) { var t1 = type$.dynamic; - transform.toString; return this.map$2$1(0, transform, t1, t1); }, toString$0(_) { @@ -23653,13 +23566,13 @@ call$0() { return true; }, - $signature: 26 + $signature: 33 }; A.BatchedStreamController__hasEventDuring_closure.prototype = { call$0() { return false; }, - $signature: 26 + $signature: 33 }; A.SocketClient.prototype = {}; A.SseSocketClient.prototype = { @@ -23708,7 +23621,7 @@ type$.StackTrace._as(stackTrace); return $.$get$_logger().log$4(B.Level_WARNING_900, "Error in unawaited Future:", error, stackTrace); }, - $signature: 25 + $signature: 21 }; A.Int32.prototype = { _toInt$1(val) { @@ -23834,9 +23747,6 @@ A._StackState.prototype = {}; A.BaseClient.prototype = { _sendUnstreamed$3(method, url, headers) { - return this._sendUnstreamed$body$BaseClient(method, url, headers); - }, - _sendUnstreamed$body$BaseClient(method, url, headers) { var $async$goto = 0, $async$completer = A._makeAsyncAwaitCompleter(type$.Response), $async$returnValue, $async$self = this, request, $async$temp1; @@ -23897,9 +23807,6 @@ }; A.BrowserClient.prototype = { send$1(request) { - return this.send$body$BrowserClient(request); - }, - send$body$BrowserClient(request) { var $async$goto = 0, $async$completer = A._makeAsyncAwaitCompleter(type$.StreamedResponse), $async$returnValue, $async$handler = 2, $async$errorStack = [], $async$next = [], $async$self = this, xhr, completer, bytes, t1, t2, header, t3; @@ -24041,7 +23948,7 @@ A.MediaType.prototype = { toString$0(_) { var buffer = new A.StringBuffer(""), - t1 = "" + this.type; + t1 = this.type; buffer._contents = t1; t1 += "/"; buffer._contents = t1; @@ -24112,7 +24019,7 @@ scanner.expectDone$0(); return A.MediaType$(t4, t5, parameters); }, - $signature: 34 + $signature: 48 }; A.MediaType_toString_closure.prototype = { call$2(attribute, value) { @@ -24137,7 +24044,7 @@ call$1(match) { return "\\" + A.S(match.$index(0, 0)); }, - $signature: 28 + $signature: 31 }; A.expectQuotedString_closure.prototype = { call$1(match) { @@ -24145,7 +24052,7 @@ t1.toString; return t1; }, - $signature: 28 + $signature: 31 }; A.Level.prototype = { $eq(_, other) { @@ -24193,7 +24100,7 @@ var record, _this = this, t1 = logLevel.value; if (t1 >= _this.get$level().value) { - if ((stackTrace == null || stackTrace === B._StringStackTrace_OdL) && t1 >= 2000) { + if (stackTrace == null && t1 >= 2000) { A.StackTrace_current(); if (error == null) logLevel.toString$0(0); @@ -24268,10 +24175,10 @@ parsed.root = t4; if (t2.needsSeparator$1(t4)) B.JSArray_methods.$indexSet(parsed.separators, 0, t2.get$separator()); - t4 = "" + parsed.toString$0(0); + t4 = parsed.toString$0(0); } else if (t2.rootLength$1(t5) > 0) { isAbsoluteAndNotRootRelative = !t2.isRootRelative$1(t5); - t4 = "" + t5; + t4 = t5; } else { t6 = t5.length; if (t6 !== 0) { @@ -24437,7 +24344,7 @@ t2 = t1.length; if (t2 === 0) return "."; - if (t2 > 1 && J.$eq$(B.JSArray_methods.get$last(t1), ".")) { + if (t2 > 1 && B.JSArray_methods.get$last(t1) === ".") { B.JSArray_methods.removeLast$0(pathParsed.parts); t1 = pathParsed.separators; if (0 >= t1.length) @@ -24468,20 +24375,20 @@ call$1(part) { return A._asString(part) !== ""; }, - $signature: 20 + $signature: 30 }; A.Context_split_closure.prototype = { call$1(part) { return A._asString(part).length !== 0; }, - $signature: 20 + $signature: 30 }; A._validateArgList_closure.prototype = { call$1(arg) { A._asStringQ(arg); return arg == null ? "null" : '"' + arg + '"'; }, - $signature: 53 + $signature: 106 }; A.InternalStyle.prototype = { getRoot$1(path) { @@ -24506,7 +24413,7 @@ var t1, t2, _this = this; while (true) { t1 = _this.parts; - if (!(t1.length !== 0 && J.$eq$(B.JSArray_methods.get$last(t1), ""))) + if (!(t1.length !== 0 && B.JSArray_methods.get$last(t1) === "")) break; B.JSArray_methods.removeLast$0(_this.parts); t1 = _this.separators; @@ -24554,13 +24461,13 @@ toString$0(_) { var t2, t3, t4, t5, i, t1 = this.root; - t1 = t1 != null ? "" + t1 : ""; + t1 = t1 != null ? t1 : ""; for (t2 = this.parts, t3 = t2.length, t4 = this.separators, t5 = t4.length, i = 0; i < t3; ++i) { if (!(i < t5)) return A.ioore(t4, i); t1 = t1 + t4[i] + t2[i]; } - t1 += A.S(B.JSArray_methods.get$last(t4)); + t1 += B.JSArray_methods.get$last(t4); return t1.charCodeAt(0) == 0 ? t1 : t1; }, set$parts(parts) { @@ -25391,7 +25298,7 @@ var t1 = type$._Highlight._as(highlight).span; return t1.get$start().get$line() !== t1.get$end().get$line(); }, - $signature: 19 + $signature: 15 }; A.Highlighter$__closure0.prototype = { call$1(line) { @@ -25460,14 +25367,14 @@ call$1(highlight) { return type$._Highlight._as(highlight).span.get$end().get$line() < this.line.number; }, - $signature: 19 + $signature: 15 }; A.Highlighter_highlight_closure.prototype = { call$1(highlight) { type$._Highlight._as(highlight); return true; }, - $signature: 19 + $signature: 15 }; A.Highlighter__writeFileStart_closure.prototype = { call$0() { @@ -25568,7 +25475,7 @@ t4 = B.JSString_methods.$mul("^", Math.max(endColumn + (tabsBefore + tabsInside) * 3 - startColumn, 1)); return (t2._contents += t4).length - t3.length; }, - $signature: 30 + $signature: 22 }; A.Highlighter__writeIndicator_closure0.prototype = { call$0() { @@ -25589,7 +25496,7 @@ t1._writeArrow$3$beginning(_this.line, Math.max(_this.highlight.span.get$end().get$column() - 1, 0), false); return t2._contents.length - t3.length; }, - $signature: 30 + $signature: 22 }; A.Highlighter__writeSidebar_closure.prototype = { call$0() { @@ -25608,7 +25515,7 @@ A._Highlight.prototype = { toString$0(_) { var t1 = this.span; - t1 = "" + "primary " + ("" + t1.get$start().get$line() + ":" + t1.get$start().get$column() + "-" + t1.get$end().get$line() + ":" + t1.get$end().get$column()); + t1 = "primary " + ("" + t1.get$start().get$line() + ":" + t1.get$start().get$column() + "-" + t1.get$end().get$line() + ":" + t1.get$end().get$column()); return t1.charCodeAt(0) == 0 ? t1 : t1; } }; @@ -25745,7 +25652,7 @@ toString$0(_) { var t3, t4, highlight, t1 = this._span, - t2 = "" + ("line " + (t1.get$start().get$line() + 1) + ", column " + (t1.get$start().get$column() + 1)); + t2 = "line " + (t1.get$start().get$line() + 1) + ", column " + (t1.get$start().get$column() + 1); if (t1.get$sourceUrl() != null) { t3 = t1.get$sourceUrl(); t4 = $.$get$context(); @@ -26000,25 +25907,25 @@ call$1(bitCount) { return this.random.nextInt$1(B.JSInt_methods._shlPositive$1(1, bitCount)); }, - $signature: 22 + $signature: 27 }; A.generateUuidV4_printDigits.prototype = { call$2(value, count) { return B.JSString_methods.padLeft$2(B.JSInt_methods.toRadixString$1(value, 16), count, "0"); }, - $signature: 32 + $signature: 20 }; A.generateUuidV4_bitsDigits.prototype = { call$2(bitCount, digitCount) { return this.printDigits.call$2(this.generateBits.call$1(bitCount), digitCount); }, - $signature: 32 + $signature: 20 }; A.GuaranteeChannel.prototype = { GuaranteeChannel$3$allowSinkErrors(innerSink, allowSinkErrors, _box_0, $T) { var _this = this, t1 = _this.$ti, - t2 = t1._eval$1("_GuaranteeSink<1>")._as(new A._GuaranteeSink(innerSink, _this, new A._AsyncCompleter(new A._Future($.Zone__current, type$._Future_void), type$._AsyncCompleter_void), allowSinkErrors, $T._eval$1("_GuaranteeSink<0>"))); + t2 = t1._eval$1("_GuaranteeSink<1>")._as(new A._GuaranteeSink(innerSink, _this, new A._AsyncCompleter(new A._Future($.Zone__current, type$._Future_dynamic), type$._AsyncCompleter_dynamic), allowSinkErrors, $T._eval$1("_GuaranteeSink<0>"))); _this.__GuaranteeChannel__sink_F !== $ && A.throwLateFieldAI("_sink"); _this.__GuaranteeChannel__sink_F = t2; t1 = t1._eval$1("StreamController<1>")._as(A.StreamController_StreamController(null, new A.GuaranteeChannel_closure(_box_0, _this, $T), true, $T)); @@ -26191,30 +26098,30 @@ } }; A.RNG.prototype = {}; - A.CryptoRNG.prototype = { + A.MathRNG.prototype = { _generateInternal$0() { - var i, k, t1, t2, + var t1, i, k, t2, t3, b = new Uint8Array(16); - for (i = 0; i < 16; i += 4) { - k = $.$get$CryptoRNG__secureRandom().nextInt$1(B.JSNumber_methods.toInt$0(Math.pow(2, 32))); + for (t1 = this._rnd, i = 0; i < 16; i += 4) { + k = t1.nextInt$1(B.JSNumber_methods.toInt$0(Math.pow(2, 32))); if (!(i < 16)) return A.ioore(b, i); b[i] = k; - t1 = i + 1; - t2 = B.JSInt_methods._shrOtherPositive$1(k, 8); - if (!(t1 < 16)) - return A.ioore(b, t1); - b[t1] = t2; - t2 = i + 2; - t1 = B.JSInt_methods._shrOtherPositive$1(k, 16); + t2 = i + 1; + t3 = B.JSInt_methods._shrOtherPositive$1(k, 8); if (!(t2 < 16)) return A.ioore(b, t2); - b[t2] = t1; - t1 = i + 3; - t2 = B.JSInt_methods._shrOtherPositive$1(k, 24); - if (!(t1 < 16)) - return A.ioore(b, t1); - b[t1] = t2; + b[t2] = t3; + t3 = i + 2; + t2 = B.JSInt_methods._shrOtherPositive$1(k, 16); + if (!(t3 < 16)) + return A.ioore(b, t3); + b[t3] = t2; + t2 = i + 3; + t3 = B.JSInt_methods._shrOtherPositive$1(k, 24); + if (!(t2 < 16)) + return A.ioore(b, t2); + b[t2] = t3; } return b; } @@ -26699,7 +26606,7 @@ }); return A._asyncStartSync($async$call$0, $async$completer); }, - $signature: 16 + $signature: 19 }; A.AdapterWebSocketChannel_closure0.prototype = { call$1(e) { @@ -26717,7 +26624,7 @@ t1 === $ && A.throwLateFieldNI("_sink"); t1.close$0(); }, - $signature: 88 + $signature: 69 }; A._WebSocketSink.prototype = {$isWebSocketSink: 1}; A.WebSocketChannelException.prototype = { @@ -26781,7 +26688,7 @@ $async$goto = 2; break; } - t3 = A.throwExpression(A.StateError$("Unknown module strategy: " + A.dartModuleStrategy())); + t3 = A.throwExpression(A.StateError$("Unknown module strategy: " + A.S(A.getProperty(A.staticInteropGlobalContext(), "$dartModuleStrategy", type$.String)))); case 2: // break $label0$0 manager = new A.ReloadingManager(client, t3); @@ -26807,7 +26714,7 @@ client.get$stream().listen$2$onError(new A.main__closure7(manager, client), new A.main__closure8()); if (A._asBool(t1.$dwdsEnableDevToolsLaunch)) A._EventStreamSubscription$(t2._as(t1.window), "keydown", type$.nullable_void_Function_JSObject._as(new A.main__closure9()), false, t2); - if (B.JSString_methods.contains$1(A._asString(t2._as(t2._as(t1.window).navigator).vendor), "Google")) { + if (A._isChromium()) { t1 = client.get$sink(); t2 = $.$get$serializers(); t3 = new A.ConnectRequestBuilder(); @@ -26822,19 +26729,19 @@ }); return A._asyncStartSync($async$call$0, $async$completer); }, - $signature: 16 + $signature: 19 }; A.main__closure.prototype = { call$0() { return A.FutureOfVoidToJSPromise_get_toJS(this.manager.hotReload$0()); }, - $signature: 11 + $signature: 10 }; A.main__closure0.prototype = { call$0() { return A.FutureOfJSAnyToJSPromise_get_toJS(this.manager._restarter.fetchLibrariesForHotReload$1(A.hotReloadSourcesPath()), type$.JSArray_nullable_Object); }, - $signature: 11 + $signature: 10 }; A.main__closure1.prototype = { call$2(runId, pauseIsolatesOnStart) { @@ -26924,7 +26831,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: 104 + $signature: 76 }; A.main___closure0.prototype = { call$1(b) { @@ -26937,11 +26844,9 @@ }; A.main__closure6.prototype = { call$0() { - var t3, - t1 = init.G, - t2 = type$.JSObject; - if (!B.JSString_methods.contains$1(A._asString(t2._as(t2._as(t1.window).navigator).vendor), "Google")) { - t2._as(t1.window).alert("Dart DevTools is only supported on Chromium based browsers."); + var t1, t2, t3; + if (!A._isChromium()) { + type$.JSObject._as(init.G.window).alert("Dart DevTools is only supported on Chromium based browsers."); return; } t1 = this.client.get$sink(); @@ -27132,7 +27037,7 @@ type$.StackTrace._as(stackTrace); A.print("Unhandled error detected in the injected client.js script.\n\nYou can disable this script in webdev by passing --no-injected-client if it\nis preventing your app from loading, but note that this will also prevent\nall debugging and hot reload/restart functionality from working.\n\nThe original error is below, please file an issue at\nhttps://github.com/dart-lang/webdev/issues/new and attach this output:\n\n" + A.S(error) + "\n" + stackTrace.toString$0(0) + "\n"); }, - $signature: 13 + $signature: 14 }; A._launchCommunicationWithDebugExtension_closure.prototype = { call$1(b) { @@ -27182,10 +27087,37 @@ $signature: 7 }; A.DdcLibraryBundleRestarter.prototype = { + _runMainWhenReady$2(readyToRunMain, runMain) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void); + var $async$_runMainWhenReady$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = readyToRunMain != null ? 2 : 3; + break; + case 2: + // then + $async$goto = 4; + return A._asyncAwait(readyToRunMain, $async$_runMainWhenReady$2); + case 4: + // returning from await. + case 3: + // join + runMain.call(); + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$_runMainWhenReady$2, $async$completer); + }, restart$2$readyToRunMain$runId(readyToRunMain, runId) { var $async$goto = 0, $async$completer = A._makeAsyncAwaitCompleter(type$.bool), - $async$returnValue, t1, t2; + $async$returnValue, $async$self = this, mainHandler, t1, t2; var $async$restart$2$readyToRunMain$runId = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); @@ -27199,6 +27131,8 @@ return A._asyncAwait(A._Debugger_maybeInvokeFlutterDisassemble(t2._as(t2._as(t1.dartDevEmbedder).debugger)), $async$restart$2$readyToRunMain$runId); case 3: // returning from await. + mainHandler = A._functionToJS1(new A.DdcLibraryBundleRestarter_restart_closure($async$self, readyToRunMain)); + t2._as(t2._as(t1.dartDevEmbedder).config).capturedMainHandler = mainHandler; $async$goto = 4; return A._asyncAwait(A.promiseToFuture(t2._as(t2._as(t1.dartDevEmbedder).hotRestart()), type$.nullable_Object), $async$restart$2$readyToRunMain$runId); case 4: @@ -27243,9 +27177,6 @@ return A._asyncStartSync($async$reload$0, $async$completer); }, fetchLibrariesForHotReload$1(hotReloadSourcesPath) { - return this.fetchLibrariesForHotReload$body$DdcLibraryBundleRestarter(hotReloadSourcesPath); - }, - fetchLibrariesForHotReload$body$DdcLibraryBundleRestarter(hotReloadSourcesPath) { var $async$goto = 0, $async$completer = A._makeAsyncAwaitCompleter(type$.JSArray_nullable_Object), $async$returnValue, $async$self = this, t3, srcLibraries, filesToLoad, librariesToReload, t4, srcLibraryCast, libraries, t5, t1, t2, xhr, $async$temp1, $async$temp2, $async$temp3; @@ -27296,6 +27227,16 @@ }, $isRestarter: 1 }; + A.DdcLibraryBundleRestarter_restart_closure.prototype = { + call$1(runMain) { + var t1; + type$.JavaScriptFunction._as(runMain); + t1 = type$.JSObject; + t1._as(t1._as(init.G.dartDevEmbedder).config).capturedMainHandler = null; + A.safeUnawaited(this.$this._runMainWhenReady$2(this.readyToRunMain, runMain)); + }, + $signature: 83 + }; A.DdcLibraryBundleRestarter_fetchLibrariesForHotReload_closure.prototype = { call$0() { var t1 = this.xhr; @@ -27356,7 +27297,7 @@ this.sub.cancel$0(); return value; }, - $signature: 83 + $signature: 84 }; A.ReloadingManager.prototype = { hotRestart$2$readyToRunMain$runId(readyToRunMain, runId) { @@ -27503,7 +27444,7 @@ case 6: // join t2._as(t2._as(t1.$loadModuleConfig("dart_sdk")).dart).hotRestart(); - A.safeUnawaited($async$self._runMainWhenReady$1(readyToRunMain)); + A.safeUnawaited($async$self._require_restarter$_runMainWhenReady$1(readyToRunMain)); $async$returnValue = result; // goto return $async$goto = 1; @@ -27521,10 +27462,10 @@ fetchLibrariesForHotReload$1(hotReloadSourcesPath) { return A.throwExpression(A.UnimplementedError$(string$.Hot_reA)); }, - _runMainWhenReady$1(readyToRunMain) { + _require_restarter$_runMainWhenReady$1(readyToRunMain) { var $async$goto = 0, $async$completer = A._makeAsyncAwaitCompleter(type$.void); - var $async$_runMainWhenReady$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + 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) @@ -27536,7 +27477,7 @@ case 2: // then $async$goto = 4; - return A._asyncAwait(readyToRunMain, $async$_runMainWhenReady$1); + return A._asyncAwait(readyToRunMain, $async$_require_restarter$_runMainWhenReady$1); case 4: // returning from await. case 3: @@ -27546,7 +27487,7 @@ return A._asyncReturn(null, $async$completer); } }); - return A._asyncStartSync($async$_runMainWhenReady$1, $async$completer); + return A._asyncStartSync($async$_require_restarter$_runMainWhenReady$1, $async$completer); }, _getDigests$0() { var $async$goto = 0, @@ -27823,7 +27764,7 @@ call$1(e) { this.completer.completeError$2(new A.HotReloadFailedException(A._asString(type$.JavaScriptObject._as(e).message)), this.stackTrace); }, - $signature: 86 + $signature: 87 }; A._createScript_closure.prototype = { call$0() { @@ -27832,14 +27773,14 @@ return new A._createScript__closure(); return new A._createScript__closure0(nonce); }, - $signature: 87 + $signature: 88 }; A._createScript__closure.prototype = { call$0() { var t1 = type$.JSObject; return t1._as(t1._as(init.G.document).createElement("script")); }, - $signature: 11 + $signature: 10 }; A._createScript__closure0.prototype = { call$0() { @@ -27848,7 +27789,7 @@ scriptElement.setAttribute("nonce", this.nonce); return scriptElement; }, - $signature: 11 + $signature: 10 }; A.runMain_closure.prototype = { call$0() { @@ -27897,51 +27838,46 @@ _instance_1_i = hunkHelpers._instance_1i, _instance_0_u = hunkHelpers._instance_0u, _instance_1_u = hunkHelpers._instance_1u; - _static_2(J, "_interceptors_JSArray__compareAny$closure", "JSArray__compareAny", 29); - _static_1(A, "async__AsyncRun__scheduleImmediateJsOverride$closure", "_AsyncRun__scheduleImmediateJsOverride", 12); - _static_1(A, "async__AsyncRun__scheduleImmediateWithSetImmediate$closure", "_AsyncRun__scheduleImmediateWithSetImmediate", 12); - _static_1(A, "async__AsyncRun__scheduleImmediateWithTimer$closure", "_AsyncRun__scheduleImmediateWithTimer", 12); + _static_2(J, "_interceptors_JSArray__compareAny$closure", "JSArray__compareAny", 28); + _static_1(A, "async__AsyncRun__scheduleImmediateJsOverride$closure", "_AsyncRun__scheduleImmediateJsOverride", 16); + _static_1(A, "async__AsyncRun__scheduleImmediateWithSetImmediate$closure", "_AsyncRun__scheduleImmediateWithSetImmediate", 16); + _static_1(A, "async__AsyncRun__scheduleImmediateWithTimer$closure", "_AsyncRun__scheduleImmediateWithTimer", 16); _static_0(A, "async___startMicrotaskLoop$closure", "_startMicrotaskLoop", 0); _static_1(A, "async___nullDataHandler$closure", "_nullDataHandler", 7); - _static_2(A, "async___nullErrorHandler$closure", "_nullErrorHandler", 13); + _static_2(A, "async___nullErrorHandler$closure", "_nullErrorHandler", 14); _static_0(A, "async___nullDoneHandler$closure", "_nullDoneHandler", 0); - _static(A, "async___rootHandleUncaughtError$closure", 5, null, ["call$5"], ["_rootHandleUncaughtError"], 90, 0); + _static(A, "async___rootHandleUncaughtError$closure", 5, null, ["call$5"], ["_rootHandleUncaughtError"], 91, 0); _static(A, "async___rootRun$closure", 4, null, ["call$1$4", "call$4"], ["_rootRun", function($self, $parent, zone, f) { - f.toString; return A._rootRun($self, $parent, zone, f, type$.dynamic); - }], 91, 0); + }], 92, 0); _static(A, "async___rootRunUnary$closure", 5, null, ["call$2$5", "call$5"], ["_rootRunUnary", function($self, $parent, zone, f, arg) { var t1 = type$.dynamic; - f.toString; return A._rootRunUnary($self, $parent, zone, f, arg, t1, t1); - }], 92, 0); - _static(A, "async___rootRunBinary$closure", 6, null, ["call$3$6"], ["_rootRunBinary"], 93, 0); + }], 93, 0); + _static(A, "async___rootRunBinary$closure", 6, null, ["call$3$6"], ["_rootRunBinary"], 94, 0); _static(A, "async___rootRegisterCallback$closure", 4, null, ["call$1$4", "call$4"], ["_rootRegisterCallback", function($self, $parent, zone, f) { - f.toString; return A._rootRegisterCallback($self, $parent, zone, f, type$.dynamic); - }], 94, 0); + }], 95, 0); _static(A, "async___rootRegisterUnaryCallback$closure", 4, null, ["call$2$4", "call$4"], ["_rootRegisterUnaryCallback", function($self, $parent, zone, f) { var t1 = type$.dynamic; - f.toString; return A._rootRegisterUnaryCallback($self, $parent, zone, f, t1, t1); - }], 95, 0); + }], 96, 0); _static(A, "async___rootRegisterBinaryCallback$closure", 4, null, ["call$3$4", "call$4"], ["_rootRegisterBinaryCallback", function($self, $parent, zone, f) { var t1 = type$.dynamic; - f.toString; return A._rootRegisterBinaryCallback($self, $parent, zone, f, t1, t1, t1); - }], 96, 0); - _static(A, "async___rootErrorCallback$closure", 5, null, ["call$5"], ["_rootErrorCallback"], 97, 0); - _static(A, "async___rootScheduleMicrotask$closure", 4, null, ["call$4"], ["_rootScheduleMicrotask"], 98, 0); - _static(A, "async___rootCreateTimer$closure", 5, null, ["call$5"], ["_rootCreateTimer"], 99, 0); - _static(A, "async___rootCreatePeriodicTimer$closure", 5, null, ["call$5"], ["_rootCreatePeriodicTimer"], 100, 0); - _static(A, "async___rootPrint$closure", 4, null, ["call$4"], ["_rootPrint"], 101, 0); - _static_1(A, "async___printToZone$closure", "_printToZone", 102); - _static(A, "async___rootFork$closure", 5, null, ["call$5"], ["_rootFork"], 103, 0); - _instance(A._Completer.prototype, "get$completeError", 0, 1, null, ["call$2", "call$1"], ["completeError$2", "completeError$1"], 24, 0, 0); - _instance_2_u(A._Future.prototype, "get$_completeError", "_completeError$2", 13); + }], 97, 0); + _static(A, "async___rootErrorCallback$closure", 5, null, ["call$5"], ["_rootErrorCallback"], 98, 0); + _static(A, "async___rootScheduleMicrotask$closure", 4, null, ["call$4"], ["_rootScheduleMicrotask"], 99, 0); + _static(A, "async___rootCreateTimer$closure", 5, null, ["call$5"], ["_rootCreateTimer"], 100, 0); + _static(A, "async___rootCreatePeriodicTimer$closure", 5, null, ["call$5"], ["_rootCreatePeriodicTimer"], 101, 0); + _static(A, "async___rootPrint$closure", 4, null, ["call$4"], ["_rootPrint"], 102, 0); + _static_1(A, "async___printToZone$closure", "_printToZone", 103); + _static(A, "async___rootFork$closure", 5, null, ["call$5"], ["_rootFork"], 104, 0); + _instance(A._Completer.prototype, "get$completeError", 0, 1, null, ["call$2", "call$1"], ["completeError$2", "completeError$1"], 32, 0, 0); + _instance_2_u(A._Future.prototype, "get$_completeError", "_completeError$2", 14); var _; _instance_1_i(_ = A._StreamController.prototype, "get$add", "add$1", 9); - _instance(_, "get$addError", 0, 1, null, ["call$2", "call$1"], ["addError$2", "addError$1"], 24, 0, 0); + _instance(_, "get$addError", 0, 1, null, ["call$2", "call$1"], ["addError$2", "addError$1"], 32, 0, 0); _instance_0_u(_ = A._ControllerSubscription.prototype, "get$_onPause", "_onPause$0", 0); _instance_0_u(_, "get$_onResume", "_onResume$0", 0); _instance_0_u(_ = A._BufferingStreamSubscription.prototype, "get$_onPause", "_onPause$0", 0); @@ -27950,43 +27886,41 @@ _instance_0_u(_ = A._ForwardingStreamSubscription.prototype, "get$_onPause", "_onPause$0", 0); _instance_0_u(_, "get$_onResume", "_onResume$0", 0); _instance_1_u(_, "get$_handleData", "_handleData$1", 9); - _instance_2_u(_, "get$_handleError", "_handleError$2", 25); + _instance_2_u(_, "get$_handleError", "_handleError$2", 21); _instance_0_u(_, "get$_handleDone", "_handleDone$0", 0); - _static_2(A, "collection___defaultEquals$closure", "_defaultEquals0", 17); - _static_1(A, "collection___defaultHashCode$closure", "_defaultHashCode", 18); - _static_2(A, "collection_ListBase__compareAny$closure", "ListBase__compareAny", 29); + _static_2(A, "collection___defaultEquals$closure", "_defaultEquals0", 18); + _static_1(A, "collection___defaultHashCode$closure", "_defaultHashCode", 17); + _static_2(A, "collection_ListBase__compareAny$closure", "ListBase__compareAny", 28); _static_1(A, "convert___defaultToEncodable$closure", "_defaultToEncodable", 4); _instance_1_i(_ = A._ByteCallbackSink.prototype, "get$add", "add$1", 9); _instance_0_u(_, "get$close", "close$0", 0); - _static_1(A, "core__identityHashCode$closure", "identityHashCode", 18); - _static_2(A, "core__identical$closure", "identical", 17); - _static_1(A, "core_Uri_decodeComponent$closure", "Uri_decodeComponent", 15); + _static_1(A, "core__identityHashCode$closure", "identityHashCode", 17); + _static_2(A, "core__identical$closure", "identical", 18); + _static_1(A, "core_Uri_decodeComponent$closure", "Uri_decodeComponent", 13); _static(A, "math__max$closure", 2, null, ["call$1$2", "call$2"], ["max", function(a, b) { - a.toString; - b.toString; return A.max(a, b, type$.num); - }], 76, 0); - _instance_2_u(_ = A.DeepCollectionEquality.prototype, "get$equals", "equals$2", 17); - _instance_1_u(_, "get$hash", "hash$1", 18); - _instance_1_u(_, "get$isValidKey", "isValidKey$1", 14); + }], 105, 0); + _instance_2_u(_ = A.DeepCollectionEquality.prototype, "get$equals", "equals$2", 18); + _instance_1_u(_, "get$hash", "hash$1", 17); + _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); - }], 69, 0); - _static_1(A, "case_insensitive_map_CaseInsensitiveMap__canonicalizer$closure", "CaseInsensitiveMap__canonicalizer", 15); + }], 70, 0); + _static_1(A, "case_insensitive_map_CaseInsensitiveMap__canonicalizer$closure", "CaseInsensitiveMap__canonicalizer", 13); _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", 64); _static_1(A, "client___handleAuthRequest$closure", "_handleAuthRequest", 2); - _instance_1_u(_ = A.RequireRestarter.prototype, "get$_moduleParents", "_moduleParents$1", 84); - _instance_2_u(_, "get$_moduleTopologicalCompare", "_moduleTopologicalCompare$2", 85); + _instance_1_u(_ = A.RequireRestarter.prototype, "get$_moduleParents", "_moduleParents$1", 85); + _instance_2_u(_, "get$_moduleTopologicalCompare", "_moduleTopologicalCompare$2", 86); })(); (function inheritance() { var _mixin = hunkHelpers.mixin, _inherit = hunkHelpers.inherit, _inheritMany = hunkHelpers.inheritMany; _inherit(A.Object, null); - _inheritMany(A.Object, [A.JS_CONST, J.Interceptor, A.SafeToStringHook, J.ArrayIterator, A.Iterable, A.CastIterator, A.Closure, A.MapBase, A.Error, A.ListBase, A.SentinelValue, A.ListIterator, A.MappedIterator, A.WhereIterator, A.ExpandIterator, A.TakeIterator, A.SkipIterator, A.EmptyIterator, A.WhereTypeIterator, A.FixedLengthListMixin, A.UnmodifiableListMixin, A._Record, A.ConstantMap, A._KeysOrValuesOrElementsIterator, A.TypeErrorDecoder, A.NullThrownFromJavaScriptException, A.ExceptionAndStackTrace, A._StackTrace, A.LinkedHashMapCell, A.LinkedHashMapKeyIterator, A.LinkedHashMapValueIterator, A.LinkedHashMapEntryIterator, A.JSSyntaxRegExp, A._MatchImplementation, A._AllMatchesIterator, A.StringMatch, A._StringAllMatchesIterator, A._Cell, A._UnmodifiableNativeByteBufferView, A.Rti, A._FunctionParameters, A._Type, A._TimerImpl, A._AsyncAwaitCompleter, A.AsyncError, A.TimeoutException, A._Completer, A._FutureListener, A._Future, A._AsyncCallbackEntry, A.Stream, A._StreamController, A._SyncStreamControllerDispatch, A._AsyncStreamControllerDispatch, A._BufferingStreamSubscription, A._StreamSinkWrapper, A._DelayedEvent, A._DelayedDone, A._PendingEvents, A._DoneStreamSubscription, A._StreamIterator, A._ZoneFunction, A._ZoneSpecification, A._ZoneDelegate, A._Zone, A._HashMapKeyIterator, A.SetBase, A._HashSetIterator, A._LinkedHashSetCell, A._LinkedHashSetIterator, A._UnmodifiableMapMixin, A.MapView, A._ListQueueIterator, A._SplayTreeNode, A._SplayTree, A._SplayTreeIterator, A.Codec, A.Converter, A._Base64Encoder, A._Base64Decoder, A.ByteConversionSink, A._JsonStringifier, A._Utf8Encoder, A._Utf8Decoder, A._BigIntImpl, A.DateTime, A.Duration, A.OutOfMemoryError, A.StackOverflowError, A._Exception, A.FormatException, A.IntegerDivisionByZeroException, A.MapEntry, A.Null, A._StringStackTrace, A.StringBuffer, A._Uri, A.UriData, A._SimpleUri, A.NullRejectionException, A._JSRandom, A._JSSecureRandom, A.AsyncMemoizer, A.DelegatingStreamSink, A.ErrorResult, A.ValueResult, A.StreamQueue, A._NextRequest, A._HasNextRequest, A.BuiltList, A.ListBuilder, A.BuiltListMultimap, A.ListMultimapBuilder, A.BuiltMap, A.MapBuilder, A.BuiltSet, A.SetBuilder, A.BuiltSetMultimap, A.SetMultimapBuilder, A.EnumClass, A.IndentingBuiltValueToStringHelper, A.JsonObject, A.FullType, A.BigIntSerializer, A.BoolSerializer, A.BuiltJsonSerializers, A.BuiltJsonSerializersBuilder, A.BuiltListMultimapSerializer, A.BuiltListSerializer, A.BuiltMapSerializer, A.BuiltSetMultimapSerializer, A.BuiltSetSerializer, A.DateTimeSerializer, A.DoubleSerializer, A.DurationSerializer, A.Int32Serializer, A.Int64Serializer, A.IntSerializer, A.JsonObjectSerializer, A.NullSerializer, A.NumSerializer, A.RegExpSerializer, A.StringSerializer, A.Uint8ListSerializer, A.UriSerializer, A.CanonicalizedMap, A.DefaultEquality, A.IterableEquality, A.ListEquality, A._UnorderedEquality, A._MapEntry, A.MapEquality, A.DeepCollectionEquality, A._QueueList_Object_ListMixin, A.BuildResult, A._$BuildStatusSerializer, A._$BuildResultSerializer, A.BuildResultBuilder, A.ConnectRequest, A._$ConnectRequestSerializer, A.ConnectRequestBuilder, A.DebugEvent, A.BatchedDebugEvents, A._$DebugEventSerializer, A._$BatchedDebugEventsSerializer, A.DebugEventBuilder, A.BatchedDebugEventsBuilder, A.DebugInfo, A._$DebugInfoSerializer, A.DebugInfoBuilder, A.DevToolsRequest, A.DevToolsResponse, A._$DevToolsRequestSerializer, A._$DevToolsResponseSerializer, A.DevToolsRequestBuilder, A.DevToolsResponseBuilder, A.ErrorResponse, A._$ErrorResponseSerializer, A.ErrorResponseBuilder, A.ExtensionRequest, A.ExtensionResponse, A.ExtensionEvent, A.BatchedEvents, A._$ExtensionRequestSerializer, A._$ExtensionResponseSerializer, A._$ExtensionEventSerializer, A._$BatchedEventsSerializer, A.ExtensionRequestBuilder, A.ExtensionResponseBuilder, A.ExtensionEventBuilder, A.BatchedEventsBuilder, A.HotReloadRequest, A._$HotReloadRequestSerializer, A.HotReloadRequestBuilder, A.HotReloadResponse, A._$HotReloadResponseSerializer, A.HotReloadResponseBuilder, A.IsolateExit, A.IsolateStart, A._$IsolateExitSerializer, A._$IsolateStartSerializer, A.IsolateExitBuilder, A.IsolateStartBuilder, A.RegisterEvent, A._$RegisterEventSerializer, A.RegisterEventBuilder, A.RunRequest, A._$RunRequestSerializer, A.BatchedStreamController, A.SocketClient, A.Int32, A.Int64, A._StackState, A.BaseClient, A.BaseRequest, A.BaseResponse, A.ClientException, A.MediaType, A.Level, A.LogRecord, A.Logger, A.Context, A.Style, A.ParsedPath, A.PathException, A.Pool, A.PoolResource, A.SourceFile, A.SourceLocationMixin, A.SourceSpanMixin, A.Highlighter, A._Highlight, A._Line, A.SourceLocation, A.SourceSpanException, A.StreamChannelMixin, A._GuaranteeSink, A.StreamChannelController, A.StringScanner, A.RNG, A.UuidV1, A.EventStreamProvider, A._EventStreamSubscription, A.BrowserWebSocket, A.WebSocketEvent, A.WebSocketException, A.WebSocketChannelException, A.DdcLibraryBundleRestarter, A.DdcRestarter, A.ReloadingManager, A.HotReloadFailedException, A.RequireRestarter]); + _inheritMany(A.Object, [A.JS_CONST, J.Interceptor, A.SafeToStringHook, J.ArrayIterator, A.Iterable, A.CastIterator, A.Closure, A.MapBase, A.Error, A.ListBase, A.SentinelValue, A.ListIterator, A.MappedIterator, A.WhereIterator, A.ExpandIterator, A.TakeIterator, A.SkipIterator, A.EmptyIterator, A.WhereTypeIterator, A.FixedLengthListMixin, A.UnmodifiableListMixin, A._Record, A.ConstantMap, A._KeysOrValuesOrElementsIterator, A.TypeErrorDecoder, A.NullThrownFromJavaScriptException, A.ExceptionAndStackTrace, A._StackTrace, A.LinkedHashMapCell, A.LinkedHashMapKeyIterator, A.LinkedHashMapValueIterator, A.LinkedHashMapEntryIterator, A.JSSyntaxRegExp, A._MatchImplementation, A._AllMatchesIterator, A.StringMatch, A._StringAllMatchesIterator, A._Cell, A.Rti, A._FunctionParameters, A._Type, A._TimerImpl, A._AsyncAwaitCompleter, A.AsyncError, A.TimeoutException, A._Completer, A._FutureListener, A._Future, A._AsyncCallbackEntry, A.Stream, A._StreamController, A._SyncStreamControllerDispatch, A._AsyncStreamControllerDispatch, A._BufferingStreamSubscription, A._StreamSinkWrapper, A._DelayedEvent, A._DelayedDone, A._PendingEvents, A._DoneStreamSubscription, A._StreamIterator, A._ZoneFunction, A._ZoneSpecification, A._ZoneDelegate, A._Zone, A._HashMapKeyIterator, A.SetBase, A._HashSetIterator, A._LinkedHashSetCell, A._LinkedHashSetIterator, A._UnmodifiableMapMixin, A.MapView, A._ListQueueIterator, A._SplayTreeNode, A._SplayTree, A._SplayTreeIterator, A.Codec, A.Converter, A._Base64Encoder, A._Base64Decoder, A.ByteConversionSink, A._JsonStringifier, A._Utf8Encoder, A._Utf8Decoder, A._BigIntImpl, A.DateTime, A.Duration, A.OutOfMemoryError, A.StackOverflowError, A._Exception, A.FormatException, A.IntegerDivisionByZeroException, A.MapEntry, A.Null, A._StringStackTrace, A.StringBuffer, A._Uri, A.UriData, A._SimpleUri, A.NullRejectionException, A._JSRandom, A.AsyncMemoizer, A.DelegatingStreamSink, A.ErrorResult, A.ValueResult, A.StreamQueue, A._NextRequest, A._HasNextRequest, A.BuiltList, A.ListBuilder, A.BuiltListMultimap, A.ListMultimapBuilder, A.BuiltMap, A.MapBuilder, A.BuiltSet, A.SetBuilder, A.BuiltSetMultimap, A.SetMultimapBuilder, A.EnumClass, A.IndentingBuiltValueToStringHelper, A.JsonObject, A.FullType, A.BigIntSerializer, A.BoolSerializer, A.BuiltJsonSerializers, A.BuiltJsonSerializersBuilder, A.BuiltListMultimapSerializer, A.BuiltListSerializer, A.BuiltMapSerializer, A.BuiltSetMultimapSerializer, A.BuiltSetSerializer, A.DateTimeSerializer, A.DoubleSerializer, A.DurationSerializer, A.Int32Serializer, A.Int64Serializer, A.IntSerializer, A.JsonObjectSerializer, A.NullSerializer, A.NumSerializer, A.RegExpSerializer, A.StringSerializer, A.Uint8ListSerializer, A.UriSerializer, A.CanonicalizedMap, A.DefaultEquality, A.IterableEquality, A.ListEquality, A._UnorderedEquality, A._MapEntry, A.MapEquality, A.DeepCollectionEquality, A._QueueList_Object_ListMixin, A.BuildResult, A._$BuildStatusSerializer, A._$BuildResultSerializer, A.BuildResultBuilder, A.ConnectRequest, A._$ConnectRequestSerializer, A.ConnectRequestBuilder, A.DebugEvent, A.BatchedDebugEvents, A._$DebugEventSerializer, A._$BatchedDebugEventsSerializer, A.DebugEventBuilder, A.BatchedDebugEventsBuilder, A.DebugInfo, A._$DebugInfoSerializer, A.DebugInfoBuilder, A.DevToolsRequest, A.DevToolsResponse, A._$DevToolsRequestSerializer, A._$DevToolsResponseSerializer, A.DevToolsRequestBuilder, A.DevToolsResponseBuilder, A.ErrorResponse, A._$ErrorResponseSerializer, A.ErrorResponseBuilder, A.ExtensionRequest, A.ExtensionResponse, A.ExtensionEvent, A.BatchedEvents, A._$ExtensionRequestSerializer, A._$ExtensionResponseSerializer, A._$ExtensionEventSerializer, A._$BatchedEventsSerializer, A.ExtensionRequestBuilder, A.ExtensionResponseBuilder, A.ExtensionEventBuilder, A.BatchedEventsBuilder, A.HotReloadRequest, A._$HotReloadRequestSerializer, A.HotReloadRequestBuilder, A.HotReloadResponse, A._$HotReloadResponseSerializer, A.HotReloadResponseBuilder, A.IsolateExit, A.IsolateStart, A._$IsolateExitSerializer, A._$IsolateStartSerializer, A.IsolateExitBuilder, A.IsolateStartBuilder, A.RegisterEvent, A._$RegisterEventSerializer, A.RegisterEventBuilder, A.RunRequest, A._$RunRequestSerializer, A.BatchedStreamController, A.SocketClient, A.Int32, A.Int64, A._StackState, A.BaseClient, A.BaseRequest, A.BaseResponse, A.ClientException, A.MediaType, A.Level, A.LogRecord, A.Logger, A.Context, A.Style, A.ParsedPath, A.PathException, A.Pool, A.PoolResource, A.SourceFile, A.SourceLocationMixin, A.SourceSpanMixin, A.Highlighter, A._Highlight, A._Line, A.SourceLocation, A.SourceSpanException, A.StreamChannelMixin, A._GuaranteeSink, A.StreamChannelController, A.StringScanner, A.RNG, A.UuidV1, A.EventStreamProvider, A._EventStreamSubscription, A.BrowserWebSocket, A.WebSocketEvent, A.WebSocketException, A.WebSocketChannelException, A.DdcLibraryBundleRestarter, A.DdcRestarter, A.ReloadingManager, A.HotReloadFailedException, A.RequireRestarter]); _inheritMany(J.Interceptor, [J.JSBool, J.JSNull, J.JavaScriptObject, J.JavaScriptBigInt, J.JavaScriptSymbol, J.JSNumber, J.JSString]); _inheritMany(J.JavaScriptObject, [J.LegacyJavaScriptObject, J.JSArray, A.NativeByteBuffer, A.NativeTypedData]); _inheritMany(J.LegacyJavaScriptObject, [J.PlainJavaScriptObject, J.UnknownJavaScriptObject, J.JavaScriptFunction]); @@ -27997,7 +27931,7 @@ _inheritMany(A._CastIterableBase, [A.CastIterable, A.__CastListBase__CastIterableBase_ListMixin]); _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._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.CanonicalizedMap_keys_closure, A.WebSocketClient_stream_closure, A.BaseRequest_closure0, A.BrowserClient_send_closure, A.BrowserClient_send_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.generateUuidV4_generateBits, 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.main__closure10, A._launchCommunicationWithDebugExtension_closure, A._handleAuthRequest_closure, A._sendResponse_closure, A.DdcRestarter_restart_closure0, A.DdcRestarter_restart_closure, A.RequireRestarter__reloadModule_closure0, A.JSArrayExtension_toDartIterable_closure]); + _inheritMany(A.Closure, [A.Closure2Args, A.Closure0Args, A.Instantiation, A.TearOffClosure, A.initHooks_closure, A.initHooks_closure1, A._AsyncRun__initializeScheduleImmediate_internalCallback, A._AsyncRun__initializeScheduleImmediate_closure, A._awaitOnObject_closure, A._Future__propagateToListeners_handleWhenCompleteCallback_closure, A._Future_timeout_closure0, A.Stream_length_closure, A.Stream_first_closure0, A._CustomZone_bindUnaryCallback_closure, A._CustomZone_bindUnaryCallbackGuarded_closure, A._RootZone_bindUnaryCallback_closure, A._RootZone_bindUnaryCallbackGuarded_closure, A.runZonedGuarded_closure, A._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.CanonicalizedMap_keys_closure, A.WebSocketClient_stream_closure, A.BaseRequest_closure0, A.BrowserClient_send_closure, A.BrowserClient_send_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.generateUuidV4_generateBits, 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.main__closure10, A._launchCommunicationWithDebugExtension_closure, A._handleAuthRequest_closure, A._sendResponse_closure, A.DdcLibraryBundleRestarter_restart_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._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.generateUuidV4_printDigits, A.generateUuidV4_bitsDigits, A.main__closure4, A.main_closure0]); _inherit(A.CastList, A._CastListBase); _inheritMany(A.MapBase, [A.CastMap, A.JsLinkedHashMap, A._HashMap, A._JsonMap]); @@ -28097,7 +28031,7 @@ _inherit(A.SourceSpanWithContext, A.SourceSpanBase); _inheritMany(A.StreamChannelMixin, [A.SseClient, A.GuaranteeChannel, A.AdapterWebSocketChannel]); _inherit(A.StringScannerException, A.SourceSpanFormatException); - _inherit(A.CryptoRNG, A.RNG); + _inherit(A.MathRNG, A.RNG); _inheritMany(A.WebSocketEvent, [A.TextDataReceived, A.BinaryDataReceived, A.CloseReceived]); _inherit(A.WebSocketConnectionClosed, A.WebSocketException); _inherit(A._WebSocketSink, A.DelegatingStreamSink); @@ -28119,7 +28053,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"}, mangledNames: {}, - types: ["~()", "Null()", "~(JSObject)", "Object?(@)", "@(@)", "Null(Object,StackTrace)", "Null(@)", "~(@)", "Null(JSObject)", "~(Object?)", "Object?(Object?)", "JSObject()", "~(~())", "~(Object,StackTrace)", "bool(Object?)", "String(String)", "Future<~>()", "bool(Object?,Object?)", "int(Object?)", "bool(_Highlight)", "bool(String)", "@()", "int(int)", "Null(JavaScriptFunction,JavaScriptFunction)", "~(Object[StackTrace?])", "~(@,StackTrace)", "bool()", "int(int,int)", "String(Match)", "int(@,@)", "int()", "~(@,@)", "String(int,int)", "~(Object?,Object?)", "MediaType()", "@(String)", "SetMultimapBuilder()", "@(@,String)", "Null(~())", "~(int,@)", "ListBuilder()", "ListBuilder()", "~(String,int)", "String(@)", "bool(String,String)", "int(String)", "~(Zone,ZoneDelegate,Zone,Object,StackTrace)", "~(List)", "~(String,int?)", "~(String,String)", "JSObject(Object,StackTrace)", "Logger()", "Object?(~)", "String(String?)", "String?()", "int(_Line)", "Null(@,StackTrace)", "Object(_Line)", "Object(_Highlight)", "int(_Highlight,_Highlight)", "List<_Line>(MapEntry>)", "int(int,@)", "SourceSpanWithContext()", "IndentingBuiltValueToStringHelper(String)", "~(String?)", "Future()", "ListBuilder()", "Null(WebSocket)", "~(WebSocketEvent)", "HotReloadResponse([~(HotReloadResponseBuilder)])", "ListMultimapBuilder()", "JSObject(String[bool?])", "~(List)", "ListBuilder(BatchedDebugEventsBuilder)", "Null(String,String)", "DebugEventBuilder(DebugEventBuilder)", "0^(0^,0^)", "RegisterEventBuilder(RegisterEventBuilder)", "DevToolsRequestBuilder(DevToolsRequestBuilder)", "Future<~>(String)", "ConnectRequestBuilder(ConnectRequestBuilder)", "DebugInfoBuilder(DebugInfoBuilder)", "~(bool)", "bool(bool)", "List(String)", "int(String,String)", "Null(JavaScriptObject)", "JSObject()()", "Null(Object)", "MapBuilder()", "~(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?)", "Null(String)", "SetBuilder()"], + types: ["~()", "Null()", "~(JSObject)", "Object?(@)", "@(@)", "Null(Object,StackTrace)", "Null(@)", "~(@)", "Null(JSObject)", "~(Object?)", "JSObject()", "Object?(Object?)", "bool(Object?)", "String(String)", "~(Object,StackTrace)", "bool(_Highlight)", "~(~())", "int(Object?)", "bool(Object?,Object?)", "Future<~>()", "String(int,int)", "~(@,StackTrace)", "int()", "~(@,@)", "~(Object?,Object?)", "@()", "int(int,int)", "int(int)", "int(@,@)", "Null(JavaScriptFunction,JavaScriptFunction)", "bool(String)", "String(Match)", "~(Object[StackTrace?])", "bool()", "MapBuilder()", "SetBuilder()", "ListMultimapBuilder()", "~(int,@)", "ListBuilder()", "IndentingBuiltValueToStringHelper(String)", "ListBuilder()", "ListBuilder()", "int(int,@)", "String(@)", "bool(String,String)", "int(String)", "Object?(~)", "~(List)", "MediaType()", "~(String,String)", "JSObject(Object,StackTrace)", "Logger()", "Null(@,StackTrace)", "~(String,int?)", "String?()", "int(_Line)", "~(String,int)", "Object(_Line)", "Object(_Highlight)", "int(_Highlight,_Highlight)", "List<_Line>(MapEntry>)", "Null(~())", "SourceSpanWithContext()", "~(Zone,ZoneDelegate,Zone,Object,StackTrace)", "~(String?)", "Future()", "@(@,String)", "Null(WebSocket)", "~(WebSocketEvent)", "Null(Object)", "HotReloadResponse([~(HotReloadResponseBuilder)])", "JSObject(String[bool?])", "~(List)", "ListBuilder(BatchedDebugEventsBuilder)", "Null(String,String)", "DebugEventBuilder(DebugEventBuilder)", "Null(String)", "RegisterEventBuilder(RegisterEventBuilder)", "DevToolsRequestBuilder(DevToolsRequestBuilder)", "Future<~>(String)", "ConnectRequestBuilder(ConnectRequestBuilder)", "DebugInfoBuilder(DebugInfoBuilder)", "~(bool)", "Null(JavaScriptFunction)", "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^)", "String(String?)"], interceptorsByTag: null, leafTags: null, arrayRti: Symbol("$ti"), @@ -28127,7 +28061,7 @@ "2;libraries,sources": (t1, t2) => o => o instanceof A._Record_2_libraries_sources && t1._is(o._0) && t2._is(o._1) } }; - A._Universe_addRules(init.typeUniverse, JSON.parse('{"JavaScriptFunction":"LegacyJavaScriptObject","PlainJavaScriptObject":"LegacyJavaScriptObject","UnknownJavaScriptObject":"LegacyJavaScriptObject","JavaScriptObject":{"JSObject":[]},"JSArray":{"List":["1"],"JavaScriptObject":[],"EfficientLengthIterable":["1"],"JSObject":[],"Iterable":["1"],"JSIndexable":["1"],"Iterable.E":"1"},"JSBool":{"bool":[],"TrustedGetRuntimeType":[]},"JSNull":{"Null":[],"TrustedGetRuntimeType":[]},"LegacyJavaScriptObject":{"JavaScriptObject":[],"JSObject":[]},"JSArraySafeToStringHook":{"SafeToStringHook":[]},"JSUnmodifiableArray":{"JSArray":["1"],"List":["1"],"JavaScriptObject":[],"EfficientLengthIterable":["1"],"JSObject":[],"Iterable":["1"],"JSIndexable":["1"],"Iterable.E":"1"},"ArrayIterator":{"Iterator":["1"]},"JSNumber":{"double":[],"num":[],"Comparable":["num"]},"JSInt":{"double":[],"int":[],"num":[],"Comparable":["num"],"TrustedGetRuntimeType":[]},"JSNumNotInt":{"double":[],"num":[],"Comparable":["num"],"TrustedGetRuntimeType":[]},"JSString":{"String":[],"Comparable":["String"],"Pattern":[],"JSIndexable":["@"],"TrustedGetRuntimeType":[]},"_CastIterableBase":{"Iterable":["2"]},"CastIterator":{"Iterator":["2"]},"CastIterable":{"_CastIterableBase":["1","2"],"Iterable":["2"],"Iterable.E":"2"},"_EfficientLengthCastIterable":{"CastIterable":["1","2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2"},"_CastListBase":{"ListBase":["2"],"List":["2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"]},"CastList":{"_CastListBase":["1","2"],"ListBase":["2"],"List":["2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"ListBase.E":"2","Iterable.E":"2"},"CastMap":{"MapBase":["3","4"],"Map":["3","4"],"MapBase.K":"3","MapBase.V":"4"},"LateError":{"Error":[]},"CodeUnits":{"ListBase":["int"],"UnmodifiableListMixin":["int"],"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"],"ListBase.E":"int","Iterable.E":"int","UnmodifiableListMixin.E":"int"},"EfficientLengthIterable":{"Iterable":["1"]},"ListIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"SubListIterable":{"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"ListIterator":{"Iterator":["1"]},"MappedIterable":{"Iterable":["2"],"Iterable.E":"2"},"EfficientLengthMappedIterable":{"MappedIterable":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2"},"MappedIterator":{"Iterator":["2"]},"MappedListIterable":{"ListIterable":["2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"ListIterable.E":"2","Iterable.E":"2"},"WhereIterable":{"Iterable":["1"],"Iterable.E":"1"},"WhereIterator":{"Iterator":["1"]},"ExpandIterable":{"Iterable":["2"],"Iterable.E":"2"},"ExpandIterator":{"Iterator":["2"]},"TakeIterable":{"Iterable":["1"],"Iterable.E":"1"},"EfficientLengthTakeIterable":{"TakeIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"TakeIterator":{"Iterator":["1"]},"SkipIterable":{"Iterable":["1"],"Iterable.E":"1"},"EfficientLengthSkipIterable":{"SkipIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"SkipIterator":{"Iterator":["1"]},"EmptyIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"EmptyIterator":{"Iterator":["1"]},"WhereTypeIterable":{"Iterable":["1"],"Iterable.E":"1"},"WhereTypeIterator":{"Iterator":["1"]},"UnmodifiableListBase":{"ListBase":["1"],"UnmodifiableListMixin":["1"],"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"ReversedListIterable":{"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"_Record_2_libraries_sources":{"_Record2":[],"_Record":[]},"ConstantMap":{"Map":["1","2"]},"ConstantStringMap":{"ConstantMap":["1","2"],"Map":["1","2"]},"_KeysOrValues":{"Iterable":["1"],"Iterable.E":"1"},"_KeysOrValuesOrElementsIterator":{"Iterator":["1"]},"Instantiation":{"Closure":[],"Function":[]},"Instantiation1":{"Closure":[],"Function":[]},"NullError":{"TypeError":[],"Error":[]},"JsNoSuchMethodError":{"Error":[]},"UnknownJsTypeError":{"Error":[]},"NullThrownFromJavaScriptException":{"Exception":[]},"_StackTrace":{"StackTrace":[]},"Closure":{"Function":[]},"Closure0Args":{"Closure":[],"Function":[]},"Closure2Args":{"Closure":[],"Function":[]},"TearOffClosure":{"Closure":[],"Function":[]},"StaticClosure":{"Closure":[],"Function":[]},"BoundClosure":{"Closure":[],"Function":[]},"RuntimeError":{"Error":[]},"JsLinkedHashMap":{"MapBase":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"LinkedHashMapKeysIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"LinkedHashMapKeyIterator":{"Iterator":["1"]},"LinkedHashMapValuesIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"LinkedHashMapValueIterator":{"Iterator":["1"]},"LinkedHashMapEntriesIterable":{"EfficientLengthIterable":["MapEntry<1,2>"],"Iterable":["MapEntry<1,2>"],"Iterable.E":"MapEntry<1,2>"},"LinkedHashMapEntryIterator":{"Iterator":["MapEntry<1,2>"]},"JsIdentityLinkedHashMap":{"JsLinkedHashMap":["1","2"],"MapBase":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_Record2":{"_Record":[]},"JSSyntaxRegExp":{"RegExp":[],"Pattern":[]},"_MatchImplementation":{"RegExpMatch":[],"Match":[]},"_AllMatchesIterable":{"Iterable":["RegExpMatch"],"Iterable.E":"RegExpMatch"},"_AllMatchesIterator":{"Iterator":["RegExpMatch"]},"StringMatch":{"Match":[]},"_StringAllMatchesIterable":{"Iterable":["Match"],"Iterable.E":"Match"},"_StringAllMatchesIterator":{"Iterator":["Match"]},"NativeByteBuffer":{"JavaScriptObject":[],"JSObject":[],"ByteBuffer":[],"TrustedGetRuntimeType":[]},"NativeTypedData":{"JavaScriptObject":[],"JSObject":[]},"_UnmodifiableNativeByteBufferView":{"ByteBuffer":[]},"NativeByteData":{"JavaScriptObject":[],"ByteData":[],"JSObject":[],"TrustedGetRuntimeType":[]},"NativeTypedArray":{"JavaScriptIndexingBehavior":["1"],"JavaScriptObject":[],"JSObject":[],"JSIndexable":["1"]},"NativeTypedArrayOfDouble":{"ListBase":["double"],"NativeTypedArray":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"JavaScriptObject":[],"EfficientLengthIterable":["double"],"JSObject":[],"JSIndexable":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"]},"NativeTypedArrayOfInt":{"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"]},"NativeFloat32List":{"Float32List":[],"ListBase":["double"],"NativeTypedArray":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"JavaScriptObject":[],"EfficientLengthIterable":["double"],"JSObject":[],"JSIndexable":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"TrustedGetRuntimeType":[],"ListBase.E":"double","Iterable.E":"double","FixedLengthListMixin.E":"double"},"NativeFloat64List":{"Float64List":[],"ListBase":["double"],"NativeTypedArray":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"JavaScriptObject":[],"EfficientLengthIterable":["double"],"JSObject":[],"JSIndexable":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"TrustedGetRuntimeType":[],"ListBase.E":"double","Iterable.E":"double","FixedLengthListMixin.E":"double"},"NativeInt16List":{"NativeTypedArrayOfInt":[],"Int16List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeInt32List":{"NativeTypedArrayOfInt":[],"Int32List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeInt8List":{"NativeTypedArrayOfInt":[],"Int8List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeUint16List":{"NativeTypedArrayOfInt":[],"Uint16List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeUint32List":{"NativeTypedArrayOfInt":[],"Uint32List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeUint8ClampedList":{"NativeTypedArrayOfInt":[],"Uint8ClampedList":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeUint8List":{"NativeTypedArrayOfInt":[],"Uint8List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"_Type":{"Type":[]},"_Error":{"Error":[]},"_TypeError":{"TypeError":[],"Error":[]},"AsyncError":{"Error":[]},"_TimerImpl":{"Timer":[]},"_AsyncAwaitCompleter":{"Completer":["1"]},"_Completer":{"Completer":["1"]},"_AsyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_SyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_Future":{"Future":["1"]},"StreamView":{"Stream":["1"]},"_StreamController":{"StreamController":["1"],"StreamSink":["1"],"_StreamControllerLifecycle":["1"],"_EventSink":["1"],"_EventDispatch":["1"]},"_AsyncStreamController":{"_AsyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"StreamSink":["1"],"_StreamControllerLifecycle":["1"],"_EventSink":["1"],"_EventDispatch":["1"]},"_SyncStreamController":{"_SyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"StreamSink":["1"],"_StreamControllerLifecycle":["1"],"_EventSink":["1"],"_EventDispatch":["1"]},"_ControllerStream":{"_StreamImpl":["1"],"Stream":["1"],"Stream.T":"1"},"_ControllerSubscription":{"_BufferingStreamSubscription":["1"],"StreamSubscription":["1"],"_EventSink":["1"],"_EventDispatch":["1"],"_BufferingStreamSubscription.T":"1"},"_StreamSinkWrapper":{"StreamSink":["1"]},"_BufferingStreamSubscription":{"StreamSubscription":["1"],"_EventSink":["1"],"_EventDispatch":["1"],"_BufferingStreamSubscription.T":"1"},"_StreamImpl":{"Stream":["1"]},"_DelayedData":{"_DelayedEvent":["1"]},"_DelayedError":{"_DelayedEvent":["@"]},"_DelayedDone":{"_DelayedEvent":["@"]},"_DoneStreamSubscription":{"StreamSubscription":["1"]},"_EmptyStream":{"Stream":["1"],"Stream.T":"1"},"_ForwardingStream":{"Stream":["2"]},"_ForwardingStreamSubscription":{"_BufferingStreamSubscription":["2"],"StreamSubscription":["2"],"_EventSink":["2"],"_EventDispatch":["2"],"_BufferingStreamSubscription.T":"2"},"_MapStream":{"_ForwardingStream":["1","2"],"Stream":["2"],"Stream.T":"2"},"_ZoneSpecification":{"ZoneSpecification":[]},"_ZoneDelegate":{"ZoneDelegate":[]},"_Zone":{"Zone":[]},"_CustomZone":{"_Zone":[],"Zone":[]},"_RootZone":{"_Zone":[],"Zone":[]},"_SplayTreeSetNode":{"_SplayTreeNode":["1","_SplayTreeSetNode<1>"],"_SplayTreeNode.K":"1","_SplayTreeNode.1":"_SplayTreeSetNode<1>"},"_HashMap":{"MapBase":["1","2"],"HashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_IdentityHashMap":{"_HashMap":["1","2"],"MapBase":["1","2"],"HashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_CustomHashMap":{"_HashMap":["1","2"],"MapBase":["1","2"],"HashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_HashMapKeyIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"_HashMapKeyIterator":{"Iterator":["1"]},"_LinkedCustomHashMap":{"JsLinkedHashMap":["1","2"],"MapBase":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_HashSet":{"_SetBase":["1"],"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"_HashSetIterator":{"Iterator":["1"]},"_LinkedHashSet":{"_SetBase":["1"],"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"_LinkedHashSetIterator":{"Iterator":["1"]},"UnmodifiableListView":{"ListBase":["1"],"UnmodifiableListMixin":["1"],"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListBase.E":"1","Iterable.E":"1","UnmodifiableListMixin.E":"1"},"ListBase":{"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"MapBase":{"Map":["1","2"]},"MapView":{"Map":["1","2"]},"UnmodifiableMapView":{"_UnmodifiableMapView_MapView__UnmodifiableMapMixin":["1","2"],"MapView":["1","2"],"_UnmodifiableMapMixin":["1","2"],"Map":["1","2"]},"ListQueue":{"Queue":["1"],"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"_ListQueueIterator":{"Iterator":["1"]},"SetBase":{"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"_SetBase":{"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"_SplayTreeIterator":{"Iterator":["3"]},"_SplayTreeKeyIterator":{"_SplayTreeIterator":["1","2","1"],"Iterator":["1"],"_SplayTreeIterator.K":"1","_SplayTreeIterator.T":"1","_SplayTreeIterator.1":"2"},"SplayTreeSet":{"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"_SplayTree":["1","_SplayTreeSetNode<1>"],"Iterable":["1"],"Iterable.E":"1","_SplayTree.1":"_SplayTreeSetNode<1>","_SplayTree.K":"1"},"Encoding":{"Codec":["String","List"]},"_JsonMap":{"MapBase":["String","@"],"Map":["String","@"],"MapBase.K":"String","MapBase.V":"@"},"_JsonMapKeyIterable":{"ListIterable":["String"],"EfficientLengthIterable":["String"],"Iterable":["String"],"ListIterable.E":"String","Iterable.E":"String"},"AsciiCodec":{"Encoding":[],"Codec":["String","List"],"Codec.S":"String"},"_UnicodeSubsetEncoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"AsciiEncoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"_UnicodeSubsetDecoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"AsciiDecoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"Base64Codec":{"Codec":["List","String"],"Codec.S":"List"},"Base64Encoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"Base64Decoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"Converter":{"StreamTransformer":["1","2"]},"JsonUnsupportedObjectError":{"Error":[]},"JsonCyclicError":{"Error":[]},"JsonCodec":{"Codec":["Object?","String"],"Codec.S":"Object?"},"JsonEncoder":{"Converter":["Object?","String"],"StreamTransformer":["Object?","String"]},"JsonDecoder":{"Converter":["String","Object?"],"StreamTransformer":["String","Object?"]},"Latin1Codec":{"Encoding":[],"Codec":["String","List"],"Codec.S":"String"},"Latin1Encoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"Latin1Decoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"Utf8Codec":{"Encoding":[],"Codec":["String","List"],"Codec.S":"String"},"Utf8Encoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"Utf8Decoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"BigInt":{"Comparable":["BigInt"]},"DateTime":{"Comparable":["DateTime"]},"double":{"num":[],"Comparable":["num"]},"Duration":{"Comparable":["Duration"]},"int":{"num":[],"Comparable":["num"]},"List":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"num":{"Comparable":["num"]},"RegExp":{"Pattern":[]},"RegExpMatch":{"Match":[]},"Set":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"String":{"Comparable":["String"],"Pattern":[]},"_BigIntImpl":{"BigInt":[],"Comparable":["BigInt"]},"AssertionError":{"Error":[]},"TypeError":{"Error":[]},"ArgumentError":{"Error":[]},"RangeError":{"Error":[]},"IndexError":{"Error":[]},"UnsupportedError":{"Error":[]},"UnimplementedError":{"Error":[]},"StateError":{"Error":[]},"ConcurrentModificationError":{"Error":[]},"OutOfMemoryError":{"Error":[]},"StackOverflowError":{"Error":[]},"_Exception":{"Exception":[]},"FormatException":{"Exception":[]},"IntegerDivisionByZeroException":{"Exception":[],"Error":[]},"_StringStackTrace":{"StackTrace":[]},"StringBuffer":{"StringSink":[]},"_Uri":{"Uri":[]},"_SimpleUri":{"Uri":[]},"_DataUri":{"Uri":[]},"NullRejectionException":{"Exception":[]},"DelegatingStreamSink":{"StreamSink":["1"]},"ErrorResult":{"Result":["0&"]},"ValueResult":{"Result":["1"]},"_NextRequest":{"_EventRequest":["1"]},"_HasNextRequest":{"_EventRequest":["1"]},"BuiltList":{"Iterable":["1"]},"_BuiltList":{"BuiltList":["1"],"Iterable":["1"],"Iterable.E":"1"},"_BuiltListMultimap":{"BuiltListMultimap":["1","2"]},"_BuiltMap":{"BuiltMap":["1","2"]},"BuiltSet":{"Iterable":["1"]},"_BuiltSet":{"BuiltSet":["1"],"Iterable":["1"],"Iterable.E":"1"},"_BuiltSetMultimap":{"BuiltSetMultimap":["1","2"]},"BuiltValueNullFieldError":{"Error":[]},"BuiltValueNestedFieldError":{"Error":[]},"BoolJsonObject":{"JsonObject":[]},"ListJsonObject":{"JsonObject":[]},"MapJsonObject":{"JsonObject":[]},"NumJsonObject":{"JsonObject":[]},"StringJsonObject":{"JsonObject":[]},"DeserializationError":{"Error":[]},"BigIntSerializer":{"PrimitiveSerializer":["BigInt"],"Serializer":["BigInt"]},"BoolSerializer":{"PrimitiveSerializer":["bool"],"Serializer":["bool"]},"BuiltJsonSerializers":{"Serializers":[]},"BuiltListMultimapSerializer":{"StructuredSerializer":["BuiltListMultimap<@,@>"],"Serializer":["BuiltListMultimap<@,@>"]},"BuiltListSerializer":{"StructuredSerializer":["BuiltList<@>"],"Serializer":["BuiltList<@>"]},"BuiltMapSerializer":{"StructuredSerializer":["BuiltMap<@,@>"],"Serializer":["BuiltMap<@,@>"]},"BuiltSetMultimapSerializer":{"StructuredSerializer":["BuiltSetMultimap<@,@>"],"Serializer":["BuiltSetMultimap<@,@>"]},"BuiltSetSerializer":{"StructuredSerializer":["BuiltSet<@>"],"Serializer":["BuiltSet<@>"]},"DateTimeSerializer":{"PrimitiveSerializer":["DateTime"],"Serializer":["DateTime"]},"DoubleSerializer":{"PrimitiveSerializer":["double"],"Serializer":["double"]},"DurationSerializer":{"PrimitiveSerializer":["Duration"],"Serializer":["Duration"]},"Int32Serializer":{"PrimitiveSerializer":["Int32"],"Serializer":["Int32"]},"Int64Serializer":{"PrimitiveSerializer":["Int64"],"Serializer":["Int64"]},"IntSerializer":{"PrimitiveSerializer":["int"],"Serializer":["int"]},"JsonObjectSerializer":{"PrimitiveSerializer":["JsonObject"],"Serializer":["JsonObject"]},"NullSerializer":{"PrimitiveSerializer":["Null"],"Serializer":["Null"]},"NumSerializer":{"PrimitiveSerializer":["num"],"Serializer":["num"]},"RegExpSerializer":{"PrimitiveSerializer":["RegExp"],"Serializer":["RegExp"]},"StringSerializer":{"PrimitiveSerializer":["String"],"Serializer":["String"]},"Uint8ListSerializer":{"PrimitiveSerializer":["Uint8List"],"Serializer":["Uint8List"]},"UriSerializer":{"PrimitiveSerializer":["Uri"],"Serializer":["Uri"]},"CanonicalizedMap":{"Map":["2","3"]},"DefaultEquality":{"Equality":["1"]},"IterableEquality":{"Equality":["Iterable<1>"]},"ListEquality":{"Equality":["List<1>"]},"_UnorderedEquality":{"Equality":["2"]},"SetEquality":{"_UnorderedEquality":["1","Set<1>"],"Equality":["Set<1>"],"_UnorderedEquality.E":"1","_UnorderedEquality.T":"Set<1>"},"MapEquality":{"Equality":["Map<1,2>"]},"DeepCollectionEquality":{"Equality":["@"]},"QueueList":{"ListBase":["1"],"List":["1"],"Queue":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListBase.E":"1","QueueList.E":"1","Iterable.E":"1"},"_CastQueueList":{"QueueList":["2"],"ListBase":["2"],"List":["2"],"Queue":["2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"ListBase.E":"2","QueueList.E":"2","Iterable.E":"2"},"_$BuildStatusSerializer":{"PrimitiveSerializer":["BuildStatus"],"Serializer":["BuildStatus"]},"_$BuildResultSerializer":{"StructuredSerializer":["BuildResult"],"Serializer":["BuildResult"]},"_$BuildResult":{"BuildResult":[]},"_$ConnectRequestSerializer":{"StructuredSerializer":["ConnectRequest"],"Serializer":["ConnectRequest"]},"_$ConnectRequest":{"ConnectRequest":[]},"_$DebugEventSerializer":{"StructuredSerializer":["DebugEvent"],"Serializer":["DebugEvent"]},"_$BatchedDebugEventsSerializer":{"StructuredSerializer":["BatchedDebugEvents"],"Serializer":["BatchedDebugEvents"]},"_$DebugEvent":{"DebugEvent":[]},"_$BatchedDebugEvents":{"BatchedDebugEvents":[]},"_$DebugInfoSerializer":{"StructuredSerializer":["DebugInfo"],"Serializer":["DebugInfo"]},"_$DebugInfo":{"DebugInfo":[]},"_$DevToolsRequestSerializer":{"StructuredSerializer":["DevToolsRequest"],"Serializer":["DevToolsRequest"]},"_$DevToolsResponseSerializer":{"StructuredSerializer":["DevToolsResponse"],"Serializer":["DevToolsResponse"]},"_$DevToolsRequest":{"DevToolsRequest":[]},"_$DevToolsResponse":{"DevToolsResponse":[]},"_$ErrorResponseSerializer":{"StructuredSerializer":["ErrorResponse"],"Serializer":["ErrorResponse"]},"_$ErrorResponse":{"ErrorResponse":[]},"_$ExtensionRequestSerializer":{"StructuredSerializer":["ExtensionRequest"],"Serializer":["ExtensionRequest"]},"_$ExtensionResponseSerializer":{"StructuredSerializer":["ExtensionResponse"],"Serializer":["ExtensionResponse"]},"_$ExtensionEventSerializer":{"StructuredSerializer":["ExtensionEvent"],"Serializer":["ExtensionEvent"]},"_$BatchedEventsSerializer":{"StructuredSerializer":["BatchedEvents"],"Serializer":["BatchedEvents"]},"_$ExtensionRequest":{"ExtensionRequest":[]},"_$ExtensionResponse":{"ExtensionResponse":[]},"_$ExtensionEvent":{"ExtensionEvent":[]},"_$BatchedEvents":{"BatchedEvents":[]},"_$HotReloadRequestSerializer":{"StructuredSerializer":["HotReloadRequest"],"Serializer":["HotReloadRequest"]},"_$HotReloadRequest":{"HotReloadRequest":[]},"_$HotReloadResponseSerializer":{"StructuredSerializer":["HotReloadResponse"],"Serializer":["HotReloadResponse"]},"_$HotReloadResponse":{"HotReloadResponse":[]},"_$IsolateExitSerializer":{"StructuredSerializer":["IsolateExit"],"Serializer":["IsolateExit"]},"_$IsolateStartSerializer":{"StructuredSerializer":["IsolateStart"],"Serializer":["IsolateStart"]},"_$IsolateExit":{"IsolateExit":[]},"_$IsolateStart":{"IsolateStart":[]},"_$RegisterEventSerializer":{"StructuredSerializer":["RegisterEvent"],"Serializer":["RegisterEvent"]},"_$RegisterEvent":{"RegisterEvent":[]},"_$RunRequestSerializer":{"StructuredSerializer":["RunRequest"],"Serializer":["RunRequest"]},"_$RunRequest":{"RunRequest":[]},"SseSocketClient":{"SocketClient":[]},"WebSocketClient":{"SocketClient":[]},"Int32":{"Comparable":["Object"]},"Int64":{"Comparable":["Object"]},"ByteStream":{"StreamView":["List"],"Stream":["List"],"Stream.T":"List","StreamView.T":"List"},"ClientException":{"Exception":[]},"Request":{"BaseRequest":[]},"StreamedResponseV2":{"StreamedResponse":[]},"CaseInsensitiveMap":{"CanonicalizedMap":["String","String","1"],"Map":["String","1"],"CanonicalizedMap.K":"String","CanonicalizedMap.V":"1","CanonicalizedMap.C":"String"},"Level":{"Comparable":["Level"]},"PathException":{"Exception":[]},"PosixStyle":{"InternalStyle":[]},"UrlStyle":{"InternalStyle":[]},"WindowsStyle":{"InternalStyle":[]},"FileLocation":{"SourceLocation":[],"Comparable":["SourceLocation"]},"_FileSpan":{"SourceSpanWithContext":[],"SourceSpan":[],"Comparable":["SourceSpan"]},"SourceLocation":{"Comparable":["SourceLocation"]},"SourceLocationMixin":{"SourceLocation":[],"Comparable":["SourceLocation"]},"SourceSpan":{"Comparable":["SourceSpan"]},"SourceSpanBase":{"SourceSpan":[],"Comparable":["SourceSpan"]},"SourceSpanException":{"Exception":[]},"SourceSpanFormatException":{"FormatException":[],"Exception":[]},"SourceSpanMixin":{"SourceSpan":[],"Comparable":["SourceSpan"]},"SourceSpanWithContext":{"SourceSpan":[],"Comparable":["SourceSpan"]},"SseClient":{"StreamChannel":["String?"]},"GuaranteeChannel":{"StreamChannel":["1"]},"_GuaranteeSink":{"StreamSink":["1"]},"StreamChannelMixin":{"StreamChannel":["1"]},"StringScannerException":{"FormatException":[],"Exception":[]},"_EventStream":{"Stream":["1"],"Stream.T":"1"},"_EventStreamSubscription":{"StreamSubscription":["1"]},"BrowserWebSocket":{"WebSocket":[]},"TextDataReceived":{"WebSocketEvent":[]},"BinaryDataReceived":{"WebSocketEvent":[]},"CloseReceived":{"WebSocketEvent":[]},"WebSocketException":{"Exception":[]},"WebSocketConnectionClosed":{"Exception":[]},"AdapterWebSocketChannel":{"WebSocketChannel":[],"StreamChannel":["@"]},"_WebSocketSink":{"WebSocketSink":[],"DelegatingStreamSink":["@"],"StreamSink":["@"],"DelegatingStreamSink.T":"@"},"WebSocketChannelException":{"Exception":[]},"DdcLibraryBundleRestarter":{"Restarter":[]},"DdcRestarter":{"Restarter":[]},"RequireRestarter":{"Restarter":[]},"HotReloadFailedException":{"Exception":[]},"Int8List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint8List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint8ClampedList":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Int16List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint16List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Int32List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint32List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Float32List":{"List":["double"],"EfficientLengthIterable":["double"],"Iterable":["double"]},"Float64List":{"List":["double"],"EfficientLengthIterable":["double"],"Iterable":["double"]}}')); + A._Universe_addRules(init.typeUniverse, JSON.parse('{"JavaScriptFunction":"LegacyJavaScriptObject","PlainJavaScriptObject":"LegacyJavaScriptObject","UnknownJavaScriptObject":"LegacyJavaScriptObject","JavaScriptObject":{"JSObject":[]},"JSArray":{"List":["1"],"JavaScriptObject":[],"EfficientLengthIterable":["1"],"JSObject":[],"Iterable":["1"],"JSIndexable":["1"],"Iterable.E":"1"},"JSBool":{"bool":[],"TrustedGetRuntimeType":[]},"JSNull":{"Null":[],"TrustedGetRuntimeType":[]},"LegacyJavaScriptObject":{"JavaScriptObject":[],"JSObject":[]},"JSArraySafeToStringHook":{"SafeToStringHook":[]},"JSUnmodifiableArray":{"JSArray":["1"],"List":["1"],"JavaScriptObject":[],"EfficientLengthIterable":["1"],"JSObject":[],"Iterable":["1"],"JSIndexable":["1"],"Iterable.E":"1"},"ArrayIterator":{"Iterator":["1"]},"JSNumber":{"double":[],"num":[],"Comparable":["num"]},"JSInt":{"double":[],"int":[],"num":[],"Comparable":["num"],"TrustedGetRuntimeType":[]},"JSNumNotInt":{"double":[],"num":[],"Comparable":["num"],"TrustedGetRuntimeType":[]},"JSString":{"String":[],"Comparable":["String"],"Pattern":[],"JSIndexable":["@"],"TrustedGetRuntimeType":[]},"_CastIterableBase":{"Iterable":["2"]},"CastIterator":{"Iterator":["2"]},"CastIterable":{"_CastIterableBase":["1","2"],"Iterable":["2"],"Iterable.E":"2"},"_EfficientLengthCastIterable":{"CastIterable":["1","2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2"},"_CastListBase":{"ListBase":["2"],"List":["2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"]},"CastList":{"_CastListBase":["1","2"],"ListBase":["2"],"List":["2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"ListBase.E":"2","Iterable.E":"2"},"CastMap":{"MapBase":["3","4"],"Map":["3","4"],"MapBase.K":"3","MapBase.V":"4"},"LateError":{"Error":[]},"CodeUnits":{"ListBase":["int"],"UnmodifiableListMixin":["int"],"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"],"ListBase.E":"int","Iterable.E":"int","UnmodifiableListMixin.E":"int"},"EfficientLengthIterable":{"Iterable":["1"]},"ListIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"SubListIterable":{"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"ListIterator":{"Iterator":["1"]},"MappedIterable":{"Iterable":["2"],"Iterable.E":"2"},"EfficientLengthMappedIterable":{"MappedIterable":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2"},"MappedIterator":{"Iterator":["2"]},"MappedListIterable":{"ListIterable":["2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"ListIterable.E":"2","Iterable.E":"2"},"WhereIterable":{"Iterable":["1"],"Iterable.E":"1"},"WhereIterator":{"Iterator":["1"]},"ExpandIterable":{"Iterable":["2"],"Iterable.E":"2"},"ExpandIterator":{"Iterator":["2"]},"TakeIterable":{"Iterable":["1"],"Iterable.E":"1"},"EfficientLengthTakeIterable":{"TakeIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"TakeIterator":{"Iterator":["1"]},"SkipIterable":{"Iterable":["1"],"Iterable.E":"1"},"EfficientLengthSkipIterable":{"SkipIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"SkipIterator":{"Iterator":["1"]},"EmptyIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"EmptyIterator":{"Iterator":["1"]},"WhereTypeIterable":{"Iterable":["1"],"Iterable.E":"1"},"WhereTypeIterator":{"Iterator":["1"]},"UnmodifiableListBase":{"ListBase":["1"],"UnmodifiableListMixin":["1"],"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"ReversedListIterable":{"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"_Record_2_libraries_sources":{"_Record2":[],"_Record":[]},"ConstantMap":{"Map":["1","2"]},"ConstantStringMap":{"ConstantMap":["1","2"],"Map":["1","2"]},"_KeysOrValues":{"Iterable":["1"],"Iterable.E":"1"},"_KeysOrValuesOrElementsIterator":{"Iterator":["1"]},"Instantiation":{"Closure":[],"Function":[]},"Instantiation1":{"Closure":[],"Function":[]},"NullError":{"TypeError":[],"Error":[]},"JsNoSuchMethodError":{"Error":[]},"UnknownJsTypeError":{"Error":[]},"NullThrownFromJavaScriptException":{"Exception":[]},"_StackTrace":{"StackTrace":[]},"Closure":{"Function":[]},"Closure0Args":{"Closure":[],"Function":[]},"Closure2Args":{"Closure":[],"Function":[]},"TearOffClosure":{"Closure":[],"Function":[]},"StaticClosure":{"Closure":[],"Function":[]},"BoundClosure":{"Closure":[],"Function":[]},"RuntimeError":{"Error":[]},"JsLinkedHashMap":{"MapBase":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"LinkedHashMapKeysIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"LinkedHashMapKeyIterator":{"Iterator":["1"]},"LinkedHashMapValuesIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"LinkedHashMapValueIterator":{"Iterator":["1"]},"LinkedHashMapEntriesIterable":{"EfficientLengthIterable":["MapEntry<1,2>"],"Iterable":["MapEntry<1,2>"],"Iterable.E":"MapEntry<1,2>"},"LinkedHashMapEntryIterator":{"Iterator":["MapEntry<1,2>"]},"JsIdentityLinkedHashMap":{"JsLinkedHashMap":["1","2"],"MapBase":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_Record2":{"_Record":[]},"JSSyntaxRegExp":{"RegExp":[],"Pattern":[]},"_MatchImplementation":{"RegExpMatch":[],"Match":[]},"_AllMatchesIterable":{"Iterable":["RegExpMatch"],"Iterable.E":"RegExpMatch"},"_AllMatchesIterator":{"Iterator":["RegExpMatch"]},"StringMatch":{"Match":[]},"_StringAllMatchesIterable":{"Iterable":["Match"],"Iterable.E":"Match"},"_StringAllMatchesIterator":{"Iterator":["Match"]},"NativeByteBuffer":{"JavaScriptObject":[],"JSObject":[],"ByteBuffer":[],"TrustedGetRuntimeType":[]},"NativeTypedData":{"JavaScriptObject":[],"JSObject":[]},"NativeByteData":{"JavaScriptObject":[],"ByteData":[],"JSObject":[],"TrustedGetRuntimeType":[]},"NativeTypedArray":{"JavaScriptIndexingBehavior":["1"],"JavaScriptObject":[],"JSObject":[],"JSIndexable":["1"]},"NativeTypedArrayOfDouble":{"ListBase":["double"],"NativeTypedArray":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"JavaScriptObject":[],"EfficientLengthIterable":["double"],"JSObject":[],"JSIndexable":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"]},"NativeTypedArrayOfInt":{"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"]},"NativeFloat32List":{"Float32List":[],"ListBase":["double"],"NativeTypedArray":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"JavaScriptObject":[],"EfficientLengthIterable":["double"],"JSObject":[],"JSIndexable":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"TrustedGetRuntimeType":[],"ListBase.E":"double","Iterable.E":"double","FixedLengthListMixin.E":"double"},"NativeFloat64List":{"Float64List":[],"ListBase":["double"],"NativeTypedArray":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"JavaScriptObject":[],"EfficientLengthIterable":["double"],"JSObject":[],"JSIndexable":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"TrustedGetRuntimeType":[],"ListBase.E":"double","Iterable.E":"double","FixedLengthListMixin.E":"double"},"NativeInt16List":{"NativeTypedArrayOfInt":[],"Int16List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeInt32List":{"NativeTypedArrayOfInt":[],"Int32List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeInt8List":{"NativeTypedArrayOfInt":[],"Int8List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeUint16List":{"NativeTypedArrayOfInt":[],"Uint16List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeUint32List":{"NativeTypedArrayOfInt":[],"Uint32List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeUint8ClampedList":{"NativeTypedArrayOfInt":[],"Uint8ClampedList":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeUint8List":{"NativeTypedArrayOfInt":[],"Uint8List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"_Type":{"Type":[]},"_Error":{"Error":[]},"_TypeError":{"TypeError":[],"Error":[]},"AsyncError":{"Error":[]},"_TimerImpl":{"Timer":[]},"_AsyncAwaitCompleter":{"Completer":["1"]},"_Completer":{"Completer":["1"]},"_AsyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_SyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_Future":{"Future":["1"]},"StreamView":{"Stream":["1"]},"_StreamController":{"StreamController":["1"],"StreamSink":["1"],"_StreamControllerLifecycle":["1"],"_EventSink":["1"],"_EventDispatch":["1"]},"_AsyncStreamController":{"_AsyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"StreamSink":["1"],"_StreamControllerLifecycle":["1"],"_EventSink":["1"],"_EventDispatch":["1"]},"_SyncStreamController":{"_SyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"StreamSink":["1"],"_StreamControllerLifecycle":["1"],"_EventSink":["1"],"_EventDispatch":["1"]},"_ControllerStream":{"_StreamImpl":["1"],"Stream":["1"],"Stream.T":"1"},"_ControllerSubscription":{"_BufferingStreamSubscription":["1"],"StreamSubscription":["1"],"_EventSink":["1"],"_EventDispatch":["1"],"_BufferingStreamSubscription.T":"1"},"_StreamSinkWrapper":{"StreamSink":["1"]},"_BufferingStreamSubscription":{"StreamSubscription":["1"],"_EventSink":["1"],"_EventDispatch":["1"],"_BufferingStreamSubscription.T":"1"},"_StreamImpl":{"Stream":["1"]},"_DelayedData":{"_DelayedEvent":["1"]},"_DelayedError":{"_DelayedEvent":["@"]},"_DelayedDone":{"_DelayedEvent":["@"]},"_DoneStreamSubscription":{"StreamSubscription":["1"]},"_EmptyStream":{"Stream":["1"],"Stream.T":"1"},"_ForwardingStream":{"Stream":["2"]},"_ForwardingStreamSubscription":{"_BufferingStreamSubscription":["2"],"StreamSubscription":["2"],"_EventSink":["2"],"_EventDispatch":["2"],"_BufferingStreamSubscription.T":"2"},"_MapStream":{"_ForwardingStream":["1","2"],"Stream":["2"],"Stream.T":"2"},"_ZoneSpecification":{"ZoneSpecification":[]},"_ZoneDelegate":{"ZoneDelegate":[]},"_Zone":{"Zone":[]},"_CustomZone":{"_Zone":[],"Zone":[]},"_RootZone":{"_Zone":[],"Zone":[]},"_SplayTreeSetNode":{"_SplayTreeNode":["1","_SplayTreeSetNode<1>"],"_SplayTreeNode.K":"1","_SplayTreeNode.1":"_SplayTreeSetNode<1>"},"_HashMap":{"MapBase":["1","2"],"HashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_IdentityHashMap":{"_HashMap":["1","2"],"MapBase":["1","2"],"HashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_CustomHashMap":{"_HashMap":["1","2"],"MapBase":["1","2"],"HashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_HashMapKeyIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"_HashMapKeyIterator":{"Iterator":["1"]},"_LinkedCustomHashMap":{"JsLinkedHashMap":["1","2"],"MapBase":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_HashSet":{"_SetBase":["1"],"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"_HashSetIterator":{"Iterator":["1"]},"_LinkedHashSet":{"_SetBase":["1"],"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"_LinkedHashSetIterator":{"Iterator":["1"]},"UnmodifiableListView":{"ListBase":["1"],"UnmodifiableListMixin":["1"],"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListBase.E":"1","Iterable.E":"1","UnmodifiableListMixin.E":"1"},"ListBase":{"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"MapBase":{"Map":["1","2"]},"MapView":{"Map":["1","2"]},"UnmodifiableMapView":{"_UnmodifiableMapView_MapView__UnmodifiableMapMixin":["1","2"],"MapView":["1","2"],"_UnmodifiableMapMixin":["1","2"],"Map":["1","2"]},"ListQueue":{"Queue":["1"],"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"_ListQueueIterator":{"Iterator":["1"]},"SetBase":{"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"_SetBase":{"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"_SplayTreeIterator":{"Iterator":["3"]},"_SplayTreeKeyIterator":{"_SplayTreeIterator":["1","2","1"],"Iterator":["1"],"_SplayTreeIterator.K":"1","_SplayTreeIterator.T":"1","_SplayTreeIterator.1":"2"},"SplayTreeSet":{"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"_SplayTree":["1","_SplayTreeSetNode<1>"],"Iterable":["1"],"Iterable.E":"1","_SplayTree.1":"_SplayTreeSetNode<1>","_SplayTree.K":"1"},"Encoding":{"Codec":["String","List"]},"_JsonMap":{"MapBase":["String","@"],"Map":["String","@"],"MapBase.K":"String","MapBase.V":"@"},"_JsonMapKeyIterable":{"ListIterable":["String"],"EfficientLengthIterable":["String"],"Iterable":["String"],"ListIterable.E":"String","Iterable.E":"String"},"AsciiCodec":{"Encoding":[],"Codec":["String","List"],"Codec.S":"String"},"_UnicodeSubsetEncoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"AsciiEncoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"_UnicodeSubsetDecoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"AsciiDecoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"Base64Codec":{"Codec":["List","String"],"Codec.S":"List"},"Base64Encoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"Base64Decoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"Converter":{"StreamTransformer":["1","2"]},"JsonUnsupportedObjectError":{"Error":[]},"JsonCyclicError":{"Error":[]},"JsonCodec":{"Codec":["Object?","String"],"Codec.S":"Object?"},"JsonEncoder":{"Converter":["Object?","String"],"StreamTransformer":["Object?","String"]},"JsonDecoder":{"Converter":["String","Object?"],"StreamTransformer":["String","Object?"]},"Latin1Codec":{"Encoding":[],"Codec":["String","List"],"Codec.S":"String"},"Latin1Encoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"Latin1Decoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"Utf8Codec":{"Encoding":[],"Codec":["String","List"],"Codec.S":"String"},"Utf8Encoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"Utf8Decoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"BigInt":{"Comparable":["BigInt"]},"DateTime":{"Comparable":["DateTime"]},"double":{"num":[],"Comparable":["num"]},"Duration":{"Comparable":["Duration"]},"int":{"num":[],"Comparable":["num"]},"List":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"num":{"Comparable":["num"]},"RegExp":{"Pattern":[]},"RegExpMatch":{"Match":[]},"Set":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"String":{"Comparable":["String"],"Pattern":[]},"_BigIntImpl":{"BigInt":[],"Comparable":["BigInt"]},"AssertionError":{"Error":[]},"TypeError":{"Error":[]},"ArgumentError":{"Error":[]},"RangeError":{"Error":[]},"IndexError":{"Error":[]},"UnsupportedError":{"Error":[]},"UnimplementedError":{"Error":[]},"StateError":{"Error":[]},"ConcurrentModificationError":{"Error":[]},"OutOfMemoryError":{"Error":[]},"StackOverflowError":{"Error":[]},"_Exception":{"Exception":[]},"FormatException":{"Exception":[]},"IntegerDivisionByZeroException":{"Exception":[],"Error":[]},"_StringStackTrace":{"StackTrace":[]},"StringBuffer":{"StringSink":[]},"_Uri":{"Uri":[]},"_SimpleUri":{"Uri":[]},"_DataUri":{"Uri":[]},"NullRejectionException":{"Exception":[]},"_JSRandom":{"Random":[]},"DelegatingStreamSink":{"StreamSink":["1"]},"ErrorResult":{"Result":["0&"]},"ValueResult":{"Result":["1"]},"_NextRequest":{"_EventRequest":["1"]},"_HasNextRequest":{"_EventRequest":["1"]},"BuiltList":{"Iterable":["1"]},"_BuiltList":{"BuiltList":["1"],"Iterable":["1"],"Iterable.E":"1"},"_BuiltListMultimap":{"BuiltListMultimap":["1","2"]},"_BuiltMap":{"BuiltMap":["1","2"]},"BuiltSet":{"Iterable":["1"]},"_BuiltSet":{"BuiltSet":["1"],"Iterable":["1"],"Iterable.E":"1"},"_BuiltSetMultimap":{"BuiltSetMultimap":["1","2"]},"BuiltValueNullFieldError":{"Error":[]},"BuiltValueNestedFieldError":{"Error":[]},"BoolJsonObject":{"JsonObject":[]},"ListJsonObject":{"JsonObject":[]},"MapJsonObject":{"JsonObject":[]},"NumJsonObject":{"JsonObject":[]},"StringJsonObject":{"JsonObject":[]},"DeserializationError":{"Error":[]},"BigIntSerializer":{"PrimitiveSerializer":["BigInt"],"Serializer":["BigInt"]},"BoolSerializer":{"PrimitiveSerializer":["bool"],"Serializer":["bool"]},"BuiltJsonSerializers":{"Serializers":[]},"BuiltListMultimapSerializer":{"StructuredSerializer":["BuiltListMultimap<@,@>"],"Serializer":["BuiltListMultimap<@,@>"]},"BuiltListSerializer":{"StructuredSerializer":["BuiltList<@>"],"Serializer":["BuiltList<@>"]},"BuiltMapSerializer":{"StructuredSerializer":["BuiltMap<@,@>"],"Serializer":["BuiltMap<@,@>"]},"BuiltSetMultimapSerializer":{"StructuredSerializer":["BuiltSetMultimap<@,@>"],"Serializer":["BuiltSetMultimap<@,@>"]},"BuiltSetSerializer":{"StructuredSerializer":["BuiltSet<@>"],"Serializer":["BuiltSet<@>"]},"DateTimeSerializer":{"PrimitiveSerializer":["DateTime"],"Serializer":["DateTime"]},"DoubleSerializer":{"PrimitiveSerializer":["double"],"Serializer":["double"]},"DurationSerializer":{"PrimitiveSerializer":["Duration"],"Serializer":["Duration"]},"Int32Serializer":{"PrimitiveSerializer":["Int32"],"Serializer":["Int32"]},"Int64Serializer":{"PrimitiveSerializer":["Int64"],"Serializer":["Int64"]},"IntSerializer":{"PrimitiveSerializer":["int"],"Serializer":["int"]},"JsonObjectSerializer":{"PrimitiveSerializer":["JsonObject"],"Serializer":["JsonObject"]},"NullSerializer":{"PrimitiveSerializer":["Null"],"Serializer":["Null"]},"NumSerializer":{"PrimitiveSerializer":["num"],"Serializer":["num"]},"RegExpSerializer":{"PrimitiveSerializer":["RegExp"],"Serializer":["RegExp"]},"StringSerializer":{"PrimitiveSerializer":["String"],"Serializer":["String"]},"Uint8ListSerializer":{"PrimitiveSerializer":["Uint8List"],"Serializer":["Uint8List"]},"UriSerializer":{"PrimitiveSerializer":["Uri"],"Serializer":["Uri"]},"CanonicalizedMap":{"Map":["2","3"]},"DefaultEquality":{"Equality":["1"]},"IterableEquality":{"Equality":["Iterable<1>"]},"ListEquality":{"Equality":["List<1>"]},"_UnorderedEquality":{"Equality":["2"]},"SetEquality":{"_UnorderedEquality":["1","Set<1>"],"Equality":["Set<1>"],"_UnorderedEquality.E":"1","_UnorderedEquality.T":"Set<1>"},"MapEquality":{"Equality":["Map<1,2>"]},"DeepCollectionEquality":{"Equality":["@"]},"QueueList":{"ListBase":["1"],"List":["1"],"Queue":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListBase.E":"1","QueueList.E":"1","Iterable.E":"1"},"_CastQueueList":{"QueueList":["2"],"ListBase":["2"],"List":["2"],"Queue":["2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"ListBase.E":"2","QueueList.E":"2","Iterable.E":"2"},"_$BuildStatusSerializer":{"PrimitiveSerializer":["BuildStatus"],"Serializer":["BuildStatus"]},"_$BuildResultSerializer":{"StructuredSerializer":["BuildResult"],"Serializer":["BuildResult"]},"_$BuildResult":{"BuildResult":[]},"_$ConnectRequestSerializer":{"StructuredSerializer":["ConnectRequest"],"Serializer":["ConnectRequest"]},"_$ConnectRequest":{"ConnectRequest":[]},"_$DebugEventSerializer":{"StructuredSerializer":["DebugEvent"],"Serializer":["DebugEvent"]},"_$BatchedDebugEventsSerializer":{"StructuredSerializer":["BatchedDebugEvents"],"Serializer":["BatchedDebugEvents"]},"_$DebugEvent":{"DebugEvent":[]},"_$BatchedDebugEvents":{"BatchedDebugEvents":[]},"_$DebugInfoSerializer":{"StructuredSerializer":["DebugInfo"],"Serializer":["DebugInfo"]},"_$DebugInfo":{"DebugInfo":[]},"_$DevToolsRequestSerializer":{"StructuredSerializer":["DevToolsRequest"],"Serializer":["DevToolsRequest"]},"_$DevToolsResponseSerializer":{"StructuredSerializer":["DevToolsResponse"],"Serializer":["DevToolsResponse"]},"_$DevToolsRequest":{"DevToolsRequest":[]},"_$DevToolsResponse":{"DevToolsResponse":[]},"_$ErrorResponseSerializer":{"StructuredSerializer":["ErrorResponse"],"Serializer":["ErrorResponse"]},"_$ErrorResponse":{"ErrorResponse":[]},"_$ExtensionRequestSerializer":{"StructuredSerializer":["ExtensionRequest"],"Serializer":["ExtensionRequest"]},"_$ExtensionResponseSerializer":{"StructuredSerializer":["ExtensionResponse"],"Serializer":["ExtensionResponse"]},"_$ExtensionEventSerializer":{"StructuredSerializer":["ExtensionEvent"],"Serializer":["ExtensionEvent"]},"_$BatchedEventsSerializer":{"StructuredSerializer":["BatchedEvents"],"Serializer":["BatchedEvents"]},"_$ExtensionRequest":{"ExtensionRequest":[]},"_$ExtensionResponse":{"ExtensionResponse":[]},"_$ExtensionEvent":{"ExtensionEvent":[]},"_$BatchedEvents":{"BatchedEvents":[]},"_$HotReloadRequestSerializer":{"StructuredSerializer":["HotReloadRequest"],"Serializer":["HotReloadRequest"]},"_$HotReloadRequest":{"HotReloadRequest":[]},"_$HotReloadResponseSerializer":{"StructuredSerializer":["HotReloadResponse"],"Serializer":["HotReloadResponse"]},"_$HotReloadResponse":{"HotReloadResponse":[]},"_$IsolateExitSerializer":{"StructuredSerializer":["IsolateExit"],"Serializer":["IsolateExit"]},"_$IsolateStartSerializer":{"StructuredSerializer":["IsolateStart"],"Serializer":["IsolateStart"]},"_$IsolateExit":{"IsolateExit":[]},"_$IsolateStart":{"IsolateStart":[]},"_$RegisterEventSerializer":{"StructuredSerializer":["RegisterEvent"],"Serializer":["RegisterEvent"]},"_$RegisterEvent":{"RegisterEvent":[]},"_$RunRequestSerializer":{"StructuredSerializer":["RunRequest"],"Serializer":["RunRequest"]},"_$RunRequest":{"RunRequest":[]},"SseSocketClient":{"SocketClient":[]},"WebSocketClient":{"SocketClient":[]},"Int32":{"Comparable":["Object"]},"Int64":{"Comparable":["Object"]},"ByteStream":{"StreamView":["List"],"Stream":["List"],"Stream.T":"List","StreamView.T":"List"},"ClientException":{"Exception":[]},"Request":{"BaseRequest":[]},"StreamedResponseV2":{"StreamedResponse":[]},"CaseInsensitiveMap":{"CanonicalizedMap":["String","String","1"],"Map":["String","1"],"CanonicalizedMap.K":"String","CanonicalizedMap.V":"1","CanonicalizedMap.C":"String"},"Level":{"Comparable":["Level"]},"PathException":{"Exception":[]},"PosixStyle":{"InternalStyle":[]},"UrlStyle":{"InternalStyle":[]},"WindowsStyle":{"InternalStyle":[]},"FileLocation":{"SourceLocation":[],"Comparable":["SourceLocation"]},"_FileSpan":{"SourceSpanWithContext":[],"SourceSpan":[],"Comparable":["SourceSpan"]},"SourceLocation":{"Comparable":["SourceLocation"]},"SourceLocationMixin":{"SourceLocation":[],"Comparable":["SourceLocation"]},"SourceSpan":{"Comparable":["SourceSpan"]},"SourceSpanBase":{"SourceSpan":[],"Comparable":["SourceSpan"]},"SourceSpanException":{"Exception":[]},"SourceSpanFormatException":{"FormatException":[],"Exception":[]},"SourceSpanMixin":{"SourceSpan":[],"Comparable":["SourceSpan"]},"SourceSpanWithContext":{"SourceSpan":[],"Comparable":["SourceSpan"]},"SseClient":{"StreamChannel":["String?"]},"GuaranteeChannel":{"StreamChannel":["1"]},"_GuaranteeSink":{"StreamSink":["1"]},"StreamChannelMixin":{"StreamChannel":["1"]},"StringScannerException":{"FormatException":[],"Exception":[]},"_EventStream":{"Stream":["1"],"Stream.T":"1"},"_EventStreamSubscription":{"StreamSubscription":["1"]},"BrowserWebSocket":{"WebSocket":[]},"TextDataReceived":{"WebSocketEvent":[]},"BinaryDataReceived":{"WebSocketEvent":[]},"CloseReceived":{"WebSocketEvent":[]},"WebSocketException":{"Exception":[]},"WebSocketConnectionClosed":{"Exception":[]},"AdapterWebSocketChannel":{"WebSocketChannel":[],"StreamChannel":["@"]},"_WebSocketSink":{"WebSocketSink":[],"DelegatingStreamSink":["@"],"StreamSink":["@"],"DelegatingStreamSink.T":"@"},"WebSocketChannelException":{"Exception":[]},"DdcLibraryBundleRestarter":{"Restarter":[]},"DdcRestarter":{"Restarter":[]},"RequireRestarter":{"Restarter":[]},"HotReloadFailedException":{"Exception":[]},"Int8List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint8List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint8ClampedList":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Int16List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint16List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Int32List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint32List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Float32List":{"List":["double"],"EfficientLengthIterable":["double"],"Iterable":["double"]},"Float64List":{"List":["double"],"EfficientLengthIterable":["double"],"Iterable":["double"]}}')); A._Universe_addErasedTypes(init.typeUniverse, JSON.parse('{"UnmodifiableListBase":1,"__CastListBase__CastIterableBase_ListMixin":2,"NativeTypedArray":1,"_DelayedEvent":1,"_SplayTreeSet__SplayTree_Iterable":1,"_SplayTreeSet__SplayTree_Iterable_SetMixin":1,"_QueueList_Object_ListMixin":1,"StreamChannelMixin":1}')); var string$ = { x00_____: "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\u03f6\x00\u0404\u03f4 \u03f4\u03f6\u01f6\u01f6\u03f6\u03fc\u01f4\u03ff\u03ff\u0584\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u05d4\u01f4\x00\u01f4\x00\u0504\u05c4\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u0400\x00\u0400\u0200\u03f7\u0200\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u0200\u0200\u0200\u03f7\x00", @@ -28140,7 +28074,6 @@ Error_: "Error handler must accept one Object or one Object and a StackTrace as arguments, and return a value of the returned future's type", Hot_reA: "Hot reload is not supported for the AMD module format.", Hot_reD: "Hot reload is not supported for the DDC module format.", - max_mu: "max must be in range 0 < max \u2264 2^32, was ", serial: "serializer must be StructuredSerializer or PrimitiveSerializer" }; var type$ = (function rtii() { @@ -28384,7 +28317,6 @@ B.JSString_methods = J.JSString.prototype; B.JavaScriptFunction_methods = J.JavaScriptFunction.prototype; B.JavaScriptObject_methods = J.JavaScriptObject.prototype; - B.NativeByteData_methods = A.NativeByteData.prototype; B.NativeUint32List_methods = A.NativeUint32List.prototype; B.NativeUint8List_methods = A.NativeUint8List.prototype; B.PlainJavaScriptObject_methods = J.PlainJavaScriptObject.prototype; @@ -28543,9 +28475,9 @@ B.Duration_5000000 = new A.Duration(5000000); B.Type_BuiltList_fj6 = A.typeLiteral("BuiltList<@>"); B.Type_DebugEvent_gLJ = A.typeLiteral("DebugEvent"); - B.List_empty1 = A._setArrayType(makeConstList([]), type$.JSArray_FullType); + B.List_empty1 = makeConstList([], type$.JSArray_FullType); B.FullType_np4 = new A.FullType(B.Type_DebugEvent_gLJ, B.List_empty1, false); - B.List_njn = A._setArrayType(makeConstList([B.FullType_np4]), type$.JSArray_FullType); + B.List_njn = makeConstList([B.FullType_np4], type$.JSArray_FullType); B.FullType_3Xm = new A.FullType(B.Type_BuiltList_fj6, B.List_njn, false); B.Type_String_AXU = A.typeLiteral("String"); B.FullType_PT1 = new A.FullType(B.Type_String_AXU, B.List_empty1, false); @@ -28554,15 +28486,15 @@ B.Type_BuiltSetMultimap_yT7 = A.typeLiteral("BuiltSetMultimap<@,@>"); B.Type_Object_A4p = A.typeLiteral("Object"); B.FullType_kV7 = new A.FullType(B.Type_Object_A4p, B.List_empty1, false); - B.List_03P = A._setArrayType(makeConstList([B.FullType_kV7, B.FullType_kV7]), type$.JSArray_FullType); + B.List_03P = makeConstList([B.FullType_kV7, B.FullType_kV7], type$.JSArray_FullType); B.FullType_SWR = new A.FullType(B.Type_BuiltSetMultimap_yT7, B.List_03P, false); B.Type_BuiltListMultimap_HQW = A.typeLiteral("BuiltListMultimap<@,@>"); B.FullType_WP0 = new A.FullType(B.Type_BuiltListMultimap_HQW, B.List_03P, false); B.Type_ExtensionEvent_T8C = A.typeLiteral("ExtensionEvent"); B.FullType_I4i = new A.FullType(B.Type_ExtensionEvent_T8C, B.List_empty1, false); - B.List_O9J = A._setArrayType(makeConstList([B.FullType_I4i]), type$.JSArray_FullType); + B.List_O9J = makeConstList([B.FullType_I4i], type$.JSArray_FullType); B.FullType_ahP = new A.FullType(B.Type_BuiltList_fj6, B.List_O9J, false); - B.List_LtY = A._setArrayType(makeConstList([B.FullType_kV7]), type$.JSArray_FullType); + B.List_LtY = makeConstList([B.FullType_kV7], type$.JSArray_FullType); B.FullType_hm4 = new A.FullType(B.Type_BuiltList_fj6, B.List_LtY, false); B.Type_BuildStatus_8KJ = A.typeLiteral("BuildStatus"); B.FullType_k5M = new A.FullType(B.Type_BuildStatus_8KJ, B.List_empty1, false); @@ -28582,61 +28514,61 @@ B.Level_WARNING_900 = new A.Level("WARNING", 900); B.Type_ExtensionRequest_9GR = A.typeLiteral("ExtensionRequest"); B.Type__$ExtensionRequest_o1C = A.typeLiteral("_$ExtensionRequest"); - B.List_2dD = A._setArrayType(makeConstList([B.Type_ExtensionRequest_9GR, B.Type__$ExtensionRequest_o1C]), type$.JSArray_Type); + B.List_2dD = makeConstList([B.Type_ExtensionRequest_9GR, B.Type__$ExtensionRequest_o1C], type$.JSArray_Type); B.Type_DebugInfo_ua9 = A.typeLiteral("DebugInfo"); B.Type__$DebugInfo_ywz = A.typeLiteral("_$DebugInfo"); - B.List_55I = A._setArrayType(makeConstList([B.Type_DebugInfo_ua9, B.Type__$DebugInfo_ywz]), type$.JSArray_Type); + B.List_55I = makeConstList([B.Type_DebugInfo_ua9, B.Type__$DebugInfo_ywz], type$.JSArray_Type); B.Type_ErrorResponse_WMn = A.typeLiteral("ErrorResponse"); B.Type__$ErrorResponse_9Ps = A.typeLiteral("_$ErrorResponse"); - B.List_5LV = A._setArrayType(makeConstList([B.Type_ErrorResponse_WMn, B.Type__$ErrorResponse_9Ps]), type$.JSArray_Type); + B.List_5LV = makeConstList([B.Type_ErrorResponse_WMn, B.Type__$ErrorResponse_9Ps], type$.JSArray_Type); B.Type_HotReloadResponse_Gqc = A.typeLiteral("HotReloadResponse"); B.Type__$HotReloadResponse_56g = A.typeLiteral("_$HotReloadResponse"); - B.List_DqJ = A._setArrayType(makeConstList([B.Type_HotReloadResponse_Gqc, B.Type__$HotReloadResponse_56g]), type$.JSArray_Type); + B.List_DqJ = makeConstList([B.Type_HotReloadResponse_Gqc, B.Type__$HotReloadResponse_56g], type$.JSArray_Type); B.Type_RegisterEvent_0Yw = A.typeLiteral("RegisterEvent"); B.Type__$RegisterEvent_Ks1 = A.typeLiteral("_$RegisterEvent"); - B.List_EMv = A._setArrayType(makeConstList([B.Type_RegisterEvent_0Yw, B.Type__$RegisterEvent_Ks1]), type$.JSArray_Type); + B.List_EMv = makeConstList([B.Type_RegisterEvent_0Yw, B.Type__$RegisterEvent_Ks1], type$.JSArray_Type); B.Type_DevToolsRequest_DxE = A.typeLiteral("DevToolsRequest"); B.Type__$DevToolsRequest_Rak = A.typeLiteral("_$DevToolsRequest"); - B.List_G46 = A._setArrayType(makeConstList([B.Type_DevToolsRequest_DxE, B.Type__$DevToolsRequest_Rak]), type$.JSArray_Type); + B.List_G46 = makeConstList([B.Type_DevToolsRequest_DxE, B.Type__$DevToolsRequest_Rak], type$.JSArray_Type); B.Type_IsolateStart_nRT = A.typeLiteral("IsolateStart"); B.Type__$IsolateStart_Pnq = A.typeLiteral("_$IsolateStart"); - B.List_KpG = A._setArrayType(makeConstList([B.Type_IsolateStart_nRT, B.Type__$IsolateStart_Pnq]), type$.JSArray_Type); + B.List_KpG = makeConstList([B.Type_IsolateStart_nRT, B.Type__$IsolateStart_Pnq], type$.JSArray_Type); B.Type_IsolateExit_QVA = A.typeLiteral("IsolateExit"); B.Type__$IsolateExit_4XE = A.typeLiteral("_$IsolateExit"); - B.List_MJN = A._setArrayType(makeConstList([B.Type_IsolateExit_QVA, B.Type__$IsolateExit_4XE]), type$.JSArray_Type); + B.List_MJN = makeConstList([B.Type_IsolateExit_QVA, B.Type__$IsolateExit_4XE], type$.JSArray_Type); B.Type_ExtensionResponse_0Oi = A.typeLiteral("ExtensionResponse"); B.Type__$ExtensionResponse_46G = A.typeLiteral("_$ExtensionResponse"); - B.List_RWp = A._setArrayType(makeConstList([B.Type_ExtensionResponse_0Oi, B.Type__$ExtensionResponse_46G]), type$.JSArray_Type); + B.List_RWp = makeConstList([B.Type_ExtensionResponse_0Oi, B.Type__$ExtensionResponse_46G], type$.JSArray_Type); B.Type_RunRequest_Hfm = A.typeLiteral("RunRequest"); B.Type__$RunRequest_3ad = A.typeLiteral("_$RunRequest"); - B.List_RlA = A._setArrayType(makeConstList([B.Type_RunRequest_Hfm, B.Type__$RunRequest_3ad]), type$.JSArray_Type); + B.List_RlA = makeConstList([B.Type_RunRequest_Hfm, B.Type__$RunRequest_3ad], type$.JSArray_Type); B.Type_DevToolsResponse_gVs = A.typeLiteral("DevToolsResponse"); B.Type__$DevToolsResponse_dcs = A.typeLiteral("_$DevToolsResponse"); - B.List_TEH = A._setArrayType(makeConstList([B.Type_DevToolsResponse_gVs, B.Type__$DevToolsResponse_dcs]), type$.JSArray_Type); - B.List_Type_BuildStatus_8KJ = A._setArrayType(makeConstList([B.Type_BuildStatus_8KJ]), type$.JSArray_Type); + B.List_TEH = makeConstList([B.Type_DevToolsResponse_gVs, B.Type__$DevToolsResponse_dcs], type$.JSArray_Type); + B.List_Type_BuildStatus_8KJ = makeConstList([B.Type_BuildStatus_8KJ], type$.JSArray_Type); B.Type_BatchedDebugEvents_v7B = A.typeLiteral("BatchedDebugEvents"); B.Type__$BatchedDebugEvents_LFV = A.typeLiteral("_$BatchedDebugEvents"); - B.List_WAE = A._setArrayType(makeConstList([B.Type_BatchedDebugEvents_v7B, B.Type__$BatchedDebugEvents_LFV]), type$.JSArray_Type); - B.List_ZNA = A._setArrayType(makeConstList([0, 0, 1048576, 531441, 1048576, 390625, 279936, 823543, 262144, 531441, 1000000, 161051, 248832, 371293, 537824, 759375, 1048576, 83521, 104976, 130321, 160000, 194481, 234256, 279841, 331776, 390625, 456976, 531441, 614656, 707281, 810000, 923521, 1048576, 35937, 39304, 42875, 46656]), type$.JSArray_int); + B.List_WAE = makeConstList([B.Type_BatchedDebugEvents_v7B, B.Type__$BatchedDebugEvents_LFV], type$.JSArray_Type); + B.List_ZNA = makeConstList([0, 0, 1048576, 531441, 1048576, 390625, 279936, 823543, 262144, 531441, 1000000, 161051, 248832, 371293, 537824, 759375, 1048576, 83521, 104976, 130321, 160000, 194481, 234256, 279841, 331776, 390625, 456976, 531441, 614656, 707281, 810000, 923521, 1048576, 35937, 39304, 42875, 46656], type$.JSArray_int); B.Type_HotReloadRequest_EsW = A.typeLiteral("HotReloadRequest"); B.Type__$HotReloadRequest_ynq = A.typeLiteral("_$HotReloadRequest"); - B.List_dz9 = A._setArrayType(makeConstList([B.Type_HotReloadRequest_EsW, B.Type__$HotReloadRequest_ynq]), type$.JSArray_Type); - B.List_empty = A._setArrayType(makeConstList([]), type$.JSArray_String); - B.List_empty0 = A._setArrayType(makeConstList([]), type$.JSArray_dynamic); - B.List_fAJ = A._setArrayType(makeConstList(["d", "D", "\u2202", "\xce"]), type$.JSArray_String); + B.List_dz9 = makeConstList([B.Type_HotReloadRequest_EsW, B.Type__$HotReloadRequest_ynq], type$.JSArray_Type); + B.List_empty = makeConstList([], type$.JSArray_String); + B.List_empty0 = makeConstList([], type$.JSArray_dynamic); + B.List_fAJ = makeConstList(["d", "D", "\u2202", "\xce"], type$.JSArray_String); B.Type__$DebugEvent_YX4 = A.typeLiteral("_$DebugEvent"); - B.List_fK8 = A._setArrayType(makeConstList([B.Type_DebugEvent_gLJ, B.Type__$DebugEvent_YX4]), type$.JSArray_Type); + B.List_fK8 = makeConstList([B.Type_DebugEvent_gLJ, B.Type__$DebugEvent_YX4], type$.JSArray_Type); B.Type_BatchedEvents_ABc = A.typeLiteral("BatchedEvents"); B.Type__$BatchedEvents_jAA = A.typeLiteral("_$BatchedEvents"); - B.List_oDF = A._setArrayType(makeConstList([B.Type_BatchedEvents_ABc, B.Type__$BatchedEvents_jAA]), type$.JSArray_Type); + B.List_oDF = makeConstList([B.Type_BatchedEvents_ABc, B.Type__$BatchedEvents_jAA], type$.JSArray_Type); B.Type_BuildResult_SAR = A.typeLiteral("BuildResult"); B.Type__$BuildResult_Iwz = A.typeLiteral("_$BuildResult"); - B.List_pLn = A._setArrayType(makeConstList([B.Type_BuildResult_SAR, B.Type__$BuildResult_Iwz]), type$.JSArray_Type); + B.List_pLn = makeConstList([B.Type_BuildResult_SAR, B.Type__$BuildResult_Iwz], type$.JSArray_Type); B.Type_ConnectRequest_8Nv = A.typeLiteral("ConnectRequest"); B.Type__$ConnectRequest_3Qd = A.typeLiteral("_$ConnectRequest"); - B.List_xmd = A._setArrayType(makeConstList([B.Type_ConnectRequest_8Nv, B.Type__$ConnectRequest_3Qd]), type$.JSArray_Type); + B.List_xmd = makeConstList([B.Type_ConnectRequest_8Nv, B.Type__$ConnectRequest_3Qd], type$.JSArray_Type); B.Type__$ExtensionEvent_WzR = A.typeLiteral("_$ExtensionEvent"); - B.List_yvR = A._setArrayType(makeConstList([B.Type_ExtensionEvent_T8C, B.Type__$ExtensionEvent_WzR]), type$.JSArray_Type); + B.List_yvR = makeConstList([B.Type_ExtensionEvent_T8C, B.Type__$ExtensionEvent_WzR], type$.JSArray_Type); B.Object_empty = {}; B.Map_empty0 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); B.Map_empty = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap<@,@>")); @@ -28796,11 +28728,6 @@ _lazyFinal($, "_Uri__needsNoEncoding", "$get$_Uri__needsNoEncoding", () => A.RegExp_RegExp("^[\\-\\.0-9A-Z_a-z~]*$", true, false)); _lazyFinal($, "_hashSeed", "$get$_hashSeed", () => A.objectHashCode(B.Type_Object_A4p)); _lazyFinal($, "_jsBoxedDartObjectProperty", "$get$_jsBoxedDartObjectProperty", () => Symbol("jsBoxedDartObjectProperty")); - _lazyFinal($, "Random__secureRandom", "$get$Random__secureRandom", () => { - var t1 = new A._JSSecureRandom(new DataView(new ArrayBuffer(A._checkLength(8)))); - t1._JSSecureRandom$0(); - return t1; - }); _lazyFinal($, "isSoundMode", "$get$isSoundMode", () => !type$.List_int._is(A._setArrayType([], A.findType("JSArray")))); _lazy($, "newBuiltValueToStringHelper", "$get$newBuiltValueToStringHelper", () => new A.newBuiltValueToStringHelper_closure()); _lazyFinal($, "_runtimeType", "$get$_runtimeType", () => A.getRuntimeTypeOfDartObject(A.RegExp_RegExp("", true, false))); @@ -28856,7 +28783,7 @@ _lazyFinal($, "_escapedChar", "$get$_escapedChar", () => A.RegExp_RegExp('["\\x00-\\x1F\\x7F]', true, false)); _lazyFinal($, "token", "$get$token", () => A.RegExp_RegExp('[^()<>@,;:"\\\\/[\\]?={} \\t\\x00-\\x1F\\x7F]+', true, false)); _lazyFinal($, "_lws", "$get$_lws", () => A.RegExp_RegExp("(?:\\r\\n)?[ \\t]+", true, false)); - _lazyFinal($, "_quotedString", "$get$_quotedString", () => A.RegExp_RegExp('"(?:[^"\\x00-\\x1F\\x7F\\\\]|\\\\.)*"', true, false)); + _lazyFinal($, "_quotedString", "$get$_quotedString", () => A.RegExp_RegExp('"(?:[^"\\x00-\\x1F\\x7F]|\\\\.)*"', true, false)); _lazyFinal($, "_quotedPair", "$get$_quotedPair", () => A.RegExp_RegExp("\\\\(.)", true, false)); _lazyFinal($, "nonToken", "$get$nonToken", () => A.RegExp_RegExp('[()<>@,;:"\\\\/\\[\\]?={} \\t\\x00-\\x1F\\x7F]', true, false)); _lazyFinal($, "whitespace", "$get$whitespace", () => A.RegExp_RegExp("(?:" + $.$get$_lws().pattern + ")*", true, false)); @@ -28875,7 +28802,10 @@ t4 = A.Completer_Completer(type$.dynamic); return new A.Pool(t2, t3, t1, 1000, new A.AsyncMemoizer(t4, A.findType("AsyncMemoizer<@>"))); }); - _lazy($, "V1State_random", "$get$V1State_random", () => new A.CryptoRNG()); + _lazy($, "V1State_random", "$get$V1State_random", () => { + var t1 = A.Random_Random(null); + return new A.MathRNG(t1); + }); _lazyFinal($, "UuidParsing__byteToHex", "$get$UuidParsing__byteToHex", () => { var i, _list = J.JSArray_JSArray$allocateGrowable(256, type$.String); @@ -28883,7 +28813,6 @@ _list[i] = B.JSString_methods.padLeft$2(B.JSInt_methods.toRadixString$1(i, 16), 2, "0"); return _list; }); - _lazyFinal($, "CryptoRNG__secureRandom", "$get$CryptoRNG__secureRandom", () => $.$get$Random__secureRandom()); _lazyFinal($, "_noncePattern", "$get$_noncePattern", () => A.RegExp_RegExp("^[\\w+/_-]+[=]{0,2}$", true, false)); _lazyFinal($, "_createScript", "$get$_createScript", () => new A._createScript_closure().call$0()); })(); diff --git a/dwds/lib/src/services/chrome_proxy_service.dart b/dwds/lib/src/services/chrome_proxy_service.dart index 64f45070c..c8747b6d3 100644 --- a/dwds/lib/src/services/chrome_proxy_service.dart +++ b/dwds/lib/src/services/chrome_proxy_service.dart @@ -204,7 +204,7 @@ class ChromeProxyService implements VmServiceInterface { sendClientRequest, useWebSocket: useWebSocket, ); - safeUnawaited(service.createIsolate(appConnection)); + safeUnawaited(service.createIsolate(appConnection, newConnection: true)); return service; } @@ -300,7 +300,14 @@ class ChromeProxyService implements VmServiceInterface { /// Only one isolate at a time is supported, but they should be cleaned up /// with [destroyIsolate] and recreated with this method there is a hot /// restart or full page refresh. - Future createIsolate(AppConnection appConnection) async { + /// + /// If [newConnection] is true, does not recompute metadata information as + /// that is done only when we recreate the isolate the connection as source + /// data may have changed. + Future createIsolate( + AppConnection appConnection, { + bool newConnection = false, + }) async { // Inspector is null if the previous isolate is destroyed. if (_isIsolateRunning) { throw UnsupportedError( @@ -316,6 +323,9 @@ class ChromeProxyService implements VmServiceInterface { // Issue: https://github.com/dart-lang/webdev/issues/1282 final debugger = await debuggerFuture; final entrypoint = appConnection.request.entrypointPath; + if (!newConnection) { + await globalToolConfiguration.loadStrategy.trackEntrypoint(entrypoint); + } _initializeEntrypoint(entrypoint); debugger.notifyPausedAtStart(); diff --git a/dwds/test/common/hot_restart_common.dart b/dwds/test/common/hot_restart_common.dart index deeb791b8..4981b6c0d 100644 --- a/dwds/test/common/hot_restart_common.dart +++ b/dwds/test/common/hot_restart_common.dart @@ -378,43 +378,6 @@ void runTests({ expect(source.contains(newString), isTrue); }); - test('can hot restart while paused', () async { - final client = context.debugConnection.vmService; - var vm = await client.getVM(); - var isolateId = vm.isolates!.first.id!; - await client.streamListen('Debug'); - final stream = client.onEvent('Debug'); - final scriptList = await client.getScripts(isolateId); - final main = scriptList.scripts!.firstWhere( - (script) => script.uri!.contains('main.dart'), - ); - final bpLine = await context.findBreakpointLine( - 'printCount', - isolateId, - main, - ); - await client.addBreakpoint(isolateId, main.id!, bpLine); - await stream.firstWhere( - (event) => event.kind == EventKind.kPauseBreakpoint, - ); - - await makeEditAndRecompile(); - final hotRestart = context.getRegisteredServiceExtension('hotRestart'); - await fakeClient.callServiceExtension(hotRestart!); - final source = await context.webDriver.pageSource; - - // Main is re-invoked which shouldn't clear the state. - expect(source.contains(originalString), isTrue); - expect(source.contains(newString), isTrue); - - vm = await client.getVM(); - isolateId = vm.isolates!.first.id!; - final isolate = await client.getIsolate(isolateId); - - // Previous breakpoint should be cleared. - expect(isolate.breakpoints!.isEmpty, isTrue); - }); - test('can evaluate expressions after hot restart', () async { final client = context.debugConnection.vmService; @@ -541,106 +504,99 @@ void runTests({ timeout: Timeout.factor(2), ); - group( - 'when isolates_paused_on_start is true', - () { - late VmService client; - late VmService fakeClient; - - setUp(() async { - setCurrentLogWriter(debug: debug); - await context.setUp( - testSettings: TestSettings( - enableExpressionEvaluation: true, - compilationMode: compilationMode, - moduleFormat: provider.ddcModuleFormat, - canaryFeatures: provider.canaryFeatures, - ), - ); - client = context.debugConnection.vmService; - fakeClient = await context.connectFakeClient(); - await client.setFlag('pause_isolates_on_start', 'true'); - await client.streamListen('Isolate'); - }); - - tearDown(() async { - await context.tearDown(); - undoEdit(); - }); - - test( - 'after hot-restart, does not run app until there is a resume event', - () async { - await makeEditAndRecompile(); + group('when isolates_paused_on_start is true', () { + late VmService client; + late VmService fakeClient; - final eventsDone = expectLater( - client.onIsolateEvent, - emitsThrough( - emitsInOrder([ - _hasKind(EventKind.kIsolateExit), - _hasKind(EventKind.kIsolateStart), - _hasKind(EventKind.kIsolateRunnable), - ]), - ), - ); + setUp(() async { + setCurrentLogWriter(debug: debug); + await context.setUp( + testSettings: TestSettings( + enableExpressionEvaluation: true, + compilationMode: compilationMode, + moduleFormat: provider.ddcModuleFormat, + canaryFeatures: provider.canaryFeatures, + ), + ); + client = context.debugConnection.vmService; + fakeClient = await context.connectFakeClient(); + await client.setFlag('pause_isolates_on_start', 'true'); + await client.streamListen('Isolate'); + }); - final hotRestart = context.getRegisteredServiceExtension( - 'hotRestart', - ); - expect( - await fakeClient.callServiceExtension(hotRestart!), - const TypeMatcher(), - ); + tearDown(() async { + await context.tearDown(); + undoEdit(); + }); - await eventsDone; + test( + 'after hot-restart, does not run app until there is a resume event', + () async { + await makeEditAndRecompile(); + + final eventsDone = expectLater( + client.onIsolateEvent, + emitsThrough( + emitsInOrder([ + _hasKind(EventKind.kIsolateExit), + _hasKind(EventKind.kIsolateStart), + _hasKind(EventKind.kIsolateRunnable), + ]), + ), + ); - final sourceBeforeResume = await context.webDriver.pageSource; - expect(sourceBeforeResume.contains(newString), isFalse); + final hotRestart = context.getRegisteredServiceExtension('hotRestart'); + expect( + await fakeClient.callServiceExtension(hotRestart!), + const TypeMatcher(), + ); - final vm = await client.getVM(); - final isolateId = vm.isolates!.first.id!; - await client.resume(isolateId); + await eventsDone; - final sourceAfterResume = await context.webDriver.pageSource; - expect(sourceAfterResume.contains(newString), isTrue); - }, - ); + final sourceBeforeResume = await context.webDriver.pageSource; + expect(sourceBeforeResume.contains(newString), isFalse); - test( - 'after page refresh, does not run app until there is a resume event', - () async { - await makeEditAndRecompile(); + final vm = await client.getVM(); + final isolateId = vm.isolates!.first.id!; + await client.resume(isolateId); - await context.webDriver.driver.refresh(); + final sourceAfterResume = await context.webDriver.pageSource; + expect(sourceAfterResume.contains(newString), isTrue); + }, + ); - final eventsDone = expectLater( - client.onIsolateEvent, - emitsThrough( - emitsInOrder([ - _hasKind(EventKind.kIsolateExit), - _hasKind(EventKind.kIsolateStart), - _hasKind(EventKind.kIsolateRunnable), - ]), - ), - ); + test( + 'after page refresh, does not run app until there is a resume event', + () async { + await makeEditAndRecompile(); + + await context.webDriver.driver.refresh(); + + final eventsDone = expectLater( + client.onIsolateEvent, + emitsThrough( + emitsInOrder([ + _hasKind(EventKind.kIsolateExit), + _hasKind(EventKind.kIsolateStart), + _hasKind(EventKind.kIsolateRunnable), + ]), + ), + ); - await eventsDone; + await eventsDone; - final sourceBeforeResume = await context.webDriver.pageSource; - expect(sourceBeforeResume.contains(newString), isFalse); + final sourceBeforeResume = await context.webDriver.pageSource; + expect(sourceBeforeResume.contains(newString), isFalse); - final vm = await client.getVM(); - final isolateId = vm.isolates!.first.id!; - await client.resume(isolateId); + final vm = await client.getVM(); + final isolateId = vm.isolates!.first.id!; + await client.resume(isolateId); - final sourceAfterResume = await context.webDriver.pageSource; - expect(sourceAfterResume.contains(newString), isTrue); - }, - ); - }, - // https://github.com/dart-lang/sdk/issues/60528 - skip: moduleFormat == ModuleFormat.ddc && canaryFeatures == true, - ); + final sourceAfterResume = await context.webDriver.pageSource; + expect(sourceAfterResume.contains(newString), isTrue); + }, + ); + }); } TypeMatcher _hasKind(String kind) => diff --git a/dwds/test/fixtures/context.dart b/dwds/test/fixtures/context.dart index abe8f8f1d..f14be2821 100644 --- a/dwds/test/fixtures/context.dart +++ b/dwds/test/fixtures/context.dart @@ -583,6 +583,16 @@ class TestContext { file.writeAsStringSync(fileContents.replaceAll(toReplace, replaceWith)); } + void addLibraryFile({required String libFileName, required String contents}) { + final file = File(project.dartLibFilePath(libFileName)); + file.writeAsStringSync(contents); + } + + void removeLibraryFile({required String libFileName}) { + final file = File(project.dartLibFilePath(libFileName)); + file.deleteSync(); + } + Future recompile({required bool fullRestart}) async { await webRunner.run( frontendServerFileSystem, diff --git a/dwds/test/fixtures/project.dart b/dwds/test/fixtures/project.dart index 25f58e017..8ce0d88e6 100644 --- a/dwds/test/fixtures/project.dart +++ b/dwds/test/fixtures/project.dart @@ -135,6 +135,14 @@ class TestProject { htmlEntryFileName: 'index.html', ); + static const testHotRestartBreakpoints = TestProject._( + packageName: '_test_hot_restart_breakpoints', + packageDirectory: '_testHotRestartBreakpoints', + webAssetsPath: 'web', + dartEntryFileName: 'main.dart', + htmlEntryFileName: 'index.html', + ); + static const testHotReload = TestProject._( packageName: '_test_hot_reload', packageDirectory: '_testHotReload', diff --git a/dwds/test/hot_restart_breakpoints_test.dart b/dwds/test/hot_restart_breakpoints_test.dart new file mode 100644 index 000000000..0be4ac2ca --- /dev/null +++ b/dwds/test/hot_restart_breakpoints_test.dart @@ -0,0 +1,312 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 5)) +library; + +import 'dart:async'; + +import 'package:dwds/expression_compiler.dart'; +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 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart'; + +import 'fixtures/context.dart'; +import 'fixtures/project.dart'; +import 'fixtures/utilities.dart'; + +void main() { + // Enable verbose logging for debugging. + final debug = false; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: true, + ddcModuleFormat: ModuleFormat.ddc, + ); + final project = TestProject.testHotRestartBreakpoints; + final context = TestContext(project, provider); + final mainFile = project.dartEntryFileName; + final callLogMarker = 'callLog'; + + tearDownAll(provider.dispose); + + final edits = <({String file, String originalString, String newString})>[]; + + void makeEdit(String file, String originalString, String newString) { + if (file == project.dartEntryFileName) { + context.makeEditToDartEntryFile( + toReplace: originalString, + replaceWith: newString, + ); + } else { + context.makeEditToDartLibFile( + libFileName: file, + toReplace: originalString, + replaceWith: newString, + ); + } + edits.add(( + file: file, + originalString: originalString, + newString: newString, + )); + } + + Future makeEditAndRecompile( + String file, + String originalString, + String newString, + ) async { + makeEdit(file, originalString, newString); + await context.recompile(fullRestart: true); + } + + void undoEdits() { + for (var i = edits.length - 1; i >= 0; i--) { + final edit = edits[i]; + if (edit.file == project.dartEntryFileName) { + context.makeEditToDartEntryFile( + toReplace: edit.newString, + replaceWith: edit.originalString, + ); + } else { + context.makeEditToDartLibFile( + libFileName: edit.file, + toReplace: edit.newString, + replaceWith: edit.originalString, + ); + } + } + edits.clear(); + } + + group('when pause_isolates_on_start is true', () { + late VmService client; + late VmServiceInterface service; + late Stream stream; + // Fetch the log statements that are sent to console. + final consoleLogs = []; + late StreamSubscription consoleSubscription; + + setUp(() async { + setCurrentLogWriter(debug: debug); + await context.setUp( + testSettings: TestSettings( + enableExpressionEvaluation: true, + compilationMode: CompilationMode.frontendServer, + moduleFormat: provider.ddcModuleFormat, + canaryFeatures: provider.canaryFeatures, + ), + ); + client = await context.connectFakeClient(); + await client.setFlag('pause_isolates_on_start', 'true'); + await client.streamListen('Isolate'); + service = context.service; + await service.streamListen('Debug'); + stream = service.onEvent('Debug'); + consoleSubscription = context.webkitDebugger.onConsoleAPICalled.listen( + (e) => consoleLogs.add(e.args.first.value as String), + ); + }); + + tearDown(() async { + await consoleSubscription.cancel(); + consoleLogs.clear(); + undoEdits(); + await context.tearDown(); + }); + + Future addBreakpoint({ + required String file, + required String breakpointMarker, + }) async { + final vm = await client.getVM(); + final isolateId = vm.isolates!.first.id!; + final scriptList = await client.getScripts(isolateId); + final scriptRef = scriptList.scripts!.firstWhere( + (script) => script.uri!.contains(file), + ); + final bpLine = await context.findBreakpointLine( + breakpointMarker, + isolateId, + scriptRef, + ); + return await client.addBreakpointWithScriptUri( + isolateId, + scriptRef.uri!, + bpLine, + ); + } + + Future resume() async { + final vm = await client.getVM(); + final isolate = await client.getIsolate(vm.isolates!.first.id!); + await client.resume(isolate.id!); + } + + Future hotRestartAndHandlePausePost( + List<({String file, String breakpointMarker})> breakpoints, + ) async { + final eventsDone = expectLater( + client.onIsolateEvent, + emitsThrough( + emitsInOrder([ + _hasKind(EventKind.kIsolateExit), + _hasKind(EventKind.kIsolateStart), + _hasKind(EventKind.kIsolateRunnable), + ]), + ), + ); + + final waitForPausePost = stream.firstWhere( + (event) => event.kind == EventKind.kPausePostRequest, + ); + + final hotRestart = context.getRegisteredServiceExtension('hotRestart'); + expect( + await client.callServiceExtension(hotRestart!), + const TypeMatcher(), + ); + + await eventsDone; + + // DWDS defers running main after a hot restart until the client (e.g. + // DAP) resumes. Client should listen for this event, remove breakpoints + // (we don't remove them here as DWDS already removes them), and + // reregister breakpoints (which will be registered in the new files), and + // resume. + await waitForPausePost; + for (final breakpoint in breakpoints) { + await addBreakpoint( + file: breakpoint.file, + breakpointMarker: breakpoint.breakpointMarker, + ); + } + await resume(); + } + + test('after edit and hot restart, breakpoint is in new file', () async { + final oldLog = 'main gen0'; + final newLog = 'main gen1'; + + await addBreakpoint(file: mainFile, breakpointMarker: callLogMarker); + + await makeEditAndRecompile(mainFile, oldLog, newLog); + + await hotRestartAndHandlePausePost([ + (file: mainFile, breakpointMarker: callLogMarker), + ]); + + // Should break at `callLog`. + await stream.firstWhere( + (event) => event.kind == EventKind.kPauseBreakpoint, + ); + expect(consoleLogs.contains(newLog), false); + await resume(); + expect(consoleLogs.contains(newLog), true); + }); + + test('add adding line, hot restart, removing line, and hot restart, ' + 'breakpoint is correct across both hot restarts', () async { + final genLog = 'main gen0'; + + await addBreakpoint(file: mainFile, breakpointMarker: callLogMarker); + + // Add an extra log before the existing log. + final extraLog = 'hot reload'; + final oldString = "log('"; + final newString = "log('$extraLog');\n$oldString"; + await makeEditAndRecompile(mainFile, oldString, newString); + + await hotRestartAndHandlePausePost([ + (file: mainFile, breakpointMarker: callLogMarker), + ]); + + // Should break at `callLog`. + await stream.firstWhere( + (event) => event.kind == EventKind.kPauseBreakpoint, + ); + expect(consoleLogs.contains(extraLog), true); + expect(consoleLogs.contains(genLog), false); + await resume(); + expect(consoleLogs.contains(genLog), true); + + consoleLogs.clear(); + + // Remove the line we just added. + await makeEditAndRecompile(mainFile, newString, oldString); + + await hotRestartAndHandlePausePost([ + (file: mainFile, breakpointMarker: callLogMarker), + ]); + + // Should break at `callLog`. + await stream.firstWhere( + (event) => event.kind == EventKind.kPauseBreakpoint, + ); + expect(consoleLogs.contains(extraLog), false); + expect(consoleLogs.contains(genLog), false); + await resume(); + expect(consoleLogs.contains(genLog), true); + }); + + test( + 'after adding file and putting breakpoint in it, breakpoint is correctly ' + 'registered', + () async { + final genLog = 'main gen0'; + + await addBreakpoint(file: mainFile, breakpointMarker: callLogMarker); + + // Add a library file, import it, and then refer to it in the log. + final libFile = 'library.dart'; + final libGenLog = 'lib gen0'; + final libValueMarker = 'libValue'; + context.addLibraryFile( + libFileName: libFile, + contents: '''String get libraryValue { + return '$libGenLog'; // Breakpoint: $libValueMarker + }''', + ); + final oldImports = "import 'dart:js_interop';"; + final newImports = + '$oldImports\n' + "import 'package:_test_hot_restart_breakpoints/library.dart';"; + makeEdit(mainFile, oldImports, newImports); + final oldLog = "log('$genLog');"; + final newLog = "log('\$libraryValue');"; + await makeEditAndRecompile(mainFile, oldLog, newLog); + + await hotRestartAndHandlePausePost([ + (file: mainFile, breakpointMarker: callLogMarker), + (file: libFile, breakpointMarker: libValueMarker), + ]); + + // Should break at `callLog`. + await stream.firstWhere( + (event) => event.kind == EventKind.kPauseBreakpoint, + ); + expect(consoleLogs.contains(libGenLog), false); + await resume(); + // Should break at `libValue`. + await stream.firstWhere( + (event) => event.kind == EventKind.kPauseBreakpoint, + ); + expect(consoleLogs.contains(libGenLog), false); + await resume(); + expect(consoleLogs.contains(libGenLog), true); + + context.removeLibraryFile(libFileName: libFile); + }, + ); + }); +} + +TypeMatcher _hasKind(String kind) => + isA().having((e) => e.kind, 'kind', kind); diff --git a/dwds/web/reloader/ddc_library_bundle_restarter.dart b/dwds/web/reloader/ddc_library_bundle_restarter.dart index 56fd7b531..77f2eab9f 100644 --- a/dwds/web/reloader/ddc_library_bundle_restarter.dart +++ b/dwds/web/reloader/ddc_library_bundle_restarter.dart @@ -6,6 +6,8 @@ import 'dart:async'; import 'dart:convert'; import 'dart:js_interop'; +import 'package:dwds/src/utilities/shared.dart'; + import 'restarter.dart'; @JS('dartDevEmbedder') @@ -18,6 +20,11 @@ extension type _DartDevEmbedder._(JSObject _) implements JSObject { JSArray filesToLoad, JSArray librariesToReload, ); + external _DartDevEmbedderConfig get config; +} + +extension type _DartDevEmbedderConfig._(JSObject _) implements JSObject { + external JSFunction? capturedMainHandler; } extension type _Debugger._(JSObject _) implements JSObject { @@ -50,9 +57,26 @@ extension on JSArray { } class DdcLibraryBundleRestarter implements Restarter { + Future _runMainWhenReady( + Future? readyToRunMain, + JSFunction runMain, + ) async { + if (readyToRunMain != null) { + await readyToRunMain; + } + + runMain.callAsFunction(); + } + @override Future restart({String? runId, Future? readyToRunMain}) async { await _dartDevEmbedder.debugger.maybeInvokeFlutterDisassemble(); + final mainHandler = + (JSFunction runMain) { + _dartDevEmbedder.config.capturedMainHandler = null; + safeUnawaited(_runMainWhenReady(readyToRunMain, runMain)); + }.toJS; + _dartDevEmbedder.config.capturedMainHandler = mainHandler; await _dartDevEmbedder.hotRestart().toDart; return true; } diff --git a/fixtures/_testHotRestartBreakpoints/pubspec.yaml b/fixtures/_testHotRestartBreakpoints/pubspec.yaml new file mode 100644 index 000000000..12a48a557 --- /dev/null +++ b/fixtures/_testHotRestartBreakpoints/pubspec.yaml @@ -0,0 +1,9 @@ +name: _test_hot_restart_breakpoints +version: 1.0.0 +description: >- + A fake package used for testing hot restart breakpoints. +publish_to: none + +environment: + sdk: ^3.7.0 + diff --git a/fixtures/_testHotRestartBreakpoints/web/index.html b/fixtures/_testHotRestartBreakpoints/web/index.html new file mode 100644 index 000000000..d93440a94 --- /dev/null +++ b/fixtures/_testHotRestartBreakpoints/web/index.html @@ -0,0 +1,7 @@ + + + + + + + diff --git a/fixtures/_testHotRestartBreakpoints/web/main.dart b/fixtures/_testHotRestartBreakpoints/web/main.dart new file mode 100644 index 000000000..fad2e1777 --- /dev/null +++ b/fixtures/_testHotRestartBreakpoints/web/main.dart @@ -0,0 +1,12 @@ +// 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:js_interop'; + +@JS('console.log') +external void log(String _); + +void main() { + log('main gen0'); // Breakpoint: callLog +} From 6c5747777815e9eb4a736f5b062abead2155681f Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Thu, 22 May 2025 17:29:22 -0700 Subject: [PATCH 02/50] Add changelog entry --- dwds/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/dwds/CHANGELOG.md b/dwds/CHANGELOG.md index 03fb4191e..6d88f48d0 100644 --- a/dwds/CHANGELOG.md +++ b/dwds/CHANGELOG.md @@ -2,6 +2,7 @@ - Added WebSocket-based hot reload support: `reloadSources` in `ChromeProxyService` and `DevHandler` now handle hot reload requests and responses over WebSockets. - Refactored the injected client to use a reusable function for handling hot reload requests and responses over WebSockets. +- Added support for breakpoint registering on a hot restart with the DDC library bundle format using PausePostRequests. ## 24.3.10 From 86799f163eb30d61a28dcc70d5700b8cd4a4b61c Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Thu, 22 May 2025 19:55:13 -0700 Subject: [PATCH 03/50] Create file in addLibraryFile --- dwds/test/fixtures/context.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/dwds/test/fixtures/context.dart b/dwds/test/fixtures/context.dart index f14be2821..da472ba28 100644 --- a/dwds/test/fixtures/context.dart +++ b/dwds/test/fixtures/context.dart @@ -585,6 +585,7 @@ class TestContext { void addLibraryFile({required String libFileName, required String contents}) { final file = File(project.dartLibFilePath(libFileName)); + file.createSync(); file.writeAsStringSync(contents); } From a4b9ff91b3a92fa587d78e630ed5123abf0e8d24 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Fri, 23 May 2025 09:36:45 -0700 Subject: [PATCH 04/50] Recursively create library folder if it doesn't exist yet --- dwds/test/fixtures/context.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dwds/test/fixtures/context.dart b/dwds/test/fixtures/context.dart index da472ba28..3f7090725 100644 --- a/dwds/test/fixtures/context.dart +++ b/dwds/test/fixtures/context.dart @@ -585,7 +585,8 @@ class TestContext { void addLibraryFile({required String libFileName, required String contents}) { final file = File(project.dartLibFilePath(libFileName)); - file.createSync(); + // Library folder may not exist yet, so create it. + file.createSync(recursive: true); file.writeAsStringSync(contents); } From 675980670bc3d5229195f7182be541e23018d855 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Tue, 27 May 2025 16:28:48 -0700 Subject: [PATCH 05/50] Address review comments --- .../src/services/chrome_proxy_service.dart | 5 +-- dwds/test/common/hot_restart_common.dart | 37 +++++++++++++++++++ dwds/test/hot_restart_breakpoints_test.dart | 2 +- 3 files changed, 40 insertions(+), 4 deletions(-) diff --git a/dwds/lib/src/services/chrome_proxy_service.dart b/dwds/lib/src/services/chrome_proxy_service.dart index c8747b6d3..3141d2c57 100644 --- a/dwds/lib/src/services/chrome_proxy_service.dart +++ b/dwds/lib/src/services/chrome_proxy_service.dart @@ -301,9 +301,8 @@ class ChromeProxyService implements VmServiceInterface { /// with [destroyIsolate] and recreated with this method there is a hot /// restart or full page refresh. /// - /// If [newConnection] is true, does not recompute metadata information as - /// that is done only when we recreate the isolate the connection as source - /// data may have changed. + /// If [newConnection] is true, this method does not recompute metadata + /// information as the metadata couldn't have changed. Future createIsolate( AppConnection appConnection, { bool newConnection = false, diff --git a/dwds/test/common/hot_restart_common.dart b/dwds/test/common/hot_restart_common.dart index 4981b6c0d..de3539037 100644 --- a/dwds/test/common/hot_restart_common.dart +++ b/dwds/test/common/hot_restart_common.dart @@ -378,6 +378,43 @@ void runTests({ expect(source.contains(newString), isTrue); }); + test('can hot restart while paused', () async { + final client = context.debugConnection.vmService; + var vm = await client.getVM(); + var isolateId = vm.isolates!.first.id!; + await client.streamListen('Debug'); + final stream = client.onEvent('Debug'); + final scriptList = await client.getScripts(isolateId); + final main = scriptList.scripts!.firstWhere( + (script) => script.uri!.contains('main.dart'), + ); + final bpLine = await context.findBreakpointLine( + 'printCount', + isolateId, + main, + ); + await client.addBreakpoint(isolateId, main.id!, bpLine); + await stream.firstWhere( + (event) => event.kind == EventKind.kPauseBreakpoint, + ); + + await makeEditAndRecompile(); + final hotRestart = context.getRegisteredServiceExtension('hotRestart'); + await fakeClient.callServiceExtension(hotRestart!); + final source = await context.webDriver.pageSource; + + // Main is re-invoked which shouldn't clear the state. + expect(source.contains(originalString), isTrue); + expect(source.contains(newString), isTrue); + + vm = await client.getVM(); + isolateId = vm.isolates!.first.id!; + final isolate = await client.getIsolate(isolateId); + + // Previous breakpoint should be cleared. + expect(isolate.breakpoints!.isEmpty, isTrue); + }); + test('can evaluate expressions after hot restart', () async { final client = context.debugConnection.vmService; diff --git a/dwds/test/hot_restart_breakpoints_test.dart b/dwds/test/hot_restart_breakpoints_test.dart index 0be4ac2ca..cdeb2e049 100644 --- a/dwds/test/hot_restart_breakpoints_test.dart +++ b/dwds/test/hot_restart_breakpoints_test.dart @@ -212,7 +212,7 @@ void main() { expect(consoleLogs.contains(newLog), true); }); - test('add adding line, hot restart, removing line, and hot restart, ' + test('after adding line, hot restart, removing line, and hot restart, ' 'breakpoint is correct across both hot restarts', () async { final genLog = 'main gen0'; From 473eb87fc938f388ea63dccc1c0f3afff14f85f4 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Fri, 30 May 2025 13:58:43 -0700 Subject: [PATCH 06/50] Address review comments about removed breakpoints and move expectations of console logs after resume to use a future instead --- dwds/test/hot_restart_breakpoints_test.dart | 33 ++++++++++++++++----- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/dwds/test/hot_restart_breakpoints_test.dart b/dwds/test/hot_restart_breakpoints_test.dart index cdeb2e049..9463b2314 100644 --- a/dwds/test/hot_restart_breakpoints_test.dart +++ b/dwds/test/hot_restart_breakpoints_test.dart @@ -150,6 +150,23 @@ void main() { await client.resume(isolate.id!); } + // When the program is executing, we want to check that at some point it + // will execute code that will emit [expectedString]. + Future resumeAndExpectLog(String expectedString) async { + final completer = Completer(); + final newSubscription = context.webkitDebugger.onConsoleAPICalled.listen(( + e, + ) { + if (e.args.first.value == expectedString) { + completer.complete(); + } + }); + await resume(); + await completer.future.then((_) { + newSubscription.cancel(); + }); + } + Future hotRestartAndHandlePausePost( List<({String file, String breakpointMarker})> breakpoints, ) async { @@ -182,6 +199,10 @@ void main() { // reregister breakpoints (which will be registered in the new files), and // resume. await waitForPausePost; + // Verify DWDS has already removed the breakpoints at this point. + final vm = await client.getVM(); + final isolate = await service.getIsolate(vm.isolates!.first.id!); + expect(isolate.breakpoints, isEmpty); for (final breakpoint in breakpoints) { await addBreakpoint( file: breakpoint.file, @@ -208,8 +229,7 @@ void main() { (event) => event.kind == EventKind.kPauseBreakpoint, ); expect(consoleLogs.contains(newLog), false); - await resume(); - expect(consoleLogs.contains(newLog), true); + await resumeAndExpectLog(newLog); }); test('after adding line, hot restart, removing line, and hot restart, ' @@ -234,8 +254,7 @@ void main() { ); expect(consoleLogs.contains(extraLog), true); expect(consoleLogs.contains(genLog), false); - await resume(); - expect(consoleLogs.contains(genLog), true); + await resumeAndExpectLog(genLog); consoleLogs.clear(); @@ -252,8 +271,7 @@ void main() { ); expect(consoleLogs.contains(extraLog), false); expect(consoleLogs.contains(genLog), false); - await resume(); - expect(consoleLogs.contains(genLog), true); + await resumeAndExpectLog(genLog); }); test( @@ -299,8 +317,7 @@ void main() { (event) => event.kind == EventKind.kPauseBreakpoint, ); expect(consoleLogs.contains(libGenLog), false); - await resume(); - expect(consoleLogs.contains(libGenLog), true); + await resumeAndExpectLog(libGenLog); context.removeLibraryFile(libFileName: libFile); }, From aa54169f94ea626ba38f43c954d1ad508c472187 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Fri, 30 May 2025 17:48:07 -0700 Subject: [PATCH 07/50] Register future waiting for breakpoint before we come across it --- dwds/test/hot_restart_breakpoints_test.dart | 34 ++++++++++++--------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/dwds/test/hot_restart_breakpoints_test.dart b/dwds/test/hot_restart_breakpoints_test.dart index 9463b2314..60d8e799f 100644 --- a/dwds/test/hot_restart_breakpoints_test.dart +++ b/dwds/test/hot_restart_breakpoints_test.dart @@ -212,6 +212,9 @@ void main() { await resume(); } + Future waitForBreakpoint() => + stream.firstWhere((event) => event.kind == EventKind.kPauseBreakpoint); + test('after edit and hot restart, breakpoint is in new file', () async { final oldLog = 'main gen0'; final newLog = 'main gen1'; @@ -220,14 +223,14 @@ void main() { await makeEditAndRecompile(mainFile, oldLog, newLog); + final breakpointFuture = waitForBreakpoint(); + await hotRestartAndHandlePausePost([ (file: mainFile, breakpointMarker: callLogMarker), ]); // Should break at `callLog`. - await stream.firstWhere( - (event) => event.kind == EventKind.kPauseBreakpoint, - ); + await breakpointFuture; expect(consoleLogs.contains(newLog), false); await resumeAndExpectLog(newLog); }); @@ -244,14 +247,14 @@ void main() { final newString = "log('$extraLog');\n$oldString"; await makeEditAndRecompile(mainFile, oldString, newString); + var breakpointFuture = waitForBreakpoint(); + await hotRestartAndHandlePausePost([ (file: mainFile, breakpointMarker: callLogMarker), ]); // Should break at `callLog`. - await stream.firstWhere( - (event) => event.kind == EventKind.kPauseBreakpoint, - ); + await breakpointFuture; expect(consoleLogs.contains(extraLog), true); expect(consoleLogs.contains(genLog), false); await resumeAndExpectLog(genLog); @@ -261,14 +264,14 @@ void main() { // Remove the line we just added. await makeEditAndRecompile(mainFile, newString, oldString); + breakpointFuture = waitForBreakpoint(); + await hotRestartAndHandlePausePost([ (file: mainFile, breakpointMarker: callLogMarker), ]); // Should break at `callLog`. - await stream.firstWhere( - (event) => event.kind == EventKind.kPauseBreakpoint, - ); + await breakpointFuture; expect(consoleLogs.contains(extraLog), false); expect(consoleLogs.contains(genLog), false); await resumeAndExpectLog(genLog); @@ -301,21 +304,22 @@ void main() { final newLog = "log('\$libraryValue');"; await makeEditAndRecompile(mainFile, oldLog, newLog); + var breakpointFuture = waitForBreakpoint(); + await hotRestartAndHandlePausePost([ (file: mainFile, breakpointMarker: callLogMarker), (file: libFile, breakpointMarker: libValueMarker), ]); // Should break at `callLog`. - await stream.firstWhere( - (event) => event.kind == EventKind.kPauseBreakpoint, - ); + await breakpointFuture; expect(consoleLogs.contains(libGenLog), false); + + breakpointFuture = waitForBreakpoint(); + await resume(); // Should break at `libValue`. - await stream.firstWhere( - (event) => event.kind == EventKind.kPauseBreakpoint, - ); + await breakpointFuture; expect(consoleLogs.contains(libGenLog), false); await resumeAndExpectLog(libGenLog); From f60c2c414174fab50317635129a1922b4f2ecb14 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Thu, 22 May 2025 16:32:50 -0700 Subject: [PATCH 08/50] Support breakpoints for hot reload Adds support for properly reregistering breakpoints across a hot reload. Like with hot restart, leverages the kPausePostRequest event in order to reregister breakpoints. DWDS does the initial work to load the new sources in ("hotReloadStart"), and pauses and sends the request. Upon disabling existing breakpoint, reregistering and registering new breakpoints and resuming, DWDS will resume the app and push the new sources into the runtime ("hotReloadEnd"). Also reinitializes some cached information in order to compute new sources. Note that it's very conservative for now. A future change should optimize the invalidation. Adds tests for the following cases: - Editing a line with a breakpoint. - Adding a line before a breakpoint. - Removing a line before a breakpoint. - Adding a new file with a breakpoint in it. - Breakpoint in previously captured code is removed. - There's no pause when pause_isolates_on_start is false. --- dwds/lib/src/debugging/inspector.dart | 27 +- dwds/lib/src/injected/client.js | 287 ++++------ .../src/services/chrome_proxy_service.dart | 138 ++++- dwds/test/fixtures/project.dart | 8 + dwds/test/hot_reload_breakpoints_test.dart | 496 ++++++++++++++++++ dwds/web/client.dart | 26 +- .../ddc_library_bundle_restarter.dart | 39 +- dwds/web/reloader/ddc_restarter.dart | 6 +- dwds/web/reloader/manager.dart | 19 +- dwds/web/reloader/require_restarter.dart | 6 +- dwds/web/reloader/restarter.dart | 16 +- fixtures/_testHotReload/web/main.dart | 4 - .../_testHotReloadBreakpoints/pubspec.yaml | 9 + .../_testHotReloadBreakpoints/web/index.html | 7 + .../_testHotReloadBreakpoints/web/main.dart | 26 + 15 files changed, 832 insertions(+), 282 deletions(-) create mode 100644 dwds/test/hot_reload_breakpoints_test.dart create mode 100644 fixtures/_testHotReloadBreakpoints/pubspec.yaml create mode 100644 fixtures/_testHotReloadBreakpoints/web/index.html create mode 100644 fixtures/_testHotReloadBreakpoints/web/main.dart diff --git a/dwds/lib/src/debugging/inspector.dart b/dwds/lib/src/debugging/inspector.dart index 7128adde0..1e4932e38 100644 --- a/dwds/lib/src/debugging/inspector.dart +++ b/dwds/lib/src/debugging/inspector.dart @@ -32,7 +32,7 @@ import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart'; /// Provides information about currently loaded scripts and objects and support /// for eval. class AppInspector implements AppInspectorInterface { - final _scriptCacheMemoizer = AsyncMemoizer>(); + var _scriptCacheMemoizer = AsyncMemoizer>(); Future> get scriptRefs => _populateScriptCaches(); @@ -68,9 +68,9 @@ class AppInspector implements AppInspectorInterface { final ExecutionContext _executionContext; - late final LibraryHelper _libraryHelper; - late final ClassHelper _classHelper; - late final InstanceHelper _instanceHelper; + late LibraryHelper _libraryHelper; + late ClassHelper _classHelper; + late InstanceHelper _instanceHelper; final AssetReader _assetReader; final Locations _locations; @@ -99,15 +99,25 @@ class AppInspector implements AppInspectorInterface { this._locations, this._root, this._executionContext, - ) : _isolateRef = _toIsolateRef(_isolate) { + ) : _isolateRef = _toIsolateRef(_isolate); + + /// Reset all caches and recompute any mappings. + /// + /// Should be called across hot reloads. + Future initialize() async { + _scriptCacheMemoizer = AsyncMemoizer>(); + _scriptRefsById.clear(); + _serverPathToScriptRef.clear(); + _scriptIdToLibraryId.clear(); + _libraryIdToScriptRefs.clear(); + _libraryHelper = LibraryHelper(this); _classHelper = ClassHelper(this); _instanceHelper = InstanceHelper(this); - } - Future initialize() async { final libraries = await _libraryHelper.libraryRefs; isolate.rootLib = await _libraryHelper.rootLib; + isolate.libraries?.clear(); isolate.libraries?.addAll(libraries); final scripts = await scriptRefs; @@ -702,8 +712,7 @@ class AppInspector implements AppInspectorInterface { /// This populates [_scriptRefsById], [_scriptIdToLibraryId], /// [_libraryIdToScriptRefs] and [_serverPathToScriptRef]. /// - /// It is a one-time operation, because if we do a - /// reload the inspector will get re-created. + /// This will get repopulated on restarts and reloads. /// /// Returns the list of scripts refs cached. Future> _populateScriptCaches() { diff --git a/dwds/lib/src/injected/client.js b/dwds/lib/src/injected/client.js index e1e788f3c..17cad8867 100644 --- a/dwds/lib/src/injected/client.js +++ b/dwds/lib/src/injected/client.js @@ -2008,10 +2008,6 @@ stringReplaceRangeUnchecked(receiver, start, end, replacement) { return receiver.substring(0, start) + replacement + receiver.substring(end); }, - _Record_2_libraries_sources: function _Record_2_libraries_sources(t0, t1) { - this._0 = t0; - this._1 = t1; - }, ConstantMap: function ConstantMap() { }, ConstantMap_map_closure: function ConstantMap_map_closure(t0, t1, t2) { @@ -2161,8 +2157,6 @@ }, _Record: function _Record() { }, - _Record2: function _Record2() { - }, JSSyntaxRegExp: function JSSyntaxRegExp(t0, t1) { var _ = this; _.pattern = t0; @@ -9690,11 +9684,11 @@ requestId = $event.id; $async$handler = 3; $async$goto = 6; - return A._asyncAwait(manager._restarter.fetchLibrariesForHotReload$1(A.hotReloadSourcesPath()), $async$handleWebSocketHotReloadRequest); + return A._asyncAwait(manager._restarter.hotReloadStart$1(A.hotReloadSourcesPath()), $async$handleWebSocketHotReloadRequest); case 6: // returning from await. $async$goto = 7; - return A._asyncAwait(manager.hotReload$0(), $async$handleWebSocketHotReloadRequest); + return A._asyncAwait(manager.hotReloadEnd$0(), $async$handleWebSocketHotReloadRequest); case 7: // returning from await. A._sendResponse(clientSink, A.hot_reload_response_HotReloadResponse___new_tearOff$closure(), requestId, null, true, type$.HotReloadResponse); @@ -9842,16 +9836,19 @@ return A._asyncStartSync($async$_Debugger_maybeInvokeFlutterDisassemble, $async$completer); }, DdcLibraryBundleRestarter: function DdcLibraryBundleRestarter() { - this.__DdcLibraryBundleRestarter__sourcesAndLibrariesToReload_A = $; + this._capturedHotReloadEndCallback = null; }, DdcLibraryBundleRestarter_restart_closure: function DdcLibraryBundleRestarter_restart_closure(t0, t1) { this.$this = t0; this.readyToRunMain = t1; }, - DdcLibraryBundleRestarter_fetchLibrariesForHotReload_closure: function DdcLibraryBundleRestarter_fetchLibrariesForHotReload_closure(t0, t1) { + DdcLibraryBundleRestarter_hotReloadStart_closure: function DdcLibraryBundleRestarter_hotReloadStart_closure(t0, t1) { this.xhr = t0; this.completer = t1; }, + DdcLibraryBundleRestarter_hotReloadStart_closure0: function DdcLibraryBundleRestarter_hotReloadStart_closure0(t0) { + this.$this = t0; + }, DdcRestarter: function DdcRestarter() { }, DdcRestarter_restart_closure0: function DdcRestarter_restart_closure0(t0) { @@ -11641,7 +11638,6 @@ } }; A.__CastListBase__CastIterableBase_ListMixin.prototype = {}; - A._Record_2_libraries_sources.prototype = {$recipe: "+libraries,sources(1,2)", $shape: 2}; A.ConstantMap.prototype = { cast$2$0(_, RK, RV) { var t1 = A._instanceType(this); @@ -12264,7 +12260,7 @@ call$2(o, tag) { return this.getUnknownTag(o, tag); }, - $signature: 66 + $signature: 83 }; A.initHooks_closure1.prototype = { call$1(tag) { @@ -12272,82 +12268,7 @@ }, $signature: 90 }; - A._Record.prototype = { - get$runtimeType(_) { - return A.createRuntimeType(this._getRti$0()); - }, - _getRti$0() { - return A.evaluateRtiForRecord(this.$recipe, this._getFieldValues$0()); - }, - toString$0(_) { - return this._toString$1(false); - }, - _toString$1(safe) { - var t2, separator, i, key, value, - keys = this._fieldKeys$0(), - values = this._getFieldValues$0(), - t1 = (safe ? "Record " : "") + "("; - for (t2 = keys.length, separator = "", i = 0; i < t2; ++i, separator = ", ") { - t1 += separator; - key = keys[i]; - if (typeof key == "string") - t1 = t1 + key + ": "; - if (!(i < values.length)) - return A.ioore(values, i); - value = values[i]; - t1 = safe ? t1 + A.Primitives_safeToString(value) : t1 + A.S(value); - } - t1 += ")"; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - _fieldKeys$0() { - var t1, - shapeTag = this.$shape; - for (; $._Record__computedFieldKeys.length <= shapeTag;) - B.JSArray_methods.add$1($._Record__computedFieldKeys, null); - t1 = $._Record__computedFieldKeys[shapeTag]; - if (t1 == null) { - t1 = this._computeFieldKeys$0(); - B.JSArray_methods.$indexSet($._Record__computedFieldKeys, shapeTag, t1); - } - return t1; - }, - _computeFieldKeys$0() { - var i, names, last, - recipe = this.$recipe, - position = recipe.indexOf("("), - joinedNames = recipe.substring(1, position), - fields = recipe.substring(position), - arity = fields === "()" ? 0 : fields.replace(/[^,]/g, "").length + 1, - t1 = type$.Object, - result = J.JSArray_JSArray$allocateGrowable(arity, t1); - for (i = 0; i < arity; ++i) - result[i] = i; - if (joinedNames !== "") { - names = joinedNames.split(","); - i = names.length; - for (last = arity; i > 0;) { - --last; - --i; - B.JSArray_methods.$indexSet(result, last, names[i]); - } - } - return A.List_List$unmodifiable(result, t1); - } - }; - A._Record2.prototype = { - _getFieldValues$0() { - return [this._0, this._1]; - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A._Record2 && this.$shape === other.$shape && J.$eq$(this._0, other._0) && J.$eq$(this._1, other._1); - }, - get$hashCode(_) { - return A.Object_hash(this.$shape, this._0, this._1, B.C_SentinelValue); - } - }; + A._Record.prototype = {}; A.JSSyntaxRegExp.prototype = { toString$0(_) { return "RegExp/" + this.pattern + "/" + this._nativeRegExp.flags; @@ -12841,7 +12762,7 @@ t2 = this.span; t1.firstChild ? t1.removeChild(t2) : t1.appendChild(t2); }, - $signature: 61 + $signature: 63 }; A._AsyncRun__scheduleImmediateJsOverride_internalCallback.prototype = { call$0() { @@ -12947,7 +12868,7 @@ call$2(error, stackTrace) { this.bodyFunction.call$2(1, new A.ExceptionAndStackTrace(error, type$.StackTrace._as(stackTrace))); }, - $signature: 52 + $signature: 53 }; A._wrapJsFunctionForAsync_closure.prototype = { call$2(errorCode, result) { @@ -14762,7 +14683,7 @@ t2._processUncaughtError$3(zone, type$.Object._as(e), t1._as(s)); } }, - $signature: 63 + $signature: 66 }; A._HashMap.prototype = { get$length(_) { @@ -17899,13 +17820,13 @@ call$2(msg, position) { throw A.wrapException(A.FormatException$("Illegal IPv4 address, " + msg, this.host, position)); }, - $signature: 56 + $signature: 61 }; A.Uri_parseIPv6Address_error.prototype = { call$2(msg, position) { throw A.wrapException(A.FormatException$("Illegal IPv6 address, " + msg, this.host, position)); }, - $signature: 53 + $signature: 56 }; A.Uri_parseIPv6Address_parseHex.prototype = { call$2(start, end) { @@ -18570,7 +18491,7 @@ t1.call(t1, wrapper); return wrapper; }, - $signature: 50 + $signature: 52 }; A.FutureOfVoidToJSPromise_get_toJS_closure.prototype = { call$2(resolve, reject) { @@ -18584,7 +18505,7 @@ var t1 = this.resolve; return t1.call(t1); }, - $signature: 46 + $signature: 50 }; A.FutureOfVoidToJSPromise_get_toJS__closure0.prototype = { call$2(error, stackTrace) { @@ -18870,7 +18791,7 @@ call$2(h, i) { return A._combine(A._asInt(h), J.get$hashCode$(i)); }, - $signature: 42 + $signature: 46 }; A.BuiltList.prototype = { toBuilder$0() { @@ -19801,7 +19722,7 @@ $._indentingBuiltValueToStringHelperIndent = $._indentingBuiltValueToStringHelperIndent + 2; return new A.IndentingBuiltValueToStringHelper(t1); }, - $signature: 39 + $signature: 42 }; A.IndentingBuiltValueToStringHelper.prototype = { add$2(_, field, value) { @@ -19934,21 +19855,21 @@ call$0() { return A.ListBuilder_ListBuilder(B.List_empty0, type$.Object); }, - $signature: 38 + $signature: 39 }; A.Serializers_Serializers_closure0.prototype = { call$0() { var t1 = type$.Object; return A.ListMultimapBuilder_ListMultimapBuilder(t1, t1); }, - $signature: 36 + $signature: 38 }; A.Serializers_Serializers_closure1.prototype = { call$0() { var t1 = type$.Object; return A.MapBuilder_MapBuilder(t1, t1); }, - $signature: 34 + $signature: 36 }; A.Serializers_Serializers_closure2.prototype = { call$0() { @@ -23566,13 +23487,13 @@ call$0() { return true; }, - $signature: 33 + $signature: 34 }; A.BatchedStreamController__hasEventDuring_closure.prototype = { call$0() { return false; }, - $signature: 33 + $signature: 34 }; A.SocketClient.prototype = {}; A.SseSocketClient.prototype = { @@ -24044,7 +23965,7 @@ call$1(match) { return "\\" + A.S(match.$index(0, 0)); }, - $signature: 31 + $signature: 32 }; A.expectQuotedString_closure.prototype = { call$1(match) { @@ -24052,7 +23973,7 @@ t1.toString; return t1; }, - $signature: 31 + $signature: 32 }; A.Level.prototype = { $eq(_, other) { @@ -24375,13 +24296,13 @@ call$1(part) { return A._asString(part) !== ""; }, - $signature: 30 + $signature: 31 }; A.Context_split_closure.prototype = { call$1(part) { return A._asString(part).length !== 0; }, - $signature: 30 + $signature: 31 }; A._validateArgList_closure.prototype = { call$1(arg) { @@ -25475,7 +25396,7 @@ t4 = B.JSString_methods.$mul("^", Math.max(endColumn + (tabsBefore + tabsInside) * 3 - startColumn, 1)); return (t2._contents += t4).length - t3.length; }, - $signature: 22 + $signature: 28 }; A.Highlighter__writeIndicator_closure0.prototype = { call$0() { @@ -25496,7 +25417,7 @@ t1._writeArrow$3$beginning(_this.line, Math.max(_this.highlight.span.get$end().get$column() - 1, 0), false); return t2._contents.length - t3.length; }, - $signature: 22 + $signature: 28 }; A.Highlighter__writeSidebar_closure.prototype = { call$0() { @@ -25913,13 +25834,13 @@ call$2(value, count) { return B.JSString_methods.padLeft$2(B.JSInt_methods.toRadixString$1(value, 16), count, "0"); }, - $signature: 20 + $signature: 22 }; A.generateUuidV4_bitsDigits.prototype = { call$2(bitCount, digitCount) { return this.printDigits.call$2(this.generateBits.call$1(bitCount), digitCount); }, - $signature: 20 + $signature: 22 }; A.GuaranteeChannel.prototype = { GuaranteeChannel$3$allowSinkErrors(innerSink, allowSinkErrors, _box_0, $T) { @@ -26692,8 +26613,8 @@ case 2: // break $label0$0 manager = new A.ReloadingManager(client, t3); - t1.$dartHotReloadDwds = A._functionToJS0(new A.main__closure(manager)); - t1.$fetchLibrariesForHotReload = A._functionToJS0(new A.main__closure0(manager)); + t1.$dartHotReloadStartDwds = A._functionToJS0(new A.main__closure(manager)); + t1.$dartHotReloadEndDwds = A._functionToJS0(new A.main__closure0(manager)); _box_0.readyToRunMainCompleter = null; t1.$dartHotRestartDwds = A._functionToJS2(new A.main__closure1(_box_0, manager)); t1.$dartReadyToRunMain = A._functionToJS0(new A.main__closure2(_box_0)); @@ -26733,13 +26654,13 @@ }; A.main__closure.prototype = { call$0() { - return A.FutureOfVoidToJSPromise_get_toJS(this.manager.hotReload$0()); + return A.FutureOfJSAnyToJSPromise_get_toJS(this.manager._restarter.hotReloadStart$1(A.hotReloadSourcesPath()), type$.JSArray_nullable_Object); }, $signature: 10 }; A.main__closure0.prototype = { call$0() { - return A.FutureOfJSAnyToJSPromise_get_toJS(this.manager._restarter.fetchLibrariesForHotReload$1(A.hotReloadSourcesPath()), type$.JSArray_nullable_Object); + return A.FutureOfVoidToJSPromise_get_toJS(this.manager.hotReloadEnd$0()); }, $signature: 10 }; @@ -26919,11 +26840,11 @@ // then t1 = $async$self.manager; $async$goto = 14; - return A._asyncAwait(t1._restarter.fetchLibrariesForHotReload$1(A.hotReloadSourcesPath()), $async$call$1); + return A._asyncAwait(t1._restarter.hotReloadStart$1(A.hotReloadSourcesPath()), $async$call$1); case 14: // returning from await. $async$goto = 15; - return A._asyncAwait(t1.hotReload$0(), $async$call$1); + return A._asyncAwait(t1.hotReloadEnd$0(), $async$call$1); case 15: // returning from await. case 13: @@ -27148,39 +27069,11 @@ }); return A._asyncStartSync($async$restart$2$readyToRunMain$runId, $async$completer); }, - get$_sourcesAndLibrariesToReload() { - var t1 = this.__DdcLibraryBundleRestarter__sourcesAndLibrariesToReload_A; - t1 === $ && A.throwLateFieldNI("_sourcesAndLibrariesToReload"); - return t1; - }, - reload$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this, t1; - var $async$reload$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = type$.JSObject; - $async$goto = 2; - return A._asyncAwait(A.promiseToFuture(t1._as(t1._as(init.G.dartDevEmbedder).hotReload($async$self.get$_sourcesAndLibrariesToReload()._1, $async$self.get$_sourcesAndLibrariesToReload()._0)), type$.nullable_Object), $async$reload$0); - case 2: - // returning from await. - $async$self.__DdcLibraryBundleRestarter__sourcesAndLibrariesToReload_A = null; - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$reload$0, $async$completer); - }, - fetchLibrariesForHotReload$1(hotReloadSourcesPath) { + hotReloadStart$1(hotReloadSourcesPath) { var $async$goto = 0, $async$completer = A._makeAsyncAwaitCompleter(type$.JSArray_nullable_Object), - $async$returnValue, $async$self = this, t3, srcLibraries, filesToLoad, librariesToReload, t4, srcLibraryCast, libraries, t5, t1, t2, xhr, $async$temp1, $async$temp2, $async$temp3; - var $async$fetchLibrariesForHotReload$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + $async$returnValue, $async$self = this, t4, srcLibraries, filesToLoad, librariesToReload, t5, t6, srcLibraryCast, libraries, t7, t1, t2, t3, xhr, $async$temp1, $async$temp2, $async$temp3; + var $async$hotReloadStart$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); while (true) @@ -27189,31 +27082,36 @@ // Function start t1 = new A._Future($.Zone__current, type$._Future_String); t2 = init.G; - xhr = type$.JSObject._as(new t2.XMLHttpRequest()); + t3 = type$.JSObject; + xhr = t3._as(new t2.XMLHttpRequest()); xhr.withCredentials = true; - xhr.onreadystatechange = A._functionToJS0(new A.DdcLibraryBundleRestarter_fetchLibrariesForHotReload_closure(xhr, new A._AsyncCompleter(t1, type$._AsyncCompleter_String))); + xhr.onreadystatechange = A._functionToJS0(new A.DdcLibraryBundleRestarter_hotReloadStart_closure(xhr, new A._AsyncCompleter(t1, type$._AsyncCompleter_String))); xhr.open("GET", hotReloadSourcesPath, true); xhr.send(); - t3 = type$.List_dynamic; + t4 = type$.List_dynamic; $async$temp1 = J; - $async$temp2 = t3; + $async$temp2 = t4; $async$temp3 = B.C_JsonCodec; $async$goto = 3; - return A._asyncAwait(t1, $async$fetchLibrariesForHotReload$1); + return A._asyncAwait(t1, $async$hotReloadStart$1); case 3: // returning from await. srcLibraries = $async$temp1.cast$1$0$ax($async$temp2._as($async$temp3.decode$1($async$result)), type$.Map_dynamic_dynamic); t1 = type$.JSArray_nullable_Object; filesToLoad = t1._as(new t2.Array()); librariesToReload = t1._as(new t2.Array()); - for (t1 = srcLibraries.get$iterator(srcLibraries), t2 = type$.String, t4 = type$.Object; t1.moveNext$0();) { - srcLibraryCast = t1.get$current().cast$2$0(0, t2, t4); + for (t1 = srcLibraries.get$iterator(srcLibraries), t5 = type$.String, t6 = type$.Object; t1.moveNext$0();) { + srcLibraryCast = t1.get$current().cast$2$0(0, t5, t6); filesToLoad.push(A._asString(srcLibraryCast.$index(0, "src"))); - libraries = J.cast$1$0$ax(t3._as(srcLibraryCast.$index(0, "libraries")), t2); - for (t5 = libraries.get$iterator(libraries); t5.moveNext$0();) - librariesToReload.push(t5.get$current()); + libraries = J.cast$1$0$ax(t4._as(srcLibraryCast.$index(0, "libraries")), t5); + for (t7 = libraries.get$iterator(libraries); t7.moveNext$0();) + librariesToReload.push(t7.get$current()); } - $async$self.__DdcLibraryBundleRestarter__sourcesAndLibrariesToReload_A = new A._Record_2_libraries_sources(librariesToReload, filesToLoad); + t3._as(t3._as(t2.dartDevEmbedder).config).capturedHotReloadEndHandler = A._functionToJS1(new A.DdcLibraryBundleRestarter_hotReloadStart_closure0($async$self)); + $async$goto = 4; + return A._asyncAwait(A.promiseToFuture(t3._as(t3._as(t2.dartDevEmbedder).hotReload(filesToLoad, librariesToReload)), type$.nullable_Object), $async$hotReloadStart$1); + case 4: + // returning from await. $async$returnValue = librariesToReload; // goto return $async$goto = 1; @@ -27223,7 +27121,28 @@ return A._asyncReturn($async$returnValue, $async$completer); } }); - return A._asyncStartSync($async$fetchLibrariesForHotReload$1, $async$completer); + return A._asyncStartSync($async$hotReloadStart$1, $async$completer); + }, + hotReloadEnd$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1; + var $async$hotReloadEnd$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$self._capturedHotReloadEndCallback.call(); + t1 = type$.JSObject; + t1._as(t1._as(init.G.dartDevEmbedder).config).capturedHotReloadEndHandler = null; + $async$self._capturedHotReloadEndCallback = null; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$hotReloadEnd$0, $async$completer); }, $isRestarter: 1 }; @@ -27235,9 +27154,9 @@ t1._as(t1._as(init.G.dartDevEmbedder).config).capturedMainHandler = null; A.safeUnawaited(this.$this._runMainWhenReady$2(this.readyToRunMain, runMain)); }, - $signature: 83 + $signature: 20 }; - A.DdcLibraryBundleRestarter_fetchLibrariesForHotReload_closure.prototype = { + A.DdcLibraryBundleRestarter_hotReloadStart_closure.prototype = { call$0() { var t1 = this.xhr; if (A._asInt(t1.readyState) === 4 && A._asInt(t1.status) === 200 || A._asInt(t1.status) === 304) @@ -27245,6 +27164,12 @@ }, $signature: 1 }; + A.DdcLibraryBundleRestarter_hotReloadStart_closure0.prototype = { + call$1(hotReloadEndCallback) { + this.$this._capturedHotReloadEndCallback = type$.JavaScriptFunction._as(hotReloadEndCallback); + }, + $signature: 20 + }; A.DdcRestarter.prototype = { restart$2$readyToRunMain$runId(readyToRunMain, runId) { var $async$goto = 0, @@ -27274,10 +27199,10 @@ }); return A._asyncStartSync($async$restart$2$readyToRunMain$runId, $async$completer); }, - reload$0() { + hotReloadEnd$0() { return A.throwExpression(A.UnimplementedError$(string$.Hot_reD)); }, - fetchLibrariesForHotReload$1(hotReloadSourcesPath) { + hotReloadStart$1(hotReloadSourcesPath) { return A.throwExpression(A.UnimplementedError$(string$.Hot_reD)); }, $isRestarter: 1 @@ -27337,11 +27262,11 @@ hotRestart$1$runId(runId) { return this.hotRestart$2$readyToRunMain$runId(null, runId); }, - hotReload$0() { + hotReloadEnd$0() { var $async$goto = 0, $async$completer = A._makeAsyncAwaitCompleter(type$.void), $async$self = this; - var $async$hotReload$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + var $async$hotReloadEnd$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); while (true) @@ -27349,14 +27274,14 @@ case 0: // Function start $async$goto = 2; - return A._asyncAwait($async$self._restarter.reload$0(), $async$hotReload$0); + return A._asyncAwait($async$self._restarter.hotReloadEnd$0(), $async$hotReloadEnd$0); case 2: // returning from await. // implicit return return A._asyncReturn(null, $async$completer); } }); - return A._asyncStartSync($async$hotReload$0, $async$completer); + return A._asyncStartSync($async$hotReloadEnd$0, $async$completer); }, _afterRestart$1(succeeded) { var t1, t2; @@ -27456,10 +27381,10 @@ }); return A._asyncStartSync($async$restart$2$readyToRunMain$runId, $async$completer); }, - reload$0() { + hotReloadEnd$0() { return A.throwExpression(A.UnimplementedError$(string$.Hot_reA)); }, - fetchLibrariesForHotReload$1(hotReloadSourcesPath) { + hotReloadStart$1(hotReloadSourcesPath) { return A.throwExpression(A.UnimplementedError$(string$.Hot_reA)); }, _require_restarter$_runMainWhenReady$1(readyToRunMain) { @@ -27838,7 +27763,7 @@ _instance_1_i = hunkHelpers._instance_1i, _instance_0_u = hunkHelpers._instance_0u, _instance_1_u = hunkHelpers._instance_1u; - _static_2(J, "_interceptors_JSArray__compareAny$closure", "JSArray__compareAny", 28); + _static_2(J, "_interceptors_JSArray__compareAny$closure", "JSArray__compareAny", 30); _static_1(A, "async__AsyncRun__scheduleImmediateJsOverride$closure", "_AsyncRun__scheduleImmediateJsOverride", 16); _static_1(A, "async__AsyncRun__scheduleImmediateWithSetImmediate$closure", "_AsyncRun__scheduleImmediateWithSetImmediate", 16); _static_1(A, "async__AsyncRun__scheduleImmediateWithTimer$closure", "_AsyncRun__scheduleImmediateWithTimer", 16); @@ -27873,11 +27798,11 @@ _static(A, "async___rootPrint$closure", 4, null, ["call$4"], ["_rootPrint"], 102, 0); _static_1(A, "async___printToZone$closure", "_printToZone", 103); _static(A, "async___rootFork$closure", 5, null, ["call$5"], ["_rootFork"], 104, 0); - _instance(A._Completer.prototype, "get$completeError", 0, 1, null, ["call$2", "call$1"], ["completeError$2", "completeError$1"], 32, 0, 0); + _instance(A._Completer.prototype, "get$completeError", 0, 1, null, ["call$2", "call$1"], ["completeError$2", "completeError$1"], 33, 0, 0); _instance_2_u(A._Future.prototype, "get$_completeError", "_completeError$2", 14); var _; _instance_1_i(_ = A._StreamController.prototype, "get$add", "add$1", 9); - _instance(_, "get$addError", 0, 1, null, ["call$2", "call$1"], ["addError$2", "addError$1"], 32, 0, 0); + _instance(_, "get$addError", 0, 1, null, ["call$2", "call$1"], ["addError$2", "addError$1"], 33, 0, 0); _instance_0_u(_ = A._ControllerSubscription.prototype, "get$_onPause", "_onPause$0", 0); _instance_0_u(_, "get$_onResume", "_onResume$0", 0); _instance_0_u(_ = A._BufferingStreamSubscription.prototype, "get$_onPause", "_onPause$0", 0); @@ -27890,7 +27815,7 @@ _instance_0_u(_, "get$_handleDone", "_handleDone$0", 0); _static_2(A, "collection___defaultEquals$closure", "_defaultEquals0", 18); _static_1(A, "collection___defaultHashCode$closure", "_defaultHashCode", 17); - _static_2(A, "collection_ListBase__compareAny$closure", "ListBase__compareAny", 28); + _static_2(A, "collection_ListBase__compareAny$closure", "ListBase__compareAny", 30); _static_1(A, "convert___defaultToEncodable$closure", "_defaultToEncodable", 4); _instance_1_i(_ = A._ByteCallbackSink.prototype, "get$add", "add$1", 9); _instance_0_u(_, "get$close", "close$0", 0); @@ -27920,7 +27845,7 @@ _inherit = hunkHelpers.inherit, _inheritMany = hunkHelpers.inheritMany; _inherit(A.Object, null); - _inheritMany(A.Object, [A.JS_CONST, J.Interceptor, A.SafeToStringHook, J.ArrayIterator, A.Iterable, A.CastIterator, A.Closure, A.MapBase, A.Error, A.ListBase, A.SentinelValue, A.ListIterator, A.MappedIterator, A.WhereIterator, A.ExpandIterator, A.TakeIterator, A.SkipIterator, A.EmptyIterator, A.WhereTypeIterator, A.FixedLengthListMixin, A.UnmodifiableListMixin, A._Record, A.ConstantMap, A._KeysOrValuesOrElementsIterator, A.TypeErrorDecoder, A.NullThrownFromJavaScriptException, A.ExceptionAndStackTrace, A._StackTrace, A.LinkedHashMapCell, A.LinkedHashMapKeyIterator, A.LinkedHashMapValueIterator, A.LinkedHashMapEntryIterator, A.JSSyntaxRegExp, A._MatchImplementation, A._AllMatchesIterator, A.StringMatch, A._StringAllMatchesIterator, A._Cell, A.Rti, A._FunctionParameters, A._Type, A._TimerImpl, A._AsyncAwaitCompleter, A.AsyncError, A.TimeoutException, A._Completer, A._FutureListener, A._Future, A._AsyncCallbackEntry, A.Stream, A._StreamController, A._SyncStreamControllerDispatch, A._AsyncStreamControllerDispatch, A._BufferingStreamSubscription, A._StreamSinkWrapper, A._DelayedEvent, A._DelayedDone, A._PendingEvents, A._DoneStreamSubscription, A._StreamIterator, A._ZoneFunction, A._ZoneSpecification, A._ZoneDelegate, A._Zone, A._HashMapKeyIterator, A.SetBase, A._HashSetIterator, A._LinkedHashSetCell, A._LinkedHashSetIterator, A._UnmodifiableMapMixin, A.MapView, A._ListQueueIterator, A._SplayTreeNode, A._SplayTree, A._SplayTreeIterator, A.Codec, A.Converter, A._Base64Encoder, A._Base64Decoder, A.ByteConversionSink, A._JsonStringifier, A._Utf8Encoder, A._Utf8Decoder, A._BigIntImpl, A.DateTime, A.Duration, A.OutOfMemoryError, A.StackOverflowError, A._Exception, A.FormatException, A.IntegerDivisionByZeroException, A.MapEntry, A.Null, A._StringStackTrace, A.StringBuffer, A._Uri, A.UriData, A._SimpleUri, A.NullRejectionException, A._JSRandom, A.AsyncMemoizer, A.DelegatingStreamSink, A.ErrorResult, A.ValueResult, A.StreamQueue, A._NextRequest, A._HasNextRequest, A.BuiltList, A.ListBuilder, A.BuiltListMultimap, A.ListMultimapBuilder, A.BuiltMap, A.MapBuilder, A.BuiltSet, A.SetBuilder, A.BuiltSetMultimap, A.SetMultimapBuilder, A.EnumClass, A.IndentingBuiltValueToStringHelper, A.JsonObject, A.FullType, A.BigIntSerializer, A.BoolSerializer, A.BuiltJsonSerializers, A.BuiltJsonSerializersBuilder, A.BuiltListMultimapSerializer, A.BuiltListSerializer, A.BuiltMapSerializer, A.BuiltSetMultimapSerializer, A.BuiltSetSerializer, A.DateTimeSerializer, A.DoubleSerializer, A.DurationSerializer, A.Int32Serializer, A.Int64Serializer, A.IntSerializer, A.JsonObjectSerializer, A.NullSerializer, A.NumSerializer, A.RegExpSerializer, A.StringSerializer, A.Uint8ListSerializer, A.UriSerializer, A.CanonicalizedMap, A.DefaultEquality, A.IterableEquality, A.ListEquality, A._UnorderedEquality, A._MapEntry, A.MapEquality, A.DeepCollectionEquality, A._QueueList_Object_ListMixin, A.BuildResult, A._$BuildStatusSerializer, A._$BuildResultSerializer, A.BuildResultBuilder, A.ConnectRequest, A._$ConnectRequestSerializer, A.ConnectRequestBuilder, A.DebugEvent, A.BatchedDebugEvents, A._$DebugEventSerializer, A._$BatchedDebugEventsSerializer, A.DebugEventBuilder, A.BatchedDebugEventsBuilder, A.DebugInfo, A._$DebugInfoSerializer, A.DebugInfoBuilder, A.DevToolsRequest, A.DevToolsResponse, A._$DevToolsRequestSerializer, A._$DevToolsResponseSerializer, A.DevToolsRequestBuilder, A.DevToolsResponseBuilder, A.ErrorResponse, A._$ErrorResponseSerializer, A.ErrorResponseBuilder, A.ExtensionRequest, A.ExtensionResponse, A.ExtensionEvent, A.BatchedEvents, A._$ExtensionRequestSerializer, A._$ExtensionResponseSerializer, A._$ExtensionEventSerializer, A._$BatchedEventsSerializer, A.ExtensionRequestBuilder, A.ExtensionResponseBuilder, A.ExtensionEventBuilder, A.BatchedEventsBuilder, A.HotReloadRequest, A._$HotReloadRequestSerializer, A.HotReloadRequestBuilder, A.HotReloadResponse, A._$HotReloadResponseSerializer, A.HotReloadResponseBuilder, A.IsolateExit, A.IsolateStart, A._$IsolateExitSerializer, A._$IsolateStartSerializer, A.IsolateExitBuilder, A.IsolateStartBuilder, A.RegisterEvent, A._$RegisterEventSerializer, A.RegisterEventBuilder, A.RunRequest, A._$RunRequestSerializer, A.BatchedStreamController, A.SocketClient, A.Int32, A.Int64, A._StackState, A.BaseClient, A.BaseRequest, A.BaseResponse, A.ClientException, A.MediaType, A.Level, A.LogRecord, A.Logger, A.Context, A.Style, A.ParsedPath, A.PathException, A.Pool, A.PoolResource, A.SourceFile, A.SourceLocationMixin, A.SourceSpanMixin, A.Highlighter, A._Highlight, A._Line, A.SourceLocation, A.SourceSpanException, A.StreamChannelMixin, A._GuaranteeSink, A.StreamChannelController, A.StringScanner, A.RNG, A.UuidV1, A.EventStreamProvider, A._EventStreamSubscription, A.BrowserWebSocket, A.WebSocketEvent, A.WebSocketException, A.WebSocketChannelException, A.DdcLibraryBundleRestarter, A.DdcRestarter, A.ReloadingManager, A.HotReloadFailedException, A.RequireRestarter]); + _inheritMany(A.Object, [A.JS_CONST, J.Interceptor, A.SafeToStringHook, J.ArrayIterator, A.Iterable, A.CastIterator, A.Closure, A.MapBase, A.Error, A.ListBase, A.SentinelValue, A.ListIterator, A.MappedIterator, A.WhereIterator, A.ExpandIterator, A.TakeIterator, A.SkipIterator, A.EmptyIterator, A.WhereTypeIterator, A.FixedLengthListMixin, A.UnmodifiableListMixin, A.ConstantMap, A._KeysOrValuesOrElementsIterator, A.TypeErrorDecoder, A.NullThrownFromJavaScriptException, A.ExceptionAndStackTrace, A._StackTrace, A.LinkedHashMapCell, A.LinkedHashMapKeyIterator, A.LinkedHashMapValueIterator, A.LinkedHashMapEntryIterator, A._Record, A.JSSyntaxRegExp, A._MatchImplementation, A._AllMatchesIterator, A.StringMatch, A._StringAllMatchesIterator, A._Cell, A.Rti, A._FunctionParameters, A._Type, A._TimerImpl, A._AsyncAwaitCompleter, A.AsyncError, A.TimeoutException, A._Completer, A._FutureListener, A._Future, A._AsyncCallbackEntry, A.Stream, A._StreamController, A._SyncStreamControllerDispatch, A._AsyncStreamControllerDispatch, A._BufferingStreamSubscription, A._StreamSinkWrapper, A._DelayedEvent, A._DelayedDone, A._PendingEvents, A._DoneStreamSubscription, A._StreamIterator, A._ZoneFunction, A._ZoneSpecification, A._ZoneDelegate, A._Zone, A._HashMapKeyIterator, A.SetBase, A._HashSetIterator, A._LinkedHashSetCell, A._LinkedHashSetIterator, A._UnmodifiableMapMixin, A.MapView, A._ListQueueIterator, A._SplayTreeNode, A._SplayTree, A._SplayTreeIterator, A.Codec, A.Converter, A._Base64Encoder, A._Base64Decoder, A.ByteConversionSink, A._JsonStringifier, A._Utf8Encoder, A._Utf8Decoder, A._BigIntImpl, A.DateTime, A.Duration, A.OutOfMemoryError, A.StackOverflowError, A._Exception, A.FormatException, A.IntegerDivisionByZeroException, A.MapEntry, A.Null, A._StringStackTrace, A.StringBuffer, A._Uri, A.UriData, A._SimpleUri, A.NullRejectionException, A._JSRandom, A.AsyncMemoizer, A.DelegatingStreamSink, A.ErrorResult, A.ValueResult, A.StreamQueue, A._NextRequest, A._HasNextRequest, A.BuiltList, A.ListBuilder, A.BuiltListMultimap, A.ListMultimapBuilder, A.BuiltMap, A.MapBuilder, A.BuiltSet, A.SetBuilder, A.BuiltSetMultimap, A.SetMultimapBuilder, A.EnumClass, A.IndentingBuiltValueToStringHelper, A.JsonObject, A.FullType, A.BigIntSerializer, A.BoolSerializer, A.BuiltJsonSerializers, A.BuiltJsonSerializersBuilder, A.BuiltListMultimapSerializer, A.BuiltListSerializer, A.BuiltMapSerializer, A.BuiltSetMultimapSerializer, A.BuiltSetSerializer, A.DateTimeSerializer, A.DoubleSerializer, A.DurationSerializer, A.Int32Serializer, A.Int64Serializer, A.IntSerializer, A.JsonObjectSerializer, A.NullSerializer, A.NumSerializer, A.RegExpSerializer, A.StringSerializer, A.Uint8ListSerializer, A.UriSerializer, A.CanonicalizedMap, A.DefaultEquality, A.IterableEquality, A.ListEquality, A._UnorderedEquality, A._MapEntry, A.MapEquality, A.DeepCollectionEquality, A._QueueList_Object_ListMixin, A.BuildResult, A._$BuildStatusSerializer, A._$BuildResultSerializer, A.BuildResultBuilder, A.ConnectRequest, A._$ConnectRequestSerializer, A.ConnectRequestBuilder, A.DebugEvent, A.BatchedDebugEvents, A._$DebugEventSerializer, A._$BatchedDebugEventsSerializer, A.DebugEventBuilder, A.BatchedDebugEventsBuilder, A.DebugInfo, A._$DebugInfoSerializer, A.DebugInfoBuilder, A.DevToolsRequest, A.DevToolsResponse, A._$DevToolsRequestSerializer, A._$DevToolsResponseSerializer, A.DevToolsRequestBuilder, A.DevToolsResponseBuilder, A.ErrorResponse, A._$ErrorResponseSerializer, A.ErrorResponseBuilder, A.ExtensionRequest, A.ExtensionResponse, A.ExtensionEvent, A.BatchedEvents, A._$ExtensionRequestSerializer, A._$ExtensionResponseSerializer, A._$ExtensionEventSerializer, A._$BatchedEventsSerializer, A.ExtensionRequestBuilder, A.ExtensionResponseBuilder, A.ExtensionEventBuilder, A.BatchedEventsBuilder, A.HotReloadRequest, A._$HotReloadRequestSerializer, A.HotReloadRequestBuilder, A.HotReloadResponse, A._$HotReloadResponseSerializer, A.HotReloadResponseBuilder, A.IsolateExit, A.IsolateStart, A._$IsolateExitSerializer, A._$IsolateStartSerializer, A.IsolateExitBuilder, A.IsolateStartBuilder, A.RegisterEvent, A._$RegisterEventSerializer, A.RegisterEventBuilder, A.RunRequest, A._$RunRequestSerializer, A.BatchedStreamController, A.SocketClient, A.Int32, A.Int64, A._StackState, A.BaseClient, A.BaseRequest, A.BaseResponse, A.ClientException, A.MediaType, A.Level, A.LogRecord, A.Logger, A.Context, A.Style, A.ParsedPath, A.PathException, A.Pool, A.PoolResource, A.SourceFile, A.SourceLocationMixin, A.SourceSpanMixin, A.Highlighter, A._Highlight, A._Line, A.SourceLocation, A.SourceSpanException, A.StreamChannelMixin, A._GuaranteeSink, A.StreamChannelController, A.StringScanner, A.RNG, A.UuidV1, A.EventStreamProvider, A._EventStreamSubscription, A.BrowserWebSocket, A.WebSocketEvent, A.WebSocketException, A.WebSocketChannelException, A.DdcLibraryBundleRestarter, A.DdcRestarter, A.ReloadingManager, A.HotReloadFailedException, A.RequireRestarter]); _inheritMany(J.Interceptor, [J.JSBool, J.JSNull, J.JavaScriptObject, J.JavaScriptBigInt, J.JavaScriptSymbol, J.JSNumber, J.JSString]); _inheritMany(J.JavaScriptObject, [J.LegacyJavaScriptObject, J.JSArray, A.NativeByteBuffer, A.NativeTypedData]); _inheritMany(J.LegacyJavaScriptObject, [J.PlainJavaScriptObject, J.UnknownJavaScriptObject, J.JavaScriptFunction]); @@ -27931,21 +27856,19 @@ _inheritMany(A._CastIterableBase, [A.CastIterable, A.__CastListBase__CastIterableBase_ListMixin]); _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._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.CanonicalizedMap_keys_closure, A.WebSocketClient_stream_closure, A.BaseRequest_closure0, A.BrowserClient_send_closure, A.BrowserClient_send_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.generateUuidV4_generateBits, 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.main__closure10, A._launchCommunicationWithDebugExtension_closure, A._handleAuthRequest_closure, A._sendResponse_closure, A.DdcLibraryBundleRestarter_restart_closure, A.DdcRestarter_restart_closure0, A.DdcRestarter_restart_closure, A.RequireRestarter__reloadModule_closure0, A.JSArrayExtension_toDartIterable_closure]); + _inheritMany(A.Closure, [A.Closure2Args, A.Closure0Args, A.Instantiation, A.TearOffClosure, A.initHooks_closure, A.initHooks_closure1, A._AsyncRun__initializeScheduleImmediate_internalCallback, A._AsyncRun__initializeScheduleImmediate_closure, A._awaitOnObject_closure, A._Future__propagateToListeners_handleWhenCompleteCallback_closure, A._Future_timeout_closure0, A.Stream_length_closure, A.Stream_first_closure0, A._CustomZone_bindUnaryCallback_closure, A._CustomZone_bindUnaryCallbackGuarded_closure, A._RootZone_bindUnaryCallback_closure, A._RootZone_bindUnaryCallbackGuarded_closure, A.runZonedGuarded_closure, A._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.CanonicalizedMap_keys_closure, A.WebSocketClient_stream_closure, A.BaseRequest_closure0, A.BrowserClient_send_closure, A.BrowserClient_send_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.generateUuidV4_generateBits, 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.main__closure10, A._launchCommunicationWithDebugExtension_closure, A._handleAuthRequest_closure, A._sendResponse_closure, A.DdcLibraryBundleRestarter_restart_closure, A.DdcLibraryBundleRestarter_hotReloadStart_closure0, 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._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.generateUuidV4_printDigits, A.generateUuidV4_bitsDigits, 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]); _inherit(A.UnmodifiableListBase, A.ListBase); _inheritMany(A.UnmodifiableListBase, [A.CodeUnits, A.UnmodifiableListView]); - _inheritMany(A.Closure0Args, [A.nullFuture_closure, A._AsyncRun__scheduleImmediateJsOverride_internalCallback, A._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, A._TimerImpl_internalCallback, A._TimerImpl$periodic_closure, A.Future_Future$microtask_closure, A._Future__addListener_closure, A._Future__prependListeners_closure, A._Future__chainCoreFuture_closure, A._Future__asyncCompleteWithValue_closure, A._Future__asyncCompleteErrorObject_closure, A._Future__propagateToListeners_handleWhenCompleteCallback, A._Future__propagateToListeners_handleValueCallback, A._Future__propagateToListeners_handleError, A._Future_timeout_closure, A.Stream_length_closure0, A.Stream_first_closure, A._StreamController__subscribe_closure, A._StreamController__recordCancel_complete, A._BufferingStreamSubscription_asFuture_closure, A._BufferingStreamSubscription_asFuture__closure, A._BufferingStreamSubscription__sendError_sendError, A._BufferingStreamSubscription__sendDone_sendDone, A._PendingEvents_schedule_closure, A._cancelAndValue_closure, A._CustomZone_bindCallback_closure, A._CustomZone_bindCallbackGuarded_closure, A._rootHandleError_closure, A._RootZone_bindCallback_closure, A._RootZone_bindCallbackGuarded_closure, A._Utf8Decoder__decoder_closure, A._Utf8Decoder__decoderNonfatal_closure, A.StreamQueue__ensureListening_closure0, A.Serializers_Serializers_closure, A.Serializers_Serializers_closure0, A.Serializers_Serializers_closure1, A.Serializers_Serializers_closure2, A.Serializers_Serializers_closure3, A._$serializers_closure, A._$serializers_closure0, A.BatchedStreamController__hasEventOrTimeOut_closure, A.BatchedStreamController__hasEventDuring_closure, A.MediaType_MediaType$parse_closure, A.Logger_Logger_closure, A.Highlighter_closure, A.Highlighter__writeFileStart_closure, A.Highlighter__writeMultilineHighlights_closure, A.Highlighter__writeMultilineHighlights_closure0, A.Highlighter__writeMultilineHighlights_closure1, A.Highlighter__writeMultilineHighlights_closure2, A.Highlighter__writeMultilineHighlights__closure, A.Highlighter__writeMultilineHighlights__closure0, A.Highlighter__writeHighlightedText_closure, A.Highlighter__writeIndicator_closure, A.Highlighter__writeIndicator_closure0, A.Highlighter__writeIndicator_closure1, A.Highlighter__writeSidebar_closure, A._Highlight_closure, A.SseClient_closure, A.SseClient__closure, A.SseClient__onOutgoingMessage_closure, A.GuaranteeChannel_closure, A.GuaranteeChannel__closure, A.AdapterWebSocketChannel__closure1, A.main_closure, A.main__closure, A.main__closure0, A.main__closure2, A.main__closure6, A.DdcLibraryBundleRestarter_fetchLibrariesForHotReload_closure, A.RequireRestarter__reload_closure, A.RequireRestarter__reloadModule_closure, A._createScript_closure, A._createScript__closure, A._createScript__closure0, A.runMain_closure]); + _inheritMany(A.Closure0Args, [A.nullFuture_closure, A._AsyncRun__scheduleImmediateJsOverride_internalCallback, A._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, A._TimerImpl_internalCallback, A._TimerImpl$periodic_closure, A.Future_Future$microtask_closure, A._Future__addListener_closure, A._Future__prependListeners_closure, A._Future__chainCoreFuture_closure, A._Future__asyncCompleteWithValue_closure, A._Future__asyncCompleteErrorObject_closure, A._Future__propagateToListeners_handleWhenCompleteCallback, A._Future__propagateToListeners_handleValueCallback, A._Future__propagateToListeners_handleError, A._Future_timeout_closure, A.Stream_length_closure0, A.Stream_first_closure, A._StreamController__subscribe_closure, A._StreamController__recordCancel_complete, A._BufferingStreamSubscription_asFuture_closure, A._BufferingStreamSubscription_asFuture__closure, A._BufferingStreamSubscription__sendError_sendError, A._BufferingStreamSubscription__sendDone_sendDone, A._PendingEvents_schedule_closure, A._cancelAndValue_closure, A._CustomZone_bindCallback_closure, A._CustomZone_bindCallbackGuarded_closure, A._rootHandleError_closure, A._RootZone_bindCallback_closure, A._RootZone_bindCallbackGuarded_closure, A._Utf8Decoder__decoder_closure, A._Utf8Decoder__decoderNonfatal_closure, A.StreamQueue__ensureListening_closure0, A.Serializers_Serializers_closure, A.Serializers_Serializers_closure0, A.Serializers_Serializers_closure1, A.Serializers_Serializers_closure2, A.Serializers_Serializers_closure3, A._$serializers_closure, A._$serializers_closure0, A.BatchedStreamController__hasEventOrTimeOut_closure, A.BatchedStreamController__hasEventDuring_closure, A.MediaType_MediaType$parse_closure, A.Logger_Logger_closure, A.Highlighter_closure, A.Highlighter__writeFileStart_closure, A.Highlighter__writeMultilineHighlights_closure, A.Highlighter__writeMultilineHighlights_closure0, A.Highlighter__writeMultilineHighlights_closure1, A.Highlighter__writeMultilineHighlights_closure2, A.Highlighter__writeMultilineHighlights__closure, A.Highlighter__writeMultilineHighlights__closure0, A.Highlighter__writeHighlightedText_closure, A.Highlighter__writeIndicator_closure, A.Highlighter__writeIndicator_closure0, A.Highlighter__writeIndicator_closure1, A.Highlighter__writeSidebar_closure, A._Highlight_closure, A.SseClient_closure, A.SseClient__closure, A.SseClient__onOutgoingMessage_closure, A.GuaranteeChannel_closure, A.GuaranteeChannel__closure, A.AdapterWebSocketChannel__closure1, A.main_closure, A.main__closure, A.main__closure0, A.main__closure2, A.main__closure6, A.DdcLibraryBundleRestarter_hotReloadStart_closure, A.RequireRestarter__reload_closure, A.RequireRestarter__reloadModule_closure, A._createScript_closure, A._createScript__closure, A._createScript__closure0, A.runMain_closure]); _inheritMany(A.EfficientLengthIterable, [A.ListIterable, A.EmptyIterable, A.LinkedHashMapKeysIterable, A.LinkedHashMapValuesIterable, A.LinkedHashMapEntriesIterable, A._HashMapKeyIterable]); _inheritMany(A.ListIterable, [A.SubListIterable, A.MappedListIterable, A.ReversedListIterable, A.ListQueue, A._JsonMapKeyIterable]); _inherit(A.EfficientLengthMappedIterable, A.MappedIterable); _inherit(A.EfficientLengthTakeIterable, A.TakeIterable); _inherit(A.EfficientLengthSkipIterable, A.SkipIterable); - _inherit(A._Record2, A._Record); - _inherit(A._Record_2_libraries_sources, A._Record2); _inherit(A.ConstantStringMap, A.ConstantMap); _inherit(A.Instantiation1, A.Instantiation); _inherit(A.NullError, A.TypeError); @@ -28053,15 +27976,13 @@ 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"}, mangledNames: {}, - types: ["~()", "Null()", "~(JSObject)", "Object?(@)", "@(@)", "Null(Object,StackTrace)", "Null(@)", "~(@)", "Null(JSObject)", "~(Object?)", "JSObject()", "Object?(Object?)", "bool(Object?)", "String(String)", "~(Object,StackTrace)", "bool(_Highlight)", "~(~())", "int(Object?)", "bool(Object?,Object?)", "Future<~>()", "String(int,int)", "~(@,StackTrace)", "int()", "~(@,@)", "~(Object?,Object?)", "@()", "int(int,int)", "int(int)", "int(@,@)", "Null(JavaScriptFunction,JavaScriptFunction)", "bool(String)", "String(Match)", "~(Object[StackTrace?])", "bool()", "MapBuilder()", "SetBuilder()", "ListMultimapBuilder()", "~(int,@)", "ListBuilder()", "IndentingBuiltValueToStringHelper(String)", "ListBuilder()", "ListBuilder()", "int(int,@)", "String(@)", "bool(String,String)", "int(String)", "Object?(~)", "~(List)", "MediaType()", "~(String,String)", "JSObject(Object,StackTrace)", "Logger()", "Null(@,StackTrace)", "~(String,int?)", "String?()", "int(_Line)", "~(String,int)", "Object(_Line)", "Object(_Highlight)", "int(_Highlight,_Highlight)", "List<_Line>(MapEntry>)", "Null(~())", "SourceSpanWithContext()", "~(Zone,ZoneDelegate,Zone,Object,StackTrace)", "~(String?)", "Future()", "@(@,String)", "Null(WebSocket)", "~(WebSocketEvent)", "Null(Object)", "HotReloadResponse([~(HotReloadResponseBuilder)])", "JSObject(String[bool?])", "~(List)", "ListBuilder(BatchedDebugEventsBuilder)", "Null(String,String)", "DebugEventBuilder(DebugEventBuilder)", "Null(String)", "RegisterEventBuilder(RegisterEventBuilder)", "DevToolsRequestBuilder(DevToolsRequestBuilder)", "Future<~>(String)", "ConnectRequestBuilder(ConnectRequestBuilder)", "DebugInfoBuilder(DebugInfoBuilder)", "~(bool)", "Null(JavaScriptFunction)", "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^)", "String(String?)"], + types: ["~()", "Null()", "~(JSObject)", "Object?(@)", "@(@)", "Null(Object,StackTrace)", "Null(@)", "~(@)", "Null(JSObject)", "~(Object?)", "JSObject()", "Object?(Object?)", "bool(Object?)", "String(String)", "~(Object,StackTrace)", "bool(_Highlight)", "~(~())", "int(Object?)", "bool(Object?,Object?)", "Future<~>()", "Null(JavaScriptFunction)", "~(@,StackTrace)", "String(int,int)", "~(@,@)", "~(Object?,Object?)", "@()", "int(int,int)", "int(int)", "int()", "Null(JavaScriptFunction,JavaScriptFunction)", "int(@,@)", "bool(String)", "String(Match)", "~(Object[StackTrace?])", "bool()", "SetBuilder()", "MapBuilder()", "~(int,@)", "ListMultimapBuilder()", "ListBuilder()", "ListBuilder()", "ListBuilder()", "IndentingBuiltValueToStringHelper(String)", "String(@)", "bool(String,String)", "int(String)", "int(int,@)", "~(List)", "MediaType()", "~(String,String)", "Object?(~)", "Logger()", "JSObject(Object,StackTrace)", "Null(@,StackTrace)", "String?()", "int(_Line)", "~(String,int?)", "Object(_Line)", "Object(_Highlight)", "int(_Highlight,_Highlight)", "List<_Line>(MapEntry>)", "~(String,int)", "SourceSpanWithContext()", "Null(~())", "~(String?)", "Future()", "~(Zone,ZoneDelegate,Zone,Object,StackTrace)", "Null(WebSocket)", "~(WebSocketEvent)", "Null(Object)", "HotReloadResponse([~(HotReloadResponseBuilder)])", "JSObject(String[bool?])", "~(List)", "ListBuilder(BatchedDebugEventsBuilder)", "Null(String,String)", "DebugEventBuilder(DebugEventBuilder)", "Null(String)", "RegisterEventBuilder(RegisterEventBuilder)", "DevToolsRequestBuilder(DevToolsRequestBuilder)", "Future<~>(String)", "ConnectRequestBuilder(ConnectRequestBuilder)", "DebugInfoBuilder(DebugInfoBuilder)", "~(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^)", "String(String?)"], interceptorsByTag: null, leafTags: null, arrayRti: Symbol("$ti"), - rttc: { - "2;libraries,sources": (t1, t2) => o => o instanceof A._Record_2_libraries_sources && t1._is(o._0) && t2._is(o._1) - } + rttc: {} }; - A._Universe_addRules(init.typeUniverse, JSON.parse('{"JavaScriptFunction":"LegacyJavaScriptObject","PlainJavaScriptObject":"LegacyJavaScriptObject","UnknownJavaScriptObject":"LegacyJavaScriptObject","JavaScriptObject":{"JSObject":[]},"JSArray":{"List":["1"],"JavaScriptObject":[],"EfficientLengthIterable":["1"],"JSObject":[],"Iterable":["1"],"JSIndexable":["1"],"Iterable.E":"1"},"JSBool":{"bool":[],"TrustedGetRuntimeType":[]},"JSNull":{"Null":[],"TrustedGetRuntimeType":[]},"LegacyJavaScriptObject":{"JavaScriptObject":[],"JSObject":[]},"JSArraySafeToStringHook":{"SafeToStringHook":[]},"JSUnmodifiableArray":{"JSArray":["1"],"List":["1"],"JavaScriptObject":[],"EfficientLengthIterable":["1"],"JSObject":[],"Iterable":["1"],"JSIndexable":["1"],"Iterable.E":"1"},"ArrayIterator":{"Iterator":["1"]},"JSNumber":{"double":[],"num":[],"Comparable":["num"]},"JSInt":{"double":[],"int":[],"num":[],"Comparable":["num"],"TrustedGetRuntimeType":[]},"JSNumNotInt":{"double":[],"num":[],"Comparable":["num"],"TrustedGetRuntimeType":[]},"JSString":{"String":[],"Comparable":["String"],"Pattern":[],"JSIndexable":["@"],"TrustedGetRuntimeType":[]},"_CastIterableBase":{"Iterable":["2"]},"CastIterator":{"Iterator":["2"]},"CastIterable":{"_CastIterableBase":["1","2"],"Iterable":["2"],"Iterable.E":"2"},"_EfficientLengthCastIterable":{"CastIterable":["1","2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2"},"_CastListBase":{"ListBase":["2"],"List":["2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"]},"CastList":{"_CastListBase":["1","2"],"ListBase":["2"],"List":["2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"ListBase.E":"2","Iterable.E":"2"},"CastMap":{"MapBase":["3","4"],"Map":["3","4"],"MapBase.K":"3","MapBase.V":"4"},"LateError":{"Error":[]},"CodeUnits":{"ListBase":["int"],"UnmodifiableListMixin":["int"],"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"],"ListBase.E":"int","Iterable.E":"int","UnmodifiableListMixin.E":"int"},"EfficientLengthIterable":{"Iterable":["1"]},"ListIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"SubListIterable":{"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"ListIterator":{"Iterator":["1"]},"MappedIterable":{"Iterable":["2"],"Iterable.E":"2"},"EfficientLengthMappedIterable":{"MappedIterable":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2"},"MappedIterator":{"Iterator":["2"]},"MappedListIterable":{"ListIterable":["2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"ListIterable.E":"2","Iterable.E":"2"},"WhereIterable":{"Iterable":["1"],"Iterable.E":"1"},"WhereIterator":{"Iterator":["1"]},"ExpandIterable":{"Iterable":["2"],"Iterable.E":"2"},"ExpandIterator":{"Iterator":["2"]},"TakeIterable":{"Iterable":["1"],"Iterable.E":"1"},"EfficientLengthTakeIterable":{"TakeIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"TakeIterator":{"Iterator":["1"]},"SkipIterable":{"Iterable":["1"],"Iterable.E":"1"},"EfficientLengthSkipIterable":{"SkipIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"SkipIterator":{"Iterator":["1"]},"EmptyIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"EmptyIterator":{"Iterator":["1"]},"WhereTypeIterable":{"Iterable":["1"],"Iterable.E":"1"},"WhereTypeIterator":{"Iterator":["1"]},"UnmodifiableListBase":{"ListBase":["1"],"UnmodifiableListMixin":["1"],"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"ReversedListIterable":{"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"_Record_2_libraries_sources":{"_Record2":[],"_Record":[]},"ConstantMap":{"Map":["1","2"]},"ConstantStringMap":{"ConstantMap":["1","2"],"Map":["1","2"]},"_KeysOrValues":{"Iterable":["1"],"Iterable.E":"1"},"_KeysOrValuesOrElementsIterator":{"Iterator":["1"]},"Instantiation":{"Closure":[],"Function":[]},"Instantiation1":{"Closure":[],"Function":[]},"NullError":{"TypeError":[],"Error":[]},"JsNoSuchMethodError":{"Error":[]},"UnknownJsTypeError":{"Error":[]},"NullThrownFromJavaScriptException":{"Exception":[]},"_StackTrace":{"StackTrace":[]},"Closure":{"Function":[]},"Closure0Args":{"Closure":[],"Function":[]},"Closure2Args":{"Closure":[],"Function":[]},"TearOffClosure":{"Closure":[],"Function":[]},"StaticClosure":{"Closure":[],"Function":[]},"BoundClosure":{"Closure":[],"Function":[]},"RuntimeError":{"Error":[]},"JsLinkedHashMap":{"MapBase":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"LinkedHashMapKeysIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"LinkedHashMapKeyIterator":{"Iterator":["1"]},"LinkedHashMapValuesIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"LinkedHashMapValueIterator":{"Iterator":["1"]},"LinkedHashMapEntriesIterable":{"EfficientLengthIterable":["MapEntry<1,2>"],"Iterable":["MapEntry<1,2>"],"Iterable.E":"MapEntry<1,2>"},"LinkedHashMapEntryIterator":{"Iterator":["MapEntry<1,2>"]},"JsIdentityLinkedHashMap":{"JsLinkedHashMap":["1","2"],"MapBase":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_Record2":{"_Record":[]},"JSSyntaxRegExp":{"RegExp":[],"Pattern":[]},"_MatchImplementation":{"RegExpMatch":[],"Match":[]},"_AllMatchesIterable":{"Iterable":["RegExpMatch"],"Iterable.E":"RegExpMatch"},"_AllMatchesIterator":{"Iterator":["RegExpMatch"]},"StringMatch":{"Match":[]},"_StringAllMatchesIterable":{"Iterable":["Match"],"Iterable.E":"Match"},"_StringAllMatchesIterator":{"Iterator":["Match"]},"NativeByteBuffer":{"JavaScriptObject":[],"JSObject":[],"ByteBuffer":[],"TrustedGetRuntimeType":[]},"NativeTypedData":{"JavaScriptObject":[],"JSObject":[]},"NativeByteData":{"JavaScriptObject":[],"ByteData":[],"JSObject":[],"TrustedGetRuntimeType":[]},"NativeTypedArray":{"JavaScriptIndexingBehavior":["1"],"JavaScriptObject":[],"JSObject":[],"JSIndexable":["1"]},"NativeTypedArrayOfDouble":{"ListBase":["double"],"NativeTypedArray":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"JavaScriptObject":[],"EfficientLengthIterable":["double"],"JSObject":[],"JSIndexable":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"]},"NativeTypedArrayOfInt":{"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"]},"NativeFloat32List":{"Float32List":[],"ListBase":["double"],"NativeTypedArray":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"JavaScriptObject":[],"EfficientLengthIterable":["double"],"JSObject":[],"JSIndexable":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"TrustedGetRuntimeType":[],"ListBase.E":"double","Iterable.E":"double","FixedLengthListMixin.E":"double"},"NativeFloat64List":{"Float64List":[],"ListBase":["double"],"NativeTypedArray":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"JavaScriptObject":[],"EfficientLengthIterable":["double"],"JSObject":[],"JSIndexable":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"TrustedGetRuntimeType":[],"ListBase.E":"double","Iterable.E":"double","FixedLengthListMixin.E":"double"},"NativeInt16List":{"NativeTypedArrayOfInt":[],"Int16List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeInt32List":{"NativeTypedArrayOfInt":[],"Int32List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeInt8List":{"NativeTypedArrayOfInt":[],"Int8List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeUint16List":{"NativeTypedArrayOfInt":[],"Uint16List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeUint32List":{"NativeTypedArrayOfInt":[],"Uint32List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeUint8ClampedList":{"NativeTypedArrayOfInt":[],"Uint8ClampedList":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeUint8List":{"NativeTypedArrayOfInt":[],"Uint8List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"_Type":{"Type":[]},"_Error":{"Error":[]},"_TypeError":{"TypeError":[],"Error":[]},"AsyncError":{"Error":[]},"_TimerImpl":{"Timer":[]},"_AsyncAwaitCompleter":{"Completer":["1"]},"_Completer":{"Completer":["1"]},"_AsyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_SyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_Future":{"Future":["1"]},"StreamView":{"Stream":["1"]},"_StreamController":{"StreamController":["1"],"StreamSink":["1"],"_StreamControllerLifecycle":["1"],"_EventSink":["1"],"_EventDispatch":["1"]},"_AsyncStreamController":{"_AsyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"StreamSink":["1"],"_StreamControllerLifecycle":["1"],"_EventSink":["1"],"_EventDispatch":["1"]},"_SyncStreamController":{"_SyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"StreamSink":["1"],"_StreamControllerLifecycle":["1"],"_EventSink":["1"],"_EventDispatch":["1"]},"_ControllerStream":{"_StreamImpl":["1"],"Stream":["1"],"Stream.T":"1"},"_ControllerSubscription":{"_BufferingStreamSubscription":["1"],"StreamSubscription":["1"],"_EventSink":["1"],"_EventDispatch":["1"],"_BufferingStreamSubscription.T":"1"},"_StreamSinkWrapper":{"StreamSink":["1"]},"_BufferingStreamSubscription":{"StreamSubscription":["1"],"_EventSink":["1"],"_EventDispatch":["1"],"_BufferingStreamSubscription.T":"1"},"_StreamImpl":{"Stream":["1"]},"_DelayedData":{"_DelayedEvent":["1"]},"_DelayedError":{"_DelayedEvent":["@"]},"_DelayedDone":{"_DelayedEvent":["@"]},"_DoneStreamSubscription":{"StreamSubscription":["1"]},"_EmptyStream":{"Stream":["1"],"Stream.T":"1"},"_ForwardingStream":{"Stream":["2"]},"_ForwardingStreamSubscription":{"_BufferingStreamSubscription":["2"],"StreamSubscription":["2"],"_EventSink":["2"],"_EventDispatch":["2"],"_BufferingStreamSubscription.T":"2"},"_MapStream":{"_ForwardingStream":["1","2"],"Stream":["2"],"Stream.T":"2"},"_ZoneSpecification":{"ZoneSpecification":[]},"_ZoneDelegate":{"ZoneDelegate":[]},"_Zone":{"Zone":[]},"_CustomZone":{"_Zone":[],"Zone":[]},"_RootZone":{"_Zone":[],"Zone":[]},"_SplayTreeSetNode":{"_SplayTreeNode":["1","_SplayTreeSetNode<1>"],"_SplayTreeNode.K":"1","_SplayTreeNode.1":"_SplayTreeSetNode<1>"},"_HashMap":{"MapBase":["1","2"],"HashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_IdentityHashMap":{"_HashMap":["1","2"],"MapBase":["1","2"],"HashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_CustomHashMap":{"_HashMap":["1","2"],"MapBase":["1","2"],"HashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_HashMapKeyIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"_HashMapKeyIterator":{"Iterator":["1"]},"_LinkedCustomHashMap":{"JsLinkedHashMap":["1","2"],"MapBase":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_HashSet":{"_SetBase":["1"],"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"_HashSetIterator":{"Iterator":["1"]},"_LinkedHashSet":{"_SetBase":["1"],"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"_LinkedHashSetIterator":{"Iterator":["1"]},"UnmodifiableListView":{"ListBase":["1"],"UnmodifiableListMixin":["1"],"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListBase.E":"1","Iterable.E":"1","UnmodifiableListMixin.E":"1"},"ListBase":{"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"MapBase":{"Map":["1","2"]},"MapView":{"Map":["1","2"]},"UnmodifiableMapView":{"_UnmodifiableMapView_MapView__UnmodifiableMapMixin":["1","2"],"MapView":["1","2"],"_UnmodifiableMapMixin":["1","2"],"Map":["1","2"]},"ListQueue":{"Queue":["1"],"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"_ListQueueIterator":{"Iterator":["1"]},"SetBase":{"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"_SetBase":{"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"_SplayTreeIterator":{"Iterator":["3"]},"_SplayTreeKeyIterator":{"_SplayTreeIterator":["1","2","1"],"Iterator":["1"],"_SplayTreeIterator.K":"1","_SplayTreeIterator.T":"1","_SplayTreeIterator.1":"2"},"SplayTreeSet":{"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"_SplayTree":["1","_SplayTreeSetNode<1>"],"Iterable":["1"],"Iterable.E":"1","_SplayTree.1":"_SplayTreeSetNode<1>","_SplayTree.K":"1"},"Encoding":{"Codec":["String","List"]},"_JsonMap":{"MapBase":["String","@"],"Map":["String","@"],"MapBase.K":"String","MapBase.V":"@"},"_JsonMapKeyIterable":{"ListIterable":["String"],"EfficientLengthIterable":["String"],"Iterable":["String"],"ListIterable.E":"String","Iterable.E":"String"},"AsciiCodec":{"Encoding":[],"Codec":["String","List"],"Codec.S":"String"},"_UnicodeSubsetEncoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"AsciiEncoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"_UnicodeSubsetDecoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"AsciiDecoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"Base64Codec":{"Codec":["List","String"],"Codec.S":"List"},"Base64Encoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"Base64Decoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"Converter":{"StreamTransformer":["1","2"]},"JsonUnsupportedObjectError":{"Error":[]},"JsonCyclicError":{"Error":[]},"JsonCodec":{"Codec":["Object?","String"],"Codec.S":"Object?"},"JsonEncoder":{"Converter":["Object?","String"],"StreamTransformer":["Object?","String"]},"JsonDecoder":{"Converter":["String","Object?"],"StreamTransformer":["String","Object?"]},"Latin1Codec":{"Encoding":[],"Codec":["String","List"],"Codec.S":"String"},"Latin1Encoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"Latin1Decoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"Utf8Codec":{"Encoding":[],"Codec":["String","List"],"Codec.S":"String"},"Utf8Encoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"Utf8Decoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"BigInt":{"Comparable":["BigInt"]},"DateTime":{"Comparable":["DateTime"]},"double":{"num":[],"Comparable":["num"]},"Duration":{"Comparable":["Duration"]},"int":{"num":[],"Comparable":["num"]},"List":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"num":{"Comparable":["num"]},"RegExp":{"Pattern":[]},"RegExpMatch":{"Match":[]},"Set":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"String":{"Comparable":["String"],"Pattern":[]},"_BigIntImpl":{"BigInt":[],"Comparable":["BigInt"]},"AssertionError":{"Error":[]},"TypeError":{"Error":[]},"ArgumentError":{"Error":[]},"RangeError":{"Error":[]},"IndexError":{"Error":[]},"UnsupportedError":{"Error":[]},"UnimplementedError":{"Error":[]},"StateError":{"Error":[]},"ConcurrentModificationError":{"Error":[]},"OutOfMemoryError":{"Error":[]},"StackOverflowError":{"Error":[]},"_Exception":{"Exception":[]},"FormatException":{"Exception":[]},"IntegerDivisionByZeroException":{"Exception":[],"Error":[]},"_StringStackTrace":{"StackTrace":[]},"StringBuffer":{"StringSink":[]},"_Uri":{"Uri":[]},"_SimpleUri":{"Uri":[]},"_DataUri":{"Uri":[]},"NullRejectionException":{"Exception":[]},"_JSRandom":{"Random":[]},"DelegatingStreamSink":{"StreamSink":["1"]},"ErrorResult":{"Result":["0&"]},"ValueResult":{"Result":["1"]},"_NextRequest":{"_EventRequest":["1"]},"_HasNextRequest":{"_EventRequest":["1"]},"BuiltList":{"Iterable":["1"]},"_BuiltList":{"BuiltList":["1"],"Iterable":["1"],"Iterable.E":"1"},"_BuiltListMultimap":{"BuiltListMultimap":["1","2"]},"_BuiltMap":{"BuiltMap":["1","2"]},"BuiltSet":{"Iterable":["1"]},"_BuiltSet":{"BuiltSet":["1"],"Iterable":["1"],"Iterable.E":"1"},"_BuiltSetMultimap":{"BuiltSetMultimap":["1","2"]},"BuiltValueNullFieldError":{"Error":[]},"BuiltValueNestedFieldError":{"Error":[]},"BoolJsonObject":{"JsonObject":[]},"ListJsonObject":{"JsonObject":[]},"MapJsonObject":{"JsonObject":[]},"NumJsonObject":{"JsonObject":[]},"StringJsonObject":{"JsonObject":[]},"DeserializationError":{"Error":[]},"BigIntSerializer":{"PrimitiveSerializer":["BigInt"],"Serializer":["BigInt"]},"BoolSerializer":{"PrimitiveSerializer":["bool"],"Serializer":["bool"]},"BuiltJsonSerializers":{"Serializers":[]},"BuiltListMultimapSerializer":{"StructuredSerializer":["BuiltListMultimap<@,@>"],"Serializer":["BuiltListMultimap<@,@>"]},"BuiltListSerializer":{"StructuredSerializer":["BuiltList<@>"],"Serializer":["BuiltList<@>"]},"BuiltMapSerializer":{"StructuredSerializer":["BuiltMap<@,@>"],"Serializer":["BuiltMap<@,@>"]},"BuiltSetMultimapSerializer":{"StructuredSerializer":["BuiltSetMultimap<@,@>"],"Serializer":["BuiltSetMultimap<@,@>"]},"BuiltSetSerializer":{"StructuredSerializer":["BuiltSet<@>"],"Serializer":["BuiltSet<@>"]},"DateTimeSerializer":{"PrimitiveSerializer":["DateTime"],"Serializer":["DateTime"]},"DoubleSerializer":{"PrimitiveSerializer":["double"],"Serializer":["double"]},"DurationSerializer":{"PrimitiveSerializer":["Duration"],"Serializer":["Duration"]},"Int32Serializer":{"PrimitiveSerializer":["Int32"],"Serializer":["Int32"]},"Int64Serializer":{"PrimitiveSerializer":["Int64"],"Serializer":["Int64"]},"IntSerializer":{"PrimitiveSerializer":["int"],"Serializer":["int"]},"JsonObjectSerializer":{"PrimitiveSerializer":["JsonObject"],"Serializer":["JsonObject"]},"NullSerializer":{"PrimitiveSerializer":["Null"],"Serializer":["Null"]},"NumSerializer":{"PrimitiveSerializer":["num"],"Serializer":["num"]},"RegExpSerializer":{"PrimitiveSerializer":["RegExp"],"Serializer":["RegExp"]},"StringSerializer":{"PrimitiveSerializer":["String"],"Serializer":["String"]},"Uint8ListSerializer":{"PrimitiveSerializer":["Uint8List"],"Serializer":["Uint8List"]},"UriSerializer":{"PrimitiveSerializer":["Uri"],"Serializer":["Uri"]},"CanonicalizedMap":{"Map":["2","3"]},"DefaultEquality":{"Equality":["1"]},"IterableEquality":{"Equality":["Iterable<1>"]},"ListEquality":{"Equality":["List<1>"]},"_UnorderedEquality":{"Equality":["2"]},"SetEquality":{"_UnorderedEquality":["1","Set<1>"],"Equality":["Set<1>"],"_UnorderedEquality.E":"1","_UnorderedEquality.T":"Set<1>"},"MapEquality":{"Equality":["Map<1,2>"]},"DeepCollectionEquality":{"Equality":["@"]},"QueueList":{"ListBase":["1"],"List":["1"],"Queue":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListBase.E":"1","QueueList.E":"1","Iterable.E":"1"},"_CastQueueList":{"QueueList":["2"],"ListBase":["2"],"List":["2"],"Queue":["2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"ListBase.E":"2","QueueList.E":"2","Iterable.E":"2"},"_$BuildStatusSerializer":{"PrimitiveSerializer":["BuildStatus"],"Serializer":["BuildStatus"]},"_$BuildResultSerializer":{"StructuredSerializer":["BuildResult"],"Serializer":["BuildResult"]},"_$BuildResult":{"BuildResult":[]},"_$ConnectRequestSerializer":{"StructuredSerializer":["ConnectRequest"],"Serializer":["ConnectRequest"]},"_$ConnectRequest":{"ConnectRequest":[]},"_$DebugEventSerializer":{"StructuredSerializer":["DebugEvent"],"Serializer":["DebugEvent"]},"_$BatchedDebugEventsSerializer":{"StructuredSerializer":["BatchedDebugEvents"],"Serializer":["BatchedDebugEvents"]},"_$DebugEvent":{"DebugEvent":[]},"_$BatchedDebugEvents":{"BatchedDebugEvents":[]},"_$DebugInfoSerializer":{"StructuredSerializer":["DebugInfo"],"Serializer":["DebugInfo"]},"_$DebugInfo":{"DebugInfo":[]},"_$DevToolsRequestSerializer":{"StructuredSerializer":["DevToolsRequest"],"Serializer":["DevToolsRequest"]},"_$DevToolsResponseSerializer":{"StructuredSerializer":["DevToolsResponse"],"Serializer":["DevToolsResponse"]},"_$DevToolsRequest":{"DevToolsRequest":[]},"_$DevToolsResponse":{"DevToolsResponse":[]},"_$ErrorResponseSerializer":{"StructuredSerializer":["ErrorResponse"],"Serializer":["ErrorResponse"]},"_$ErrorResponse":{"ErrorResponse":[]},"_$ExtensionRequestSerializer":{"StructuredSerializer":["ExtensionRequest"],"Serializer":["ExtensionRequest"]},"_$ExtensionResponseSerializer":{"StructuredSerializer":["ExtensionResponse"],"Serializer":["ExtensionResponse"]},"_$ExtensionEventSerializer":{"StructuredSerializer":["ExtensionEvent"],"Serializer":["ExtensionEvent"]},"_$BatchedEventsSerializer":{"StructuredSerializer":["BatchedEvents"],"Serializer":["BatchedEvents"]},"_$ExtensionRequest":{"ExtensionRequest":[]},"_$ExtensionResponse":{"ExtensionResponse":[]},"_$ExtensionEvent":{"ExtensionEvent":[]},"_$BatchedEvents":{"BatchedEvents":[]},"_$HotReloadRequestSerializer":{"StructuredSerializer":["HotReloadRequest"],"Serializer":["HotReloadRequest"]},"_$HotReloadRequest":{"HotReloadRequest":[]},"_$HotReloadResponseSerializer":{"StructuredSerializer":["HotReloadResponse"],"Serializer":["HotReloadResponse"]},"_$HotReloadResponse":{"HotReloadResponse":[]},"_$IsolateExitSerializer":{"StructuredSerializer":["IsolateExit"],"Serializer":["IsolateExit"]},"_$IsolateStartSerializer":{"StructuredSerializer":["IsolateStart"],"Serializer":["IsolateStart"]},"_$IsolateExit":{"IsolateExit":[]},"_$IsolateStart":{"IsolateStart":[]},"_$RegisterEventSerializer":{"StructuredSerializer":["RegisterEvent"],"Serializer":["RegisterEvent"]},"_$RegisterEvent":{"RegisterEvent":[]},"_$RunRequestSerializer":{"StructuredSerializer":["RunRequest"],"Serializer":["RunRequest"]},"_$RunRequest":{"RunRequest":[]},"SseSocketClient":{"SocketClient":[]},"WebSocketClient":{"SocketClient":[]},"Int32":{"Comparable":["Object"]},"Int64":{"Comparable":["Object"]},"ByteStream":{"StreamView":["List"],"Stream":["List"],"Stream.T":"List","StreamView.T":"List"},"ClientException":{"Exception":[]},"Request":{"BaseRequest":[]},"StreamedResponseV2":{"StreamedResponse":[]},"CaseInsensitiveMap":{"CanonicalizedMap":["String","String","1"],"Map":["String","1"],"CanonicalizedMap.K":"String","CanonicalizedMap.V":"1","CanonicalizedMap.C":"String"},"Level":{"Comparable":["Level"]},"PathException":{"Exception":[]},"PosixStyle":{"InternalStyle":[]},"UrlStyle":{"InternalStyle":[]},"WindowsStyle":{"InternalStyle":[]},"FileLocation":{"SourceLocation":[],"Comparable":["SourceLocation"]},"_FileSpan":{"SourceSpanWithContext":[],"SourceSpan":[],"Comparable":["SourceSpan"]},"SourceLocation":{"Comparable":["SourceLocation"]},"SourceLocationMixin":{"SourceLocation":[],"Comparable":["SourceLocation"]},"SourceSpan":{"Comparable":["SourceSpan"]},"SourceSpanBase":{"SourceSpan":[],"Comparable":["SourceSpan"]},"SourceSpanException":{"Exception":[]},"SourceSpanFormatException":{"FormatException":[],"Exception":[]},"SourceSpanMixin":{"SourceSpan":[],"Comparable":["SourceSpan"]},"SourceSpanWithContext":{"SourceSpan":[],"Comparable":["SourceSpan"]},"SseClient":{"StreamChannel":["String?"]},"GuaranteeChannel":{"StreamChannel":["1"]},"_GuaranteeSink":{"StreamSink":["1"]},"StreamChannelMixin":{"StreamChannel":["1"]},"StringScannerException":{"FormatException":[],"Exception":[]},"_EventStream":{"Stream":["1"],"Stream.T":"1"},"_EventStreamSubscription":{"StreamSubscription":["1"]},"BrowserWebSocket":{"WebSocket":[]},"TextDataReceived":{"WebSocketEvent":[]},"BinaryDataReceived":{"WebSocketEvent":[]},"CloseReceived":{"WebSocketEvent":[]},"WebSocketException":{"Exception":[]},"WebSocketConnectionClosed":{"Exception":[]},"AdapterWebSocketChannel":{"WebSocketChannel":[],"StreamChannel":["@"]},"_WebSocketSink":{"WebSocketSink":[],"DelegatingStreamSink":["@"],"StreamSink":["@"],"DelegatingStreamSink.T":"@"},"WebSocketChannelException":{"Exception":[]},"DdcLibraryBundleRestarter":{"Restarter":[]},"DdcRestarter":{"Restarter":[]},"RequireRestarter":{"Restarter":[]},"HotReloadFailedException":{"Exception":[]},"Int8List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint8List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint8ClampedList":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Int16List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint16List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Int32List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint32List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Float32List":{"List":["double"],"EfficientLengthIterable":["double"],"Iterable":["double"]},"Float64List":{"List":["double"],"EfficientLengthIterable":["double"],"Iterable":["double"]}}')); + A._Universe_addRules(init.typeUniverse, JSON.parse('{"JavaScriptFunction":"LegacyJavaScriptObject","PlainJavaScriptObject":"LegacyJavaScriptObject","UnknownJavaScriptObject":"LegacyJavaScriptObject","JavaScriptObject":{"JSObject":[]},"JSArray":{"List":["1"],"JavaScriptObject":[],"EfficientLengthIterable":["1"],"JSObject":[],"Iterable":["1"],"JSIndexable":["1"],"Iterable.E":"1"},"JSBool":{"bool":[],"TrustedGetRuntimeType":[]},"JSNull":{"Null":[],"TrustedGetRuntimeType":[]},"LegacyJavaScriptObject":{"JavaScriptObject":[],"JSObject":[]},"JSArraySafeToStringHook":{"SafeToStringHook":[]},"JSUnmodifiableArray":{"JSArray":["1"],"List":["1"],"JavaScriptObject":[],"EfficientLengthIterable":["1"],"JSObject":[],"Iterable":["1"],"JSIndexable":["1"],"Iterable.E":"1"},"ArrayIterator":{"Iterator":["1"]},"JSNumber":{"double":[],"num":[],"Comparable":["num"]},"JSInt":{"double":[],"int":[],"num":[],"Comparable":["num"],"TrustedGetRuntimeType":[]},"JSNumNotInt":{"double":[],"num":[],"Comparable":["num"],"TrustedGetRuntimeType":[]},"JSString":{"String":[],"Comparable":["String"],"Pattern":[],"JSIndexable":["@"],"TrustedGetRuntimeType":[]},"_CastIterableBase":{"Iterable":["2"]},"CastIterator":{"Iterator":["2"]},"CastIterable":{"_CastIterableBase":["1","2"],"Iterable":["2"],"Iterable.E":"2"},"_EfficientLengthCastIterable":{"CastIterable":["1","2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2"},"_CastListBase":{"ListBase":["2"],"List":["2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"]},"CastList":{"_CastListBase":["1","2"],"ListBase":["2"],"List":["2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"ListBase.E":"2","Iterable.E":"2"},"CastMap":{"MapBase":["3","4"],"Map":["3","4"],"MapBase.K":"3","MapBase.V":"4"},"LateError":{"Error":[]},"CodeUnits":{"ListBase":["int"],"UnmodifiableListMixin":["int"],"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"],"ListBase.E":"int","Iterable.E":"int","UnmodifiableListMixin.E":"int"},"EfficientLengthIterable":{"Iterable":["1"]},"ListIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"SubListIterable":{"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"ListIterator":{"Iterator":["1"]},"MappedIterable":{"Iterable":["2"],"Iterable.E":"2"},"EfficientLengthMappedIterable":{"MappedIterable":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2"},"MappedIterator":{"Iterator":["2"]},"MappedListIterable":{"ListIterable":["2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"ListIterable.E":"2","Iterable.E":"2"},"WhereIterable":{"Iterable":["1"],"Iterable.E":"1"},"WhereIterator":{"Iterator":["1"]},"ExpandIterable":{"Iterable":["2"],"Iterable.E":"2"},"ExpandIterator":{"Iterator":["2"]},"TakeIterable":{"Iterable":["1"],"Iterable.E":"1"},"EfficientLengthTakeIterable":{"TakeIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"TakeIterator":{"Iterator":["1"]},"SkipIterable":{"Iterable":["1"],"Iterable.E":"1"},"EfficientLengthSkipIterable":{"SkipIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"SkipIterator":{"Iterator":["1"]},"EmptyIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"EmptyIterator":{"Iterator":["1"]},"WhereTypeIterable":{"Iterable":["1"],"Iterable.E":"1"},"WhereTypeIterator":{"Iterator":["1"]},"UnmodifiableListBase":{"ListBase":["1"],"UnmodifiableListMixin":["1"],"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"ReversedListIterable":{"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"ConstantMap":{"Map":["1","2"]},"ConstantStringMap":{"ConstantMap":["1","2"],"Map":["1","2"]},"_KeysOrValues":{"Iterable":["1"],"Iterable.E":"1"},"_KeysOrValuesOrElementsIterator":{"Iterator":["1"]},"Instantiation":{"Closure":[],"Function":[]},"Instantiation1":{"Closure":[],"Function":[]},"NullError":{"TypeError":[],"Error":[]},"JsNoSuchMethodError":{"Error":[]},"UnknownJsTypeError":{"Error":[]},"NullThrownFromJavaScriptException":{"Exception":[]},"_StackTrace":{"StackTrace":[]},"Closure":{"Function":[]},"Closure0Args":{"Closure":[],"Function":[]},"Closure2Args":{"Closure":[],"Function":[]},"TearOffClosure":{"Closure":[],"Function":[]},"StaticClosure":{"Closure":[],"Function":[]},"BoundClosure":{"Closure":[],"Function":[]},"RuntimeError":{"Error":[]},"JsLinkedHashMap":{"MapBase":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"LinkedHashMapKeysIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"LinkedHashMapKeyIterator":{"Iterator":["1"]},"LinkedHashMapValuesIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"LinkedHashMapValueIterator":{"Iterator":["1"]},"LinkedHashMapEntriesIterable":{"EfficientLengthIterable":["MapEntry<1,2>"],"Iterable":["MapEntry<1,2>"],"Iterable.E":"MapEntry<1,2>"},"LinkedHashMapEntryIterator":{"Iterator":["MapEntry<1,2>"]},"JsIdentityLinkedHashMap":{"JsLinkedHashMap":["1","2"],"MapBase":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"JSSyntaxRegExp":{"RegExp":[],"Pattern":[]},"_MatchImplementation":{"RegExpMatch":[],"Match":[]},"_AllMatchesIterable":{"Iterable":["RegExpMatch"],"Iterable.E":"RegExpMatch"},"_AllMatchesIterator":{"Iterator":["RegExpMatch"]},"StringMatch":{"Match":[]},"_StringAllMatchesIterable":{"Iterable":["Match"],"Iterable.E":"Match"},"_StringAllMatchesIterator":{"Iterator":["Match"]},"NativeByteBuffer":{"JavaScriptObject":[],"JSObject":[],"ByteBuffer":[],"TrustedGetRuntimeType":[]},"NativeTypedData":{"JavaScriptObject":[],"JSObject":[]},"NativeByteData":{"JavaScriptObject":[],"ByteData":[],"JSObject":[],"TrustedGetRuntimeType":[]},"NativeTypedArray":{"JavaScriptIndexingBehavior":["1"],"JavaScriptObject":[],"JSObject":[],"JSIndexable":["1"]},"NativeTypedArrayOfDouble":{"ListBase":["double"],"NativeTypedArray":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"JavaScriptObject":[],"EfficientLengthIterable":["double"],"JSObject":[],"JSIndexable":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"]},"NativeTypedArrayOfInt":{"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"]},"NativeFloat32List":{"Float32List":[],"ListBase":["double"],"NativeTypedArray":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"JavaScriptObject":[],"EfficientLengthIterable":["double"],"JSObject":[],"JSIndexable":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"TrustedGetRuntimeType":[],"ListBase.E":"double","Iterable.E":"double","FixedLengthListMixin.E":"double"},"NativeFloat64List":{"Float64List":[],"ListBase":["double"],"NativeTypedArray":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"JavaScriptObject":[],"EfficientLengthIterable":["double"],"JSObject":[],"JSIndexable":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"TrustedGetRuntimeType":[],"ListBase.E":"double","Iterable.E":"double","FixedLengthListMixin.E":"double"},"NativeInt16List":{"NativeTypedArrayOfInt":[],"Int16List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeInt32List":{"NativeTypedArrayOfInt":[],"Int32List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeInt8List":{"NativeTypedArrayOfInt":[],"Int8List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeUint16List":{"NativeTypedArrayOfInt":[],"Uint16List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeUint32List":{"NativeTypedArrayOfInt":[],"Uint32List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeUint8ClampedList":{"NativeTypedArrayOfInt":[],"Uint8ClampedList":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeUint8List":{"NativeTypedArrayOfInt":[],"Uint8List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"_Type":{"Type":[]},"_Error":{"Error":[]},"_TypeError":{"TypeError":[],"Error":[]},"AsyncError":{"Error":[]},"_TimerImpl":{"Timer":[]},"_AsyncAwaitCompleter":{"Completer":["1"]},"_Completer":{"Completer":["1"]},"_AsyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_SyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_Future":{"Future":["1"]},"StreamView":{"Stream":["1"]},"_StreamController":{"StreamController":["1"],"StreamSink":["1"],"_StreamControllerLifecycle":["1"],"_EventSink":["1"],"_EventDispatch":["1"]},"_AsyncStreamController":{"_AsyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"StreamSink":["1"],"_StreamControllerLifecycle":["1"],"_EventSink":["1"],"_EventDispatch":["1"]},"_SyncStreamController":{"_SyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"StreamSink":["1"],"_StreamControllerLifecycle":["1"],"_EventSink":["1"],"_EventDispatch":["1"]},"_ControllerStream":{"_StreamImpl":["1"],"Stream":["1"],"Stream.T":"1"},"_ControllerSubscription":{"_BufferingStreamSubscription":["1"],"StreamSubscription":["1"],"_EventSink":["1"],"_EventDispatch":["1"],"_BufferingStreamSubscription.T":"1"},"_StreamSinkWrapper":{"StreamSink":["1"]},"_BufferingStreamSubscription":{"StreamSubscription":["1"],"_EventSink":["1"],"_EventDispatch":["1"],"_BufferingStreamSubscription.T":"1"},"_StreamImpl":{"Stream":["1"]},"_DelayedData":{"_DelayedEvent":["1"]},"_DelayedError":{"_DelayedEvent":["@"]},"_DelayedDone":{"_DelayedEvent":["@"]},"_DoneStreamSubscription":{"StreamSubscription":["1"]},"_EmptyStream":{"Stream":["1"],"Stream.T":"1"},"_ForwardingStream":{"Stream":["2"]},"_ForwardingStreamSubscription":{"_BufferingStreamSubscription":["2"],"StreamSubscription":["2"],"_EventSink":["2"],"_EventDispatch":["2"],"_BufferingStreamSubscription.T":"2"},"_MapStream":{"_ForwardingStream":["1","2"],"Stream":["2"],"Stream.T":"2"},"_ZoneSpecification":{"ZoneSpecification":[]},"_ZoneDelegate":{"ZoneDelegate":[]},"_Zone":{"Zone":[]},"_CustomZone":{"_Zone":[],"Zone":[]},"_RootZone":{"_Zone":[],"Zone":[]},"_SplayTreeSetNode":{"_SplayTreeNode":["1","_SplayTreeSetNode<1>"],"_SplayTreeNode.K":"1","_SplayTreeNode.1":"_SplayTreeSetNode<1>"},"_HashMap":{"MapBase":["1","2"],"HashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_IdentityHashMap":{"_HashMap":["1","2"],"MapBase":["1","2"],"HashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_CustomHashMap":{"_HashMap":["1","2"],"MapBase":["1","2"],"HashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_HashMapKeyIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"_HashMapKeyIterator":{"Iterator":["1"]},"_LinkedCustomHashMap":{"JsLinkedHashMap":["1","2"],"MapBase":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_HashSet":{"_SetBase":["1"],"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"_HashSetIterator":{"Iterator":["1"]},"_LinkedHashSet":{"_SetBase":["1"],"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"_LinkedHashSetIterator":{"Iterator":["1"]},"UnmodifiableListView":{"ListBase":["1"],"UnmodifiableListMixin":["1"],"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListBase.E":"1","Iterable.E":"1","UnmodifiableListMixin.E":"1"},"ListBase":{"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"MapBase":{"Map":["1","2"]},"MapView":{"Map":["1","2"]},"UnmodifiableMapView":{"_UnmodifiableMapView_MapView__UnmodifiableMapMixin":["1","2"],"MapView":["1","2"],"_UnmodifiableMapMixin":["1","2"],"Map":["1","2"]},"ListQueue":{"Queue":["1"],"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"_ListQueueIterator":{"Iterator":["1"]},"SetBase":{"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"_SetBase":{"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"_SplayTreeIterator":{"Iterator":["3"]},"_SplayTreeKeyIterator":{"_SplayTreeIterator":["1","2","1"],"Iterator":["1"],"_SplayTreeIterator.K":"1","_SplayTreeIterator.T":"1","_SplayTreeIterator.1":"2"},"SplayTreeSet":{"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"_SplayTree":["1","_SplayTreeSetNode<1>"],"Iterable":["1"],"Iterable.E":"1","_SplayTree.1":"_SplayTreeSetNode<1>","_SplayTree.K":"1"},"Encoding":{"Codec":["String","List"]},"_JsonMap":{"MapBase":["String","@"],"Map":["String","@"],"MapBase.K":"String","MapBase.V":"@"},"_JsonMapKeyIterable":{"ListIterable":["String"],"EfficientLengthIterable":["String"],"Iterable":["String"],"ListIterable.E":"String","Iterable.E":"String"},"AsciiCodec":{"Encoding":[],"Codec":["String","List"],"Codec.S":"String"},"_UnicodeSubsetEncoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"AsciiEncoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"_UnicodeSubsetDecoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"AsciiDecoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"Base64Codec":{"Codec":["List","String"],"Codec.S":"List"},"Base64Encoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"Base64Decoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"Converter":{"StreamTransformer":["1","2"]},"JsonUnsupportedObjectError":{"Error":[]},"JsonCyclicError":{"Error":[]},"JsonCodec":{"Codec":["Object?","String"],"Codec.S":"Object?"},"JsonEncoder":{"Converter":["Object?","String"],"StreamTransformer":["Object?","String"]},"JsonDecoder":{"Converter":["String","Object?"],"StreamTransformer":["String","Object?"]},"Latin1Codec":{"Encoding":[],"Codec":["String","List"],"Codec.S":"String"},"Latin1Encoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"Latin1Decoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"Utf8Codec":{"Encoding":[],"Codec":["String","List"],"Codec.S":"String"},"Utf8Encoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"Utf8Decoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"BigInt":{"Comparable":["BigInt"]},"DateTime":{"Comparable":["DateTime"]},"double":{"num":[],"Comparable":["num"]},"Duration":{"Comparable":["Duration"]},"int":{"num":[],"Comparable":["num"]},"List":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"num":{"Comparable":["num"]},"RegExp":{"Pattern":[]},"RegExpMatch":{"Match":[]},"Set":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"String":{"Comparable":["String"],"Pattern":[]},"_BigIntImpl":{"BigInt":[],"Comparable":["BigInt"]},"AssertionError":{"Error":[]},"TypeError":{"Error":[]},"ArgumentError":{"Error":[]},"RangeError":{"Error":[]},"IndexError":{"Error":[]},"UnsupportedError":{"Error":[]},"UnimplementedError":{"Error":[]},"StateError":{"Error":[]},"ConcurrentModificationError":{"Error":[]},"OutOfMemoryError":{"Error":[]},"StackOverflowError":{"Error":[]},"_Exception":{"Exception":[]},"FormatException":{"Exception":[]},"IntegerDivisionByZeroException":{"Exception":[],"Error":[]},"_StringStackTrace":{"StackTrace":[]},"StringBuffer":{"StringSink":[]},"_Uri":{"Uri":[]},"_SimpleUri":{"Uri":[]},"_DataUri":{"Uri":[]},"NullRejectionException":{"Exception":[]},"_JSRandom":{"Random":[]},"DelegatingStreamSink":{"StreamSink":["1"]},"ErrorResult":{"Result":["0&"]},"ValueResult":{"Result":["1"]},"_NextRequest":{"_EventRequest":["1"]},"_HasNextRequest":{"_EventRequest":["1"]},"BuiltList":{"Iterable":["1"]},"_BuiltList":{"BuiltList":["1"],"Iterable":["1"],"Iterable.E":"1"},"_BuiltListMultimap":{"BuiltListMultimap":["1","2"]},"_BuiltMap":{"BuiltMap":["1","2"]},"BuiltSet":{"Iterable":["1"]},"_BuiltSet":{"BuiltSet":["1"],"Iterable":["1"],"Iterable.E":"1"},"_BuiltSetMultimap":{"BuiltSetMultimap":["1","2"]},"BuiltValueNullFieldError":{"Error":[]},"BuiltValueNestedFieldError":{"Error":[]},"BoolJsonObject":{"JsonObject":[]},"ListJsonObject":{"JsonObject":[]},"MapJsonObject":{"JsonObject":[]},"NumJsonObject":{"JsonObject":[]},"StringJsonObject":{"JsonObject":[]},"DeserializationError":{"Error":[]},"BigIntSerializer":{"PrimitiveSerializer":["BigInt"],"Serializer":["BigInt"]},"BoolSerializer":{"PrimitiveSerializer":["bool"],"Serializer":["bool"]},"BuiltJsonSerializers":{"Serializers":[]},"BuiltListMultimapSerializer":{"StructuredSerializer":["BuiltListMultimap<@,@>"],"Serializer":["BuiltListMultimap<@,@>"]},"BuiltListSerializer":{"StructuredSerializer":["BuiltList<@>"],"Serializer":["BuiltList<@>"]},"BuiltMapSerializer":{"StructuredSerializer":["BuiltMap<@,@>"],"Serializer":["BuiltMap<@,@>"]},"BuiltSetMultimapSerializer":{"StructuredSerializer":["BuiltSetMultimap<@,@>"],"Serializer":["BuiltSetMultimap<@,@>"]},"BuiltSetSerializer":{"StructuredSerializer":["BuiltSet<@>"],"Serializer":["BuiltSet<@>"]},"DateTimeSerializer":{"PrimitiveSerializer":["DateTime"],"Serializer":["DateTime"]},"DoubleSerializer":{"PrimitiveSerializer":["double"],"Serializer":["double"]},"DurationSerializer":{"PrimitiveSerializer":["Duration"],"Serializer":["Duration"]},"Int32Serializer":{"PrimitiveSerializer":["Int32"],"Serializer":["Int32"]},"Int64Serializer":{"PrimitiveSerializer":["Int64"],"Serializer":["Int64"]},"IntSerializer":{"PrimitiveSerializer":["int"],"Serializer":["int"]},"JsonObjectSerializer":{"PrimitiveSerializer":["JsonObject"],"Serializer":["JsonObject"]},"NullSerializer":{"PrimitiveSerializer":["Null"],"Serializer":["Null"]},"NumSerializer":{"PrimitiveSerializer":["num"],"Serializer":["num"]},"RegExpSerializer":{"PrimitiveSerializer":["RegExp"],"Serializer":["RegExp"]},"StringSerializer":{"PrimitiveSerializer":["String"],"Serializer":["String"]},"Uint8ListSerializer":{"PrimitiveSerializer":["Uint8List"],"Serializer":["Uint8List"]},"UriSerializer":{"PrimitiveSerializer":["Uri"],"Serializer":["Uri"]},"CanonicalizedMap":{"Map":["2","3"]},"DefaultEquality":{"Equality":["1"]},"IterableEquality":{"Equality":["Iterable<1>"]},"ListEquality":{"Equality":["List<1>"]},"_UnorderedEquality":{"Equality":["2"]},"SetEquality":{"_UnorderedEquality":["1","Set<1>"],"Equality":["Set<1>"],"_UnorderedEquality.E":"1","_UnorderedEquality.T":"Set<1>"},"MapEquality":{"Equality":["Map<1,2>"]},"DeepCollectionEquality":{"Equality":["@"]},"QueueList":{"ListBase":["1"],"List":["1"],"Queue":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListBase.E":"1","QueueList.E":"1","Iterable.E":"1"},"_CastQueueList":{"QueueList":["2"],"ListBase":["2"],"List":["2"],"Queue":["2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"ListBase.E":"2","QueueList.E":"2","Iterable.E":"2"},"_$BuildStatusSerializer":{"PrimitiveSerializer":["BuildStatus"],"Serializer":["BuildStatus"]},"_$BuildResultSerializer":{"StructuredSerializer":["BuildResult"],"Serializer":["BuildResult"]},"_$BuildResult":{"BuildResult":[]},"_$ConnectRequestSerializer":{"StructuredSerializer":["ConnectRequest"],"Serializer":["ConnectRequest"]},"_$ConnectRequest":{"ConnectRequest":[]},"_$DebugEventSerializer":{"StructuredSerializer":["DebugEvent"],"Serializer":["DebugEvent"]},"_$BatchedDebugEventsSerializer":{"StructuredSerializer":["BatchedDebugEvents"],"Serializer":["BatchedDebugEvents"]},"_$DebugEvent":{"DebugEvent":[]},"_$BatchedDebugEvents":{"BatchedDebugEvents":[]},"_$DebugInfoSerializer":{"StructuredSerializer":["DebugInfo"],"Serializer":["DebugInfo"]},"_$DebugInfo":{"DebugInfo":[]},"_$DevToolsRequestSerializer":{"StructuredSerializer":["DevToolsRequest"],"Serializer":["DevToolsRequest"]},"_$DevToolsResponseSerializer":{"StructuredSerializer":["DevToolsResponse"],"Serializer":["DevToolsResponse"]},"_$DevToolsRequest":{"DevToolsRequest":[]},"_$DevToolsResponse":{"DevToolsResponse":[]},"_$ErrorResponseSerializer":{"StructuredSerializer":["ErrorResponse"],"Serializer":["ErrorResponse"]},"_$ErrorResponse":{"ErrorResponse":[]},"_$ExtensionRequestSerializer":{"StructuredSerializer":["ExtensionRequest"],"Serializer":["ExtensionRequest"]},"_$ExtensionResponseSerializer":{"StructuredSerializer":["ExtensionResponse"],"Serializer":["ExtensionResponse"]},"_$ExtensionEventSerializer":{"StructuredSerializer":["ExtensionEvent"],"Serializer":["ExtensionEvent"]},"_$BatchedEventsSerializer":{"StructuredSerializer":["BatchedEvents"],"Serializer":["BatchedEvents"]},"_$ExtensionRequest":{"ExtensionRequest":[]},"_$ExtensionResponse":{"ExtensionResponse":[]},"_$ExtensionEvent":{"ExtensionEvent":[]},"_$BatchedEvents":{"BatchedEvents":[]},"_$HotReloadRequestSerializer":{"StructuredSerializer":["HotReloadRequest"],"Serializer":["HotReloadRequest"]},"_$HotReloadRequest":{"HotReloadRequest":[]},"_$HotReloadResponseSerializer":{"StructuredSerializer":["HotReloadResponse"],"Serializer":["HotReloadResponse"]},"_$HotReloadResponse":{"HotReloadResponse":[]},"_$IsolateExitSerializer":{"StructuredSerializer":["IsolateExit"],"Serializer":["IsolateExit"]},"_$IsolateStartSerializer":{"StructuredSerializer":["IsolateStart"],"Serializer":["IsolateStart"]},"_$IsolateExit":{"IsolateExit":[]},"_$IsolateStart":{"IsolateStart":[]},"_$RegisterEventSerializer":{"StructuredSerializer":["RegisterEvent"],"Serializer":["RegisterEvent"]},"_$RegisterEvent":{"RegisterEvent":[]},"_$RunRequestSerializer":{"StructuredSerializer":["RunRequest"],"Serializer":["RunRequest"]},"_$RunRequest":{"RunRequest":[]},"SseSocketClient":{"SocketClient":[]},"WebSocketClient":{"SocketClient":[]},"Int32":{"Comparable":["Object"]},"Int64":{"Comparable":["Object"]},"ByteStream":{"StreamView":["List"],"Stream":["List"],"Stream.T":"List","StreamView.T":"List"},"ClientException":{"Exception":[]},"Request":{"BaseRequest":[]},"StreamedResponseV2":{"StreamedResponse":[]},"CaseInsensitiveMap":{"CanonicalizedMap":["String","String","1"],"Map":["String","1"],"CanonicalizedMap.K":"String","CanonicalizedMap.V":"1","CanonicalizedMap.C":"String"},"Level":{"Comparable":["Level"]},"PathException":{"Exception":[]},"PosixStyle":{"InternalStyle":[]},"UrlStyle":{"InternalStyle":[]},"WindowsStyle":{"InternalStyle":[]},"FileLocation":{"SourceLocation":[],"Comparable":["SourceLocation"]},"_FileSpan":{"SourceSpanWithContext":[],"SourceSpan":[],"Comparable":["SourceSpan"]},"SourceLocation":{"Comparable":["SourceLocation"]},"SourceLocationMixin":{"SourceLocation":[],"Comparable":["SourceLocation"]},"SourceSpan":{"Comparable":["SourceSpan"]},"SourceSpanBase":{"SourceSpan":[],"Comparable":["SourceSpan"]},"SourceSpanException":{"Exception":[]},"SourceSpanFormatException":{"FormatException":[],"Exception":[]},"SourceSpanMixin":{"SourceSpan":[],"Comparable":["SourceSpan"]},"SourceSpanWithContext":{"SourceSpan":[],"Comparable":["SourceSpan"]},"SseClient":{"StreamChannel":["String?"]},"GuaranteeChannel":{"StreamChannel":["1"]},"_GuaranteeSink":{"StreamSink":["1"]},"StreamChannelMixin":{"StreamChannel":["1"]},"StringScannerException":{"FormatException":[],"Exception":[]},"_EventStream":{"Stream":["1"],"Stream.T":"1"},"_EventStreamSubscription":{"StreamSubscription":["1"]},"BrowserWebSocket":{"WebSocket":[]},"TextDataReceived":{"WebSocketEvent":[]},"BinaryDataReceived":{"WebSocketEvent":[]},"CloseReceived":{"WebSocketEvent":[]},"WebSocketException":{"Exception":[]},"WebSocketConnectionClosed":{"Exception":[]},"AdapterWebSocketChannel":{"WebSocketChannel":[],"StreamChannel":["@"]},"_WebSocketSink":{"WebSocketSink":[],"DelegatingStreamSink":["@"],"StreamSink":["@"],"DelegatingStreamSink.T":"@"},"WebSocketChannelException":{"Exception":[]},"DdcLibraryBundleRestarter":{"Restarter":[]},"DdcRestarter":{"Restarter":[]},"RequireRestarter":{"Restarter":[]},"HotReloadFailedException":{"Exception":[]},"Int8List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint8List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint8ClampedList":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Int16List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint16List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Int32List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint32List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Float32List":{"List":["double"],"EfficientLengthIterable":["double"],"Iterable":["double"]},"Float64List":{"List":["double"],"EfficientLengthIterable":["double"],"Iterable":["double"]}}')); A._Universe_addErasedTypes(init.typeUniverse, JSON.parse('{"UnmodifiableListBase":1,"__CastListBase__CastIterableBase_ListMixin":2,"NativeTypedArray":1,"_DelayedEvent":1,"_SplayTreeSet__SplayTree_Iterable":1,"_SplayTreeSet__SplayTree_Iterable_SetMixin":1,"_QueueList_Object_ListMixin":1,"StreamChannelMixin":1}')); var string$ = { x00_____: "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\u03f6\x00\u0404\u03f4 \u03f4\u03f6\u01f6\u01f6\u03f6\u03fc\u01f4\u03ff\u03ff\u0584\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u05d4\u01f4\x00\u01f4\x00\u0504\u05c4\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u0400\x00\u0400\u0200\u03f7\u0200\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u0200\u0200\u0200\u03f7\x00", diff --git a/dwds/lib/src/services/chrome_proxy_service.dart b/dwds/lib/src/services/chrome_proxy_service.dart index 3141d2c57..b94927611 100644 --- a/dwds/lib/src/services/chrome_proxy_service.dart +++ b/dwds/lib/src/services/chrome_proxy_service.dart @@ -117,7 +117,10 @@ class ChromeProxyService implements VmServiceInterface { final _resumeAfterRestartEventsController = StreamController.broadcast(); - /// A global stream of resume events. + final _resumeAfterHotReloadEventsController = + StreamController>.broadcast(); + + /// A global stream of resume events for hot restart. /// /// The values in the stream are the isolates IDs for the resume event. /// @@ -127,6 +130,17 @@ class ChromeProxyService implements VmServiceInterface { Stream get resumeAfterRestartEventsStream => _resumeAfterRestartEventsController.stream; + /// A global stream of resume events for hot reload. + /// + /// The values in the stream are [Completer]s that should be completed after + /// finishing the hot reload. + /// + /// IMPORTANT: This should only be listened to during a hot reload. The + /// debugger ignores any resume events as long as there is a subscriber to + /// this stream. + Stream> get resumeAfterHotReloadEventsStream => + _resumeAfterHotReloadEventsController.stream; + final _logger = Logger('ChromeProxyService'); final ExpressionCompiler? _compiler; @@ -227,6 +241,20 @@ class ChromeProxyService implements VmServiceInterface { } } + /// Reinitializes any caches so that they can be recomputed across hot reload. + // TODO(srujzs): We can maybe do better here than reinitializing all the data. + // Specifically, we can invalidate certain parts as we know what libraries + // will be stale, and therefore recompute information only for those libraries + // and possibly libraries that depend on them. Currently, there's no good + // separation between "existing" information and "new" information, making + // this difficult. + Future _reinitializeForHotReload() async { + final entrypoint = inspector.appConnection.request.entrypointPath; + await globalToolConfiguration.loadStrategy.trackEntrypoint(entrypoint); + _initializeEntrypoint(entrypoint); + await inspector.initialize(); + } + /// Initializes metadata in [Locations], [Modules], and [ExpressionCompiler]. void _initializeEntrypoint(String entrypoint) { _locations.initialize(entrypoint); @@ -1160,7 +1188,9 @@ class ChromeProxyService implements VmServiceInterface { String? rootLibUri, String? packagesUri, }) async { - _logger.info('Attempting a hot reload'); + await isInitialized; + _checkIsolate('reloadSources', isolateId); + ReloadReport getFailedReloadReport(String error) => _ReloadReportWithMetadata(success: false) ..json = { @@ -1172,7 +1202,7 @@ class ChromeProxyService implements VmServiceInterface { if (useWebSocket) { await _performWebSocketHotReload(); } else { - await _performClientSideHotReload(); + await _performClientSideHotReload(isolateId); } } catch (e) { _logger.info('Hot reload failed: $e'); @@ -1182,26 +1212,71 @@ class ChromeProxyService implements VmServiceInterface { return _ReloadReportWithMetadata(success: true); } - /// Performs a client-side hot reload by fetching libraries, disabling breakpoints, and invoking the reload. - Future _performClientSideHotReload() async { - // Fetch the needed sources and libraries, disable breakpoints on the - // changed libraries, and then reload. - // TODO(srujzs): Re-map the breakpoints appropriately using events to - // trigger the client to re-register the breakpoints on the new sources. - // https://github.com/dart-lang/sdk/issues/60186 - _logger.info('Issuing \$fetchLibrariesForHotReload request'); - final librariesRemoteObject = await inspector.jsEvaluate( - '\$fetchLibrariesForHotReload();', + /// Performs a client-side hot reload by fetching libraries, handling + /// PausePostRequests, and invoking the reload. + Future _performClientSideHotReload(String isolateId) async { + _logger.info('Attempting a hot reload'); + + // Initiate a hot reload. + _logger.info('Issuing \$dartHotReloadStartDwds request'); + await inspector.jsEvaluate( + '\$dartHotReloadStartDwds();', awaitPromise: true, returnByValue: true, ); - _logger.info('\$fetchLibrariesForHotReload request complete.'); - final libraries = - (librariesRemoteObject.value as List).toSet().cast(); - await disableBreakpoints(libraries: libraries); - _logger.info('Issuing \$dartHotReloadDwds request'); - await inspector.jsEvaluate('\$dartHotReloadDwds();', awaitPromise: true); - _logger.info('\$dartHotReloadDwds request complete.'); + + if (pauseIsolatesOnStart) { + await _reinitializeForHotReload(); + // If `pause_isolates_on_start` is enabled, pause and then the reload + // should finish later after the client removes breakpoints, reregisters + // breakpoints, and resumes. + StreamSubscription>? resumeEventsSubscription; + resumeEventsSubscription = resumeAfterHotReloadEventsStream.listen(( + Completer completer, + ) async { + // Client finished setting breakpoints, called resume, and now the + // execution has resumed. Finish the hot reload so we start executing + // the new code instead. + await resumeEventsSubscription!.cancel(); + _logger.info('Issuing \$dartHotReloadEndDwds request'); + await inspector.jsEvaluate( + '\$dartHotReloadEndDwds();', + awaitPromise: true, + ); + _logger.info('\$dartHotReloadEndDwds request complete.'); + completer.complete(); + }); + + // Pause and wait for the pause to occur before managing breakpoints. + final pausedEvent = _firstStreamEvent( + 'Debug', + EventKind.kPauseInterrupted, + ); + await pause(isolateId); + await pausedEvent; + + // This lets the client know that we're ready for breakpoint management + // and a resume. + _streamNotify( + 'Debug', + Event( + kind: EventKind.kPausePostRequest, + timestamp: DateTime.now().millisecondsSinceEpoch, + isolate: inspector.isolateRef, + ), + ); + } else { + // Finish hot reload immediately. + _logger.info('Issuing \$dartHotReloadEndDwds request'); + await inspector.jsEvaluate( + '\$dartHotReloadEndDwds();', + awaitPromise: true, + ); + _logger.info('\$dartHotReloadEndDwds request complete.'); + // TODO(srujzs): Supposedly Dart DevTools uses a kIsolateReload event + // for breakpoints? We should confirm and add tests before sending the + // event. + } } /// Performs a WebSocket-based hot reload by sending a request and waiting for a response. @@ -1263,13 +1338,14 @@ class ChromeProxyService implements VmServiceInterface { String? step, int? frameIndex, }) async { - // If there is a subscriber listening for a resume event after hot-restart, - // then add the event to the stream and skip processing it. + // If there is a hot restart or hot reload subscriber listening for a resume + // event after a hot restart or a hot reload, then add the event to the + // stream and skip processing it. if (_resumeAfterRestartEventsController.hasListener) { _resumeAfterRestartEventsController.add(isolateId); return Success(); } - if (inspector.appConnection.isStarted) { + Future resumeWhenAppHasStarted() { return captureElapsedTime(() async { await isInitialized; await isStarted; @@ -1279,6 +1355,17 @@ class ChromeProxyService implements VmServiceInterface { frameIndex: frameIndex, ); }, (result) => DwdsEvent.resume(step)); + } + + if (_resumeAfterHotReloadEventsController.hasListener) { + await resumeWhenAppHasStarted(); + final completer = Completer(); + _resumeAfterHotReloadEventsController.add(completer); + await completer.future; + return Success(); + } + if (inspector.appConnection.isStarted) { + return resumeWhenAppHasStarted(); } else { inspector.appConnection.runMain(); return Success(); @@ -1575,6 +1662,11 @@ class ChromeProxyService implements VmServiceInterface { controller.add(event); } + Future _firstStreamEvent(String streamId, String eventKind) { + final controller = _streamControllers[streamId]!; + return controller.stream.firstWhere((event) => event.kind == eventKind); + } + Future _handleDeveloperLog( IsolateRef isolateRef, ConsoleAPIEvent event, diff --git a/dwds/test/fixtures/project.dart b/dwds/test/fixtures/project.dart index 8ce0d88e6..8e722704b 100644 --- a/dwds/test/fixtures/project.dart +++ b/dwds/test/fixtures/project.dart @@ -151,6 +151,14 @@ class TestProject { htmlEntryFileName: 'index.html', ); + static const testHotReloadBreakpoints = TestProject._( + packageName: '_test_hot_reload_breakpoints', + packageDirectory: '_testHotReloadBreakpoints', + webAssetsPath: 'web', + dartEntryFileName: 'main.dart', + htmlEntryFileName: 'index.html', + ); + const TestProject._({ required this.packageName, required this.packageDirectory, diff --git a/dwds/test/hot_reload_breakpoints_test.dart b/dwds/test/hot_reload_breakpoints_test.dart new file mode 100644 index 000000000..841c3a137 --- /dev/null +++ b/dwds/test/hot_reload_breakpoints_test.dart @@ -0,0 +1,496 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 5)) +library; + +import 'dart:async'; + +import 'package:dwds/expression_compiler.dart'; +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 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart'; + +import 'fixtures/context.dart'; +import 'fixtures/project.dart'; +import 'fixtures/utilities.dart'; + +void main() { + // Enable verbose logging for debugging. + final debug = false; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: true, + ddcModuleFormat: ModuleFormat.ddc, + ); + final project = TestProject.testHotReloadBreakpoints; + final context = TestContext(project, provider); + final mainFile = project.dartEntryFileName; + final callLogMarker = 'callLog'; + final capturedStringMarker = 'capturedString'; + + tearDownAll(provider.dispose); + + final edits = <({String file, String originalString, String newString})>[]; + + void makeEdit(String file, String originalString, String newString) { + if (file == project.dartEntryFileName) { + context.makeEditToDartEntryFile( + toReplace: originalString, + replaceWith: newString, + ); + } else { + context.makeEditToDartLibFile( + libFileName: file, + toReplace: originalString, + replaceWith: newString, + ); + } + edits.add(( + file: file, + originalString: originalString, + newString: newString, + )); + } + + Future makeEditAndRecompile( + String file, + String originalString, + String newString, + ) async { + makeEdit(file, originalString, newString); + await context.recompile(fullRestart: false); + } + + void undoEdits() { + for (var i = edits.length - 1; i >= 0; i--) { + final edit = edits[i]; + if (edit.file == project.dartEntryFileName) { + context.makeEditToDartEntryFile( + toReplace: edit.newString, + replaceWith: edit.originalString, + ); + } else { + context.makeEditToDartLibFile( + libFileName: edit.file, + toReplace: edit.newString, + replaceWith: edit.originalString, + ); + } + } + edits.clear(); + } + + group('when pause_isolates_on_start is true', () { + late VmService client; + late VmServiceInterface service; + late Stream stream; + // Fetch the log statements that are sent to console. + final consoleLogs = []; + late StreamSubscription consoleSubscription; + + setUp(() async { + setCurrentLogWriter(debug: debug); + await context.setUp( + testSettings: TestSettings( + enableExpressionEvaluation: true, + compilationMode: CompilationMode.frontendServer, + moduleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ), + ); + client = await context.connectFakeClient(); + await client.setFlag('pause_isolates_on_start', 'true'); + service = context.service; + await service.streamListen('Debug'); + stream = service.onEvent('Debug'); + consoleSubscription = context.webkitDebugger.onConsoleAPICalled.listen( + (e) => consoleLogs.add(e.args.first.value as String), + ); + }); + + tearDown(() async { + await consoleSubscription.cancel(); + consoleLogs.clear(); + undoEdits(); + await context.tearDown(); + }); + + Future addBreakpoint({ + required String file, + required String breakpointMarker, + }) async { + final vm = await client.getVM(); + final isolateId = vm.isolates!.first.id!; + final scriptList = await client.getScripts(isolateId); + final scriptRef = scriptList.scripts!.firstWhere( + (script) => script.uri!.contains(file), + ); + final bpLine = await context.findBreakpointLine( + breakpointMarker, + isolateId, + scriptRef, + ); + return await client.addBreakpointWithScriptUri( + isolateId, + scriptRef.uri!, + bpLine, + ); + } + + Future removeBreakpoint(Breakpoint bp) async { + final vm = await client.getVM(); + final isolateId = vm.isolates!.first.id!; + await client.removeBreakpoint(isolateId, bp.id!); + } + + Future resume() async { + final vm = await client.getVM(); + final isolate = await client.getIsolate(vm.isolates!.first.id!); + await client.resume(isolate.id!); + } + + Future> hotReloadAndHandlePausePost( + List<({String file, String breakpointMarker, Breakpoint? bp})> + breakpoints, + ) async { + final waitForPausePost = stream.firstWhere( + (event) => event.kind == EventKind.kPausePostRequest, + ); + + // Initiate the hot reload by loading the sources into the page. + final vm = await client.getVM(); + final isolate = await client.getIsolate(vm.isolates!.first.id!); + final report = await client.reloadSources(isolate.id!); + expect(report.success, true); + + // Client (e.g. DAP) should listen for this event, remove old breakpoints, + // reregister breakpoints, and then resume. The following lines imitate + // what the client should do. + await waitForPausePost; + final newBreakpoints = []; + for (final breakpoint in breakpoints) { + // This could be a new file, so there's no existing breakpoint to + // remove. + if (breakpoint.bp != null) await removeBreakpoint(breakpoint.bp!); + newBreakpoints.add( + await addBreakpoint( + file: breakpoint.file, + breakpointMarker: breakpoint.breakpointMarker, + ), + ); + } + // The resume should complete hot reload and resume the program. + await resume(); + return newBreakpoints; + } + + Future callEvaluate() async { + final vm = await client.getVM(); + final isolate = await client.getIsolate(vm.isolates!.first.id!); + final rootLib = isolate.rootLib; + await client.evaluate(isolate.id!, rootLib!.id!, 'evaluate()'); + } + + test('after edit and hot reload, breakpoint is in new file', () async { + final oldString = 'main gen0'; + final newString = 'main gen1'; + + final bp = await addBreakpoint( + file: mainFile, + breakpointMarker: callLogMarker, + ); + + await callEvaluate(); + + // Should break at `callLog`. + await stream.firstWhere( + (event) => event.kind == EventKind.kPauseBreakpoint, + ); + expect(consoleLogs.contains(oldString), false); + await resume(); + expect(consoleLogs.contains(oldString), true); + + consoleLogs.clear(); + + // Modify the string that gets printed. + await makeEditAndRecompile(mainFile, oldString, newString); + + await hotReloadAndHandlePausePost([ + (file: mainFile, breakpointMarker: callLogMarker, bp: bp), + ]); + + await callEvaluate(); + + // Should break at `callLog`. + await stream.firstWhere( + (event) => event.kind == EventKind.kPauseBreakpoint, + ); + expect(consoleLogs.contains(newString), false); + await resume(); + expect(consoleLogs.contains(newString), true); + }); + + test('after adding line, hot reload, removing line, and hot reload, ' + 'breakpoint is correct across both hot reloads', () async { + final genLog = 'main gen0'; + + var bp = await addBreakpoint( + file: mainFile, + breakpointMarker: callLogMarker, + ); + + await callEvaluate(); + + // Should break at `callLog`. + await stream.firstWhere( + (event) => event.kind == EventKind.kPauseBreakpoint, + ); + expect(consoleLogs.contains(genLog), false); + await resume(); + expect(consoleLogs.contains(genLog), true); + + consoleLogs.clear(); + + // Add an extra log before the existing log. + final extraLog = 'hot reload'; + final oldString = "log('"; + final newString = "log('$extraLog');\n$oldString"; + await makeEditAndRecompile(mainFile, oldString, newString); + + bp = + (await hotReloadAndHandlePausePost([ + (file: mainFile, breakpointMarker: callLogMarker, bp: bp), + ])).first; + + await callEvaluate(); + + // Should break at `callLog`. + await stream.firstWhere( + (event) => event.kind == EventKind.kPauseBreakpoint, + ); + expect(consoleLogs.contains(extraLog), true); + await resume(); + expect(consoleLogs.contains(genLog), true); + + consoleLogs.clear(); + + // Remove the line we just added. + await makeEditAndRecompile(mainFile, newString, oldString); + + await hotReloadAndHandlePausePost([ + (file: mainFile, breakpointMarker: callLogMarker, bp: bp), + ]); + + await callEvaluate(); + + // Should break at `callLog`. + await stream.firstWhere( + (event) => event.kind == EventKind.kPauseBreakpoint, + ); + expect(consoleLogs.contains(extraLog), false); + await resume(); + expect(consoleLogs.contains(genLog), true); + }); + + test( + 'after adding file and putting breakpoint in it, breakpoint is correctly ' + 'registered', + () async { + final genLog = 'main gen0'; + + final bp = await addBreakpoint( + file: mainFile, + breakpointMarker: callLogMarker, + ); + + await callEvaluate(); + + // Should break at `callLog`. + await stream.firstWhere( + (event) => event.kind == EventKind.kPauseBreakpoint, + ); + expect(consoleLogs.contains(genLog), false); + await resume(); + expect(consoleLogs.contains(genLog), true); + + consoleLogs.clear(); + + // Add a library file, import it, and then refer to it in the log. + final libFile = 'library.dart'; + final libGenLog = 'lib gen0'; + final libValueMarker = 'libValue'; + context.addLibraryFile( + libFileName: libFile, + contents: '''String get libraryValue { + return '$libGenLog'; // Breakpoint: $libValueMarker + }''', + ); + final oldImports = "import 'dart:js_interop';"; + final newImports = + '$oldImports\n' + "import 'package:_test_hot_reload_breakpoints/library.dart';"; + makeEdit(mainFile, oldImports, newImports); + final oldLog = "log('\$mainValue');"; + final newLog = "log('\$libraryValue');"; + await makeEditAndRecompile(mainFile, oldLog, newLog); + + await hotReloadAndHandlePausePost([ + (file: mainFile, breakpointMarker: callLogMarker, bp: bp), + (file: libFile, breakpointMarker: libValueMarker, bp: null), + ]); + + await callEvaluate(); + + // Should break at `callLog`. + await stream.firstWhere( + (event) => event.kind == EventKind.kPauseBreakpoint, + ); + expect(consoleLogs.contains(libGenLog), false); + await resume(); + // Should break at `libValue`. + await stream.firstWhere( + (event) => event.kind == EventKind.kPauseBreakpoint, + ); + expect(consoleLogs.contains(libGenLog), false); + await resume(); + expect(consoleLogs.contains(libGenLog), true); + + context.removeLibraryFile(libFileName: libFile); + }, + ); + + test('breakpoint in captured code is deleted', () async { + var bp = await addBreakpoint( + file: mainFile, + breakpointMarker: capturedStringMarker, + ); + + final oldLog = "log('\$mainValue');"; + final newLog = "log('\${closure()}');"; + await makeEditAndRecompile(mainFile, oldLog, newLog); + + bp = + (await hotReloadAndHandlePausePost([ + (file: mainFile, breakpointMarker: capturedStringMarker, bp: bp), + ])).first; + + await callEvaluate(); + + // Should break at `capturedString`. + await stream.firstWhere( + (event) => event.kind == EventKind.kPauseBreakpoint, + ); + final oldCapturedString = 'captured closure gen0'; + expect(consoleLogs.contains(oldCapturedString), false); + // Closure gets evaluated for the first time. + await resume(); + expect(consoleLogs.contains(oldCapturedString), true); + + final newCapturedString = 'captured closure gen1'; + await makeEditAndRecompile( + mainFile, + oldCapturedString, + newCapturedString, + ); + + await hotReloadAndHandlePausePost([ + (file: mainFile, breakpointMarker: capturedStringMarker, bp: bp), + ]); + + // Use a completer as we won't hit a pause. + final completer = Completer(); + final consoleSubscription = context.webkitDebugger.onConsoleAPICalled + .listen((e) { + if (e.args.first.value == oldCapturedString) { + completer.complete(); + } + }); + + await callEvaluate(); + + // Breakpoint should not have been hit as it's now deleted. We should also + // see the old string still as the closure has not been reevaluated. + await completer.future; + + await consoleSubscription.cancel(); + }); + }, timeout: Timeout.factor(2)); + + group('when pause_isolates_on_start is false', () { + late VmService client; + + setUp(() async { + setCurrentLogWriter(debug: debug); + await context.setUp( + testSettings: TestSettings( + enableExpressionEvaluation: true, + compilationMode: CompilationMode.frontendServer, + moduleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ), + ); + client = await context.connectFakeClient(); + await client.setFlag('pause_isolates_on_start', 'false'); + }); + + tearDown(() async { + undoEdits(); + await context.tearDown(); + }); + + Future callEvaluate() async { + final vm = await client.getVM(); + final isolate = await client.getIsolate(vm.isolates!.first.id!); + final rootLib = isolate.rootLib; + await client.evaluate(isolate.id!, rootLib!.id!, 'evaluate()'); + } + + test('no pause when calling reloadSources', () async { + final oldString = 'main gen0'; + final newString = 'main gen1'; + + // Use a completer as we won't hit a pause. + var completer = Completer(); + var consoleSubscription = context.webkitDebugger.onConsoleAPICalled + .listen((e) { + if (e.args.first.value == oldString) { + completer.complete(); + } + }); + + await callEvaluate(); + await completer.future; + + await consoleSubscription.cancel(); + + // Modify the string that gets printed and hot reload. + await makeEditAndRecompile(mainFile, oldString, newString); + final vm = await client.getVM(); + final isolate = await client.getIsolate(vm.isolates!.first.id!); + final report = await client.reloadSources(isolate.id!); + expect(report.success, true); + + completer = Completer(); + consoleSubscription = context.webkitDebugger.onConsoleAPICalled.listen(( + e, + ) { + if (e.args.first.value == newString) { + completer.complete(); + } + }); + + // Program should not be paused, so this should execute. + await callEvaluate(); + await completer.future; + + await consoleSubscription.cancel(); + }); + }, timeout: Timeout.factor(2)); +} diff --git a/dwds/web/client.dart b/dwds/web/client.dart index 5a549c7da..29dc2b750 100644 --- a/dwds/web/client.dart +++ b/dwds/web/client.dart @@ -63,16 +63,14 @@ Future? main() { final manager = ReloadingManager(client, restarter); - hotReloadJs = + hotReloadStartJs = () { - return manager.hotReload().toJS; + return manager.hotReloadStart(hotReloadSourcesPath).toJS; }.toJS; - fetchLibrariesForHotReloadJs = + hotReloadEndJs = () { - return manager - .fetchLibrariesForHotReload(hotReloadSourcesPath) - .toJS; + return manager.hotReloadEnd().toJS; }.toJS; Completer? readyToRunMainCompleter; @@ -184,8 +182,8 @@ Future? main() { 'ReloadConfiguration.hotRestart') { await manager.hotRestart(); } else if (reloadConfiguration == 'ReloadConfiguration.hotReload') { - await manager.fetchLibrariesForHotReload(hotReloadSourcesPath); - await manager.hotReload(); + await manager.hotReloadStart(hotReloadSourcesPath); + await manager.hotReloadEnd(); } } else if (event is DevToolsResponse) { if (!event.success) { @@ -413,8 +411,8 @@ Future handleWebSocketHotReloadRequest( ) async { final requestId = event.id; try { - await manager.fetchLibrariesForHotReload(hotReloadSourcesPath); - await manager.hotReload(); + await manager.hotReloadStart(hotReloadSourcesPath); + await manager.hotReloadEnd(); _sendHotReloadResponse(clientSink, requestId, success: true); } catch (e) { _sendHotReloadResponse( @@ -441,11 +439,11 @@ external set dartAppInstanceId(String? id); @JS(r'$dartModuleStrategy') external String get dartModuleStrategy; -@JS(r'$dartHotReloadDwds') -external set hotReloadJs(JSFunction cb); +@JS(r'$dartHotReloadStartDwds') +external set hotReloadStartJs(JSFunction cb); -@JS(r'$fetchLibrariesForHotReload') -external set fetchLibrariesForHotReloadJs(JSFunction cb); +@JS(r'$dartHotReloadEndDwds') +external set hotReloadEndJs(JSFunction cb); @JS(r'$hotReloadSourcesPath') external String? get _hotReloadSourcesPath; diff --git a/dwds/web/reloader/ddc_library_bundle_restarter.dart b/dwds/web/reloader/ddc_library_bundle_restarter.dart index 77f2eab9f..b9bffc843 100644 --- a/dwds/web/reloader/ddc_library_bundle_restarter.dart +++ b/dwds/web/reloader/ddc_library_bundle_restarter.dart @@ -25,6 +25,7 @@ extension type _DartDevEmbedder._(JSObject _) implements JSObject { extension type _DartDevEmbedderConfig._(JSObject _) implements JSObject { external JSFunction? capturedMainHandler; + external JSFunction? capturedHotReloadEndHandler; } extension type _Debugger._(JSObject _) implements JSObject { @@ -57,6 +58,8 @@ extension on JSArray { } class DdcLibraryBundleRestarter implements Restarter { + JSFunction? _capturedHotReloadEndCallback; + Future _runMainWhenReady( Future? readyToRunMain, JSFunction runMain, @@ -81,25 +84,8 @@ class DdcLibraryBundleRestarter implements Restarter { return true; } - late ({JSArray sources, JSArray libraries})? - _sourcesAndLibrariesToReload; - - @override - Future reload() async { - // Requires a previous call to `fetchLibrariesForHotReload`. - await _dartDevEmbedder - .hotReload( - _sourcesAndLibrariesToReload!.sources, - _sourcesAndLibrariesToReload!.libraries, - ) - .toDart; - _sourcesAndLibrariesToReload = null; - } - @override - Future> fetchLibrariesForHotReload( - String hotReloadSourcesPath, - ) async { + Future> hotReloadStart(String hotReloadSourcesPath) async { final completer = Completer(); final xhr = _XMLHttpRequest(); xhr.withCredentials = true; @@ -126,10 +112,19 @@ class DdcLibraryBundleRestarter implements Restarter { librariesToReload.push(library.toJS); } } - _sourcesAndLibrariesToReload = ( - sources: filesToLoad, - libraries: librariesToReload, - ); + _dartDevEmbedder.config.capturedHotReloadEndHandler = + (JSFunction hotReloadEndCallback) { + _capturedHotReloadEndCallback = hotReloadEndCallback; + }.toJS; + await _dartDevEmbedder.hotReload(filesToLoad, librariesToReload).toDart; return librariesToReload; } + + @override + Future hotReloadEnd() async { + // Requires a previous call to `hotReloadStart`. + _capturedHotReloadEndCallback!.callAsFunction(); + _dartDevEmbedder.config.capturedHotReloadEndHandler = null; + _capturedHotReloadEndCallback = null; + } } diff --git a/dwds/web/reloader/ddc_restarter.dart b/dwds/web/reloader/ddc_restarter.dart index c3ce499e0..095f21ef1 100644 --- a/dwds/web/reloader/ddc_restarter.dart +++ b/dwds/web/reloader/ddc_restarter.dart @@ -41,15 +41,13 @@ class DdcRestarter implements Restarter { } @override - Future reload() => + Future hotReloadEnd() => throw UnimplementedError( 'Hot reload is not supported for the DDC module format.', ); @override - Future> fetchLibrariesForHotReload( - String hotReloadSourcesPath, - ) => + Future> hotReloadStart(String hotReloadSourcesPath) => throw UnimplementedError( 'Hot reload is not supported for the DDC module format.', ); diff --git a/dwds/web/reloader/manager.dart b/dwds/web/reloader/manager.dart index 1142d8016..22c4b0fb4 100644 --- a/dwds/web/reloader/manager.dart +++ b/dwds/web/reloader/manager.dart @@ -36,15 +36,15 @@ class ReloadingManager { return result; } - /// Performs a hot reload using the sources and libraries computes in the - /// previous call to [fetchLibrariesForHotReload]. - Future hotReload() async { - await _restarter.reload(); + /// After a previous call to [hotReloadStart], completes the hot + /// reload by pushing the libraries into the Dart runtime. + Future hotReloadEnd() async { + await _restarter.hotReloadEnd(); } - /// Computes the sources and libraries to reload and returns the list of - /// libraries using [hotReloadSourcesPath] as the path to a JSONified list of - /// maps which follows the following format: + /// Computes the sources and libraries to reload, loads them into the page, + /// and returns the list of libraries using [hotReloadSourcesPath] as the path + /// to a JSONified list of maps which follows the following format: /// /// ```json /// [ @@ -59,9 +59,8 @@ class ReloadingManager { /// bundle. /// `libraries`: An array of strings containing the libraries that were /// compiled in `src`. - Future> fetchLibrariesForHotReload( - String hotReloadSourcesPath, - ) => _restarter.fetchLibrariesForHotReload(hotReloadSourcesPath); + Future> hotReloadStart(String hotReloadSourcesPath) => + _restarter.hotReloadStart(hotReloadSourcesPath); /// Does a hard reload of the application. void reloadPage() { diff --git a/dwds/web/reloader/require_restarter.dart b/dwds/web/reloader/require_restarter.dart index 6c94f5eb0..0e650629a 100644 --- a/dwds/web/reloader/require_restarter.dart +++ b/dwds/web/reloader/require_restarter.dart @@ -162,15 +162,13 @@ class RequireRestarter implements Restarter { } @override - Future reload() => + Future hotReloadEnd() => throw UnimplementedError( 'Hot reload is not supported for the AMD module format.', ); @override - Future> fetchLibrariesForHotReload( - String hotReloadSourcesPath, - ) => + Future> hotReloadStart(String hotReloadSourcesPath) => throw UnimplementedError( 'Hot reload is not supported for the AMD module format.', ); diff --git a/dwds/web/reloader/restarter.dart b/dwds/web/reloader/restarter.dart index baa933a51..e3ca0f70f 100644 --- a/dwds/web/reloader/restarter.dart +++ b/dwds/web/reloader/restarter.dart @@ -9,13 +9,13 @@ abstract class Restarter { /// not. Future restart({String? runId, Future? readyToRunMain}); - /// Performs a hot reload using the sources and libraries computes in the - /// previous call to [fetchLibrariesForHotReload]. - Future reload(); + /// After a previous call to [hotReloadStart], completes the hot + /// reload by pushing the libraries into the Dart runtime. + Future hotReloadEnd(); - /// Computes the sources and libraries to reload and returns the list of - /// libraries using [hotReloadSourcesPath] as the path to a JSONified list of - /// maps which follows the following format: + /// Computes the sources and libraries to reload, loads them into the page, + /// and returns the list of libraries using [hotReloadSourcesPath] as the path + /// to a JSONified list of maps which follows the following format: /// /// ```json /// [ @@ -30,7 +30,5 @@ abstract class Restarter { /// bundle. /// `libraries`: An array of strings containing the libraries that were /// compiled in `src`. - Future> fetchLibrariesForHotReload( - String hotReloadSourcesPath, - ); + Future> hotReloadStart(String hotReloadSourcesPath); } diff --git a/fixtures/_testHotReload/web/main.dart b/fixtures/_testHotReload/web/main.dart index 03fe05d3b..fb4229367 100644 --- a/fixtures/_testHotReload/web/main.dart +++ b/fixtures/_testHotReload/web/main.dart @@ -10,11 +10,7 @@ import 'package:_test_hot_reload/library1.dart'; @JS('document.body.innerHTML') external set innerHtml(String html); -@JS('console.log') -external void log(String s); - void evaluate() { - log('evaluate called $reloadValue'); innerHtml = 'Program is running!\n $reloadValue}\n'; } diff --git a/fixtures/_testHotReloadBreakpoints/pubspec.yaml b/fixtures/_testHotReloadBreakpoints/pubspec.yaml new file mode 100644 index 000000000..b70a37343 --- /dev/null +++ b/fixtures/_testHotReloadBreakpoints/pubspec.yaml @@ -0,0 +1,9 @@ +name: _test_hot_reload_breakpoints +version: 1.0.0 +description: >- + A fake package used for testing hot reload breakpoints. +publish_to: none + +environment: + sdk: ^3.7.0 + diff --git a/fixtures/_testHotReloadBreakpoints/web/index.html b/fixtures/_testHotReloadBreakpoints/web/index.html new file mode 100644 index 000000000..d93440a94 --- /dev/null +++ b/fixtures/_testHotReloadBreakpoints/web/index.html @@ -0,0 +1,7 @@ + + + + + + + diff --git a/fixtures/_testHotReloadBreakpoints/web/main.dart b/fixtures/_testHotReloadBreakpoints/web/main.dart new file mode 100644 index 000000000..ecad1c226 --- /dev/null +++ b/fixtures/_testHotReloadBreakpoints/web/main.dart @@ -0,0 +1,26 @@ +// 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:js_interop'; + +@JS('console.log') +external void log(String _); + +String get mainValue => 'main gen0'; + +void evaluate() { + // Use a future as if we come across a breakpoint, evaluating this method + // would never finish. + Future.delayed(Duration(milliseconds: 10), printToConsole); +} + +void printToConsole() { + log('$mainValue'); // Breakpoint: callLog +} + +final closure = () { + return 'captured closure gen0'; // Breakpoint: capturedString +}; + +void main() {} From 9167e951699aa425451a87cb2c7b21b0ee489cf7 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Thu, 29 May 2025 15:52:37 -0700 Subject: [PATCH 09/50] Add issue for optimizing metadata invalidation --- dwds/lib/src/services/chrome_proxy_service.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/dwds/lib/src/services/chrome_proxy_service.dart b/dwds/lib/src/services/chrome_proxy_service.dart index b94927611..142e8872b 100644 --- a/dwds/lib/src/services/chrome_proxy_service.dart +++ b/dwds/lib/src/services/chrome_proxy_service.dart @@ -248,6 +248,7 @@ class ChromeProxyService implements VmServiceInterface { // and possibly libraries that depend on them. Currently, there's no good // separation between "existing" information and "new" information, making // this difficult. + // https://github.com/dart-lang/webdev/issues/2628 Future _reinitializeForHotReload() async { final entrypoint = inspector.appConnection.request.entrypointPath; await globalToolConfiguration.loadStrategy.trackEntrypoint(entrypoint); From 32a5809581345dde43a67a55e3a98de8407e29b8 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Fri, 30 May 2025 14:16:36 -0700 Subject: [PATCH 10/50] Expect logs in the future instead and remove now dead code around removing breakpoints for specific libraries --- .../src/services/chrome_proxy_service.dart | 12 +- dwds/test/hot_reload_breakpoints_test.dart | 119 +++++++++--------- 2 files changed, 64 insertions(+), 67 deletions(-) diff --git a/dwds/lib/src/services/chrome_proxy_service.dart b/dwds/lib/src/services/chrome_proxy_service.dart index 142e8872b..253561b58 100644 --- a/dwds/lib/src/services/chrome_proxy_service.dart +++ b/dwds/lib/src/services/chrome_proxy_service.dart @@ -477,20 +477,12 @@ class ChromeProxyService implements VmServiceInterface { } /// Removes the breakpoints in the running isolate. - /// - /// [libraries] is a set of Dart libraries, where if non-null, only - /// breakpoints within those libraries are removed. - Future disableBreakpoints({Set? libraries}) async { + Future disableBreakpoints() async { if (!_isIsolateRunning) return; final isolate = inspector.isolate; for (final breakpoint in isolate.breakpoints?.toList() ?? []) { - if (libraries == null || - (breakpoint.location.script != null && - // ignore: avoid-collection-methods-with-unrelated-types - libraries.contains(breakpoint.location.script.uri))) { - await (await debuggerFuture).removeBreakpoint(breakpoint.id!); - } + await (await debuggerFuture).removeBreakpoint(breakpoint.id!); } } diff --git a/dwds/test/hot_reload_breakpoints_test.dart b/dwds/test/hot_reload_breakpoints_test.dart index 841c3a137..f008f80b9 100644 --- a/dwds/test/hot_reload_breakpoints_test.dart +++ b/dwds/test/hot_reload_breakpoints_test.dart @@ -156,6 +156,23 @@ void main() { await client.resume(isolate.id!); } + // When the program is executing, we want to check that at some point it + // will execute code that will emit [expectedString]. + Future resumeAndExpectLog(String expectedString) async { + final completer = Completer(); + final newSubscription = context.webkitDebugger.onConsoleAPICalled.listen(( + e, + ) { + if (e.args.first.value == expectedString) { + completer.complete(); + } + }); + await resume(); + await completer.future.then((_) { + newSubscription.cancel(); + }); + } + Future> hotReloadAndHandlePausePost( List<({String file, String breakpointMarker, Breakpoint? bp})> breakpoints, @@ -198,6 +215,26 @@ void main() { await client.evaluate(isolate.id!, rootLib!.id!, 'evaluate()'); } + // Much like `resumeAndExpectLog`, we need a completer to ensure the log + // will eventually occur when code is executing. + Future callEvaluateAndExpectLog(String expectedString) async { + final completer = Completer(); + final newSubscription = context.webkitDebugger.onConsoleAPICalled.listen(( + e, + ) { + if (e.args.first.value == expectedString) { + completer.complete(); + } + }); + final vm = await client.getVM(); + final isolate = await client.getIsolate(vm.isolates!.first.id!); + final rootLib = isolate.rootLib; + await client.evaluate(isolate.id!, rootLib!.id!, 'evaluate()'); + await completer.future.then((_) { + newSubscription.cancel(); + }); + } + test('after edit and hot reload, breakpoint is in new file', () async { final oldString = 'main gen0'; final newString = 'main gen1'; @@ -214,8 +251,7 @@ void main() { (event) => event.kind == EventKind.kPauseBreakpoint, ); expect(consoleLogs.contains(oldString), false); - await resume(); - expect(consoleLogs.contains(oldString), true); + await resumeAndExpectLog(oldString); consoleLogs.clear(); @@ -233,8 +269,7 @@ void main() { (event) => event.kind == EventKind.kPauseBreakpoint, ); expect(consoleLogs.contains(newString), false); - await resume(); - expect(consoleLogs.contains(newString), true); + await resumeAndExpectLog(newString); }); test('after adding line, hot reload, removing line, and hot reload, ' @@ -253,8 +288,7 @@ void main() { (event) => event.kind == EventKind.kPauseBreakpoint, ); expect(consoleLogs.contains(genLog), false); - await resume(); - expect(consoleLogs.contains(genLog), true); + await resumeAndExpectLog(genLog); consoleLogs.clear(); @@ -276,8 +310,7 @@ void main() { (event) => event.kind == EventKind.kPauseBreakpoint, ); expect(consoleLogs.contains(extraLog), true); - await resume(); - expect(consoleLogs.contains(genLog), true); + await resumeAndExpectLog(genLog); consoleLogs.clear(); @@ -295,8 +328,7 @@ void main() { (event) => event.kind == EventKind.kPauseBreakpoint, ); expect(consoleLogs.contains(extraLog), false); - await resume(); - expect(consoleLogs.contains(genLog), true); + await resumeAndExpectLog(genLog); }); test( @@ -317,8 +349,7 @@ void main() { (event) => event.kind == EventKind.kPauseBreakpoint, ); expect(consoleLogs.contains(genLog), false); - await resume(); - expect(consoleLogs.contains(genLog), true); + await resumeAndExpectLog(genLog); consoleLogs.clear(); @@ -359,8 +390,7 @@ void main() { (event) => event.kind == EventKind.kPauseBreakpoint, ); expect(consoleLogs.contains(libGenLog), false); - await resume(); - expect(consoleLogs.contains(libGenLog), true); + await resumeAndExpectLog(libGenLog); context.removeLibraryFile(libFileName: libFile); }, @@ -390,8 +420,7 @@ void main() { final oldCapturedString = 'captured closure gen0'; expect(consoleLogs.contains(oldCapturedString), false); // Closure gets evaluated for the first time. - await resume(); - expect(consoleLogs.contains(oldCapturedString), true); + await resumeAndExpectLog(oldCapturedString); final newCapturedString = 'captured closure gen1'; await makeEditAndRecompile( @@ -404,20 +433,9 @@ void main() { (file: mainFile, breakpointMarker: capturedStringMarker, bp: bp), ]); - // Use a completer as we won't hit a pause. - final completer = Completer(); - final consoleSubscription = context.webkitDebugger.onConsoleAPICalled - .listen((e) { - if (e.args.first.value == oldCapturedString) { - completer.complete(); - } - }); - - await callEvaluate(); - - // Breakpoint should not have been hit as it's now deleted. We should also - // see the old string still as the closure has not been reevaluated. - await completer.future; + // Breakpoint should not be hit as it's now deleted. We should also see + // the old string still as the closure has not been reevaluated. + await callEvaluateAndExpectLog(oldCapturedString); await consoleSubscription.cancel(); }); @@ -445,30 +463,29 @@ void main() { await context.tearDown(); }); - Future callEvaluate() async { + Future callEvaluateAndExpectLog(String expectedString) async { + final completer = Completer(); + final newSubscription = context.webkitDebugger.onConsoleAPICalled.listen(( + e, + ) { + if (e.args.first.value == expectedString) { + completer.complete(); + } + }); final vm = await client.getVM(); final isolate = await client.getIsolate(vm.isolates!.first.id!); final rootLib = isolate.rootLib; await client.evaluate(isolate.id!, rootLib!.id!, 'evaluate()'); + await completer.future.then((_) { + newSubscription.cancel(); + }); } test('no pause when calling reloadSources', () async { final oldString = 'main gen0'; final newString = 'main gen1'; - // Use a completer as we won't hit a pause. - var completer = Completer(); - var consoleSubscription = context.webkitDebugger.onConsoleAPICalled - .listen((e) { - if (e.args.first.value == oldString) { - completer.complete(); - } - }); - - await callEvaluate(); - await completer.future; - - await consoleSubscription.cancel(); + await callEvaluateAndExpectLog(oldString); // Modify the string that gets printed and hot reload. await makeEditAndRecompile(mainFile, oldString, newString); @@ -477,20 +494,8 @@ void main() { final report = await client.reloadSources(isolate.id!); expect(report.success, true); - completer = Completer(); - consoleSubscription = context.webkitDebugger.onConsoleAPICalled.listen(( - e, - ) { - if (e.args.first.value == newString) { - completer.complete(); - } - }); - // Program should not be paused, so this should execute. - await callEvaluate(); - await completer.future; - - await consoleSubscription.cancel(); + await callEvaluateAndExpectLog(newString); }); }, timeout: Timeout.factor(2)); } From 7a365a616f5074bd06174ee2b4b7d597ef3fdf10 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Fri, 30 May 2025 17:28:29 -0700 Subject: [PATCH 11/50] Remove duplicate cancel and send real isolateid to reloadsources --- dwds/test/common/chrome_proxy_service_common.dart | 4 +++- dwds/test/hot_reload_breakpoints_test.dart | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dwds/test/common/chrome_proxy_service_common.dart b/dwds/test/common/chrome_proxy_service_common.dart index 29351b96b..60fc6e2ca 100644 --- a/dwds/test/common/chrome_proxy_service_common.dart +++ b/dwds/test/common/chrome_proxy_service_common.dart @@ -2234,7 +2234,9 @@ void runTests({ test('reloadSources', () async { final service = context.service; - final report = await service.reloadSources(''); + final vm = await service.getVM(); + final isolateId = vm.isolates!.first.id!; + final report = await service.reloadSources(isolateId); // TODO(srujzs): This naturally fails regardless of the module format // because we didn't set up prerequisite state (the reload scripts). We // should create new tests for hot reload within DWDS and remove this diff --git a/dwds/test/hot_reload_breakpoints_test.dart b/dwds/test/hot_reload_breakpoints_test.dart index f008f80b9..bc29bac76 100644 --- a/dwds/test/hot_reload_breakpoints_test.dart +++ b/dwds/test/hot_reload_breakpoints_test.dart @@ -436,8 +436,6 @@ void main() { // Breakpoint should not be hit as it's now deleted. We should also see // the old string still as the closure has not been reevaluated. await callEvaluateAndExpectLog(oldCapturedString); - - await consoleSubscription.cancel(); }); }, timeout: Timeout.factor(2)); From b9709a6943f99e3efa110b2649af4238d1be7d9d Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Fri, 30 May 2025 17:52:49 -0700 Subject: [PATCH 12/50] Use breakpoint futures instead to wait for breakpoint in the future --- dwds/test/hot_reload_breakpoints_test.dart | 58 ++++++++++++---------- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/dwds/test/hot_reload_breakpoints_test.dart b/dwds/test/hot_reload_breakpoints_test.dart index bc29bac76..35d584599 100644 --- a/dwds/test/hot_reload_breakpoints_test.dart +++ b/dwds/test/hot_reload_breakpoints_test.dart @@ -235,6 +235,9 @@ void main() { }); } + Future waitForBreakpoint() => + stream.firstWhere((event) => event.kind == EventKind.kPauseBreakpoint); + test('after edit and hot reload, breakpoint is in new file', () async { final oldString = 'main gen0'; final newString = 'main gen1'; @@ -244,12 +247,12 @@ void main() { breakpointMarker: callLogMarker, ); + var breakpointFuture = waitForBreakpoint(); + await callEvaluate(); // Should break at `callLog`. - await stream.firstWhere( - (event) => event.kind == EventKind.kPauseBreakpoint, - ); + await breakpointFuture; expect(consoleLogs.contains(oldString), false); await resumeAndExpectLog(oldString); @@ -262,12 +265,12 @@ void main() { (file: mainFile, breakpointMarker: callLogMarker, bp: bp), ]); + breakpointFuture = waitForBreakpoint(); + await callEvaluate(); // Should break at `callLog`. - await stream.firstWhere( - (event) => event.kind == EventKind.kPauseBreakpoint, - ); + await breakpointFuture; expect(consoleLogs.contains(newString), false); await resumeAndExpectLog(newString); }); @@ -281,12 +284,12 @@ void main() { breakpointMarker: callLogMarker, ); + var breakpointFuture = waitForBreakpoint(); + await callEvaluate(); // Should break at `callLog`. - await stream.firstWhere( - (event) => event.kind == EventKind.kPauseBreakpoint, - ); + await breakpointFuture; expect(consoleLogs.contains(genLog), false); await resumeAndExpectLog(genLog); @@ -303,12 +306,12 @@ void main() { (file: mainFile, breakpointMarker: callLogMarker, bp: bp), ])).first; + breakpointFuture = waitForBreakpoint(); + await callEvaluate(); // Should break at `callLog`. - await stream.firstWhere( - (event) => event.kind == EventKind.kPauseBreakpoint, - ); + await breakpointFuture; expect(consoleLogs.contains(extraLog), true); await resumeAndExpectLog(genLog); @@ -321,12 +324,12 @@ void main() { (file: mainFile, breakpointMarker: callLogMarker, bp: bp), ]); + breakpointFuture = waitForBreakpoint(); + await callEvaluate(); // Should break at `callLog`. - await stream.firstWhere( - (event) => event.kind == EventKind.kPauseBreakpoint, - ); + await breakpointFuture; expect(consoleLogs.contains(extraLog), false); await resumeAndExpectLog(genLog); }); @@ -342,12 +345,12 @@ void main() { breakpointMarker: callLogMarker, ); + var breakpointFuture = waitForBreakpoint(); + await callEvaluate(); // Should break at `callLog`. - await stream.firstWhere( - (event) => event.kind == EventKind.kPauseBreakpoint, - ); + await breakpointFuture; expect(consoleLogs.contains(genLog), false); await resumeAndExpectLog(genLog); @@ -377,18 +380,19 @@ void main() { (file: libFile, breakpointMarker: libValueMarker, bp: null), ]); + breakpointFuture = waitForBreakpoint(); + await callEvaluate(); // Should break at `callLog`. - await stream.firstWhere( - (event) => event.kind == EventKind.kPauseBreakpoint, - ); + await breakpointFuture; expect(consoleLogs.contains(libGenLog), false); + + breakpointFuture = waitForBreakpoint(); + await resume(); // Should break at `libValue`. - await stream.firstWhere( - (event) => event.kind == EventKind.kPauseBreakpoint, - ); + await breakpointFuture; expect(consoleLogs.contains(libGenLog), false); await resumeAndExpectLog(libGenLog); @@ -411,12 +415,12 @@ void main() { (file: mainFile, breakpointMarker: capturedStringMarker, bp: bp), ])).first; + final breakpointFuture = waitForBreakpoint(); + await callEvaluate(); // Should break at `capturedString`. - await stream.firstWhere( - (event) => event.kind == EventKind.kPauseBreakpoint, - ); + await breakpointFuture; final oldCapturedString = 'captured closure gen0'; expect(consoleLogs.contains(oldCapturedString), false); // Closure gets evaluated for the first time. From a18a7c7608445ec36bca5ad8635737f2c7c5f6c2 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Sun, 8 Jun 2025 11:07:58 -0700 Subject: [PATCH 13/50] Await main in hot restart tests to fix some race conditions - Recompile is needed for the frontend server even when no edits are made - Also use expectAll in hot_restart_breakpoints_test --- dwds/test/common/hot_restart_common.dart | 76 ++++++++++++++++--- dwds/test/hot_restart_breakpoints_test.dart | 5 +- .../_testSound/example/append_body/main.dart | 7 ++ 3 files changed, 74 insertions(+), 14 deletions(-) diff --git a/dwds/test/common/hot_restart_common.dart b/dwds/test/common/hot_restart_common.dart index de3539037..f1f0fce4a 100644 --- a/dwds/test/common/hot_restart_common.dart +++ b/dwds/test/common/hot_restart_common.dart @@ -7,6 +7,8 @@ @Timeout(Duration(minutes: 5)) library; +import 'dart:async'; + import 'package:dwds/dwds.dart'; import 'package:dwds/expression_compiler.dart'; import 'package:test/test.dart'; @@ -32,19 +34,26 @@ void runTests({ tearDownAll(provider.dispose); - Future makeEditAndRecompile() async { - context.makeEditToDartEntryFile( - toReplace: originalString, - replaceWith: newString, - ); + Future recompile({bool hasEdits = false}) async { if (compilationMode == CompilationMode.frontendServer) { await context.recompile(fullRestart: true); } else { assert(compilationMode == CompilationMode.buildDaemon); - await context.waitForSuccessfulBuild(propagateToBrowser: true); + if (hasEdits) { + // Only gets a new build if there were edits. + await context.waitForSuccessfulBuild(propagateToBrowser: true); + } } } + Future makeEditAndRecompile() async { + context.makeEditToDartEntryFile( + toReplace: originalString, + replaceWith: newString, + ); + await recompile(hasEdits: true); + } + void undoEdit() { context.makeEditToDartEntryFile( toReplace: newString, @@ -52,6 +61,27 @@ void runTests({ ); } + /// Wait for main to finish executing before checking expectations by checking + /// for a log output. + /// + /// If [debuggingEnabled] is false, we can't check for Chrome logs and instead + /// wait 1 second. + // TODO(srujzs): We should do something less prone to race conditions when + // debugging is disabled. + Future waitForMainToExecute({bool debuggingEnabled = true}) async { + if (!debuggingEnabled) return Future.delayed(const Duration(seconds: 1)); + final completer = Completer(); + final expectedString = 'main executed'; + final subscription = context.webkitDebugger.onConsoleAPICalled.listen((e) { + if (e.args.first.value == expectedString) { + completer.complete(); + } + }); + await completer.future.then((_) { + subscription.cancel(); + }); + } + group( 'Injected client with live reload', () { @@ -74,7 +104,9 @@ void runTests({ }); test('can live reload changes ', () async { + final mainDone = waitForMainToExecute(); await makeEditAndRecompile(); + await mainDone; final source = await context.webDriver.pageSource; // A full reload should clear the state. @@ -105,8 +137,9 @@ void runTests({ }); test('can live reload changes ', () async { + final mainDone = waitForMainToExecute(debuggingEnabled: false); await makeEditAndRecompile(); - + await mainDone; final source = await context.webDriver.pageSource; // A full reload should clear the state. @@ -138,8 +171,9 @@ void runTests({ }); test('can live reload changes ', () async { + final mainDone = waitForMainToExecute(debuggingEnabled: false); await makeEditAndRecompile(); - + await mainDone; final source = await context.webDriver.pageSource; // A full reload should clear the state. @@ -281,6 +315,7 @@ void runTests({ ]), ), ); + final mainDone = waitForMainToExecute(); final hotRestart = context.getRegisteredServiceExtension('hotRestart'); expect( await fakeClient.callServiceExtension(hotRestart!), @@ -288,6 +323,7 @@ void runTests({ ); await eventsDone; + await mainDone; final source = await context.webDriver.pageSource; // Main is re-invoked which shouldn't clear the state. @@ -324,6 +360,8 @@ void runTests({ "registerExtension('ext.foo', $callback)", ); + await recompile(); + final mainDone = waitForMainToExecute(); final hotRestart = context.getRegisteredServiceExtension('hotRestart'); expect( await fakeClient.callServiceExtension(hotRestart!), @@ -342,6 +380,7 @@ void runTests({ ); await eventsDone; + await mainDone; final source = await context.webDriver.pageSource; // Main is re-invoked which shouldn't clear the state. @@ -363,7 +402,7 @@ void runTests({ ]), ), ); - + final mainDone = waitForMainToExecute(); final fullReload = context.getRegisteredServiceExtension('fullReload'); expect( await fakeClient.callServiceExtension(fullReload!), @@ -371,6 +410,7 @@ void runTests({ ); await eventsDone; + await mainDone; final source = await context.webDriver.pageSource; // Should see only the new text @@ -399,8 +439,12 @@ void runTests({ ); await makeEditAndRecompile(); + final mainDone = waitForMainToExecute(); final hotRestart = context.getRegisteredServiceExtension('hotRestart'); await fakeClient.callServiceExtension(hotRestart!); + + await mainDone; + final source = await context.webDriver.pageSource; // Main is re-invoked which shouldn't clear the state. @@ -418,6 +462,7 @@ void runTests({ test('can evaluate expressions after hot restart', () async { final client = context.debugConnection.vmService; + await recompile(); final hotRestart = context.getRegisteredServiceExtension('hotRestart'); await fakeClient.callServiceExtension(hotRestart!); @@ -461,8 +506,9 @@ void runTests({ }); test('can hot restart changes ', () async { + final mainDone = waitForMainToExecute(); await makeEditAndRecompile(); - + await mainDone; final source = await context.webDriver.pageSource; // Main is re-invoked which shouldn't clear the state. @@ -521,8 +567,9 @@ void runTests({ }); test('can hot restart changes ', () async { + final mainDone = waitForMainToExecute(debuggingEnabled: false); await makeEditAndRecompile(); - + await mainDone; final source = await context.webDriver.pageSource; // Main is re-invoked which shouldn't clear the state. @@ -582,6 +629,7 @@ void runTests({ ), ); + final mainDone = waitForMainToExecute(); final hotRestart = context.getRegisteredServiceExtension('hotRestart'); expect( await fakeClient.callServiceExtension(hotRestart!), @@ -597,6 +645,8 @@ void runTests({ final isolateId = vm.isolates!.first.id!; await client.resume(isolateId); + await mainDone; + final sourceAfterResume = await context.webDriver.pageSource; expect(sourceAfterResume.contains(newString), isTrue); }, @@ -605,8 +655,8 @@ void runTests({ test( 'after page refresh, does not run app until there is a resume event', () async { + final mainDone = waitForMainToExecute(); await makeEditAndRecompile(); - await context.webDriver.driver.refresh(); final eventsDone = expectLater( @@ -629,6 +679,8 @@ void runTests({ final isolateId = vm.isolates!.first.id!; await client.resume(isolateId); + await mainDone; + final sourceAfterResume = await context.webDriver.pageSource; expect(sourceAfterResume.contains(newString), isTrue); }, diff --git a/dwds/test/hot_restart_breakpoints_test.dart b/dwds/test/hot_restart_breakpoints_test.dart index 60d8e799f..a8f11b078 100644 --- a/dwds/test/hot_restart_breakpoints_test.dart +++ b/dwds/test/hot_restart_breakpoints_test.dart @@ -181,8 +181,9 @@ void main() { ), ); - final waitForPausePost = stream.firstWhere( - (event) => event.kind == EventKind.kPausePostRequest, + final waitForPausePost = expectLater( + stream, + emitsThrough(_hasKind(EventKind.kPausePostRequest)), ); final hotRestart = context.getRegisteredServiceExtension('hotRestart'); diff --git a/fixtures/_testSound/example/append_body/main.dart b/fixtures/_testSound/example/append_body/main.dart index c9000e381..c030eac89 100644 --- a/fixtures/_testSound/example/append_body/main.dart +++ b/fixtures/_testSound/example/append_body/main.dart @@ -7,6 +7,10 @@ import 'dart:developer'; // TODO: https://github.com/dart-lang/webdev/issues/2508 // ignore: deprecated_member_use import 'dart:html'; +import 'dart:js_interop'; + +@JS('console.log') +external void log(String _); void main() { var count = 0; @@ -23,4 +27,7 @@ void main() { document.body?.appendText('end disassemble '); return ServiceExtensionResponse.result('{}'); }); + + // Wait for this print statement so that we know main is done executing. + log('main executed'); } From 3d613420882997df0a9b07f71b0c2502a581b3a9 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Sun, 8 Jun 2025 11:17:06 -0700 Subject: [PATCH 14/50] Use expectLater instead --- dwds/test/hot_reload_breakpoints_test.dart | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dwds/test/hot_reload_breakpoints_test.dart b/dwds/test/hot_reload_breakpoints_test.dart index 35d584599..df0636f12 100644 --- a/dwds/test/hot_reload_breakpoints_test.dart +++ b/dwds/test/hot_reload_breakpoints_test.dart @@ -177,8 +177,9 @@ void main() { List<({String file, String breakpointMarker, Breakpoint? bp})> breakpoints, ) async { - final waitForPausePost = stream.firstWhere( - (event) => event.kind == EventKind.kPausePostRequest, + final waitForPausePost = expectLater( + stream, + emitsThrough(_hasKind(EventKind.kPausePostRequest)), ); // Initiate the hot reload by loading the sources into the page. @@ -235,8 +236,8 @@ void main() { }); } - Future waitForBreakpoint() => - stream.firstWhere((event) => event.kind == EventKind.kPauseBreakpoint); + Future waitForBreakpoint() => + expectLater(stream, emitsThrough(_hasKind(EventKind.kPauseBreakpoint))); test('after edit and hot reload, breakpoint is in new file', () async { final oldString = 'main gen0'; @@ -501,3 +502,6 @@ void main() { }); }, timeout: Timeout.factor(2)); } + +TypeMatcher _hasKind(String kind) => + isA().having((e) => e.kind, 'kind', kind); From 3fea5a5bf9a79c25db1b6b55dc97411b0cf89bdd Mon Sep 17 00:00:00 2001 From: Nate Biggs Date: Tue, 27 May 2025 14:27:00 -0400 Subject: [PATCH 15/50] Fix e2e 'evaluate' test to use new Closure toString format. (#2624) Co-authored-by: Nate Biggs --- webdev/test/e2e_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webdev/test/e2e_test.dart b/webdev/test/e2e_test.dart index 09de57c7a..fe7100efe 100644 --- a/webdev/test/e2e_test.dart +++ b/webdev/test/e2e_test.dart @@ -390,7 +390,7 @@ void main() { const TypeMatcher().having( (instance) => instance.valueAsString, 'valueAsString', - contains('Hello World!!'))); + contains('Closure: () => void'))); } finally { await vmService?.dispose(); await exitWebdev(process); From 4b04ad9b531820b1e8c1d9f57b5d54916593e8a0 Mon Sep 17 00:00:00 2001 From: Nicholas Shahan Date: Tue, 3 Jun 2025 09:50:22 -0700 Subject: [PATCH 16/50] Fix e2e_test to work with current DDC output (#2626) Fix e2e_test to work with current DDC output Add a top level method and expect the result of calling that method in an expression evaluation. The existing test for expression evaluation in the context of a library relied on the output of the `.toString()` of a top level method tearoff. This representation changed recently causing the test to fail. --- fixtures/_webdevSoundSmoke/web/main.dart | 2 ++ webdev/test/e2e_test.dart | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/fixtures/_webdevSoundSmoke/web/main.dart b/fixtures/_webdevSoundSmoke/web/main.dart index a8be53f93..8e3be2873 100644 --- a/fixtures/_webdevSoundSmoke/web/main.dart +++ b/fixtures/_webdevSoundSmoke/web/main.dart @@ -23,3 +23,5 @@ void main() { print('Counter is: ${++count}'); // Breakpoint: printCounter }); } + +String topLevelMethod() => 'verify this!'; diff --git a/webdev/test/e2e_test.dart b/webdev/test/e2e_test.dart index fe7100efe..102d3f3ff 100644 --- a/webdev/test/e2e_test.dart +++ b/webdev/test/e2e_test.dart @@ -382,15 +382,15 @@ void main() { 'valueAsString', 'Hello World!!')); - result = - await vmService.evaluate(isolateId, libraryId, 'main.toString()'); + result = await vmService.evaluate( + isolateId, libraryId, 'topLevelMethod()'); expect( result, const TypeMatcher().having( (instance) => instance.valueAsString, 'valueAsString', - contains('Closure: () => void'))); + equals('verify this!'))); } finally { await vmService?.dispose(); await exitWebdev(process); @@ -555,7 +555,7 @@ void main() { expect( () => - vmService!.evaluate(isolateId, libraryId, 'main.toString()'), + vmService!.evaluate(isolateId, libraryId, 'topLevelMethod()'), throwsRPCError); } finally { await vmService?.dispose(); From ecc3c7a1e90aa4ddf9d0397ee430a36b88464472 Mon Sep 17 00:00:00 2001 From: Nate Biggs Date: Thu, 5 Jun 2025 10:45:49 -0400 Subject: [PATCH 17/50] Update e2e_test expectation to look for more consistent message. (#2630) Co-authored-by: Nate Biggs --- webdev/test/e2e_test.dart | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/webdev/test/e2e_test.dart b/webdev/test/e2e_test.dart index 102d3f3ff..4a4e4a579 100644 --- a/webdev/test/e2e_test.dart +++ b/webdev/test/e2e_test.dart @@ -113,7 +113,7 @@ void main() { final process = await testRunner.runWebDev(args, workingDirectory: soundExampleDirectory); - await checkProcessStdout(process, ['Succeeded']); + await checkProcessStdout(process, ['Writing asset manifest completed']); await process.shouldExit(0); }, // https://github.com/dart-lang/webdev/issues/2489, @@ -133,7 +133,7 @@ void main() { final process = await testRunner.runWebDev(args, workingDirectory: soundExampleDirectory); - final expectedItems = ['Succeeded']; + final expectedItems = ['Writing asset manifest completed']; await checkProcessStdout(process, expectedItems); await process.shouldExit(0); @@ -166,7 +166,7 @@ void main() { final process = await testRunner.runWebDev(args, workingDirectory: soundExampleDirectory); - final expectedItems = ['Succeeded']; + final expectedItems = ['Writing asset manifest completed']; await checkProcessStdout(process, expectedItems); await process.shouldExit(0); @@ -189,7 +189,9 @@ void main() { final process = await testRunner.runWebDev(args, workingDirectory: soundExampleDirectory); - final expectedItems = ['Succeeded']; + final expectedItems = [ + 'Caching finalized dependency graph completed' + ]; await checkProcessStdout(process, expectedItems); await process.shouldExit(0); @@ -215,7 +217,10 @@ void main() { final hostUrl = 'http://localhost:$openPort'; // Wait for the initial build to finish. - await expectLater(process.stdout, emitsThrough(contains('Succeeded'))); + await expectLater( + process.stdout, + emitsThrough( + contains('Caching finalized dependency graph completed'))); final client = HttpClient(); From c55980f3c6ac0e2ddcd94cfeb413224a1d117356 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Jun 2025 17:22:08 +0000 Subject: [PATCH 18/50] Bump the github-actions group across 1 directory with 3 updates (#2593) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the github-actions group with 3 updates in the / directory: [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart), [actions/cache](https://github.com/actions/cache) and [actions/stale](https://github.com/actions/stale). Updates `dart-lang/setup-dart` from 1.7.0 to 1.7.1
Release notes

Sourced from dart-lang/setup-dart's releases.

v1.7.1

  • Roll undici dependency to address CVE-2025-22150.
  • Update to the latest npm dependencies.
  • Recompile the action using the new Dart / JavaScript interop.
Changelog

Sourced from dart-lang/setup-dart's changelog.

v1.7.1

  • Roll undici dependency to address CVE-2025-22150.
  • Update to the latest npm dependencies.
  • Recompile the action using the new Dart / JavaScript interop.

v1.7.0

v1.6.5

  • Fix zip path handling on Windows 11 (#118[])

#118: dart-lang/setup-dart#118

v1.6.4

  • Rebuild JS code.

v1.6.3

v1.6.2

v1.6.1

  • Updated the google storage url for main channel releases.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).

v1.5.1

... (truncated)

Commits

Updates `actions/cache` from 4.2.0 to 4.2.2
Release notes

Sourced from actions/cache's releases.

v4.2.2

What's Changed

[!IMPORTANT] As a reminder, there were important backend changes to release v4.2.0, see those release notes and the announcement for more details.

Full Changelog: https://github.com/actions/cache/compare/v4.2.1...v4.2.2

v4.2.1

What's Changed

[!IMPORTANT] As a reminder, there were important backend changes to release v4.2.0, see those release notes and the announcement for more details.

New Contributors

Full Changelog: https://github.com/actions/cache/compare/v4.2.0...v4.2.1

Changelog

Sourced from actions/cache's changelog.

Releases

4.2.2

  • Bump @actions/cache to v4.0.2

4.2.1

  • Bump @actions/cache to v4.0.1

4.2.0

TLDR; The cache backend service has been rewritten from the ground up for improved performance and reliability. actions/cache now integrates with the new cache service (v2) APIs.

The new service will gradually roll out as of February 1st, 2025. The legacy service will also be sunset on the same date. Changes in these release are fully backward compatible.

We are deprecating some versions of this action. We recommend upgrading to version v4 or v3 as soon as possible before February 1st, 2025. (Upgrade instructions below).

If you are using pinned SHAs, please use the SHAs of versions v4.2.0 or v3.4.0

If you do not upgrade, all workflow runs using any of the deprecated actions/cache will fail.

Upgrading to the recommended versions will not break your workflows.

4.1.2

  • Add GitHub Enterprise Cloud instances hostname filters to inform API endpoint choices - #1474
  • Security fix: Bump braces from 3.0.2 to 3.0.3 - #1475

4.1.1

  • Restore original behavior of cache-hit output - #1467

4.1.0

  • Ensure cache-hit output is set when a cache is missed - #1404
  • Deprecate save-always input - #1452

4.0.2

  • Fixed restore fail-on-cache-miss not working.

4.0.1

  • Updated isGhes check

4.0.0

  • Updated minimum runner version support from node 12 -> node 20

... (truncated)

Commits
  • d4323d4 Merge pull request #1560 from actions/robherley/v4.2.2
  • da26677 bump @​actions/cache to v4.0.2, prep for v4.2.2 release
  • 7921ae2 Merge pull request #1557 from actions/robherley/ia-workflow-released
  • 3937731 Update publish-immutable-actions.yml
  • 0c907a7 Merge pull request #1554 from actions/robherley/v4.2.1
  • 710893c bump @​actions/cache to v4.0.1
  • 9fa7e61 Update force deletion docs due a recent deprecation (#1500)
  • 36f1e14 docs: Make the "always save prime numbers" example more clear (#1525)
  • 53aa38c Correct GitHub Spelling in caching-strategies.md (#1526)
  • See full diff in compare view

Updates `actions/stale` from 9.0.0 to 9.1.0
Release notes

Sourced from actions/stale's releases.

v9.1.0

What's Changed

New Contributors

Full Changelog: https://github.com/actions/stale/compare/v9...v9.1.0

Commits
  • 5bef64f build(deps): bump @​actions/cache from 3.2.2 to 4.0.0 (#1194)
  • fa77dfd build(deps-dev): bump @​types/jest from 29.5.11 to 29.5.14 (#1193)
  • f04443d build(deps): bump @​actions/core from 1.10.1 to 1.11.1 (#1191)
  • 5c715b0 build(deps-dev): bump ts-jest from 29.1.1 to 29.2.5 (#1175)
  • f691222 build(deps): bump actions/publish-action from 0.2.2 to 0.3.0 (#1147)
  • df990c2 build(deps): bump actions/checkout from 3 to 4 (#1091)
  • 6e472ce Merge pull request #1179 from actions/Jcambass-patch-1
  • d10ba64 Merge pull request #1150 from actions/dependabot/npm_and_yarn/undici-5.28.4
  • bbf3da5 resolve check failures
  • 6a2e61d Add workflow file for publishing releases to immutable action package
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
--- .github/workflows/daily_stable_testing.yml | 2 +- .github/workflows/daily_testing.yml | 2 +- .github/workflows/dart.yml | 120 ++++++++++----------- .github/workflows/dcm.yml | 2 +- .github/workflows/no-response.yml | 2 +- .github/workflows/release_reminder.yml | 2 +- 6 files changed, 65 insertions(+), 65 deletions(-) diff --git a/.github/workflows/daily_stable_testing.yml b/.github/workflows/daily_stable_testing.yml index 7a9fc7714..0039739ba 100644 --- a/.github/workflows/daily_stable_testing.yml +++ b/.github/workflows/daily_stable_testing.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up stable Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: stable - name: Activate Webdev diff --git a/.github/workflows/daily_testing.yml b/.github/workflows/daily_testing.yml index 2232ee63a..108df81d9 100644 --- a/.github/workflows/daily_testing.yml +++ b/.github/workflows/daily_testing.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: main - id: checkout diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index c9cae5c54..e50e847c6 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable" @@ -30,7 +30,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: stable - id: checkout @@ -45,7 +45,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds;commands:format-analyze_0-test_0" @@ -55,7 +55,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: dev - id: checkout @@ -83,7 +83,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:example-fixtures/_webdevSoundSmoke-frontend_server_client-frontend_server_common-test_common;commands:format-analyze_0" @@ -93,7 +93,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: dev - id: checkout @@ -169,7 +169,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:webdev;commands:format-analyze_0-test_7" @@ -179,7 +179,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: dev - id: checkout @@ -207,7 +207,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds;commands:command-test_1" @@ -217,7 +217,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: dev - id: checkout @@ -246,7 +246,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds;commands:test_2" @@ -256,7 +256,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: dev - id: checkout @@ -281,7 +281,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds;commands:test_3" @@ -291,7 +291,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: dev - id: checkout @@ -316,7 +316,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds;commands:test_4" @@ -326,7 +326,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: dev - id: checkout @@ -351,7 +351,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:frontend_server_client;commands:test_5" @@ -361,7 +361,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: dev - id: checkout @@ -386,7 +386,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:test_common;commands:command-test_6" @@ -396,7 +396,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: dev - id: checkout @@ -425,7 +425,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:webdev;commands:command-test_5" @@ -435,7 +435,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: dev - id: checkout @@ -464,7 +464,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:main;packages:dwds;commands:command-test_1" @@ -474,7 +474,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: main - id: checkout @@ -503,7 +503,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:main;packages:dwds;commands:test_2" @@ -513,7 +513,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: main - id: checkout @@ -538,7 +538,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:main;packages:dwds;commands:test_3" @@ -548,7 +548,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: main - id: checkout @@ -573,7 +573,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:main;packages:dwds;commands:test_4" @@ -583,7 +583,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: main - id: checkout @@ -608,7 +608,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:main;packages:frontend_server_client;commands:test_5" @@ -618,7 +618,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: main - id: checkout @@ -643,7 +643,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:main;packages:test_common;commands:command-test_6" @@ -653,7 +653,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: main - id: checkout @@ -682,7 +682,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:main;packages:webdev;commands:command-test_5" @@ -692,7 +692,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: main - id: checkout @@ -721,7 +721,7 @@ jobs: runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: dev - id: checkout @@ -746,7 +746,7 @@ jobs: runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: dev - id: checkout @@ -771,7 +771,7 @@ jobs: runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: dev - id: checkout @@ -796,7 +796,7 @@ jobs: runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: dev - id: checkout @@ -821,7 +821,7 @@ jobs: runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: dev - id: checkout @@ -846,7 +846,7 @@ jobs: runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: dev - id: checkout @@ -871,7 +871,7 @@ jobs: runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: dev - id: checkout @@ -896,7 +896,7 @@ jobs: runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: main - id: checkout @@ -921,7 +921,7 @@ jobs: runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: main - id: checkout @@ -946,7 +946,7 @@ jobs: runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: main - id: checkout @@ -971,7 +971,7 @@ jobs: runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: main - id: checkout @@ -996,7 +996,7 @@ jobs: runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: main - id: checkout @@ -1021,7 +1021,7 @@ jobs: runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: main - id: checkout @@ -1046,7 +1046,7 @@ jobs: runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: main - id: checkout @@ -1072,7 +1072,7 @@ jobs: if: "github.event_name == 'schedule'" steps: - name: Cache Pub hosted dependencies - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:beta;packages:dwds;commands:command-test_5" @@ -1082,7 +1082,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: beta - id: checkout @@ -1140,7 +1140,7 @@ jobs: if: "github.event_name == 'schedule'" steps: - name: Cache Pub hosted dependencies - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:beta;packages:webdev;commands:command-test_5" @@ -1150,7 +1150,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: beta - id: checkout @@ -1208,7 +1208,7 @@ jobs: if: "github.event_name == 'schedule'" steps: - name: Cache Pub hosted dependencies - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:beta;packages:dwds;commands:analyze_1" @@ -1218,7 +1218,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: beta - id: checkout @@ -1272,7 +1272,7 @@ jobs: if: "github.event_name == 'schedule'" steps: - name: Cache Pub hosted dependencies - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:beta;packages:webdev;commands:analyze_1" @@ -1282,7 +1282,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: beta - id: checkout @@ -1336,7 +1336,7 @@ jobs: if: "github.event_name == 'schedule'" steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: beta - id: checkout @@ -1390,7 +1390,7 @@ jobs: if: "github.event_name == 'schedule'" steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: beta - id: checkout diff --git a/.github/workflows/dcm.yml b/.github/workflows/dcm.yml index c5725d874..9344bd976 100644 --- a/.github/workflows/dcm.yml +++ b/.github/workflows/dcm.yml @@ -22,7 +22,7 @@ jobs: sudo apt-get install dcm=1.26.0-1 # To avoid errors add `-1` (build number) to the version sudo chmod +x /usr/bin/dcm - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: dev - id: checkout diff --git a/.github/workflows/no-response.yml b/.github/workflows/no-response.yml index ab1ac4984..1f33ec625 100644 --- a/.github/workflows/no-response.yml +++ b/.github/workflows/no-response.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest if: ${{ github.repository_owner == 'dart-lang' }} steps: - - uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e + - uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 with: # Don't automatically mark inactive issues+PRs as stale. days-before-stale: -1 diff --git a/.github/workflows/release_reminder.yml b/.github/workflows/release_reminder.yml index bcb9652a7..ea3180c0c 100644 --- a/.github/workflows/release_reminder.yml +++ b/.github/workflows/release_reminder.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: sdk: dev - id: checkout From 13821dd6444c9002d35e0b3a3df48c04eda96bd6 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Thu, 5 Jun 2025 12:27:52 -0500 Subject: [PATCH 19/50] [dwds] DRY up MD5/etag logic (#2625) One path used utf8, the other used codeUnits Better to do it once, correctly --- dwds/lib/src/handlers/injector.dart | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/dwds/lib/src/handlers/injector.dart b/dwds/lib/src/handlers/injector.dart index e4c263c88..aad12ec06 100644 --- a/dwds/lib/src/handlers/injector.dart +++ b/dwds/lib/src/handlers/injector.dart @@ -87,9 +87,7 @@ class DwdsInjector { // The requestedUri contains the hostname and port which guarantees // uniqueness. final requestedUri = request.requestedUri; - final appId = base64.encode( - md5.convert(utf8.encode('$requestedUri')).bytes, - ); + final appId = _base64Md5('$requestedUri'); var scheme = request.requestedUri.scheme; if (!globalToolConfiguration.debugSettings.useSseForInjectedClient) { // Switch http->ws and https->wss. @@ -128,7 +126,7 @@ class DwdsInjector { 'Injected debugging metadata for ' 'entrypoint at $requestedUri', ); - etag = base64.encode(md5.convert(body.codeUnits).bytes); + etag = _base64Md5(body); newHeaders[HttpHeaders.etagHeader] = etag; } if (ifNoneMatch == etag) { @@ -237,3 +235,10 @@ Future _injectedClientSnippet( return injectedBody; } + +final _utf8FusedConverter = utf8.encoder.fuse(md5); + +String _base64Md5(String input) { + final bytes = _utf8FusedConverter.convert(input).bytes; + return base64.encode(bytes); +} From 9d3aefcb917e861e3aeb447ac4df7c8b18dd6232 Mon Sep 17 00:00:00 2001 From: Nicholas Shahan Date: Fri, 6 Jun 2025 09:29:25 -0700 Subject: [PATCH 20/50] Remove skip from chrome proxy service test Start running the "shared context Step Into goes to the next Dart location" test case now that it is passing again. Fixes: https://github.com/dart-lang/webdev/issues/2617 --- .../common/chrome_proxy_service_common.dart | 33 ++++++++----------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/dwds/test/common/chrome_proxy_service_common.dart b/dwds/test/common/chrome_proxy_service_common.dart index 60fc6e2ca..92b8a3e4e 100644 --- a/dwds/test/common/chrome_proxy_service_common.dart +++ b/dwds/test/common/chrome_proxy_service_common.dart @@ -1579,26 +1579,19 @@ void runTests({ await service.resume(isolateId!); }); - test( - 'Into goes to the next Dart location', - () async { - await service.resume(isolateId!, step: 'Into'); - // Wait for the step to actually occur. - await stream.firstWhere( - (event) => event.kind == EventKind.kPauseInterrupted, - ); - final stack = await service.getStack(isolateId!); - expect(stack, isNotNull); - final first = stack.frames!.first; - expect(first.kind, 'Regular'); - expect(first.code!.kind, 'Dart'); - expect(first.code!.name, 'printCount'); - }, - skip: - moduleFormat == ModuleFormat.ddc && canaryFeatures - ? 'https://github.com/dart-lang/webdev/issues/2617' - : null, - ); + test('Into goes to the next Dart location', () async { + await service.resume(isolateId!, step: 'Into'); + // Wait for the step to actually occur. + await stream.firstWhere( + (event) => event.kind == EventKind.kPauseInterrupted, + ); + final stack = await service.getStack(isolateId!); + expect(stack, isNotNull); + final first = stack.frames!.first; + expect(first.kind, 'Regular'); + expect(first.code!.kind, 'Dart'); + expect(first.code!.name, 'printCount'); + }); test('Over goes to the next Dart location', () async { await service.resume(isolateId!, step: 'Over'); From fbae28cf32175553451e3cdef760d4e1ffe11b4f Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Mon, 9 Jun 2025 14:50:18 -0700 Subject: [PATCH 21/50] Use function that returns a Future instead of a stream + completer --- .../src/services/chrome_proxy_service.dart | 32 ++++++------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/dwds/lib/src/services/chrome_proxy_service.dart b/dwds/lib/src/services/chrome_proxy_service.dart index 253561b58..a276e068b 100644 --- a/dwds/lib/src/services/chrome_proxy_service.dart +++ b/dwds/lib/src/services/chrome_proxy_service.dart @@ -117,9 +117,6 @@ class ChromeProxyService implements VmServiceInterface { final _resumeAfterRestartEventsController = StreamController.broadcast(); - final _resumeAfterHotReloadEventsController = - StreamController>.broadcast(); - /// A global stream of resume events for hot restart. /// /// The values in the stream are the isolates IDs for the resume event. @@ -130,16 +127,11 @@ class ChromeProxyService implements VmServiceInterface { Stream get resumeAfterRestartEventsStream => _resumeAfterRestartEventsController.stream; - /// A global stream of resume events for hot reload. - /// - /// The values in the stream are [Completer]s that should be completed after - /// finishing the hot reload. + /// If non-null, a resume event should await the result of this after resuming + /// execution. /// - /// IMPORTANT: This should only be listened to during a hot reload. The - /// debugger ignores any resume events as long as there is a subscriber to - /// this stream. - Stream> get resumeAfterHotReloadEventsStream => - _resumeAfterHotReloadEventsController.stream; + /// This is used to complete a hot reload. + Future Function()? _finishHotReloadOnResume; final _logger = Logger('ChromeProxyService'); @@ -1223,22 +1215,17 @@ class ChromeProxyService implements VmServiceInterface { // If `pause_isolates_on_start` is enabled, pause and then the reload // should finish later after the client removes breakpoints, reregisters // breakpoints, and resumes. - StreamSubscription>? resumeEventsSubscription; - resumeEventsSubscription = resumeAfterHotReloadEventsStream.listen(( - Completer completer, - ) async { + _finishHotReloadOnResume = () async { // Client finished setting breakpoints, called resume, and now the // execution has resumed. Finish the hot reload so we start executing // the new code instead. - await resumeEventsSubscription!.cancel(); _logger.info('Issuing \$dartHotReloadEndDwds request'); await inspector.jsEvaluate( '\$dartHotReloadEndDwds();', awaitPromise: true, ); _logger.info('\$dartHotReloadEndDwds request complete.'); - completer.complete(); - }); + }; // Pause and wait for the pause to occur before managing breakpoints. final pausedEvent = _firstStreamEvent( @@ -1350,11 +1337,10 @@ class ChromeProxyService implements VmServiceInterface { }, (result) => DwdsEvent.resume(step)); } - if (_resumeAfterHotReloadEventsController.hasListener) { + if (_finishHotReloadOnResume != null) { await resumeWhenAppHasStarted(); - final completer = Completer(); - _resumeAfterHotReloadEventsController.add(completer); - await completer.future; + await _finishHotReloadOnResume!(); + _finishHotReloadOnResume = null; return Success(); } if (inspector.appConnection.isStarted) { From 83a6a5d4fa0ed8b2e316789bf4d02aca66fdc230 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Mon, 9 Jun 2025 14:52:23 -0700 Subject: [PATCH 22/50] Add print logs for failing test --- dwds/test/hot_reload_breakpoints_test.dart | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/dwds/test/hot_reload_breakpoints_test.dart b/dwds/test/hot_reload_breakpoints_test.dart index df0636f12..670f41f04 100644 --- a/dwds/test/hot_reload_breakpoints_test.dart +++ b/dwds/test/hot_reload_breakpoints_test.dart @@ -406,27 +406,37 @@ void main() { file: mainFile, breakpointMarker: capturedStringMarker, ); + print('added breakpoint'); final oldLog = "log('\$mainValue');"; final newLog = "log('\${closure()}');"; await makeEditAndRecompile(mainFile, oldLog, newLog); + print('recompiled'); bp = (await hotReloadAndHandlePausePost([ (file: mainFile, breakpointMarker: capturedStringMarker, bp: bp), ])).first; + print('hot reload and handled pausepost'); + final breakpointFuture = waitForBreakpoint(); await callEvaluate(); + print('called evaluate'); + // Should break at `capturedString`. await breakpointFuture; + + print('waited for breakpoint'); final oldCapturedString = 'captured closure gen0'; expect(consoleLogs.contains(oldCapturedString), false); // Closure gets evaluated for the first time. await resumeAndExpectLog(oldCapturedString); + print('resumed and got log'); + final newCapturedString = 'captured closure gen1'; await makeEditAndRecompile( mainFile, @@ -434,13 +444,19 @@ void main() { newCapturedString, ); + print('made edit again and recompiled'); + await hotReloadAndHandlePausePost([ (file: mainFile, breakpointMarker: capturedStringMarker, bp: bp), ]); + print('hot reloaded again and handled pause post'); + // Breakpoint should not be hit as it's now deleted. We should also see // the old string still as the closure has not been reevaluated. await callEvaluateAndExpectLog(oldCapturedString); + + print('handled evaluate again and got log'); }); }, timeout: Timeout.factor(2)); From 3b6e05f2d52f982cf0aa26eda2ddb914ea4e28a8 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Mon, 9 Jun 2025 17:21:54 -0700 Subject: [PATCH 23/50] Revert "Add print logs for failing test" This reverts commit 83a6a5d4fa0ed8b2e316789bf4d02aca66fdc230. --- dwds/test/hot_reload_breakpoints_test.dart | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/dwds/test/hot_reload_breakpoints_test.dart b/dwds/test/hot_reload_breakpoints_test.dart index 670f41f04..df0636f12 100644 --- a/dwds/test/hot_reload_breakpoints_test.dart +++ b/dwds/test/hot_reload_breakpoints_test.dart @@ -406,37 +406,27 @@ void main() { file: mainFile, breakpointMarker: capturedStringMarker, ); - print('added breakpoint'); final oldLog = "log('\$mainValue');"; final newLog = "log('\${closure()}');"; await makeEditAndRecompile(mainFile, oldLog, newLog); - print('recompiled'); bp = (await hotReloadAndHandlePausePost([ (file: mainFile, breakpointMarker: capturedStringMarker, bp: bp), ])).first; - print('hot reload and handled pausepost'); - final breakpointFuture = waitForBreakpoint(); await callEvaluate(); - print('called evaluate'); - // Should break at `capturedString`. await breakpointFuture; - - print('waited for breakpoint'); final oldCapturedString = 'captured closure gen0'; expect(consoleLogs.contains(oldCapturedString), false); // Closure gets evaluated for the first time. await resumeAndExpectLog(oldCapturedString); - print('resumed and got log'); - final newCapturedString = 'captured closure gen1'; await makeEditAndRecompile( mainFile, @@ -444,19 +434,13 @@ void main() { newCapturedString, ); - print('made edit again and recompiled'); - await hotReloadAndHandlePausePost([ (file: mainFile, breakpointMarker: capturedStringMarker, bp: bp), ]); - print('hot reloaded again and handled pause post'); - // Breakpoint should not be hit as it's now deleted. We should also see // the old string still as the closure has not been reevaluated. await callEvaluateAndExpectLog(oldCapturedString); - - print('handled evaluate again and got log'); }); }, timeout: Timeout.factor(2)); From 2641547b6b2adfd7146391fd2512fd1e90c7903a Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Mon, 9 Jun 2025 17:22:09 -0700 Subject: [PATCH 24/50] Move reinitialization --- dwds/lib/src/services/chrome_proxy_service.dart | 3 ++- fixtures/_testHotReloadBreakpoints/web/main.dart | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dwds/lib/src/services/chrome_proxy_service.dart b/dwds/lib/src/services/chrome_proxy_service.dart index a276e068b..3197fe3d9 100644 --- a/dwds/lib/src/services/chrome_proxy_service.dart +++ b/dwds/lib/src/services/chrome_proxy_service.dart @@ -1211,7 +1211,6 @@ class ChromeProxyService implements VmServiceInterface { ); if (pauseIsolatesOnStart) { - await _reinitializeForHotReload(); // If `pause_isolates_on_start` is enabled, pause and then the reload // should finish later after the client removes breakpoints, reregisters // breakpoints, and resumes. @@ -1235,6 +1234,8 @@ class ChromeProxyService implements VmServiceInterface { await pause(isolateId); await pausedEvent; + await _reinitializeForHotReload(); + // This lets the client know that we're ready for breakpoint management // and a resume. _streamNotify( diff --git a/fixtures/_testHotReloadBreakpoints/web/main.dart b/fixtures/_testHotReloadBreakpoints/web/main.dart index ecad1c226..2c9baa8d5 100644 --- a/fixtures/_testHotReloadBreakpoints/web/main.dart +++ b/fixtures/_testHotReloadBreakpoints/web/main.dart @@ -10,8 +10,8 @@ external void log(String _); String get mainValue => 'main gen0'; void evaluate() { - // Use a future as if we come across a breakpoint, evaluating this method - // would never finish. + // Use a future instead of directly calling because evaluating this method + // with a breakpoint would never complete otherwise. Future.delayed(Duration(milliseconds: 10), printToConsole); } From 0733fa0e8c571153e9598831e99f7d96ace3466c Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Mon, 9 Jun 2025 19:55:54 -0700 Subject: [PATCH 25/50] Remove extraneous use of console logs and add changelog --- dwds/CHANGELOG.md | 2 +- dwds/test/hot_reload_breakpoints_test.dart | 34 +++++----------------- 2 files changed, 9 insertions(+), 27 deletions(-) diff --git a/dwds/CHANGELOG.md b/dwds/CHANGELOG.md index 6d88f48d0..c1f587c2f 100644 --- a/dwds/CHANGELOG.md +++ b/dwds/CHANGELOG.md @@ -2,7 +2,7 @@ - Added WebSocket-based hot reload support: `reloadSources` in `ChromeProxyService` and `DevHandler` now handle hot reload requests and responses over WebSockets. - Refactored the injected client to use a reusable function for handling hot reload requests and responses over WebSockets. -- Added support for breakpoint registering on a hot restart with the DDC library bundle format using PausePostRequests. +- Added support for breakpoint registering on a hot restart and on a hot reload with the DDC library bundle format using PausePostRequests. ## 24.3.10 diff --git a/dwds/test/hot_reload_breakpoints_test.dart b/dwds/test/hot_reload_breakpoints_test.dart index df0636f12..718c3eb4c 100644 --- a/dwds/test/hot_reload_breakpoints_test.dart +++ b/dwds/test/hot_reload_breakpoints_test.dart @@ -15,7 +15,6 @@ 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 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart'; import 'fixtures/context.dart'; import 'fixtures/project.dart'; @@ -91,9 +90,6 @@ void main() { late VmService client; late VmServiceInterface service; late Stream stream; - // Fetch the log statements that are sent to console. - final consoleLogs = []; - late StreamSubscription consoleSubscription; setUp(() async { setCurrentLogWriter(debug: debug); @@ -110,14 +106,9 @@ void main() { service = context.service; await service.streamListen('Debug'); stream = service.onEvent('Debug'); - consoleSubscription = context.webkitDebugger.onConsoleAPICalled.listen( - (e) => consoleLogs.add(e.args.first.value as String), - ); }); tearDown(() async { - await consoleSubscription.cancel(); - consoleLogs.clear(); undoEdits(); await context.tearDown(); }); @@ -254,11 +245,8 @@ void main() { // Should break at `callLog`. await breakpointFuture; - expect(consoleLogs.contains(oldString), false); await resumeAndExpectLog(oldString); - consoleLogs.clear(); - // Modify the string that gets printed. await makeEditAndRecompile(mainFile, oldString, newString); @@ -272,7 +260,6 @@ void main() { // Should break at `callLog`. await breakpointFuture; - expect(consoleLogs.contains(newString), false); await resumeAndExpectLog(newString); }); @@ -291,11 +278,8 @@ void main() { // Should break at `callLog`. await breakpointFuture; - expect(consoleLogs.contains(genLog), false); await resumeAndExpectLog(genLog); - consoleLogs.clear(); - // Add an extra log before the existing log. final extraLog = 'hot reload'; final oldString = "log('"; @@ -309,15 +293,12 @@ void main() { breakpointFuture = waitForBreakpoint(); - await callEvaluate(); + await callEvaluateAndExpectLog(extraLog); // Should break at `callLog`. await breakpointFuture; - expect(consoleLogs.contains(extraLog), true); await resumeAndExpectLog(genLog); - consoleLogs.clear(); - // Remove the line we just added. await makeEditAndRecompile(mainFile, newString, oldString); @@ -327,12 +308,19 @@ void main() { breakpointFuture = waitForBreakpoint(); + final consoleLogs = []; + final consoleSubscription = context.webkitDebugger.onConsoleAPICalled + .listen((e) { + consoleLogs.add(e.args.first.value as String); + }); + await callEvaluate(); // Should break at `callLog`. await breakpointFuture; expect(consoleLogs.contains(extraLog), false); await resumeAndExpectLog(genLog); + await consoleSubscription.cancel(); }); test( @@ -352,11 +340,8 @@ void main() { // Should break at `callLog`. await breakpointFuture; - expect(consoleLogs.contains(genLog), false); await resumeAndExpectLog(genLog); - consoleLogs.clear(); - // Add a library file, import it, and then refer to it in the log. final libFile = 'library.dart'; final libGenLog = 'lib gen0'; @@ -387,14 +372,12 @@ void main() { // Should break at `callLog`. await breakpointFuture; - expect(consoleLogs.contains(libGenLog), false); breakpointFuture = waitForBreakpoint(); await resume(); // Should break at `libValue`. await breakpointFuture; - expect(consoleLogs.contains(libGenLog), false); await resumeAndExpectLog(libGenLog); context.removeLibraryFile(libFileName: libFile); @@ -423,7 +406,6 @@ void main() { // Should break at `capturedString`. await breakpointFuture; final oldCapturedString = 'captured closure gen0'; - expect(consoleLogs.contains(oldCapturedString), false); // Closure gets evaluated for the first time. await resumeAndExpectLog(oldCapturedString); From b492d9f106227013048db92fde3d0ba43ecaa68a Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Thu, 12 Jun 2025 09:32:23 -0700 Subject: [PATCH 26/50] Address review comments --- .../src/services/chrome_proxy_service.dart | 103 ++++++++---------- dwds/test/build_daemon_callstack_test.dart | 2 +- .../build_daemon_circular_evaluate_test.dart | 2 +- dwds/test/build_daemon_evaluate_test.dart | 2 +- ...d_daemon_hot_restart_correctness_test.dart | 2 +- dwds/test/build_daemon_hot_restart_test.dart | 2 +- dwds/test/chrome_proxy_service_amd_test.dart | 2 +- ...proxy_service_ddc_library_bundle_test.dart | 2 +- dwds/test/common/hot_restart_common.dart | 5 +- dwds/test/execution_context_test.dart | 2 +- .../test/frontend_server_breakpoint_test.dart | 2 +- dwds/test/frontend_server_callstack_test.dart | 2 +- ...rontend_server_circular_evaluate_test.dart | 2 +- .../frontend_server_ddc_evaluate_test.dart | 2 +- ...rver_ddc_library_bundle_evaluate_test.dart | 2 +- dwds/test/frontend_server_evaluate_test.dart | 2 +- ...d_server_hot_restart_correctness_test.dart | 2 +- .../frontend_server_hot_restart_test.dart | 2 +- dwds/test/hot_reload_breakpoints_test.dart | 53 ++++----- dwds/test/hot_reload_test.dart | 2 +- dwds/test/hot_restart_breakpoints_test.dart | 37 +++---- .../instances/class_inspection_amd_test.dart | 2 +- ...ss_inspection_ddc_library_bundle_test.dart | 2 +- .../instances/instance_amd_canary_test.dart | 2 +- dwds/test/instances/instance_amd_test.dart | 2 +- .../instance_ddc_library_bundle_test.dart | 2 +- .../instance_inspection_amd_canary_test.dart | 2 +- .../instance_inspection_amd_test.dart | 2 +- ...ce_inspection_ddc_library_bundle_test.dart | 2 +- .../patterns_inspection_canary_test.dart | 2 +- .../instances/patterns_inspection_test.dart | 2 +- .../record_inspection_amd_canary_test.dart | 2 +- .../instances/record_inspection_amd_test.dart | 2 +- ...rd_inspection_ddc_library_bundle_test.dart | 2 +- ...ecord_type_inspection_amd_canary_test.dart | 2 +- .../record_type_inspection_amd_test.dart | 2 +- ...pe_inspection_ddc_library_bundle_test.dart | 2 +- .../type_inspection_canary_test.dart | 2 +- dwds/test/instances/type_inspection_test.dart | 2 +- dwds/test/run_request_test.dart | 2 +- dwds/test/variable_scope_test.dart | 2 +- .../test/sdk_asset_generator_test.dart | 2 +- .../test/test_sdk_configuration_test.dart | 2 +- webdev/test/e2e_test.dart | 2 +- webdev/test/tls_test.dart | 2 +- 45 files changed, 129 insertions(+), 151 deletions(-) diff --git a/dwds/lib/src/services/chrome_proxy_service.dart b/dwds/lib/src/services/chrome_proxy_service.dart index 3197fe3d9..c02388795 100644 --- a/dwds/lib/src/services/chrome_proxy_service.dart +++ b/dwds/lib/src/services/chrome_proxy_service.dart @@ -473,8 +473,9 @@ class ChromeProxyService implements VmServiceInterface { if (!_isIsolateRunning) return; final isolate = inspector.isolate; + final debugger = await debuggerFuture; for (final breakpoint in isolate.breakpoints?.toList() ?? []) { - await (await debuggerFuture).removeBreakpoint(breakpoint.id!); + await debugger.removeBreakpoint(breakpoint.id!); } } @@ -1210,43 +1211,7 @@ class ChromeProxyService implements VmServiceInterface { returnByValue: true, ); - if (pauseIsolatesOnStart) { - // If `pause_isolates_on_start` is enabled, pause and then the reload - // should finish later after the client removes breakpoints, reregisters - // breakpoints, and resumes. - _finishHotReloadOnResume = () async { - // Client finished setting breakpoints, called resume, and now the - // execution has resumed. Finish the hot reload so we start executing - // the new code instead. - _logger.info('Issuing \$dartHotReloadEndDwds request'); - await inspector.jsEvaluate( - '\$dartHotReloadEndDwds();', - awaitPromise: true, - ); - _logger.info('\$dartHotReloadEndDwds request complete.'); - }; - - // Pause and wait for the pause to occur before managing breakpoints. - final pausedEvent = _firstStreamEvent( - 'Debug', - EventKind.kPauseInterrupted, - ); - await pause(isolateId); - await pausedEvent; - - await _reinitializeForHotReload(); - - // This lets the client know that we're ready for breakpoint management - // and a resume. - _streamNotify( - 'Debug', - Event( - kind: EventKind.kPausePostRequest, - timestamp: DateTime.now().millisecondsSinceEpoch, - isolate: inspector.isolateRef, - ), - ); - } else { + if (!pauseIsolatesOnStart) { // Finish hot reload immediately. _logger.info('Issuing \$dartHotReloadEndDwds request'); await inspector.jsEvaluate( @@ -1257,7 +1222,40 @@ class ChromeProxyService implements VmServiceInterface { // TODO(srujzs): Supposedly Dart DevTools uses a kIsolateReload event // for breakpoints? We should confirm and add tests before sending the // event. + return; } + // If `pause_isolates_on_start` is enabled, pause and then the reload + // should finish later after the client removes breakpoints, reregisters + // breakpoints, and resumes. + _finishHotReloadOnResume = () async { + // Client finished setting breakpoints, called resume, and now the + // execution has resumed. Finish the hot reload so we start executing + // the new code instead. + _logger.info('Issuing \$dartHotReloadEndDwds request'); + await inspector.jsEvaluate( + '\$dartHotReloadEndDwds();', + awaitPromise: true, + ); + _logger.info('\$dartHotReloadEndDwds request complete.'); + }; + + // Pause and wait for the pause to occur before managing breakpoints. + final pausedEvent = _firstStreamEvent('Debug', EventKind.kPauseInterrupted); + await pause(isolateId); + await pausedEvent; + + await _reinitializeForHotReload(); + + // This lets the client know that we're ready for breakpoint management + // and a resume. + _streamNotify( + 'Debug', + Event( + kind: EventKind.kPausePostRequest, + timestamp: DateTime.now().millisecondsSinceEpoch, + isolate: inspector.isolateRef, + ), + ); } /// Performs a WebSocket-based hot reload by sending a request and waiting for a response. @@ -1319,37 +1317,30 @@ class ChromeProxyService implements VmServiceInterface { String? step, int? frameIndex, }) async { - // If there is a hot restart or hot reload subscriber listening for a resume - // event after a hot restart or a hot reload, then add the event to the - // stream and skip processing it. + // If there is a subscriber listening for a resume event after hot-restart, + // then add the event to the stream and skip processing it. if (_resumeAfterRestartEventsController.hasListener) { _resumeAfterRestartEventsController.add(isolateId); return Success(); } - Future resumeWhenAppHasStarted() { - return captureElapsedTime(() async { + + if (inspector.appConnection.isStarted) { + await captureElapsedTime(() async { await isInitialized; await isStarted; _checkIsolate('resume', isolateId); - return await (await debuggerFuture).resume( - step: step, - frameIndex: frameIndex, - ); + final debugger = await debuggerFuture; + return await debugger.resume(step: step, frameIndex: frameIndex); }, (result) => DwdsEvent.resume(step)); + } else { + inspector.appConnection.runMain(); } - + // Finish the hot reload if needed. if (_finishHotReloadOnResume != null) { - await resumeWhenAppHasStarted(); await _finishHotReloadOnResume!(); _finishHotReloadOnResume = null; - return Success(); - } - if (inspector.appConnection.isStarted) { - return resumeWhenAppHasStarted(); - } else { - inspector.appConnection.runMain(); - return Success(); } + return Success(); } /// This method is deprecated in vm_service package. diff --git a/dwds/test/build_daemon_callstack_test.dart b/dwds/test/build_daemon_callstack_test.dart index 96268b9e0..c93b58fc8 100644 --- a/dwds/test/build_daemon_callstack_test.dart +++ b/dwds/test/build_daemon_callstack_test.dart @@ -22,7 +22,7 @@ void main() { group('shared context |', () { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final project = TestProject.testPackage(); final context = TestContext(project, provider); diff --git a/dwds/test/build_daemon_circular_evaluate_test.dart b/dwds/test/build_daemon_circular_evaluate_test.dart index 941670ed4..760fb0bc3 100644 --- a/dwds/test/build_daemon_circular_evaluate_test.dart +++ b/dwds/test/build_daemon_circular_evaluate_test.dart @@ -14,7 +14,7 @@ import 'fixtures/context.dart'; void main() async { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final provider = TestSdkConfigurationProvider(verbose: debug); tearDownAll(provider.dispose); diff --git a/dwds/test/build_daemon_evaluate_test.dart b/dwds/test/build_daemon_evaluate_test.dart index a50810547..2f59d551c 100644 --- a/dwds/test/build_daemon_evaluate_test.dart +++ b/dwds/test/build_daemon_evaluate_test.dart @@ -15,7 +15,7 @@ import 'fixtures/context.dart'; void main() async { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final provider = TestSdkConfigurationProvider(verbose: debug); tearDownAll(provider.dispose); diff --git a/dwds/test/build_daemon_hot_restart_correctness_test.dart b/dwds/test/build_daemon_hot_restart_correctness_test.dart index 66042b6b6..a5599447c 100644 --- a/dwds/test/build_daemon_hot_restart_correctness_test.dart +++ b/dwds/test/build_daemon_hot_restart_correctness_test.dart @@ -16,7 +16,7 @@ import 'fixtures/context.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = false; final moduleFormat = ModuleFormat.amd; final compilationMode = CompilationMode.buildDaemon; diff --git a/dwds/test/build_daemon_hot_restart_test.dart b/dwds/test/build_daemon_hot_restart_test.dart index 12600703a..bb7a69192 100644 --- a/dwds/test/build_daemon_hot_restart_test.dart +++ b/dwds/test/build_daemon_hot_restart_test.dart @@ -16,7 +16,7 @@ import 'fixtures/context.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = false; final moduleFormat = ModuleFormat.amd; final compilationMode = CompilationMode.buildDaemon; diff --git a/dwds/test/chrome_proxy_service_amd_test.dart b/dwds/test/chrome_proxy_service_amd_test.dart index 296914d5d..7e83599e9 100644 --- a/dwds/test/chrome_proxy_service_amd_test.dart +++ b/dwds/test/chrome_proxy_service_amd_test.dart @@ -16,7 +16,7 @@ import 'fixtures/context.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = false; final moduleFormat = ModuleFormat.amd; final compilationMode = CompilationMode.buildDaemon; diff --git a/dwds/test/chrome_proxy_service_ddc_library_bundle_test.dart b/dwds/test/chrome_proxy_service_ddc_library_bundle_test.dart index a9f31437a..515a25d7a 100644 --- a/dwds/test/chrome_proxy_service_ddc_library_bundle_test.dart +++ b/dwds/test/chrome_proxy_service_ddc_library_bundle_test.dart @@ -16,7 +16,7 @@ import 'fixtures/context.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = true; final moduleFormat = ModuleFormat.ddc; final compilationMode = CompilationMode.frontendServer; diff --git a/dwds/test/common/hot_restart_common.dart b/dwds/test/common/hot_restart_common.dart index f1f0fce4a..5c93be6ce 100644 --- a/dwds/test/common/hot_restart_common.dart +++ b/dwds/test/common/hot_restart_common.dart @@ -77,9 +77,8 @@ void runTests({ completer.complete(); } }); - await completer.future.then((_) { - subscription.cancel(); - }); + await completer.future; + await subscription.cancel(); } group( diff --git a/dwds/test/execution_context_test.dart b/dwds/test/execution_context_test.dart index acbe2f148..9f8b59b5e 100644 --- a/dwds/test/execution_context_test.dart +++ b/dwds/test/execution_context_test.dart @@ -20,7 +20,7 @@ import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart'; import 'fixtures/fakes.dart'; void main() async { - final debug = false; + const debug = false; group('ExecutionContext', () { setUpAll(() { diff --git a/dwds/test/frontend_server_breakpoint_test.dart b/dwds/test/frontend_server_breakpoint_test.dart index 9823e6117..d1f9fe523 100644 --- a/dwds/test/frontend_server_breakpoint_test.dart +++ b/dwds/test/frontend_server_breakpoint_test.dart @@ -18,7 +18,7 @@ import 'fixtures/utilities.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final provider = TestSdkConfigurationProvider(verbose: debug); tearDownAll(provider.dispose); diff --git a/dwds/test/frontend_server_callstack_test.dart b/dwds/test/frontend_server_callstack_test.dart index 79f6f0e6c..64ff9e359 100644 --- a/dwds/test/frontend_server_callstack_test.dart +++ b/dwds/test/frontend_server_callstack_test.dart @@ -18,7 +18,7 @@ import 'fixtures/utilities.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final provider = TestSdkConfigurationProvider(verbose: debug); tearDownAll(provider.dispose); diff --git a/dwds/test/frontend_server_circular_evaluate_test.dart b/dwds/test/frontend_server_circular_evaluate_test.dart index 19ce2a345..33b0edaf8 100644 --- a/dwds/test/frontend_server_circular_evaluate_test.dart +++ b/dwds/test/frontend_server_circular_evaluate_test.dart @@ -17,7 +17,7 @@ import 'fixtures/project.dart'; void main() async { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final provider = TestSdkConfigurationProvider(verbose: debug); tearDownAll(provider.dispose); diff --git a/dwds/test/frontend_server_ddc_evaluate_test.dart b/dwds/test/frontend_server_ddc_evaluate_test.dart index dc67a431e..4ed878a6e 100644 --- a/dwds/test/frontend_server_ddc_evaluate_test.dart +++ b/dwds/test/frontend_server_ddc_evaluate_test.dart @@ -19,7 +19,7 @@ import 'fixtures/project.dart'; void main() async { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final provider = TestSdkConfigurationProvider( verbose: debug, diff --git a/dwds/test/frontend_server_ddc_library_bundle_evaluate_test.dart b/dwds/test/frontend_server_ddc_library_bundle_evaluate_test.dart index 3f5e5927d..157ee82b1 100644 --- a/dwds/test/frontend_server_ddc_library_bundle_evaluate_test.dart +++ b/dwds/test/frontend_server_ddc_library_bundle_evaluate_test.dart @@ -19,7 +19,7 @@ import 'fixtures/project.dart'; void main() async { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final provider = TestSdkConfigurationProvider( verbose: debug, diff --git a/dwds/test/frontend_server_evaluate_test.dart b/dwds/test/frontend_server_evaluate_test.dart index 2ccfd489e..02d798661 100644 --- a/dwds/test/frontend_server_evaluate_test.dart +++ b/dwds/test/frontend_server_evaluate_test.dart @@ -18,7 +18,7 @@ import 'fixtures/project.dart'; void main() async { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final provider = TestSdkConfigurationProvider(verbose: debug); tearDownAll(provider.dispose); diff --git a/dwds/test/frontend_server_hot_restart_correctness_test.dart b/dwds/test/frontend_server_hot_restart_correctness_test.dart index 198e6546c..b1aeda73e 100644 --- a/dwds/test/frontend_server_hot_restart_correctness_test.dart +++ b/dwds/test/frontend_server_hot_restart_correctness_test.dart @@ -16,7 +16,7 @@ import 'fixtures/context.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = true; final moduleFormat = ModuleFormat.ddc; final compilationMode = CompilationMode.frontendServer; diff --git a/dwds/test/frontend_server_hot_restart_test.dart b/dwds/test/frontend_server_hot_restart_test.dart index 95d98bd28..df48f2a95 100644 --- a/dwds/test/frontend_server_hot_restart_test.dart +++ b/dwds/test/frontend_server_hot_restart_test.dart @@ -16,7 +16,7 @@ import 'fixtures/context.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = true; final moduleFormat = ModuleFormat.ddc; final compilationMode = CompilationMode.frontendServer; diff --git a/dwds/test/hot_reload_breakpoints_test.dart b/dwds/test/hot_reload_breakpoints_test.dart index 718c3eb4c..092a0a2a6 100644 --- a/dwds/test/hot_reload_breakpoints_test.dart +++ b/dwds/test/hot_reload_breakpoints_test.dart @@ -22,7 +22,7 @@ import 'fixtures/utilities.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: true, @@ -68,18 +68,17 @@ void main() { } void undoEdits() { - for (var i = edits.length - 1; i >= 0; i--) { - final edit = edits[i]; - if (edit.file == project.dartEntryFileName) { + for (final (:file, :originalString, :newString) in edits.reversed) { + if (file == project.dartEntryFileName) { context.makeEditToDartEntryFile( - toReplace: edit.newString, - replaceWith: edit.originalString, + toReplace: newString, + replaceWith: originalString, ); } else { context.makeEditToDartLibFile( - libFileName: edit.file, - toReplace: edit.newString, - replaceWith: edit.originalString, + libFileName: file, + toReplace: newString, + replaceWith: originalString, ); } } @@ -104,8 +103,8 @@ void main() { client = await context.connectFakeClient(); await client.setFlag('pause_isolates_on_start', 'true'); service = context.service; - await service.streamListen('Debug'); - stream = service.onEvent('Debug'); + stream = service.onEvent(EventStreams.kDebug); + await service.streamListen(EventStreams.kDebug); }); tearDown(() async { @@ -151,7 +150,7 @@ void main() { // will execute code that will emit [expectedString]. Future resumeAndExpectLog(String expectedString) async { final completer = Completer(); - final newSubscription = context.webkitDebugger.onConsoleAPICalled.listen(( + final subscription = context.webkitDebugger.onConsoleAPICalled.listen(( e, ) { if (e.args.first.value == expectedString) { @@ -159,9 +158,8 @@ void main() { } }); await resume(); - await completer.future.then((_) { - newSubscription.cancel(); - }); + await completer.future; + await subscription.cancel(); } Future> hotReloadAndHandlePausePost( @@ -184,15 +182,12 @@ void main() { // what the client should do. await waitForPausePost; final newBreakpoints = []; - for (final breakpoint in breakpoints) { + for (final (:bp, :breakpointMarker, :file) in breakpoints) { // This could be a new file, so there's no existing breakpoint to // remove. - if (breakpoint.bp != null) await removeBreakpoint(breakpoint.bp!); + if (bp != null) await removeBreakpoint(bp); newBreakpoints.add( - await addBreakpoint( - file: breakpoint.file, - breakpointMarker: breakpoint.breakpointMarker, - ), + await addBreakpoint(file: file, breakpointMarker: breakpointMarker), ); } // The resume should complete hot reload and resume the program. @@ -211,7 +206,7 @@ void main() { // will eventually occur when code is executing. Future callEvaluateAndExpectLog(String expectedString) async { final completer = Completer(); - final newSubscription = context.webkitDebugger.onConsoleAPICalled.listen(( + final subscription = context.webkitDebugger.onConsoleAPICalled.listen(( e, ) { if (e.args.first.value == expectedString) { @@ -222,12 +217,11 @@ void main() { final isolate = await client.getIsolate(vm.isolates!.first.id!); final rootLib = isolate.rootLib; await client.evaluate(isolate.id!, rootLib!.id!, 'evaluate()'); - await completer.future.then((_) { - newSubscription.cancel(); - }); + await completer.future; + await subscription.cancel(); } - Future waitForBreakpoint() => + Future waitForBreakpoint() => expectLater(stream, emitsThrough(_hasKind(EventKind.kPauseBreakpoint))); test('after edit and hot reload, breakpoint is in new file', () async { @@ -450,7 +444,7 @@ void main() { Future callEvaluateAndExpectLog(String expectedString) async { final completer = Completer(); - final newSubscription = context.webkitDebugger.onConsoleAPICalled.listen(( + final subscription = context.webkitDebugger.onConsoleAPICalled.listen(( e, ) { if (e.args.first.value == expectedString) { @@ -461,9 +455,8 @@ void main() { final isolate = await client.getIsolate(vm.isolates!.first.id!); final rootLib = isolate.rootLib; await client.evaluate(isolate.id!, rootLib!.id!, 'evaluate()'); - await completer.future.then((_) { - newSubscription.cancel(); - }); + await completer.future; + await subscription.cancel(); } test('no pause when calling reloadSources', () async { diff --git a/dwds/test/hot_reload_test.dart b/dwds/test/hot_reload_test.dart index a836426c8..17651c492 100644 --- a/dwds/test/hot_reload_test.dart +++ b/dwds/test/hot_reload_test.dart @@ -22,7 +22,7 @@ const newString = 'Bonjour le monde!'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: true, diff --git a/dwds/test/hot_restart_breakpoints_test.dart b/dwds/test/hot_restart_breakpoints_test.dart index a8f11b078..3c58b12ac 100644 --- a/dwds/test/hot_restart_breakpoints_test.dart +++ b/dwds/test/hot_restart_breakpoints_test.dart @@ -23,7 +23,7 @@ import 'fixtures/utilities.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: true, @@ -68,18 +68,17 @@ void main() { } void undoEdits() { - for (var i = edits.length - 1; i >= 0; i--) { - final edit = edits[i]; - if (edit.file == project.dartEntryFileName) { + for (final (:file, :originalString, :newString) in edits.reversed) { + if (file == project.dartEntryFileName) { context.makeEditToDartEntryFile( - toReplace: edit.newString, - replaceWith: edit.originalString, + toReplace: newString, + replaceWith: originalString, ); } else { context.makeEditToDartLibFile( - libFileName: edit.file, - toReplace: edit.newString, - replaceWith: edit.originalString, + libFileName: file, + toReplace: newString, + replaceWith: originalString, ); } } @@ -106,10 +105,10 @@ void main() { ); client = await context.connectFakeClient(); await client.setFlag('pause_isolates_on_start', 'true'); - await client.streamListen('Isolate'); + await client.streamListen(EventStreams.kIsolate); service = context.service; - await service.streamListen('Debug'); - stream = service.onEvent('Debug'); + stream = service.onEvent(EventStreams.kDebug); + await service.streamListen(EventStreams.kDebug); consoleSubscription = context.webkitDebugger.onConsoleAPICalled.listen( (e) => consoleLogs.add(e.args.first.value as String), ); @@ -154,7 +153,7 @@ void main() { // will execute code that will emit [expectedString]. Future resumeAndExpectLog(String expectedString) async { final completer = Completer(); - final newSubscription = context.webkitDebugger.onConsoleAPICalled.listen(( + final subscription = context.webkitDebugger.onConsoleAPICalled.listen(( e, ) { if (e.args.first.value == expectedString) { @@ -162,9 +161,8 @@ void main() { } }); await resume(); - await completer.future.then((_) { - newSubscription.cancel(); - }); + await completer.future; + await subscription.cancel(); } Future hotRestartAndHandlePausePost( @@ -204,11 +202,8 @@ void main() { final vm = await client.getVM(); final isolate = await service.getIsolate(vm.isolates!.first.id!); expect(isolate.breakpoints, isEmpty); - for (final breakpoint in breakpoints) { - await addBreakpoint( - file: breakpoint.file, - breakpointMarker: breakpoint.breakpointMarker, - ); + for (final (:breakpointMarker, :file) in breakpoints) { + await addBreakpoint(file: file, breakpointMarker: breakpointMarker); } await resume(); } diff --git a/dwds/test/instances/class_inspection_amd_test.dart b/dwds/test/instances/class_inspection_amd_test.dart index 0cf7f3426..a82ab46ac 100644 --- a/dwds/test/instances/class_inspection_amd_test.dart +++ b/dwds/test/instances/class_inspection_amd_test.dart @@ -16,7 +16,7 @@ import 'common/class_inspection_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = false; group('Class |', () { diff --git a/dwds/test/instances/class_inspection_ddc_library_bundle_test.dart b/dwds/test/instances/class_inspection_ddc_library_bundle_test.dart index 2f54f5fbc..b00100348 100644 --- a/dwds/test/instances/class_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/instances/class_inspection_ddc_library_bundle_test.dart @@ -16,7 +16,7 @@ import 'common/class_inspection_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = true; final compilationMode = CompilationMode.frontendServer; final provider = TestSdkConfigurationProvider( diff --git a/dwds/test/instances/instance_amd_canary_test.dart b/dwds/test/instances/instance_amd_canary_test.dart index 8f74aa270..588a0d2e4 100644 --- a/dwds/test/instances/instance_amd_canary_test.dart +++ b/dwds/test/instances/instance_amd_canary_test.dart @@ -15,7 +15,7 @@ import 'common/instance_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = true; final moduleFormat = ModuleFormat.amd; diff --git a/dwds/test/instances/instance_amd_test.dart b/dwds/test/instances/instance_amd_test.dart index d87deb5f5..03706e5ce 100644 --- a/dwds/test/instances/instance_amd_test.dart +++ b/dwds/test/instances/instance_amd_test.dart @@ -15,7 +15,7 @@ import 'common/instance_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = false; final moduleFormat = ModuleFormat.amd; diff --git a/dwds/test/instances/instance_ddc_library_bundle_test.dart b/dwds/test/instances/instance_ddc_library_bundle_test.dart index a06018121..d38e9f84a 100644 --- a/dwds/test/instances/instance_ddc_library_bundle_test.dart +++ b/dwds/test/instances/instance_ddc_library_bundle_test.dart @@ -15,7 +15,7 @@ import 'common/instance_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = true; final moduleFormat = ModuleFormat.ddc; final compilationMode = CompilationMode.frontendServer; diff --git a/dwds/test/instances/instance_inspection_amd_canary_test.dart b/dwds/test/instances/instance_inspection_amd_canary_test.dart index c9dbaf5cf..0319b9bfc 100644 --- a/dwds/test/instances/instance_inspection_amd_canary_test.dart +++ b/dwds/test/instances/instance_inspection_amd_canary_test.dart @@ -16,7 +16,7 @@ import 'common/instance_inspection_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = true; group('canary: $canaryFeatures |', () { diff --git a/dwds/test/instances/instance_inspection_amd_test.dart b/dwds/test/instances/instance_inspection_amd_test.dart index a8f7df0d7..36d19793b 100644 --- a/dwds/test/instances/instance_inspection_amd_test.dart +++ b/dwds/test/instances/instance_inspection_amd_test.dart @@ -16,7 +16,7 @@ import 'common/instance_inspection_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = false; group('canary: $canaryFeatures |', () { diff --git a/dwds/test/instances/instance_inspection_ddc_library_bundle_test.dart b/dwds/test/instances/instance_inspection_ddc_library_bundle_test.dart index bfca2b3c7..7bcda8b35 100644 --- a/dwds/test/instances/instance_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/instances/instance_inspection_ddc_library_bundle_test.dart @@ -16,7 +16,7 @@ import 'common/instance_inspection_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = true; final compilationMode = CompilationMode.frontendServer; diff --git a/dwds/test/instances/patterns_inspection_canary_test.dart b/dwds/test/instances/patterns_inspection_canary_test.dart index fecc84b9a..cc46732b4 100644 --- a/dwds/test/instances/patterns_inspection_canary_test.dart +++ b/dwds/test/instances/patterns_inspection_canary_test.dart @@ -15,7 +15,7 @@ import 'common/patterns_inspection_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = true; group('canary: $canaryFeatures |', () { diff --git a/dwds/test/instances/patterns_inspection_test.dart b/dwds/test/instances/patterns_inspection_test.dart index c0b58ea34..2578b7264 100644 --- a/dwds/test/instances/patterns_inspection_test.dart +++ b/dwds/test/instances/patterns_inspection_test.dart @@ -15,7 +15,7 @@ import 'common/patterns_inspection_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = false; group('canary: $canaryFeatures |', () { diff --git a/dwds/test/instances/record_inspection_amd_canary_test.dart b/dwds/test/instances/record_inspection_amd_canary_test.dart index 7c2c5c0a8..52df6fc7e 100644 --- a/dwds/test/instances/record_inspection_amd_canary_test.dart +++ b/dwds/test/instances/record_inspection_amd_canary_test.dart @@ -16,7 +16,7 @@ import 'common/record_inspection_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = true; group('canary: $canaryFeatures |', () { diff --git a/dwds/test/instances/record_inspection_amd_test.dart b/dwds/test/instances/record_inspection_amd_test.dart index afee36510..cab859fe5 100644 --- a/dwds/test/instances/record_inspection_amd_test.dart +++ b/dwds/test/instances/record_inspection_amd_test.dart @@ -16,7 +16,7 @@ import 'common/record_inspection_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = false; group('canary: $canaryFeatures |', () { diff --git a/dwds/test/instances/record_inspection_ddc_library_bundle_test.dart b/dwds/test/instances/record_inspection_ddc_library_bundle_test.dart index deb18060a..ee123ae1f 100644 --- a/dwds/test/instances/record_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/instances/record_inspection_ddc_library_bundle_test.dart @@ -16,7 +16,7 @@ import 'common/record_inspection_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = true; final compilationMode = CompilationMode.frontendServer; diff --git a/dwds/test/instances/record_type_inspection_amd_canary_test.dart b/dwds/test/instances/record_type_inspection_amd_canary_test.dart index 02d5f826b..952b73b35 100644 --- a/dwds/test/instances/record_type_inspection_amd_canary_test.dart +++ b/dwds/test/instances/record_type_inspection_amd_canary_test.dart @@ -16,7 +16,7 @@ import 'common/record_type_inspection_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = true; group('canary: $canaryFeatures |', () { diff --git a/dwds/test/instances/record_type_inspection_amd_test.dart b/dwds/test/instances/record_type_inspection_amd_test.dart index d471b0769..d86880e3c 100644 --- a/dwds/test/instances/record_type_inspection_amd_test.dart +++ b/dwds/test/instances/record_type_inspection_amd_test.dart @@ -16,7 +16,7 @@ import 'common/record_type_inspection_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = false; group('canary: $canaryFeatures |', () { diff --git a/dwds/test/instances/record_type_inspection_ddc_library_bundle_test.dart b/dwds/test/instances/record_type_inspection_ddc_library_bundle_test.dart index 9e5cb3c11..e6a9e7ec1 100644 --- a/dwds/test/instances/record_type_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/instances/record_type_inspection_ddc_library_bundle_test.dart @@ -16,7 +16,7 @@ import 'common/record_type_inspection_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = true; final compilationMode = CompilationMode.frontendServer; diff --git a/dwds/test/instances/type_inspection_canary_test.dart b/dwds/test/instances/type_inspection_canary_test.dart index f908fb629..0cd257ead 100644 --- a/dwds/test/instances/type_inspection_canary_test.dart +++ b/dwds/test/instances/type_inspection_canary_test.dart @@ -15,7 +15,7 @@ import 'common/type_inspection_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = true; group('canary: $canaryFeatures |', () { diff --git a/dwds/test/instances/type_inspection_test.dart b/dwds/test/instances/type_inspection_test.dart index 7f510226e..35090d4bd 100644 --- a/dwds/test/instances/type_inspection_test.dart +++ b/dwds/test/instances/type_inspection_test.dart @@ -15,7 +15,7 @@ import 'common/type_inspection_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = false; group('canary: $canaryFeatures |', () { diff --git a/dwds/test/run_request_test.dart b/dwds/test/run_request_test.dart index c3a538dfb..d5e00cbf2 100644 --- a/dwds/test/run_request_test.dart +++ b/dwds/test/run_request_test.dart @@ -19,7 +19,7 @@ import 'fixtures/utilities.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final provider = TestSdkConfigurationProvider(verbose: debug); tearDownAll(provider.dispose); diff --git a/dwds/test/variable_scope_test.dart b/dwds/test/variable_scope_test.dart index e55e423ec..22880ec8e 100644 --- a/dwds/test/variable_scope_test.dart +++ b/dwds/test/variable_scope_test.dart @@ -19,7 +19,7 @@ import 'fixtures/utilities.dart'; void main() { // set to true for debug logging. - final debug = false; + const debug = false; final provider = TestSdkConfigurationProvider(verbose: debug); tearDownAll(provider.dispose); diff --git a/test_common/test/sdk_asset_generator_test.dart b/test_common/test/sdk_asset_generator_test.dart index da109dd29..21adc1058 100644 --- a/test_common/test/sdk_asset_generator_test.dart +++ b/test_common/test/sdk_asset_generator_test.dart @@ -16,7 +16,7 @@ import 'package:test_common/test_sdk_layout.dart'; void main() { group('SDK asset generator', () { - final debug = false; + const debug = false; late Directory tempDir; late String sdkDirectory; diff --git a/test_common/test/test_sdk_configuration_test.dart b/test_common/test/test_sdk_configuration_test.dart index ada3712cc..f061d58b3 100644 --- a/test_common/test/test_sdk_configuration_test.dart +++ b/test_common/test/test_sdk_configuration_test.dart @@ -14,7 +14,7 @@ import 'package:test_common/logging.dart'; import 'package:test_common/test_sdk_configuration.dart'; void main() { - final debug = false; + const debug = false; group('Test SDK configuration provider |', () { setUpAll(() { diff --git a/webdev/test/e2e_test.dart b/webdev/test/e2e_test.dart index 4a4e4a579..0cb63efa4 100644 --- a/webdev/test/e2e_test.dart +++ b/webdev/test/e2e_test.dart @@ -37,7 +37,7 @@ final _testItems = { void main() { // Change to true for debugging. - final debug = false; + const debug = false; final testRunner = TestRunner(); late String soundExampleDirectory; diff --git a/webdev/test/tls_test.dart b/webdev/test/tls_test.dart index 43a95e8e9..ace16b8a9 100644 --- a/webdev/test/tls_test.dart +++ b/webdev/test/tls_test.dart @@ -19,7 +19,7 @@ import 'test_utils.dart'; void main() { group('serve app with TLS options', () { // Change to true for debugging. - final debug = false; + const debug = false; final testRunner = TestRunner(); late String exampleDirectory; From fa4ca71c1dec9d8fa3cb98e3b4836aaff3e1d2e9 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Thu, 12 Jun 2025 11:33:53 -0700 Subject: [PATCH 27/50] Use Future.wait and increase timeout --- dwds/lib/src/services/chrome_proxy_service.dart | 7 ++++--- dwds/test/hot_reload_breakpoints_test.dart | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dwds/lib/src/services/chrome_proxy_service.dart b/dwds/lib/src/services/chrome_proxy_service.dart index c02388795..836a1de21 100644 --- a/dwds/lib/src/services/chrome_proxy_service.dart +++ b/dwds/lib/src/services/chrome_proxy_service.dart @@ -474,9 +474,10 @@ class ChromeProxyService implements VmServiceInterface { final isolate = inspector.isolate; final debugger = await debuggerFuture; - for (final breakpoint in isolate.breakpoints?.toList() ?? []) { - await debugger.removeBreakpoint(breakpoint.id!); - } + await Future.wait([ + for (final breakpoint in isolate.breakpoints ?? []) + debugger.removeBreakpoint(breakpoint.id!), + ]); } @override diff --git a/dwds/test/hot_reload_breakpoints_test.dart b/dwds/test/hot_reload_breakpoints_test.dart index 092a0a2a6..cc514b965 100644 --- a/dwds/test/hot_reload_breakpoints_test.dart +++ b/dwds/test/hot_reload_breakpoints_test.dart @@ -418,7 +418,7 @@ void main() { // the old string still as the closure has not been reevaluated. await callEvaluateAndExpectLog(oldCapturedString); }); - }, timeout: Timeout.factor(2)); + }, timeout: Timeout.factor(3)); group('when pause_isolates_on_start is false', () { late VmService client; From 4c2fce89a9d361b21de3a33a70349c155680731e Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Mon, 16 Jun 2025 12:18:02 -0700 Subject: [PATCH 28/50] Copy fixtures when edits are needed --- dwds/pubspec.yaml | 1 + dwds/test/common/hot_restart_common.dart | 14 -- .../hot_restart_correctness_common.dart | 11 -- dwds/test/devtools_test.dart | 5 - dwds/test/fixtures/context.dart | 40 +++--- dwds/test/fixtures/project.dart | 134 +++++++++++++----- dwds/test/hot_reload_breakpoints_test.dart | 36 +---- dwds/test/hot_reload_test.dart | 9 -- dwds/test/hot_restart_breakpoints_test.dart | 34 +---- dwds/test/package_uri_mapper_test.dart | 3 +- 10 files changed, 127 insertions(+), 160 deletions(-) diff --git a/dwds/pubspec.yaml b/dwds/pubspec.yaml index cb5775821..7d4ad1e2e 100644 --- a/dwds/pubspec.yaml +++ b/dwds/pubspec.yaml @@ -53,6 +53,7 @@ dev_dependencies: graphs: ^2.1.0 frontend_server_common: path: ../frontend_server_common + io: ^1.0.5 js: '>=0.6.4 <0.8.0' pubspec_parse: ^1.2.0 puppeteer: ^3.1.1 diff --git a/dwds/test/common/hot_restart_common.dart b/dwds/test/common/hot_restart_common.dart index 5c93be6ce..c8bf30269 100644 --- a/dwds/test/common/hot_restart_common.dart +++ b/dwds/test/common/hot_restart_common.dart @@ -54,13 +54,6 @@ void runTests({ await recompile(hasEdits: true); } - void undoEdit() { - context.makeEditToDartEntryFile( - toReplace: newString, - replaceWith: originalString, - ); - } - /// Wait for main to finish executing before checking expectations by checking /// for a log output. /// @@ -98,7 +91,6 @@ void runTests({ }); tearDown(() async { - undoEdit(); await context.tearDown(); }); @@ -131,7 +123,6 @@ void runTests({ }); tearDown(() async { - undoEdit(); await context.tearDown(); }); @@ -166,7 +157,6 @@ void runTests({ tearDown(() async { await context.tearDown(); - undoEdit(); }); test('can live reload changes ', () async { @@ -204,7 +194,6 @@ void runTests({ tearDown(() async { await context.tearDown(); - undoEdit(); }); test('destroys and recreates the isolate during a hot restart', () async { @@ -501,7 +490,6 @@ void runTests({ tearDown(() async { await context.tearDown(); - undoEdit(); }); test('can hot restart changes ', () async { @@ -562,7 +550,6 @@ void runTests({ tearDown(() async { await context.tearDown(); - undoEdit(); }); test('can hot restart changes ', () async { @@ -609,7 +596,6 @@ void runTests({ tearDown(() async { await context.tearDown(); - undoEdit(); }); test( diff --git a/dwds/test/common/hot_restart_correctness_common.dart b/dwds/test/common/hot_restart_correctness_common.dart index 5cdda1000..381c41a39 100644 --- a/dwds/test/common/hot_restart_correctness_common.dart +++ b/dwds/test/common/hot_restart_correctness_common.dart @@ -51,14 +51,6 @@ void runTests({ } } - void undoEdit() { - context.makeEditToDartLibFile( - libFileName: 'library2.dart', - toReplace: newString, - replaceWith: originalString, - ); - } - group('Injected client', () { VmService? fakeClient; @@ -78,7 +70,6 @@ void runTests({ tearDown(() async { await context.tearDown(); - undoEdit(); }); test( @@ -145,7 +136,6 @@ void runTests({ tearDown(() async { await context.tearDown(); - undoEdit(); }); test('properly compares constants after hot restart', () async { @@ -189,7 +179,6 @@ void runTests({ tearDown(() async { await context.tearDown(); - undoEdit(); }); test('properly compares constants after hot restart', () async { diff --git a/dwds/test/devtools_test.dart b/dwds/test/devtools_test.dart index 2fef4633e..3c246fe74 100644 --- a/dwds/test/devtools_test.dart +++ b/dwds/test/devtools_test.dart @@ -132,11 +132,6 @@ void main() { await context.webDriver.driver.refresh(); await eventsDone; - // Re-set the edited file: - context.makeEditToDartEntryFile( - toReplace: 'Bonjour le monde!', - replaceWith: 'Hello World!', - ); }, skip: 'https://github.com/dart-lang/webdev/issues/1888', ); diff --git a/dwds/test/fixtures/context.dart b/dwds/test/fixtures/context.dart index 3f7090725..992484430 100644 --- a/dwds/test/fixtures/context.dart +++ b/dwds/test/fixtures/context.dart @@ -129,18 +129,7 @@ class TestContext { /// External VM service. VmService get vmService => debugConnection.vmService; - TestContext(this.project, this.sdkConfigurationProvider) { - DartUri.currentDirectory = project.absolutePackageDirectory; - - project.validate(); - - _logger.info( - 'Serving: ${project.directoryToServe}/${project.filePathToServe}', - ); - _logger.info('Project: ${project.absolutePackageDirectory}'); - _logger.info('Packages: ${project.packageConfigFile}'); - _logger.info('Entry: ${project.dartEntryFilePath}'); - } + TestContext(this.project, this.sdkConfigurationProvider); Future setUp({ TestSettings testSettings = const TestSettings(), @@ -160,10 +149,17 @@ class TestContext { final sdkLayout = sdkConfigurationProvider.sdkLayout; final configuration = await sdkConfigurationProvider.configuration; configuration.validate(); - await project.cleanUp(); + await project.setUp(); DartUri.currentDirectory = project.absolutePackageDirectory; + _logger.info( + 'Serving: ${project.directoryToServe}/${project.filePathToServe}', + ); + _logger.info('Project: ${project.absolutePackageDirectory}'); + _logger.info('Packages: ${project.packageConfigFile}'); + _logger.info('Entry: ${project.dartEntryFilePath}'); + configureLogWriter(); _client = IOClient( @@ -552,6 +548,7 @@ class TestContext { _client?.close(); await _outputDir?.delete(recursive: true); stopLogWriter(); + project.tearDown(); // clear the state for next setup _webDriver = null; @@ -568,6 +565,10 @@ class TestContext { required String toReplace, required String replaceWith, }) { + assert( + project.editable, + 'Project ${project.packageName} is not marked as editable', + ); final file = File(project.dartEntryFilePath); final fileContents = file.readAsStringSync(); file.writeAsStringSync(fileContents.replaceAll(toReplace, replaceWith)); @@ -578,23 +579,26 @@ class TestContext { required String toReplace, required String replaceWith, }) { + assert( + project.editable, + 'Project ${project.packageName} is not marked as editable', + ); final file = File(project.dartLibFilePath(libFileName)); final fileContents = file.readAsStringSync(); file.writeAsStringSync(fileContents.replaceAll(toReplace, replaceWith)); } void addLibraryFile({required String libFileName, required String contents}) { + assert( + project.editable, + 'Project ${project.packageName} is not marked as editable', + ); final file = File(project.dartLibFilePath(libFileName)); // Library folder may not exist yet, so create it. file.createSync(recursive: true); file.writeAsStringSync(contents); } - void removeLibraryFile({required String libFileName}) { - final file = File(project.dartLibFilePath(libFileName)); - file.deleteSync(); - } - Future recompile({required bool fullRestart}) async { await webRunner.run( frontendServerFileSystem, diff --git a/dwds/test/fixtures/project.dart b/dwds/test/fixtures/project.dart index 8e722704b..ec46a6f69 100644 --- a/dwds/test/fixtures/project.dart +++ b/dwds/test/fixtures/project.dart @@ -4,6 +4,7 @@ import 'dart:io'; +import 'package:io/io.dart'; import 'package:path/path.dart' as p; import 'package:test_common/utilities.dart'; @@ -16,11 +17,17 @@ class TestProject { final String webAssetsPath; final String dartEntryFileName; final String htmlEntryFileName; + final List dependencies; + final bool editable; + + late Directory _fixturesCopy; /// The top level directory in which we run the test server, e.g. /// "/workstation/webdev/fixtures/_testSound". String get absolutePackageDirectory => - absolutePath(pathFromFixtures: packageDirectory); + editable + ? p.join(_fixturesCopy.absolute.path, packageDirectory) + : absolutePath(pathFromFixtures: packageDirectory); /// The directory to build and serve, e.g. "example". String get directoryToServe => p.split(webAssetsPath).first; @@ -36,13 +43,16 @@ class TestProject { /// The path to the Dart entry file, e.g, /// "/workstation/webdev/fixtures/_testSound/example/hello_world/main.dart": - String get dartEntryFilePath => absolutePath( - pathFromFixtures: p.joinAll([ + String get dartEntryFilePath { + final entryFilePathInPkg = [ packageDirectory, webAssetsPath, dartEntryFileName, - ]), - ); + ]; + editable + ? p.joinAll([_fixturesCopy.absolute.path, ...entryFilePathInPkg]) + : absolutePath(pathFromFixtures: p.joinAll(entryFilePathInPkg)); + } /// The URI for the package_config.json is located in: /// `/.dart_tool/package_config` @@ -56,7 +66,7 @@ class TestProject { 'org-dartlang-app:///${p.join(webAssetsPath, dartEntryFileName)}', ); - const TestProject.testPackage({IndexBaseMode baseMode = IndexBaseMode.noBase}) + TestProject.testPackage({IndexBaseMode baseMode = IndexBaseMode.noBase}) : this._( packageName: '_test_package_sound', packageDirectory: '_testPackageSound', @@ -64,33 +74,36 @@ class TestProject { dartEntryFileName: 'main.dart', htmlEntryFileName: baseMode == IndexBaseMode.base ? 'base_index.html' : 'index.html', + dependencies: [TestProject.test], ); - static const testCircular1 = TestProject._( + static final testCircular1 = TestProject._( packageName: '_test_circular1_sound', packageDirectory: '_testCircular1Sound', webAssetsPath: 'web', dartEntryFileName: 'main.dart', htmlEntryFileName: 'index.html', + dependencies: [TestProject.testCircular2()], ); - const TestProject.testCircular2({ - IndexBaseMode baseMode = IndexBaseMode.noBase, - }) : this._( - packageName: '_test_circular2_sound', - packageDirectory: '_testCircular2Sound', - webAssetsPath: 'web', - dartEntryFileName: 'main.dart', - htmlEntryFileName: - baseMode == IndexBaseMode.base ? 'base_index.html' : 'index.html', - ); - - static const test = TestProject._( + TestProject.testCircular2({IndexBaseMode baseMode = IndexBaseMode.noBase}) + : this._( + packageName: '_test_circular2_sound', + packageDirectory: '_testCircular2Sound', + webAssetsPath: 'web', + dartEntryFileName: 'main.dart', + htmlEntryFileName: + baseMode == IndexBaseMode.base ? 'base_index.html' : 'index.html', + dependencies: [TestProject.testCircular1], + ); + + static final test = TestProject._( packageName: '_test_sound', packageDirectory: '_testSound', webAssetsPath: 'example/hello_world', dartEntryFileName: 'main.dart', htmlEntryFileName: 'index.html', + editable: true, ); static final testScopes = TestProject._( @@ -107,9 +120,10 @@ class TestProject { webAssetsPath: webCompatiblePath(['example', 'append_body']), dartEntryFileName: 'main.dart', htmlEntryFileName: 'index.html', + editable: true, ); - static const testExperiment = TestProject._( + static final testExperiment = TestProject._( packageName: '_experiment_sound', packageDirectory: '_experimentSound', webAssetsPath: 'web', @@ -117,7 +131,7 @@ class TestProject { htmlEntryFileName: 'index.html', ); - static const testHotRestart1 = TestProject._( + static final testHotRestart1 = TestProject._( packageName: '_test_hot_restart1', packageDirectory: '_testHotRestart1Sound', webAssetsPath: 'web', @@ -127,55 +141,93 @@ class TestProject { /// This series of hot restart tests is divided across multiple packages in /// order to test correctness when only a subset of libraries are updated. - static const testHotRestart2 = TestProject._( + static final testHotRestart2 = TestProject._( packageName: '_test_hot_restart2', packageDirectory: '_testHotRestart2Sound', webAssetsPath: 'web', dartEntryFileName: 'main.dart', htmlEntryFileName: 'index.html', + dependencies: [TestProject.testHotRestart1], + editable: true, ); - static const testHotRestartBreakpoints = TestProject._( + static final testHotRestartBreakpoints = TestProject._( packageName: '_test_hot_restart_breakpoints', packageDirectory: '_testHotRestartBreakpoints', webAssetsPath: 'web', dartEntryFileName: 'main.dart', htmlEntryFileName: 'index.html', + editable: true, ); - static const testHotReload = TestProject._( + static final testHotReload = TestProject._( packageName: '_test_hot_reload', packageDirectory: '_testHotReload', webAssetsPath: 'web', dartEntryFileName: 'main.dart', htmlEntryFileName: 'index.html', + editable: true, ); - static const testHotReloadBreakpoints = TestProject._( + static final testHotReloadBreakpoints = TestProject._( packageName: '_test_hot_reload_breakpoints', packageDirectory: '_testHotReloadBreakpoints', webAssetsPath: 'web', dartEntryFileName: 'main.dart', htmlEntryFileName: 'index.html', + editable: true, ); - const TestProject._({ + TestProject._({ required this.packageName, required this.packageDirectory, required this.webAssetsPath, required this.dartEntryFileName, required this.htmlEntryFileName, + this.dependencies = const [], + this.editable = false, }); - void validate() { - // Verify that the web assets path has no starting slash: - assert(!webAssetsPath.startsWith('/')); + static void _copyPackageIntoTempDirectory( + Directory tempDirectory, + String packageDirectory, + ) { + final currentPath = absolutePath(pathFromFixtures: packageDirectory); + final newPath = p.join(tempDirectory.absolute.path, packageDirectory); + Directory(newPath).createSync(); + copyPathSync(currentPath, newPath); } - /// Clean up the project. - /// Called when we need to rebuild sdk and the app from - /// previous test configurations. - Future cleanUp() async { + Future setUp() async { + // Verify that the web assets path has no starting slash. + assert(!webAssetsPath.startsWith('/')); + // If this project is editable, we should use a copy of the package to edit + // instead. + if (editable) { + final systemTempDir = Directory( + // Resolve symbolic links as build_daemon tests rely on paths matching + // between the client and the daemon. + Directory.systemTemp.resolveSymbolicLinksSync(), + ); + _fixturesCopy = systemTempDir.createTempSync(); + _copyPackageIntoTempDirectory(_fixturesCopy, packageDirectory); + // Also copy any of its dependencies, recursively. + final copiedPackages = {this}; + final dependencyQueue = List.from(dependencies); + while (dependencyQueue.isNotEmpty) { + final dependency = dependencyQueue.removeAt(0); + if (copiedPackages.contains(dependency)) continue; + _copyPackageIntoTempDirectory( + _fixturesCopy, + dependency.packageDirectory, + ); + dependencyQueue.addAll(dependency.dependencies); + } + } + + // Clean up the project. + // Called when we need to rebuild sdk and the app from previous test + // configurations. await Process.run('dart', [ 'run', 'build_runner', @@ -183,9 +235,19 @@ class TestProject { ], workingDirectory: absolutePackageDirectory); } + /// Delete the project if we made a copy. + void tearDown() { + if (editable) { + _fixturesCopy.deleteSync(recursive: true); + } + } + /// The path to the Dart specified file in the 'lib' directory, e.g, /// "/workstation/webdev/fixtures/_testSound/lib/library.dart": - String dartLibFilePath(String dartLibFileName) => absolutePath( - pathFromFixtures: p.joinAll([packageDirectory, 'lib', dartLibFileName]), - ); + String dartLibFilePath(String dartLibFileName) { + final libFilePathInPkg = [packageDirectory, 'lib', dartLibFileName]; + return editable + ? p.joinAll([_fixturesCopy.absolute.path, ...libFilePathInPkg]) + : absolutePath(pathFromFixtures: p.joinAll(libFilePathInPkg)); + } } diff --git a/dwds/test/hot_reload_breakpoints_test.dart b/dwds/test/hot_reload_breakpoints_test.dart index cc514b965..f4531386b 100644 --- a/dwds/test/hot_reload_breakpoints_test.dart +++ b/dwds/test/hot_reload_breakpoints_test.dart @@ -14,7 +14,6 @@ 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'; @@ -36,8 +35,6 @@ void main() { tearDownAll(provider.dispose); - final edits = <({String file, String originalString, String newString})>[]; - void makeEdit(String file, String originalString, String newString) { if (file == project.dartEntryFileName) { context.makeEditToDartEntryFile( @@ -51,11 +48,6 @@ void main() { replaceWith: newString, ); } - edits.add(( - file: file, - originalString: originalString, - newString: newString, - )); } Future makeEditAndRecompile( @@ -67,27 +59,8 @@ void main() { await context.recompile(fullRestart: false); } - void undoEdits() { - for (final (:file, :originalString, :newString) in edits.reversed) { - if (file == project.dartEntryFileName) { - context.makeEditToDartEntryFile( - toReplace: newString, - replaceWith: originalString, - ); - } else { - context.makeEditToDartLibFile( - libFileName: file, - toReplace: newString, - replaceWith: originalString, - ); - } - } - edits.clear(); - } - group('when pause_isolates_on_start is true', () { late VmService client; - late VmServiceInterface service; late Stream stream; setUp(() async { @@ -102,13 +75,11 @@ void main() { ); client = await context.connectFakeClient(); await client.setFlag('pause_isolates_on_start', 'true'); - service = context.service; - stream = service.onEvent(EventStreams.kDebug); - await service.streamListen(EventStreams.kDebug); + await client.streamListen(EventStreams.kDebug); + stream = client.onDebugEvent; }); tearDown(() async { - undoEdits(); await context.tearDown(); }); @@ -373,8 +344,6 @@ void main() { // Should break at `libValue`. await breakpointFuture; await resumeAndExpectLog(libGenLog); - - context.removeLibraryFile(libFileName: libFile); }, ); @@ -438,7 +407,6 @@ void main() { }); tearDown(() async { - undoEdits(); await context.tearDown(); }); diff --git a/dwds/test/hot_reload_test.dart b/dwds/test/hot_reload_test.dart index 17651c492..d9eec22f9 100644 --- a/dwds/test/hot_reload_test.dart +++ b/dwds/test/hot_reload_test.dart @@ -42,14 +42,6 @@ void main() { await context.recompile(fullRestart: false); } - void undoEdit() { - context.makeEditToDartLibFile( - libFileName: 'library1.dart', - toReplace: newString, - replaceWith: originalString, - ); - } - group('Injected client', () { late VmService fakeClient; @@ -67,7 +59,6 @@ void main() { }); tearDown(() async { - undoEdit(); await context.tearDown(); }); diff --git a/dwds/test/hot_restart_breakpoints_test.dart b/dwds/test/hot_restart_breakpoints_test.dart index 3c58b12ac..2cf2b5b12 100644 --- a/dwds/test/hot_restart_breakpoints_test.dart +++ b/dwds/test/hot_restart_breakpoints_test.dart @@ -36,8 +36,6 @@ void main() { tearDownAll(provider.dispose); - final edits = <({String file, String originalString, String newString})>[]; - void makeEdit(String file, String originalString, String newString) { if (file == project.dartEntryFileName) { context.makeEditToDartEntryFile( @@ -51,11 +49,6 @@ void main() { replaceWith: newString, ); } - edits.add(( - file: file, - originalString: originalString, - newString: newString, - )); } Future makeEditAndRecompile( @@ -67,24 +60,6 @@ void main() { await context.recompile(fullRestart: true); } - void undoEdits() { - for (final (:file, :originalString, :newString) in edits.reversed) { - if (file == project.dartEntryFileName) { - context.makeEditToDartEntryFile( - toReplace: newString, - replaceWith: originalString, - ); - } else { - context.makeEditToDartLibFile( - libFileName: file, - toReplace: newString, - replaceWith: originalString, - ); - } - } - edits.clear(); - } - group('when pause_isolates_on_start is true', () { late VmService client; late VmServiceInterface service; @@ -104,11 +79,11 @@ void main() { ), ); client = await context.connectFakeClient(); + service = context.service; await client.setFlag('pause_isolates_on_start', 'true'); await client.streamListen(EventStreams.kIsolate); - service = context.service; - stream = service.onEvent(EventStreams.kDebug); - await service.streamListen(EventStreams.kDebug); + await client.streamListen(EventStreams.kDebug); + stream = client.onEvent(EventStreams.kDebug); consoleSubscription = context.webkitDebugger.onConsoleAPICalled.listen( (e) => consoleLogs.add(e.args.first.value as String), ); @@ -117,7 +92,6 @@ void main() { tearDown(() async { await consoleSubscription.cancel(); consoleLogs.clear(); - undoEdits(); await context.tearDown(); }); @@ -318,8 +292,6 @@ void main() { await breakpointFuture; expect(consoleLogs.contains(libGenLog), false); await resumeAndExpectLog(libGenLog); - - context.removeLibraryFile(libFileName: libFile); }, ); }); diff --git a/dwds/test/package_uri_mapper_test.dart b/dwds/test/package_uri_mapper_test.dart index a5de72ca6..267e72e63 100644 --- a/dwds/test/package_uri_mapper_test.dart +++ b/dwds/test/package_uri_mapper_test.dart @@ -33,8 +33,7 @@ void main() { ? 'packages/${project.packageDirectory}/lib/test_library.dart' : '/packages/${project.packageName}/test_library.dart'; - final resolvedPath = - '/webdev/fixtures/${project.packageDirectory}/lib/test_library.dart'; + final resolvedPath = '${project.packageDirectory}/lib/test_library.dart'; final testPackageSoundPath = project.absolutePackageDirectory; final packageConfigFile = Uri.file( From e3760781e70ace21bcfe2abea5c6702f80c539a2 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Tue, 17 Jun 2025 17:45:43 -0700 Subject: [PATCH 29/50] Fix missing return and use onDebugEvent --- dwds/test/common/hot_restart_common.dart | 2 +- dwds/test/fixtures/project.dart | 2 +- dwds/test/hot_restart_breakpoints_test.dart | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dwds/test/common/hot_restart_common.dart b/dwds/test/common/hot_restart_common.dart index c8bf30269..504704a15 100644 --- a/dwds/test/common/hot_restart_common.dart +++ b/dwds/test/common/hot_restart_common.dart @@ -411,7 +411,7 @@ void runTests({ var vm = await client.getVM(); var isolateId = vm.isolates!.first.id!; await client.streamListen('Debug'); - final stream = client.onEvent('Debug'); + final stream = client.onDebugEvent; final scriptList = await client.getScripts(isolateId); final main = scriptList.scripts!.firstWhere( (script) => script.uri!.contains('main.dart'), diff --git a/dwds/test/fixtures/project.dart b/dwds/test/fixtures/project.dart index ec46a6f69..63a44f801 100644 --- a/dwds/test/fixtures/project.dart +++ b/dwds/test/fixtures/project.dart @@ -49,7 +49,7 @@ class TestProject { webAssetsPath, dartEntryFileName, ]; - editable + return editable ? p.joinAll([_fixturesCopy.absolute.path, ...entryFilePathInPkg]) : absolutePath(pathFromFixtures: p.joinAll(entryFilePathInPkg)); } diff --git a/dwds/test/hot_restart_breakpoints_test.dart b/dwds/test/hot_restart_breakpoints_test.dart index 2cf2b5b12..b8be5746a 100644 --- a/dwds/test/hot_restart_breakpoints_test.dart +++ b/dwds/test/hot_restart_breakpoints_test.dart @@ -83,7 +83,7 @@ void main() { await client.setFlag('pause_isolates_on_start', 'true'); await client.streamListen(EventStreams.kIsolate); await client.streamListen(EventStreams.kDebug); - stream = client.onEvent(EventStreams.kDebug); + stream = client.onDebugEvent; consoleSubscription = context.webkitDebugger.onConsoleAPICalled.listen( (e) => consoleLogs.add(e.args.first.value as String), ); From 9f3d730e2a78f93a408b068c0d02eb57e53741b6 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Thu, 19 Jun 2025 11:31:55 -0700 Subject: [PATCH 30/50] Use pubspec_parse to copy dependencies instead of relying on the project to declare it --- dwds/test/dart_uri_file_uri_test.dart | 32 +++++++---- dwds/test/fixtures/project.dart | 55 ++++++++++++------- dwds/test/load_strategy_test.dart | 8 +-- .../frontend_server_asset_reader_test.dart | 10 ++-- 4 files changed, 66 insertions(+), 39 deletions(-) diff --git a/dwds/test/dart_uri_file_uri_test.dart b/dwds/test/dart_uri_file_uri_test.dart index c84b1c3c6..c3998a393 100644 --- a/dwds/test/dart_uri_file_uri_test.dart +++ b/dwds/test/dart_uri_file_uri_test.dart @@ -26,13 +26,6 @@ void main() { final testProject = TestProject.test; final testPackageProject = TestProject.testPackage(); - /// The directory for the general _test package. - final testDir = testProject.absolutePackageDirectory; - - /// The directory for the _testPackage package (contained within dwds), - /// which imports _test. - final testPackageDir = testPackageProject.absolutePackageDirectory; - final context = TestContext(testPackageProject, provider); for (final compilationMode in CompilationMode.values) { @@ -71,7 +64,13 @@ void main() { test('file path to org-dartlang-app', () { final webMain = Uri.file( - p.join(testPackageDir, 'web', 'main.dart'), + p.join( + // The directory for the _testPackage package (contained within + // dwds), which imports _test. + testPackageProject.absolutePackageDirectory, + 'web', + 'main.dart', + ), ); final uri = DartUri('$webMain'); expect(uri.serverPath, appServerPath); @@ -79,14 +78,27 @@ void main() { test('file path to this package', () { final testPackageLib = Uri.file( - p.join(testPackageDir, 'lib', 'test_library.dart'), + p.join( + testPackageProject.absolutePackageDirectory, + 'lib', + 'test_library.dart', + ), ); final uri = DartUri('$testPackageLib'); expect(uri.serverPath, serverPath); }); test('file path to another package', () { - final testLib = Uri.file(p.join(testDir, 'lib', 'library.dart')); + final testLib = Uri.file( + p.join( + // The directory for the general _test package. + testPackageProject.absolutePackageDirectory, + '..', + testProject.packageDirectory, + 'lib', + 'library.dart', + ), + ); final dartUri = DartUri('$testLib'); expect(dartUri.serverPath, anotherServerPath); }); diff --git a/dwds/test/fixtures/project.dart b/dwds/test/fixtures/project.dart index 63a44f801..3d80bf942 100644 --- a/dwds/test/fixtures/project.dart +++ b/dwds/test/fixtures/project.dart @@ -6,6 +6,7 @@ import 'dart:io'; import 'package:io/io.dart'; import 'package:path/path.dart' as p; +import 'package:pubspec_parse/pubspec_parse.dart'; import 'package:test_common/utilities.dart'; enum IndexBaseMode { noBase, base } @@ -17,7 +18,6 @@ class TestProject { final String webAssetsPath; final String dartEntryFileName; final String htmlEntryFileName; - final List dependencies; final bool editable; late Directory _fixturesCopy; @@ -74,7 +74,6 @@ class TestProject { dartEntryFileName: 'main.dart', htmlEntryFileName: baseMode == IndexBaseMode.base ? 'base_index.html' : 'index.html', - dependencies: [TestProject.test], ); static final testCircular1 = TestProject._( @@ -83,7 +82,6 @@ class TestProject { webAssetsPath: 'web', dartEntryFileName: 'main.dart', htmlEntryFileName: 'index.html', - dependencies: [TestProject.testCircular2()], ); TestProject.testCircular2({IndexBaseMode baseMode = IndexBaseMode.noBase}) @@ -94,7 +92,6 @@ class TestProject { dartEntryFileName: 'main.dart', htmlEntryFileName: baseMode == IndexBaseMode.base ? 'base_index.html' : 'index.html', - dependencies: [TestProject.testCircular1], ); static final test = TestProject._( @@ -147,7 +144,6 @@ class TestProject { webAssetsPath: 'web', dartEntryFileName: 'main.dart', htmlEntryFileName: 'index.html', - dependencies: [TestProject.testHotRestart1], editable: true, ); @@ -184,18 +180,45 @@ class TestProject { required this.webAssetsPath, required this.dartEntryFileName, required this.htmlEntryFileName, - this.dependencies = const [], this.editable = false, }); - static void _copyPackageIntoTempDirectory( + static void _copyPackageAndPathDependenciesIntoTempDirectory( Directory tempDirectory, String packageDirectory, + Set copiedPackageDirectories, ) { + // There may be cycles in dependencies, so check that we already copied this + // package. + if (copiedPackageDirectories.contains(packageDirectory)) return; final currentPath = absolutePath(pathFromFixtures: packageDirectory); final newPath = p.join(tempDirectory.absolute.path, packageDirectory); Directory(newPath).createSync(); copyPathSync(currentPath, newPath); + copiedPackageDirectories.add(packageDirectory); + final pubspec = Pubspec.parse( + File(p.join(currentPath, 'pubspec.yaml')).readAsStringSync(), + ); + for (final package in pubspec.dependencies.keys) { + final dependency = pubspec.dependencies[package]!; + if (dependency is PathDependency) { + final dependencyDirectory = Directory(dependency.path); + // It may be okay to do some more complicated copying here for path + // dependencies that aren't immediately under `fixtures`, but for now, + // only support those that are. + assert( + dependencyDirectory.parent == Directory(currentPath).parent, + 'Path dependency of $packageDirectory: ' + '${dependencyDirectory.absolute.path} is not an immediate directory ' + 'in `fixtures`.', + ); + _copyPackageAndPathDependenciesIntoTempDirectory( + tempDirectory, + p.dirname(dependencyDirectory.path), + copiedPackageDirectories, + ); + } + } } Future setUp() async { @@ -210,19 +233,11 @@ class TestProject { Directory.systemTemp.resolveSymbolicLinksSync(), ); _fixturesCopy = systemTempDir.createTempSync(); - _copyPackageIntoTempDirectory(_fixturesCopy, packageDirectory); - // Also copy any of its dependencies, recursively. - final copiedPackages = {this}; - final dependencyQueue = List.from(dependencies); - while (dependencyQueue.isNotEmpty) { - final dependency = dependencyQueue.removeAt(0); - if (copiedPackages.contains(dependency)) continue; - _copyPackageIntoTempDirectory( - _fixturesCopy, - dependency.packageDirectory, - ); - dependencyQueue.addAll(dependency.dependencies); - } + _copyPackageAndPathDependenciesIntoTempDirectory( + _fixturesCopy, + packageDirectory, + {}, + ); } // Clean up the project. diff --git a/dwds/test/load_strategy_test.dart b/dwds/test/load_strategy_test.dart index 99c6c608e..8539526c8 100644 --- a/dwds/test/load_strategy_test.dart +++ b/dwds/test/load_strategy_test.dart @@ -31,7 +31,7 @@ void main() { group( 'When the packageConfigLocator does not specify a package config path', () { - final strategy = FakeStrategy(FakeAssetReader()); + late final strategy = FakeStrategy(FakeAssetReader()); test('defaults to "./dart_tool/package_config.json"', () { expect( @@ -43,7 +43,7 @@ void main() { ); group('When a custom package config path is specified', () { - final strategy = FakeStrategy( + late final strategy = FakeStrategy( FakeAssetReader(), packageConfigPath: 'custom/package_config/path', ); @@ -57,7 +57,7 @@ void main() { }); group('When default build settings defined', () { - final strategy = FakeStrategy( + late final strategy = FakeStrategy( FakeAssetReader(), buildSettings: TestBuildSettings.dart(), ); @@ -85,7 +85,7 @@ void main() { final isFlutterApp = true; final experiments = ['records']; - final strategy = FakeStrategy( + late final strategy = FakeStrategy( FakeAssetReader(), buildSettings: BuildSettings( appEntrypoint: appEntrypoint, diff --git a/dwds/test/readers/frontend_server_asset_reader_test.dart b/dwds/test/readers/frontend_server_asset_reader_test.dart index 1e85ed2d3..90372b2be 100644 --- a/dwds/test/readers/frontend_server_asset_reader_test.dart +++ b/dwds/test/readers/frontend_server_asset_reader_test.dart @@ -22,9 +22,9 @@ void main() { late Directory tempFixtures; late File jsonOriginal; late File mapOriginal; + late String packagesDir; final testProject = TestProject.test; - final packagesDir = testProject.absolutePackageDirectory; Future createTempFixtures() async { tempFixtures = await Directory.systemTemp.createTemp('dwds_test_fixtures'); @@ -37,15 +37,14 @@ void main() { ).copy(p.join(tempFixtures.path, 'main.dart.dill.map')); } - setUpAll(() async { + setUp(() async { + await testProject.setUp(); + packagesDir = testProject.absolutePackageDirectory; final sdkLayout = TestSdkLayout.defaultSdkLayout; await Process.run(sdkLayout.dartPath, [ 'pub', 'upgrade', ], workingDirectory: packagesDir); - }); - - setUp(() async { await createTempFixtures(); assetReader = FrontendServerAssetReader( outputPath: p.join(tempFixtures.path, 'main.dart.dill'), @@ -55,6 +54,7 @@ void main() { }); tearDown(() async { + testProject.tearDown(); if (await tempFixtures.exists()) await tempFixtures.delete(recursive: true); }); From 184bbd3a206f0d27c2d3ddff47b13d8963e153cd Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Thu, 19 Jun 2025 16:36:28 -0700 Subject: [PATCH 31/50] Fix issue with not normalizing path of dependency before compare and copy --- dwds/test/fixtures/project.dart | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/dwds/test/fixtures/project.dart b/dwds/test/fixtures/project.dart index 3d80bf942..ffe4df5d4 100644 --- a/dwds/test/fixtures/project.dart +++ b/dwds/test/fixtures/project.dart @@ -199,22 +199,23 @@ class TestProject { final pubspec = Pubspec.parse( File(p.join(currentPath, 'pubspec.yaml')).readAsStringSync(), ); - for (final package in pubspec.dependencies.keys) { - final dependency = pubspec.dependencies[package]!; + for (final dependency in pubspec.dependencies.values) { if (dependency is PathDependency) { - final dependencyDirectory = Directory(dependency.path); + final dependencyDirectory = Directory( + p.normalize(p.join(currentPath, dependency.path)), + ); // It may be okay to do some more complicated copying here for path // dependencies that aren't immediately under `fixtures`, but for now, // only support those that are. assert( - dependencyDirectory.parent == Directory(currentPath).parent, + dependencyDirectory.parent.path == Directory(currentPath).parent.path, 'Path dependency of $packageDirectory: ' - '${dependencyDirectory.absolute.path} is not an immediate directory ' - 'in `fixtures`.', + '${dependencyDirectory.path} is not an immediate directory in ' + '`fixtures`.', ); _copyPackageAndPathDependenciesIntoTempDirectory( tempDirectory, - p.dirname(dependencyDirectory.path), + p.basename(dependencyDirectory.path), copiedPackageDirectories, ); } From 5ec1261dd864587b2e734d21745d868f7252f6fb Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Fri, 20 Jun 2025 15:40:29 -0700 Subject: [PATCH 32/50] Wait an extra second if we can't delete the directory yet --- dwds/test/fixtures/context.dart | 2 +- dwds/test/fixtures/project.dart | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/dwds/test/fixtures/context.dart b/dwds/test/fixtures/context.dart index 992484430..cb4dda72e 100644 --- a/dwds/test/fixtures/context.dart +++ b/dwds/test/fixtures/context.dart @@ -548,7 +548,7 @@ class TestContext { _client?.close(); await _outputDir?.delete(recursive: true); stopLogWriter(); - project.tearDown(); + await project.tearDown(); // clear the state for next setup _webDriver = null; diff --git a/dwds/test/fixtures/project.dart b/dwds/test/fixtures/project.dart index ffe4df5d4..d220d4a55 100644 --- a/dwds/test/fixtures/project.dart +++ b/dwds/test/fixtures/project.dart @@ -252,9 +252,16 @@ class TestProject { } /// Delete the project if we made a copy. - void tearDown() { + Future tearDown() async { if (editable) { - _fixturesCopy.deleteSync(recursive: true); + try { + _fixturesCopy.deleteSync(recursive: true); + } on FileSystemException catch (_) { + // On Windows, the build daemon process might still be accessing the + // working directory, so wait a second and then try again. + await Future.delayed(const Duration(seconds: 1)); + _fixturesCopy.deleteSync(recursive: true); + } } } From 9cece73e2662cf3d0c3df04f5215e5bbe1a8f801 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Fri, 20 Jun 2025 16:18:55 -0700 Subject: [PATCH 33/50] Add await --- dwds/test/readers/frontend_server_asset_reader_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dwds/test/readers/frontend_server_asset_reader_test.dart b/dwds/test/readers/frontend_server_asset_reader_test.dart index 90372b2be..9c20eb2dd 100644 --- a/dwds/test/readers/frontend_server_asset_reader_test.dart +++ b/dwds/test/readers/frontend_server_asset_reader_test.dart @@ -54,7 +54,7 @@ void main() { }); tearDown(() async { - testProject.tearDown(); + await testProject.tearDown(); if (await tempFixtures.exists()) await tempFixtures.delete(recursive: true); }); From 859205387b079c36e7767d089af5726e6ef768f6 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Sat, 21 Jun 2025 00:56:39 -0700 Subject: [PATCH 34/50] Copy for all projects, not just those marked editable --- dwds/test/fixtures/context.dart | 12 ----- dwds/test/fixtures/project.dart | 92 +++++++++++++-------------------- 2 files changed, 37 insertions(+), 67 deletions(-) diff --git a/dwds/test/fixtures/context.dart b/dwds/test/fixtures/context.dart index cb4dda72e..fb261a58f 100644 --- a/dwds/test/fixtures/context.dart +++ b/dwds/test/fixtures/context.dart @@ -565,10 +565,6 @@ class TestContext { required String toReplace, required String replaceWith, }) { - assert( - project.editable, - 'Project ${project.packageName} is not marked as editable', - ); final file = File(project.dartEntryFilePath); final fileContents = file.readAsStringSync(); file.writeAsStringSync(fileContents.replaceAll(toReplace, replaceWith)); @@ -579,20 +575,12 @@ class TestContext { required String toReplace, required String replaceWith, }) { - assert( - project.editable, - 'Project ${project.packageName} is not marked as editable', - ); final file = File(project.dartLibFilePath(libFileName)); final fileContents = file.readAsStringSync(); file.writeAsStringSync(fileContents.replaceAll(toReplace, replaceWith)); } void addLibraryFile({required String libFileName, required String contents}) { - assert( - project.editable, - 'Project ${project.packageName} is not marked as editable', - ); final file = File(project.dartLibFilePath(libFileName)); // Library folder may not exist yet, so create it. file.createSync(recursive: true); diff --git a/dwds/test/fixtures/project.dart b/dwds/test/fixtures/project.dart index d220d4a55..ce7506c50 100644 --- a/dwds/test/fixtures/project.dart +++ b/dwds/test/fixtures/project.dart @@ -18,16 +18,13 @@ class TestProject { final String webAssetsPath; final String dartEntryFileName; final String htmlEntryFileName; - final bool editable; late Directory _fixturesCopy; /// The top level directory in which we run the test server, e.g. - /// "/workstation/webdev/fixtures/_testSound". + /// "/tmp/_testSound". String get absolutePackageDirectory => - editable - ? p.join(_fixturesCopy.absolute.path, packageDirectory) - : absolutePath(pathFromFixtures: packageDirectory); + p.join(_fixturesCopy.absolute.path, packageDirectory); /// The directory to build and serve, e.g. "example". String get directoryToServe => p.split(webAssetsPath).first; @@ -42,17 +39,13 @@ class TestProject { } /// The path to the Dart entry file, e.g, - /// "/workstation/webdev/fixtures/_testSound/example/hello_world/main.dart": - String get dartEntryFilePath { - final entryFilePathInPkg = [ - packageDirectory, - webAssetsPath, - dartEntryFileName, - ]; - return editable - ? p.joinAll([_fixturesCopy.absolute.path, ...entryFilePathInPkg]) - : absolutePath(pathFromFixtures: p.joinAll(entryFilePathInPkg)); - } + /// "/tmp/_testSound/example/hello_world/main.dart": + String get dartEntryFilePath => p.joinAll([ + _fixturesCopy.absolute.path, + packageDirectory, + webAssetsPath, + dartEntryFileName, + ]); /// The URI for the package_config.json is located in: /// `/.dart_tool/package_config` @@ -100,7 +93,6 @@ class TestProject { webAssetsPath: 'example/hello_world', dartEntryFileName: 'main.dart', htmlEntryFileName: 'index.html', - editable: true, ); static final testScopes = TestProject._( @@ -117,7 +109,6 @@ class TestProject { webAssetsPath: webCompatiblePath(['example', 'append_body']), dartEntryFileName: 'main.dart', htmlEntryFileName: 'index.html', - editable: true, ); static final testExperiment = TestProject._( @@ -144,7 +135,6 @@ class TestProject { webAssetsPath: 'web', dartEntryFileName: 'main.dart', htmlEntryFileName: 'index.html', - editable: true, ); static final testHotRestartBreakpoints = TestProject._( @@ -153,7 +143,6 @@ class TestProject { webAssetsPath: 'web', dartEntryFileName: 'main.dart', htmlEntryFileName: 'index.html', - editable: true, ); static final testHotReload = TestProject._( @@ -162,7 +151,6 @@ class TestProject { webAssetsPath: 'web', dartEntryFileName: 'main.dart', htmlEntryFileName: 'index.html', - editable: true, ); static final testHotReloadBreakpoints = TestProject._( @@ -171,7 +159,6 @@ class TestProject { webAssetsPath: 'web', dartEntryFileName: 'main.dart', htmlEntryFileName: 'index.html', - editable: true, ); TestProject._({ @@ -180,7 +167,6 @@ class TestProject { required this.webAssetsPath, required this.dartEntryFileName, required this.htmlEntryFileName, - this.editable = false, }); static void _copyPackageAndPathDependenciesIntoTempDirectory( @@ -225,21 +211,19 @@ class TestProject { Future setUp() async { // Verify that the web assets path has no starting slash. assert(!webAssetsPath.startsWith('/')); - // If this project is editable, we should use a copy of the package to edit - // instead. - if (editable) { - final systemTempDir = Directory( - // Resolve symbolic links as build_daemon tests rely on paths matching - // between the client and the daemon. - Directory.systemTemp.resolveSymbolicLinksSync(), - ); - _fixturesCopy = systemTempDir.createTempSync(); - _copyPackageAndPathDependenciesIntoTempDirectory( - _fixturesCopy, - packageDirectory, - {}, - ); - } + // Copy the package into a temporary directory to allow editing of files if + // needed. + final systemTempDir = Directory( + // Resolve symbolic links as build_daemon tests rely on paths matching + // between the client and the daemon. + Directory.systemTemp.resolveSymbolicLinksSync(), + ); + _fixturesCopy = systemTempDir.createTempSync(); + _copyPackageAndPathDependenciesIntoTempDirectory( + _fixturesCopy, + packageDirectory, + {}, + ); // Clean up the project. // Called when we need to rebuild sdk and the app from previous test @@ -251,26 +235,24 @@ class TestProject { ], workingDirectory: absolutePackageDirectory); } - /// Delete the project if we made a copy. + /// Delete the copy of the project. Future tearDown() async { - if (editable) { - try { - _fixturesCopy.deleteSync(recursive: true); - } on FileSystemException catch (_) { - // On Windows, the build daemon process might still be accessing the - // working directory, so wait a second and then try again. - await Future.delayed(const Duration(seconds: 1)); - _fixturesCopy.deleteSync(recursive: true); - } + try { + _fixturesCopy.deleteSync(recursive: true); + } on FileSystemException catch (_) { + // On Windows, the build daemon process might still be accessing the + // working directory, so wait a second and then try again. + await Future.delayed(const Duration(seconds: 1)); + _fixturesCopy.deleteSync(recursive: true); } } /// The path to the Dart specified file in the 'lib' directory, e.g, - /// "/workstation/webdev/fixtures/_testSound/lib/library.dart": - String dartLibFilePath(String dartLibFileName) { - final libFilePathInPkg = [packageDirectory, 'lib', dartLibFileName]; - return editable - ? p.joinAll([_fixturesCopy.absolute.path, ...libFilePathInPkg]) - : absolutePath(pathFromFixtures: p.joinAll(libFilePathInPkg)); - } + /// "/tmp/_testSound/lib/library.dart": + String dartLibFilePath(String dartLibFileName) => p.joinAll([ + _fixturesCopy.absolute.path, + packageDirectory, + 'lib', + dartLibFileName, + ]); } From 288d44df7dd08ba82516f1ebca4bd81708285c31 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Tue, 24 Jun 2025 12:21:04 -0700 Subject: [PATCH 35/50] Modify currentDirectoryUri when currentDirectory is updated and fix up some tests --- dwds/lib/src/utilities/dart_uri.dart | 13 ++++++++-- dwds/test/dart_uri_file_uri_test.dart | 7 +++--- dwds/test/fixtures/project.dart | 33 +++++++++++++------------- dwds/test/package_uri_mapper_test.dart | 18 +++++++++----- 4 files changed, 44 insertions(+), 27 deletions(-) diff --git a/dwds/lib/src/utilities/dart_uri.dart b/dwds/lib/src/utilities/dart_uri.dart index 43f60d807..2b8d0b8d6 100644 --- a/dwds/lib/src/utilities/dart_uri.dart +++ b/dwds/lib/src/utilities/dart_uri.dart @@ -161,15 +161,24 @@ class DartUri { /// Returns resolved path for a package, app, or dart uri. static String? toResolvedUri(String uri) => _uriToResolvedUri[uri]; + static String _currentDirectory = p.current; + /// The directory in which we're running. /// /// We store this here because for tests we may want to act as if we're /// running in the directory of a target package, even if the current /// directory of the tests is actually the main dwds directory. - static String currentDirectory = p.current; + static String get currentDirectory => _currentDirectory; + + static set currentDirectory(String newDir) { + _currentDirectory = newDir; + _currentDirectoryUri = '${p.toUri(newDir)}'; + } + + static String _currentDirectoryUri = '${p.toUri(currentDirectory)}'; /// The current directory as a file: Uri, saved here to avoid re-computing. - static final String currentDirectoryUri = '${p.toUri(currentDirectory)}'; + static String get currentDirectoryUri => _currentDirectoryUri; /// Record library and script uris to enable resolving library and script paths. static Future initialize() async { diff --git a/dwds/test/dart_uri_file_uri_test.dart b/dwds/test/dart_uri_file_uri_test.dart index c3998a393..7f223c8a4 100644 --- a/dwds/test/dart_uri_file_uri_test.dart +++ b/dwds/test/dart_uri_file_uri_test.dart @@ -65,8 +65,8 @@ void main() { test('file path to org-dartlang-app', () { final webMain = Uri.file( p.join( - // The directory for the _testPackage package (contained within - // dwds), which imports _test. + // The directory for the _testPackage package which imports + // _test. testPackageProject.absolutePackageDirectory, 'web', 'main.dart', @@ -91,7 +91,8 @@ void main() { test('file path to another package', () { final testLib = Uri.file( p.join( - // The directory for the general _test package. + // The directory for the general _test package. This is going to + // be relative to the project in the `TestContext`. testPackageProject.absolutePackageDirectory, '..', testProject.packageDirectory, diff --git a/dwds/test/fixtures/project.dart b/dwds/test/fixtures/project.dart index ce7506c50..6830c49ad 100644 --- a/dwds/test/fixtures/project.dart +++ b/dwds/test/fixtures/project.dart @@ -169,13 +169,14 @@ class TestProject { required this.htmlEntryFileName, }); - static void _copyPackageAndPathDependenciesIntoTempDirectory( + static Future _copyPackageAndPathDependenciesIntoTempDirectory( Directory tempDirectory, - String packageDirectory, + String absolutePackageDirectory, Set copiedPackageDirectories, - ) { + ) async { // There may be cycles in dependencies, so check that we already copied this // package. + final packageDirectory = p.basename(absolutePackageDirectory); if (copiedPackageDirectories.contains(packageDirectory)) return; final currentPath = absolutePath(pathFromFixtures: packageDirectory); final newPath = p.join(tempDirectory.absolute.path, packageDirectory); @@ -199,13 +200,22 @@ class TestProject { '${dependencyDirectory.path} is not an immediate directory in ' '`fixtures`.', ); - _copyPackageAndPathDependenciesIntoTempDirectory( + await _copyPackageAndPathDependenciesIntoTempDirectory( tempDirectory, - p.basename(dependencyDirectory.path), + dependencyDirectory.path, copiedPackageDirectories, ); } } + + // Clean up the project. + // Called when we need to rebuild sdk and the app from previous test + // configurations. + await Process.run('dart', [ + 'run', + 'build_runner', + 'clean', + ], workingDirectory: absolutePackageDirectory); } Future setUp() async { @@ -219,20 +229,11 @@ class TestProject { Directory.systemTemp.resolveSymbolicLinksSync(), ); _fixturesCopy = systemTempDir.createTempSync(); - _copyPackageAndPathDependenciesIntoTempDirectory( + await _copyPackageAndPathDependenciesIntoTempDirectory( _fixturesCopy, - packageDirectory, + absolutePackageDirectory, {}, ); - - // Clean up the project. - // Called when we need to rebuild sdk and the app from previous test - // configurations. - await Process.run('dart', [ - 'run', - 'build_runner', - 'clean', - ], workingDirectory: absolutePackageDirectory); } /// Delete the copy of the project. diff --git a/dwds/test/package_uri_mapper_test.dart b/dwds/test/package_uri_mapper_test.dart index 267e72e63..179e3a91a 100644 --- a/dwds/test/package_uri_mapper_test.dart +++ b/dwds/test/package_uri_mapper_test.dart @@ -35,19 +35,23 @@ void main() { final resolvedPath = '${project.packageDirectory}/lib/test_library.dart'; - final testPackageSoundPath = project.absolutePackageDirectory; - final packageConfigFile = Uri.file( - p.join(testPackageSoundPath, '.dart_tool', 'package_config.json'), - ); - late final PackageUriMapper packageUriMapper; setUpAll(() async { + await project.setUp(); // Note: Run `dart pub upgrade` before the test cases to fix // https://github.com/dart-lang/webdev/issues/1834: await Process.run('dart', [ 'pub', 'upgrade', - ], workingDirectory: testPackageSoundPath); + ], workingDirectory: project.absolutePackageDirectory); + + final packageConfigFile = Uri.file( + p.join( + project.absolutePackageDirectory, + '.dart_tool', + 'package_config.json', + ), + ); packageUriMapper = await PackageUriMapper.create( fileSystem, @@ -56,6 +60,8 @@ void main() { ); }); + tearDownAll(project.tearDown); + test('Can convert package urls to server paths', () { expect(packageUriMapper.packageUriToServerPath(packageUri), serverPath); }); From 7ffb36362a06df872474de90d9d585c0f5fd55d9 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Tue, 24 Jun 2025 15:04:47 -0700 Subject: [PATCH 36/50] Reuse absolutePackageDirectory --- dwds/test/fixtures/project.dart | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dwds/test/fixtures/project.dart b/dwds/test/fixtures/project.dart index 6830c49ad..103385bca 100644 --- a/dwds/test/fixtures/project.dart +++ b/dwds/test/fixtures/project.dart @@ -178,24 +178,24 @@ class TestProject { // package. final packageDirectory = p.basename(absolutePackageDirectory); if (copiedPackageDirectories.contains(packageDirectory)) return; - final currentPath = absolutePath(pathFromFixtures: packageDirectory); final newPath = p.join(tempDirectory.absolute.path, packageDirectory); Directory(newPath).createSync(); - copyPathSync(currentPath, newPath); + copyPathSync(absolutePackageDirectory, newPath); copiedPackageDirectories.add(packageDirectory); final pubspec = Pubspec.parse( - File(p.join(currentPath, 'pubspec.yaml')).readAsStringSync(), + File(p.join(absolutePackageDirectory, 'pubspec.yaml')).readAsStringSync(), ); for (final dependency in pubspec.dependencies.values) { if (dependency is PathDependency) { final dependencyDirectory = Directory( - p.normalize(p.join(currentPath, dependency.path)), + p.normalize(p.join(absolutePackageDirectory, dependency.path)), ); // It may be okay to do some more complicated copying here for path // dependencies that aren't immediately under `fixtures`, but for now, // only support those that are. assert( - dependencyDirectory.parent.path == Directory(currentPath).parent.path, + dependencyDirectory.parent.path == + Directory(absolutePackageDirectory).parent.path, 'Path dependency of $packageDirectory: ' '${dependencyDirectory.path} is not an immediate directory in ' '`fixtures`.', From c43fe2eb9fa882a156a1f67eee8f268524673024 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Tue, 24 Jun 2025 15:36:59 -0700 Subject: [PATCH 37/50] Revert "Reuse absolutePackageDirectory" This reverts commit 7ffb36362a06df872474de90d9d585c0f5fd55d9. --- dwds/test/fixtures/project.dart | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dwds/test/fixtures/project.dart b/dwds/test/fixtures/project.dart index 103385bca..6830c49ad 100644 --- a/dwds/test/fixtures/project.dart +++ b/dwds/test/fixtures/project.dart @@ -178,24 +178,24 @@ class TestProject { // package. final packageDirectory = p.basename(absolutePackageDirectory); if (copiedPackageDirectories.contains(packageDirectory)) return; + final currentPath = absolutePath(pathFromFixtures: packageDirectory); final newPath = p.join(tempDirectory.absolute.path, packageDirectory); Directory(newPath).createSync(); - copyPathSync(absolutePackageDirectory, newPath); + copyPathSync(currentPath, newPath); copiedPackageDirectories.add(packageDirectory); final pubspec = Pubspec.parse( - File(p.join(absolutePackageDirectory, 'pubspec.yaml')).readAsStringSync(), + File(p.join(currentPath, 'pubspec.yaml')).readAsStringSync(), ); for (final dependency in pubspec.dependencies.values) { if (dependency is PathDependency) { final dependencyDirectory = Directory( - p.normalize(p.join(absolutePackageDirectory, dependency.path)), + p.normalize(p.join(currentPath, dependency.path)), ); // It may be okay to do some more complicated copying here for path // dependencies that aren't immediately under `fixtures`, but for now, // only support those that are. assert( - dependencyDirectory.parent.path == - Directory(absolutePackageDirectory).parent.path, + dependencyDirectory.parent.path == Directory(currentPath).parent.path, 'Path dependency of $packageDirectory: ' '${dependencyDirectory.path} is not an immediate directory in ' '`fixtures`.', From 61cb8a407e66877056f599dde549cc162acd96e9 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Tue, 24 Jun 2025 17:22:31 -0700 Subject: [PATCH 38/50] Add debug log --- test_common/lib/utilities.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test_common/lib/utilities.dart b/test_common/lib/utilities.dart index 7ba1dca32..2626ec2d2 100644 --- a/test_common/lib/utilities.dart +++ b/test_common/lib/utilities.dart @@ -17,6 +17,9 @@ const newDdcTypeSystemVersion = '3.3.0-242.0.dev'; String get webdevPath { final pathParts = p.split(p.current); // We expect all tests to be run from the webdev mono-repo: + // TODO(srujzs): This is just to debug the failures on https://github.com/dart-lang/webdev/pull/2627. + // Delete when done debugging. + print(pathParts); assert(pathParts.contains(webdevDirName)); return p.joinAll( pathParts.sublist(0, pathParts.lastIndexOf(webdevDirName) + 1), From 11db903a390e9b9ec10709df55c7c8d89fe97727 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Tue, 24 Jun 2025 20:43:57 -0700 Subject: [PATCH 39/50] Don't assign currentdirectoryuri to test --- dwds/lib/src/utilities/dart_uri.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dwds/lib/src/utilities/dart_uri.dart b/dwds/lib/src/utilities/dart_uri.dart index 2b8d0b8d6..63622f1e1 100644 --- a/dwds/lib/src/utilities/dart_uri.dart +++ b/dwds/lib/src/utilities/dart_uri.dart @@ -170,9 +170,13 @@ class DartUri { /// directory of the tests is actually the main dwds directory. static String get currentDirectory => _currentDirectory; + // TODO(srujzs): This is temporary to debug test failures and avoid analysis + // issues. Remove. + static bool tmp = false; + static set currentDirectory(String newDir) { _currentDirectory = newDir; - _currentDirectoryUri = '${p.toUri(newDir)}'; + if (tmp) _currentDirectoryUri = '${p.toUri(newDir)}'; } static String _currentDirectoryUri = '${p.toUri(currentDirectory)}'; From 060bc55f5864d1203f9cc4f9a484d3870be9fea4 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Wed, 25 Jun 2025 11:22:29 -0700 Subject: [PATCH 40/50] More testing --- dwds/lib/src/utilities/dart_uri.dart | 21 +++++++++++++-------- dwds/test/fixtures/context.dart | 1 + test_common/lib/utilities.dart | 4 +--- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/dwds/lib/src/utilities/dart_uri.dart b/dwds/lib/src/utilities/dart_uri.dart index 63622f1e1..1271f625f 100644 --- a/dwds/lib/src/utilities/dart_uri.dart +++ b/dwds/lib/src/utilities/dart_uri.dart @@ -168,21 +168,26 @@ class DartUri { /// We store this here because for tests we may want to act as if we're /// running in the directory of a target package, even if the current /// directory of the tests is actually the main dwds directory. - static String get currentDirectory => _currentDirectory; - - // TODO(srujzs): This is temporary to debug test failures and avoid analysis - // issues. Remove. - static bool tmp = false; + static String get currentDirectory { + print('Getting current directory: $_currentDirectory'); + return _currentDirectory; + } static set currentDirectory(String newDir) { + print('Setting current directory: $newDir'); _currentDirectory = newDir; - if (tmp) _currentDirectoryUri = '${p.toUri(newDir)}'; + print('Setting current directory uri: ${p.toUri(newDir)}'); + _currentDirectoryUri = '${p.toUri(newDir)}'; } static String _currentDirectoryUri = '${p.toUri(currentDirectory)}'; - /// The current directory as a file: Uri, saved here to avoid re-computing. - static String get currentDirectoryUri => _currentDirectoryUri; + /// The current directory as a file: Uri, saved in a field to avoid + /// re-computing. + static String get currentDirectoryUri { + print('Getting current directory uri: $_currentDirectoryUri'); + return _currentDirectoryUri; + } /// Record library and script uris to enable resolving library and script paths. static Future initialize() async { diff --git a/dwds/test/fixtures/context.dart b/dwds/test/fixtures/context.dart index fb261a58f..22e6a51e3 100644 --- a/dwds/test/fixtures/context.dart +++ b/dwds/test/fixtures/context.dart @@ -541,6 +541,7 @@ class TestContext { await _webDriver?.quit(closeSession: true); _chromeDriver?.kill(); DartUri.currentDirectory = p.current; + print('Setting currentDirectory in tearDown: ${DartUri.currentDirectory}'); await _daemonClient?.close(); await ddcService?.stop(); await _webRunner?.stop(); diff --git a/test_common/lib/utilities.dart b/test_common/lib/utilities.dart index 2626ec2d2..edd8b161b 100644 --- a/test_common/lib/utilities.dart +++ b/test_common/lib/utilities.dart @@ -16,10 +16,8 @@ const newDdcTypeSystemVersion = '3.3.0-242.0.dev'; /// '/workstation/webdev'. String get webdevPath { final pathParts = p.split(p.current); + print('Path parts: $pathParts'); // We expect all tests to be run from the webdev mono-repo: - // TODO(srujzs): This is just to debug the failures on https://github.com/dart-lang/webdev/pull/2627. - // Delete when done debugging. - print(pathParts); assert(pathParts.contains(webdevDirName)); return p.joinAll( pathParts.sublist(0, pathParts.lastIndexOf(webdevDirName) + 1), From c8390cf543c9924b5f479926f2745cb404a2df93 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Wed, 25 Jun 2025 20:59:42 -0700 Subject: [PATCH 41/50] Clean up debug prints, move sync calls to async, and set currentDirectory to p.current before project setUp --- dwds/lib/src/utilities/dart_uri.dart | 12 ++---------- dwds/test/fixtures/context.dart | 2 +- dwds/test/fixtures/project.dart | 23 +++++++++++------------ test_common/lib/utilities.dart | 1 - 4 files changed, 14 insertions(+), 24 deletions(-) diff --git a/dwds/lib/src/utilities/dart_uri.dart b/dwds/lib/src/utilities/dart_uri.dart index 1271f625f..45235711f 100644 --- a/dwds/lib/src/utilities/dart_uri.dart +++ b/dwds/lib/src/utilities/dart_uri.dart @@ -168,15 +168,10 @@ class DartUri { /// We store this here because for tests we may want to act as if we're /// running in the directory of a target package, even if the current /// directory of the tests is actually the main dwds directory. - static String get currentDirectory { - print('Getting current directory: $_currentDirectory'); - return _currentDirectory; - } + static String get currentDirectory => _currentDirectory; static set currentDirectory(String newDir) { - print('Setting current directory: $newDir'); _currentDirectory = newDir; - print('Setting current directory uri: ${p.toUri(newDir)}'); _currentDirectoryUri = '${p.toUri(newDir)}'; } @@ -184,10 +179,7 @@ class DartUri { /// The current directory as a file: Uri, saved in a field to avoid /// re-computing. - static String get currentDirectoryUri { - print('Getting current directory uri: $_currentDirectoryUri'); - return _currentDirectoryUri; - } + static String get currentDirectoryUri => _currentDirectoryUri; /// Record library and script uris to enable resolving library and script paths. static Future initialize() async { diff --git a/dwds/test/fixtures/context.dart b/dwds/test/fixtures/context.dart index 22e6a51e3..def8744c0 100644 --- a/dwds/test/fixtures/context.dart +++ b/dwds/test/fixtures/context.dart @@ -137,6 +137,7 @@ class TestContext { TestDebugSettings debugSettings = const TestDebugSettings.noDevTools(), }) async { try { + DartUri.currentDirectory = p.current; // Build settings to return from load strategy. final buildSettings = TestBuildSettings( appEntrypoint: project.dartEntryFilePackageUri, @@ -541,7 +542,6 @@ class TestContext { await _webDriver?.quit(closeSession: true); _chromeDriver?.kill(); DartUri.currentDirectory = p.current; - print('Setting currentDirectory in tearDown: ${DartUri.currentDirectory}'); await _daemonClient?.close(); await ddcService?.stop(); await _webRunner?.stop(); diff --git a/dwds/test/fixtures/project.dart b/dwds/test/fixtures/project.dart index 6830c49ad..af0db9ef2 100644 --- a/dwds/test/fixtures/project.dart +++ b/dwds/test/fixtures/project.dart @@ -171,20 +171,19 @@ class TestProject { static Future _copyPackageAndPathDependenciesIntoTempDirectory( Directory tempDirectory, - String absolutePackageDirectory, + String packageDirectory, Set copiedPackageDirectories, ) async { // There may be cycles in dependencies, so check that we already copied this // package. - final packageDirectory = p.basename(absolutePackageDirectory); if (copiedPackageDirectories.contains(packageDirectory)) return; final currentPath = absolutePath(pathFromFixtures: packageDirectory); final newPath = p.join(tempDirectory.absolute.path, packageDirectory); - Directory(newPath).createSync(); - copyPathSync(currentPath, newPath); + await Directory(newPath).create(); + await copyPath(currentPath, newPath); copiedPackageDirectories.add(packageDirectory); final pubspec = Pubspec.parse( - File(p.join(currentPath, 'pubspec.yaml')).readAsStringSync(), + await File(p.join(currentPath, 'pubspec.yaml')).readAsString(), ); for (final dependency in pubspec.dependencies.values) { if (dependency is PathDependency) { @@ -202,7 +201,7 @@ class TestProject { ); await _copyPackageAndPathDependenciesIntoTempDirectory( tempDirectory, - dependencyDirectory.path, + p.basename(dependencyDirectory.path), copiedPackageDirectories, ); } @@ -215,7 +214,7 @@ class TestProject { 'run', 'build_runner', 'clean', - ], workingDirectory: absolutePackageDirectory); + ], workingDirectory: newPath); } Future setUp() async { @@ -226,12 +225,12 @@ class TestProject { final systemTempDir = Directory( // Resolve symbolic links as build_daemon tests rely on paths matching // between the client and the daemon. - Directory.systemTemp.resolveSymbolicLinksSync(), + await Directory.systemTemp.resolveSymbolicLinks(), ); - _fixturesCopy = systemTempDir.createTempSync(); + _fixturesCopy = await systemTempDir.createTemp(); await _copyPackageAndPathDependenciesIntoTempDirectory( _fixturesCopy, - absolutePackageDirectory, + packageDirectory, {}, ); } @@ -239,12 +238,12 @@ class TestProject { /// Delete the copy of the project. Future tearDown() async { try { - _fixturesCopy.deleteSync(recursive: true); + await _fixturesCopy.delete(recursive: true); } on FileSystemException catch (_) { // On Windows, the build daemon process might still be accessing the // working directory, so wait a second and then try again. await Future.delayed(const Duration(seconds: 1)); - _fixturesCopy.deleteSync(recursive: true); + await _fixturesCopy.delete(recursive: true); } } diff --git a/test_common/lib/utilities.dart b/test_common/lib/utilities.dart index edd8b161b..7ba1dca32 100644 --- a/test_common/lib/utilities.dart +++ b/test_common/lib/utilities.dart @@ -16,7 +16,6 @@ const newDdcTypeSystemVersion = '3.3.0-242.0.dev'; /// '/workstation/webdev'. String get webdevPath { final pathParts = p.split(p.current); - print('Path parts: $pathParts'); // We expect all tests to be run from the webdev mono-repo: assert(pathParts.contains(webdevDirName)); return p.joinAll( From 6849d64e3305b678c3e20a75594e63aefc0ce59f Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Thu, 26 Jun 2025 09:45:57 -0700 Subject: [PATCH 42/50] Wait for breakpoints to be removed and added using events and restore timeout factor --- dwds/test/hot_reload_breakpoints_test.dart | 15 +++++++++++++-- dwds/test/hot_restart_breakpoints_test.dart | 8 +++++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/dwds/test/hot_reload_breakpoints_test.dart b/dwds/test/hot_reload_breakpoints_test.dart index f4531386b..4710e7b1d 100644 --- a/dwds/test/hot_reload_breakpoints_test.dart +++ b/dwds/test/hot_reload_breakpoints_test.dart @@ -98,17 +98,28 @@ void main() { isolateId, scriptRef, ); - return await client.addBreakpointWithScriptUri( + final breakpointAdded = expectLater( + stream, + emitsThrough(_hasKind(EventKind.kBreakpointAdded)), + ); + final breakpoint = await client.addBreakpointWithScriptUri( isolateId, scriptRef.uri!, bpLine, ); + await breakpointAdded; + return breakpoint; } Future removeBreakpoint(Breakpoint bp) async { final vm = await client.getVM(); final isolateId = vm.isolates!.first.id!; + final breakpointRemoved = expectLater( + stream, + emitsThrough(_hasKind(EventKind.kBreakpointRemoved)), + ); await client.removeBreakpoint(isolateId, bp.id!); + await breakpointRemoved; } Future resume() async { @@ -387,7 +398,7 @@ void main() { // the old string still as the closure has not been reevaluated. await callEvaluateAndExpectLog(oldCapturedString); }); - }, timeout: Timeout.factor(3)); + }, timeout: Timeout.factor(2)); group('when pause_isolates_on_start is false', () { late VmService client; diff --git a/dwds/test/hot_restart_breakpoints_test.dart b/dwds/test/hot_restart_breakpoints_test.dart index b8be5746a..c54bb3696 100644 --- a/dwds/test/hot_restart_breakpoints_test.dart +++ b/dwds/test/hot_restart_breakpoints_test.dart @@ -110,11 +110,17 @@ void main() { isolateId, scriptRef, ); - return await client.addBreakpointWithScriptUri( + final breakpointAdded = expectLater( + stream, + emitsThrough(_hasKind(EventKind.kBreakpointAdded)), + ); + final breakpoint = await client.addBreakpointWithScriptUri( isolateId, scriptRef.uri!, bpLine, ); + await breakpointAdded; + return breakpoint; } Future resume() async { From 7bcf5145fd2d1ea9bb0c69b0ec4598fdd7abc6c3 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Thu, 26 Jun 2025 09:46:55 -0700 Subject: [PATCH 43/50] Move changelog entry --- dwds/CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dwds/CHANGELOG.md b/dwds/CHANGELOG.md index 2eeb816bf..bdc733b8e 100644 --- a/dwds/CHANGELOG.md +++ b/dwds/CHANGELOG.md @@ -1,11 +1,13 @@ ## 24.4.0-wip +- Added support for breakpoint registering on a hot reload with the DDC library bundle format using PausePostRequests. + ## 24.3.11 - Changed DWDS to always inject the client and added `useDwdsWebSocketConnection` flag to control communication protocol: when true uses socket-based implementation, when false uses Chrome-based communication protocol. - Added WebSocket-based hot reload support: `reloadSources` in `ChromeProxyService` and `DevHandler` now handle hot reload requests and responses over WebSockets. - Refactored the injected client to use a reusable function for handling hot reload requests and responses over WebSockets. -- Added support for breakpoint registering on a hot restart and on a hot reload with the DDC library bundle format using PausePostRequests. +- Added support for breakpoint registering on a hot restart with the DDC library bundle format using PausePostRequests. ## 24.3.10 From 231cd811b9382a0058b68374224bb73eeab1254c Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Fri, 27 Jun 2025 09:24:35 -0700 Subject: [PATCH 44/50] Address review comments --- dwds/lib/src/utilities/dart_uri.dart | 4 ++-- dwds/test/fixtures/project.dart | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dwds/lib/src/utilities/dart_uri.dart b/dwds/lib/src/utilities/dart_uri.dart index 45235711f..c1698a1c8 100644 --- a/dwds/lib/src/utilities/dart_uri.dart +++ b/dwds/lib/src/utilities/dart_uri.dart @@ -172,10 +172,10 @@ class DartUri { static set currentDirectory(String newDir) { _currentDirectory = newDir; - _currentDirectoryUri = '${p.toUri(newDir)}'; + _currentDirectoryUri = p.toUri(newDir).toString(); } - static String _currentDirectoryUri = '${p.toUri(currentDirectory)}'; + static String _currentDirectoryUri = p.toUri(currentDirectory).toString(); /// The current directory as a file: Uri, saved in a field to avoid /// re-computing. diff --git a/dwds/test/fixtures/project.dart b/dwds/test/fixtures/project.dart index af0db9ef2..46bd9193b 100644 --- a/dwds/test/fixtures/project.dart +++ b/dwds/test/fixtures/project.dart @@ -179,11 +179,11 @@ class TestProject { if (copiedPackageDirectories.contains(packageDirectory)) return; final currentPath = absolutePath(pathFromFixtures: packageDirectory); final newPath = p.join(tempDirectory.absolute.path, packageDirectory); - await Directory(newPath).create(); - await copyPath(currentPath, newPath); + Directory(newPath).createSync(); + copyPathSync(currentPath, newPath); copiedPackageDirectories.add(packageDirectory); final pubspec = Pubspec.parse( - await File(p.join(currentPath, 'pubspec.yaml')).readAsString(), + File(p.join(currentPath, 'pubspec.yaml')).readAsStringSync(), ); for (final dependency in pubspec.dependencies.values) { if (dependency is PathDependency) { @@ -225,9 +225,9 @@ class TestProject { final systemTempDir = Directory( // Resolve symbolic links as build_daemon tests rely on paths matching // between the client and the daemon. - await Directory.systemTemp.resolveSymbolicLinks(), + Directory.systemTemp.resolveSymbolicLinksSync(), ); - _fixturesCopy = await systemTempDir.createTemp(); + _fixturesCopy = systemTempDir.createTempSync(); await _copyPackageAndPathDependenciesIntoTempDirectory( _fixturesCopy, packageDirectory, @@ -238,12 +238,12 @@ class TestProject { /// Delete the copy of the project. Future tearDown() async { try { - await _fixturesCopy.delete(recursive: true); + _fixturesCopy.deleteSync(recursive: true); } on FileSystemException catch (_) { // On Windows, the build daemon process might still be accessing the // working directory, so wait a second and then try again. await Future.delayed(const Duration(seconds: 1)); - await _fixturesCopy.delete(recursive: true); + _fixturesCopy.deleteSync(recursive: true); } } From f141fa9031737ebee4cd8bcd232b2bf20ecc51a2 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Fri, 27 Jun 2025 10:19:23 -0700 Subject: [PATCH 45/50] Use Directory.current when finding webdev path --- test_common/lib/utilities.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test_common/lib/utilities.dart b/test_common/lib/utilities.dart index 7ba1dca32..7a8f3f8d7 100644 --- a/test_common/lib/utilities.dart +++ b/test_common/lib/utilities.dart @@ -15,8 +15,9 @@ const newDdcTypeSystemVersion = '3.3.0-242.0.dev'; /// The path to the webdev directory in the local machine, e.g. /// '/workstation/webdev'. String get webdevPath { - final pathParts = p.split(p.current); - // We expect all tests to be run from the webdev mono-repo: + // Use `Directory.current` instead of `p.current` as the latter is allowed to + // change with `DartUri.currentDirectory` modifications. + final pathParts = p.split(Directory.current.path); assert(pathParts.contains(webdevDirName)); return p.joinAll( pathParts.sublist(0, pathParts.lastIndexOf(webdevDirName) + 1), From 39326eb7fb636586768a8763536dea9e3f0980b0 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Fri, 27 Jun 2025 11:02:59 -0700 Subject: [PATCH 46/50] Remove unnecessary currentDirectory set --- dwds/test/fixtures/context.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/dwds/test/fixtures/context.dart b/dwds/test/fixtures/context.dart index def8744c0..fb261a58f 100644 --- a/dwds/test/fixtures/context.dart +++ b/dwds/test/fixtures/context.dart @@ -137,7 +137,6 @@ class TestContext { TestDebugSettings debugSettings = const TestDebugSettings.noDevTools(), }) async { try { - DartUri.currentDirectory = p.current; // Build settings to return from load strategy. final buildSettings = TestBuildSettings( appEntrypoint: project.dartEntryFilePackageUri, From 897433cc3b2fa860baa76b87ee18123e1f6bfcac Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Fri, 27 Jun 2025 13:01:49 -0700 Subject: [PATCH 47/50] Skip captured code breakpoint deletion test on Windows for now --- dwds/test/hot_reload_breakpoints_test.dart | 73 ++++++++++++---------- 1 file changed, 40 insertions(+), 33 deletions(-) diff --git a/dwds/test/hot_reload_breakpoints_test.dart b/dwds/test/hot_reload_breakpoints_test.dart index 4710e7b1d..bd9ec0bff 100644 --- a/dwds/test/hot_reload_breakpoints_test.dart +++ b/dwds/test/hot_reload_breakpoints_test.dart @@ -8,6 +8,7 @@ library; import 'dart:async'; +import 'dart:io'; import 'package:dwds/expression_compiler.dart'; import 'package:test/test.dart'; @@ -358,46 +359,52 @@ void main() { }, ); - test('breakpoint in captured code is deleted', () async { - var bp = await addBreakpoint( - file: mainFile, - breakpointMarker: capturedStringMarker, - ); + test( + 'breakpoint in captured code is deleted', + () async { + var bp = await addBreakpoint( + file: mainFile, + breakpointMarker: capturedStringMarker, + ); - final oldLog = "log('\$mainValue');"; - final newLog = "log('\${closure()}');"; - await makeEditAndRecompile(mainFile, oldLog, newLog); + final oldLog = "log('\$mainValue');"; + final newLog = "log('\${closure()}');"; + await makeEditAndRecompile(mainFile, oldLog, newLog); - bp = - (await hotReloadAndHandlePausePost([ - (file: mainFile, breakpointMarker: capturedStringMarker, bp: bp), - ])).first; + bp = + (await hotReloadAndHandlePausePost([ + (file: mainFile, breakpointMarker: capturedStringMarker, bp: bp), + ])).first; - final breakpointFuture = waitForBreakpoint(); + final breakpointFuture = waitForBreakpoint(); - await callEvaluate(); + await callEvaluate(); - // Should break at `capturedString`. - await breakpointFuture; - final oldCapturedString = 'captured closure gen0'; - // Closure gets evaluated for the first time. - await resumeAndExpectLog(oldCapturedString); - - final newCapturedString = 'captured closure gen1'; - await makeEditAndRecompile( - mainFile, - oldCapturedString, - newCapturedString, - ); + // Should break at `capturedString`. + await breakpointFuture; + final oldCapturedString = 'captured closure gen0'; + // Closure gets evaluated for the first time. + await resumeAndExpectLog(oldCapturedString); + + final newCapturedString = 'captured closure gen1'; + await makeEditAndRecompile( + mainFile, + oldCapturedString, + newCapturedString, + ); - await hotReloadAndHandlePausePost([ - (file: mainFile, breakpointMarker: capturedStringMarker, bp: bp), - ]); + await hotReloadAndHandlePausePost([ + (file: mainFile, breakpointMarker: capturedStringMarker, bp: bp), + ]); - // Breakpoint should not be hit as it's now deleted. We should also see - // the old string still as the closure has not been reevaluated. - await callEvaluateAndExpectLog(oldCapturedString); - }); + // Breakpoint should not be hit as it's now deleted. We should also see + // the old string still as the closure has not been reevaluated. + await callEvaluateAndExpectLog(oldCapturedString); + }, + // TODO(srujzs): Re-enable after + // https://github.com/dart-lang/webdev/issues/2640. + skip: Platform.isWindows, + ); }, timeout: Timeout.factor(2)); group('when pause_isolates_on_start is false', () { From 3b35f9d0d3b22b6463e71b004daad78c18cfd662 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Fri, 27 Jun 2025 14:07:58 -0700 Subject: [PATCH 48/50] Cache current directory at context creation --- dwds/test/fixtures/context.dart | 9 ++++++++- test_common/lib/utilities.dart | 4 +--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/dwds/test/fixtures/context.dart b/dwds/test/fixtures/context.dart index fb261a58f..7bf04ac69 100644 --- a/dwds/test/fixtures/context.dart +++ b/dwds/test/fixtures/context.dart @@ -129,7 +129,10 @@ class TestContext { /// External VM service. VmService get vmService => debugConnection.vmService; - TestContext(this.project, this.sdkConfigurationProvider); + final String _savedCurrentDirectory; + + TestContext(this.project, this.sdkConfigurationProvider) + : _savedCurrentDirectory = p.current; Future setUp({ TestSettings testSettings = const TestSettings(), @@ -137,6 +140,10 @@ class TestContext { TestDebugSettings debugSettings = const TestDebugSettings.noDevTools(), }) async { try { + // The frontend server modifies the current path. Make sure that we + // restore it every time the context is set up so that if a previous + // test failed to tear down, we don't affect future tests. + DartUri.currentDirectory = _savedCurrentDirectory; // Build settings to return from load strategy. final buildSettings = TestBuildSettings( appEntrypoint: project.dartEntryFilePackageUri, diff --git a/test_common/lib/utilities.dart b/test_common/lib/utilities.dart index 7a8f3f8d7..d4d3619be 100644 --- a/test_common/lib/utilities.dart +++ b/test_common/lib/utilities.dart @@ -15,9 +15,7 @@ const newDdcTypeSystemVersion = '3.3.0-242.0.dev'; /// The path to the webdev directory in the local machine, e.g. /// '/workstation/webdev'. String get webdevPath { - // Use `Directory.current` instead of `p.current` as the latter is allowed to - // change with `DartUri.currentDirectory` modifications. - final pathParts = p.split(Directory.current.path); + final pathParts = p.split(p.current); assert(pathParts.contains(webdevDirName)); return p.joinAll( pathParts.sublist(0, pathParts.lastIndexOf(webdevDirName) + 1), From b1a80a9ea60ee5c924cacc226d913f162d9521c4 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Fri, 27 Jun 2025 14:53:07 -0700 Subject: [PATCH 49/50] Remove saved current directory and instead make _chromeDriver not late The failed tear down was due to a late variable being accessed. This cascaded into the current directory not being restored. Instead, make this variable nullable only. --- dwds/test/fixtures/context.dart | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/dwds/test/fixtures/context.dart b/dwds/test/fixtures/context.dart index 7bf04ac69..3ced54036 100644 --- a/dwds/test/fixtures/context.dart +++ b/dwds/test/fixtures/context.dart @@ -89,7 +89,7 @@ class TestContext { WebDriver? _webDriver; Process get chromeDriver => _chromeDriver!; - late Process? _chromeDriver; + Process? _chromeDriver; WebkitDebugger get webkitDebugger => _webkitDebugger!; late WebkitDebugger? _webkitDebugger; @@ -129,10 +129,7 @@ class TestContext { /// External VM service. VmService get vmService => debugConnection.vmService; - final String _savedCurrentDirectory; - - TestContext(this.project, this.sdkConfigurationProvider) - : _savedCurrentDirectory = p.current; + TestContext(this.project, this.sdkConfigurationProvider); Future setUp({ TestSettings testSettings = const TestSettings(), @@ -140,10 +137,6 @@ class TestContext { TestDebugSettings debugSettings = const TestDebugSettings.noDevTools(), }) async { try { - // The frontend server modifies the current path. Make sure that we - // restore it every time the context is set up so that if a previous - // test failed to tear down, we don't affect future tests. - DartUri.currentDirectory = _savedCurrentDirectory; // Build settings to return from load strategy. final buildSettings = TestBuildSettings( appEntrypoint: project.dartEntryFilePackageUri, From fd93b7900ef8b015f0aaccf4102e96c56eb776a6 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Fri, 27 Jun 2025 15:48:27 -0700 Subject: [PATCH 50/50] Make more members non-late to avoid late initialization errors and move webRunner.stop up to restore working directory sooner --- dwds/test/fixtures/context.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dwds/test/fixtures/context.dart b/dwds/test/fixtures/context.dart index 3ced54036..a6a1ab373 100644 --- a/dwds/test/fixtures/context.dart +++ b/dwds/test/fixtures/context.dart @@ -98,7 +98,7 @@ class TestContext { late Handler? _assetHandler; Client get client => _client!; - late Client? _client; + Client? _client; ExpressionCompilerService? ddcService; @@ -106,7 +106,7 @@ class TestContext { late int? _port; Directory get outputDir => _outputDir!; - late Directory? _outputDir; + Directory? _outputDir; late WipConnection extensionConnection; late AppConnection appConnection; @@ -538,12 +538,12 @@ class TestContext { } Future tearDown() async { + await _webRunner?.stop(); await _webDriver?.quit(closeSession: true); _chromeDriver?.kill(); DartUri.currentDirectory = p.current; await _daemonClient?.close(); await ddcService?.stop(); - await _webRunner?.stop(); await _testServer?.stop(); _client?.close(); await _outputDir?.delete(recursive: true);