From 769a0568dce1931544a6fd8b4c011cfb8f723cee Mon Sep 17 00:00:00 2001 From: Ben Konyi Date: Fri, 29 Aug 2025 12:14:48 -0400 Subject: [PATCH 1/2] [ DWDS ] Serve DevTools from DDS by default (#2681) In order to reduce the number of ways DevTools is served across the ecosystem, we're working on serving DevTools from DDS by default in all tools that spawn DDS. This change exposes some new DDS related configuration options that allow for specifying whether or not DevTools should be served via DDS and whether or not an existing DevTools server should be used. The `devToolsLauncher` parameter has been marked as deprecated as it will be removed in a future major release, but will continue to act as the default way to launch DevTools if it is provided. Other DDS related properties that have been merged into the new `DartDevelopmentServiceConfiguration` class are also marked as deprecated. --- dwds/CHANGELOG.md | 8 + dwds/lib/dart_web_debug_service.dart | 24 +- dwds/lib/dwds.dart | 1 + dwds/lib/src/config/tool_configuration.dart | 31 ++- .../lib/src/connections/debug_connection.dart | 5 +- dwds/lib/src/handlers/dev_handler.dart | 74 +++--- dwds/lib/src/injected/client.js | 2 +- dwds/lib/src/servers/devtools.dart | 2 + dwds/lib/src/services/app_debug_services.dart | 9 + dwds/lib/src/services/debug_service.dart | 24 +- dwds/lib/src/version.dart | 2 +- dwds/pubspec.yaml | 2 +- dwds/test/common/hot_restart_common.dart | 6 +- .../hot_restart_correctness_common.dart | 2 +- dwds/test/dds_port_test.dart | 30 ++- dwds/test/debug_extension_test.dart | 10 +- dwds/test/debug_service_test.dart | 6 +- dwds/test/devtools_test.dart | 218 ++++++++++-------- dwds/test/events_test.dart | 2 +- dwds/test/fixtures/context.dart | 3 +- dwds/test/fixtures/utilities.dart | 57 +++-- dwds/test/handlers/injector_test.dart | 4 +- dwds/test/puppeteer/test_utils.dart | 4 +- 23 files changed, 326 insertions(+), 200 deletions(-) diff --git a/dwds/CHANGELOG.md b/dwds/CHANGELOG.md index 5e28fd57e..7208f3e20 100644 --- a/dwds/CHANGELOG.md +++ b/dwds/CHANGELOG.md @@ -1,3 +1,11 @@ +## 25.1.0 + +- Added `DartDevelopmentServiceConfiguration` to allow for configuring DDS behavior. +- Added support for serving DevTools via DDS. This will become the sole method of serving + DevTools from DWDS in a future major release. +- Deprecated `spawnDds`, `ddsPort`, and `devToolsLauncher` properties in `DebugSettings`. +- Added `ddsConfiguration` to `DebugSettings`. + ## 25.0.4 ### Bug Fixes: diff --git a/dwds/lib/dart_web_debug_service.dart b/dwds/lib/dart_web_debug_service.dart index 693bcd8ce..1a6780dd4 100644 --- a/dwds/lib/dart_web_debug_service.dart +++ b/dwds/lib/dart_web_debug_service.dart @@ -115,15 +115,20 @@ class Dwds { } } + // TODO(bkonyi): only allow for serving DevTools via DDS. + // ignore: deprecated_member_use_from_same_package final devToolsLauncher = debugSettings.devToolsLauncher; - if (devToolsLauncher != null) { + Uri? launchedDevToolsUri; + if (devToolsLauncher != null && + // If DDS is configured to serve DevTools, use its instance. + !debugSettings.ddsConfiguration.serveDevTools) { devTools = await devToolsLauncher(appMetadata.hostname); - final uri = Uri( + launchedDevToolsUri = Uri( scheme: 'http', host: devTools.hostname, port: devTools.port, ); - _logger.info('Serving DevTools at $uri\n'); + _logger.info('Serving DevTools at $launchedDevToolsUri\n'); } final injected = DwdsInjector(extensionUri: extensionUri); @@ -140,8 +145,17 @@ class Dwds { debugSettings.useSseForInjectedClient, debugSettings.expressionCompiler, injected, - debugSettings.spawnDds, - debugSettings.ddsPort, + DartDevelopmentServiceConfiguration( + // This technically isn't correct, but DartDevelopmentServiceConfiguration.enable + // is true by default, so this won't break unmigrated tools. + // ignore: deprecated_member_use_from_same_package + enable: debugSettings.spawnDds && debugSettings.ddsConfiguration.enable, + // ignore: deprecated_member_use_from_same_package + port: debugSettings.ddsPort ?? debugSettings.ddsConfiguration.port, + devToolsServerAddress: + launchedDevToolsUri ?? + debugSettings.ddsConfiguration.devToolsServerAddress, + ), debugSettings.launchDevToolsInNewWindow, useWebSocketConnection: useDwdsWebSocketConnection, ); diff --git a/dwds/lib/dwds.dart b/dwds/lib/dwds.dart index 2d008f38f..5610ceb0e 100644 --- a/dwds/lib/dwds.dart +++ b/dwds/lib/dwds.dart @@ -7,6 +7,7 @@ export 'src/config/tool_configuration.dart' show AppMetadata, UrlEncoder, + DartDevelopmentServiceConfiguration, DevToolsLauncher, DebugSettings, ToolConfiguration; diff --git a/dwds/lib/src/config/tool_configuration.dart b/dwds/lib/src/config/tool_configuration.dart index ed65e6576..f5552b84e 100644 --- a/dwds/lib/src/config/tool_configuration.dart +++ b/dwds/lib/src/config/tool_configuration.dart @@ -51,6 +51,20 @@ typedef UrlEncoder = Future Function(String url); typedef DevToolsLauncher = Future Function(String hostname); +class DartDevelopmentServiceConfiguration { + const DartDevelopmentServiceConfiguration({ + this.enable = true, + this.port, + this.serveDevTools = true, + this.devToolsServerAddress, + }); + + final bool enable; + final int? port; + final bool serveDevTools; + final Uri? devToolsServerAddress; +} + /// Debug settings for the connected app. /// /// These are set by the code runner and passed to DWDS on start up. @@ -60,14 +74,22 @@ class DebugSettings { final bool useSseForDebugProxy; final bool useSseForDebugBackend; final bool useSseForInjectedClient; + + @Deprecated('Use ddsConfiguration instead.') final bool spawnDds; + @Deprecated('Use ddsConfiguration instead.') final int? ddsPort; final bool enableDevToolsLaunch; final bool launchDevToolsInNewWindow; final bool emitDebugEvents; + @Deprecated( + 'Use ddsConfigurationInstead. DevTools will eventually only be ' + 'served via DDS.', + ) final DevToolsLauncher? devToolsLauncher; final ExpressionCompiler? expressionCompiler; final UrlEncoder? urlEncoder; + final DartDevelopmentServiceConfiguration ddsConfiguration; const DebugSettings({ this.enableDebugging = true, @@ -75,13 +97,18 @@ class DebugSettings { this.useSseForDebugProxy = true, this.useSseForDebugBackend = true, this.useSseForInjectedClient = true, - this.spawnDds = true, - this.ddsPort, + @Deprecated('Use ddsConfiguration instead.') this.spawnDds = true, + @Deprecated('Use ddsConfiguration instead.') this.ddsPort, this.enableDevToolsLaunch = true, this.launchDevToolsInNewWindow = true, this.emitDebugEvents = true, + @Deprecated( + 'Use ddsConfigurationInstead. DevTools will eventually only be ' + 'served via DDS.', + ) this.devToolsLauncher, this.expressionCompiler, this.urlEncoder, + this.ddsConfiguration = const DartDevelopmentServiceConfiguration(), }); } diff --git a/dwds/lib/src/connections/debug_connection.dart b/dwds/lib/src/connections/debug_connection.dart index 06efd932c..6a84cef89 100644 --- a/dwds/lib/src/connections/debug_connection.dart +++ b/dwds/lib/src/connections/debug_connection.dart @@ -35,9 +35,12 @@ class DebugConnection { /// The endpoint of the Dart VM Service. String get uri => _appDebugServices.debugService.uri; - // The endpoint of the Dart Development Service (DDS). + /// The endpoint of the Dart Development Service (DDS). String? get ddsUri => _appDebugServices.ddsUri?.toString(); + /// The endpoint of the Dart DevTools instance. + String? get devToolsUri => _appDebugServices.devToolsUri?.toString(); + /// A client of the Dart VM Service with DWDS specific extensions. VmService get vmService => _appDebugServices.dwdsVmClient.client; diff --git a/dwds/lib/src/handlers/dev_handler.dart b/dwds/lib/src/handlers/dev_handler.dart index 25b81982a..ec669f47a 100644 --- a/dwds/lib/src/handlers/dev_handler.dart +++ b/dwds/lib/src/handlers/dev_handler.dart @@ -6,6 +6,8 @@ import 'dart:async'; import 'dart:convert'; import 'dart:io'; +import 'package:collection/collection.dart'; +import 'package:dds/dds_launcher.dart'; import 'package:dwds/data/build_result.dart'; import 'package:dwds/data/connect_request.dart'; import 'package:dwds/data/debug_event.dart'; @@ -70,8 +72,7 @@ class DevHandler { final UrlEncoder? _urlEncoder; final bool _useSseForDebugProxy; final bool _useSseForInjectedClient; - final bool _spawnDds; - final int? _ddsPort; + final DartDevelopmentServiceConfiguration _ddsConfig; final bool _launchDevToolsInNewWindow; final ExpressionCompiler? _expressionCompiler; final DwdsInjector _injected; @@ -97,8 +98,8 @@ class DevHandler { this._useSseForInjectedClient, this._expressionCompiler, this._injected, - this._spawnDds, - this._ddsPort, + + this._ddsConfig, this._launchDevToolsInNewWindow, { this.useWebSocketConnection = false, }) { @@ -251,8 +252,7 @@ class DevHandler { // This will provide a websocket based service. useSse: false, expressionCompiler: _expressionCompiler, - spawnDds: _spawnDds, - ddsPort: _ddsPort, + ddsConfig: _ddsConfig, ); } @@ -451,7 +451,7 @@ class DevHandler { AppConnection appConnection, SocketConnection sseConnection, ) async { - if (_devTools == null) { + if (_devTools == null && !_ddsConfig.serveDevTools) { sseConnection.sink.add( jsonEncode( serializers.serialize( @@ -548,6 +548,7 @@ class DevHandler { await _launchDevTools( chromeProxy.remoteDebugger, _constructDevToolsUri( + appServices, appServices.debugService.uri, ideQueryParam: 'Dwds', ), @@ -853,21 +854,21 @@ class DevHandler { ChromeDebugService debugService, ) async { final dwdsStats = DwdsStats(); - Uri? ddsUri; - if (_spawnDds) { - final dds = await debugService.startDartDevelopmentService(); - ddsUri = dds.wsUri; + DartDevelopmentServiceLauncher? dds; + if (_ddsConfig.enable) { + dds = await debugService.startDartDevelopmentService(); } final vmClient = await ChromeDwdsVmClient.create( debugService, dwdsStats, - ddsUri, + dds?.wsUri, ); final appDebugService = ChromeAppDebugServices( debugService, vmClient, dwdsStats, - ddsUri, + dds?.wsUri, + dds?.devToolsUri, ); final encodedUri = await debugService.encodedUri; _logger.info('Debug service listening on $encodedUri\n'); @@ -985,8 +986,7 @@ class DevHandler { }, useSse: _useSseForDebugProxy, expressionCompiler: _expressionCompiler, - spawnDds: _spawnDds, - ddsPort: _ddsPort, + ddsConfig: _ddsConfig, ); appServices = await _createAppDebugServices(debugService); extensionDebugger.sendEvent('dwds.debugUri', debugService.uri); @@ -1026,27 +1026,17 @@ class DevHandler { emitEvent(DwdsEvent.devtoolsLaunch()); // Send the DevTools URI to the Dart Debug Extension so that it can open it: final devToolsUri = _constructDevToolsUri( + appServices, encodedUri, ideQueryParam: 'ChromeDevTools', ); return extensionDebugger.sendEvent('dwds.devtoolsUri', devToolsUri); } - DevTools _ensureDevTools() { - final devTools = _devTools; - if (devTools == null) { - throw StateError('DevHandler: DevTools is not available'); - } - return devTools; - } - Future _launchDevTools( RemoteDebugger remoteDebugger, String devToolsUri, ) async { - // TODO(annagrin): move checking whether devtools should be started - // and the creation of the uri logic here so it is easier to follow. - _ensureDevTools(); // TODO(grouma) - We may want to log the debugServiceUri if we don't launch // DevTools so that users can manually connect. emitEvent(DwdsEvent.devtoolsLaunch()); @@ -1057,20 +1047,28 @@ class DevHandler { } String _constructDevToolsUri( - String debugServiceUri, { + AppDebugServices appDebugServices, + String serviceUri, { String ideQueryParam = '', }) { - final devTools = _ensureDevTools(); - return Uri( - scheme: 'http', - host: devTools.hostname, - port: devTools.port, - path: 'debugger', - queryParameters: { - 'uri': debugServiceUri, - if (ideQueryParam.isNotEmpty) 'ide': ideQueryParam, - }, - ).toString(); + final devToolsUri = _devTools?.uri ?? appDebugServices.devToolsUri; + if (devToolsUri == null) { + throw StateError('DevHandler: DevTools is not available'); + } + return devToolsUri + .replace( + pathSegments: [ + // Strips any trailing slashes from the original path + ...devToolsUri.pathSegments.whereNot((e) => e.isEmpty), + 'debugger', + ], + queryParameters: { + ...devToolsUri.queryParameters, + 'uri': serviceUri, + if (ideQueryParam.isNotEmpty) 'ide': ideQueryParam, + }, + ) + .toString(); } static void _maybeEmitDwdsAttachEvent(DevToolsRequest request) { diff --git a/dwds/lib/src/injected/client.js b/dwds/lib/src/injected/client.js index cb3b4b4ba..4680e9b74 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. +// Generated by dart2js (, csp, intern-composite-values), the Dart to JavaScript compiler version: 3.10.0-142.0.dev. // The code supports the following hooks: // dartPrint(message): // if this function is defined it is called instead of the Dart [print] diff --git a/dwds/lib/src/servers/devtools.dart b/dwds/lib/src/servers/devtools.dart index 579957dff..c52a07908 100644 --- a/dwds/lib/src/servers/devtools.dart +++ b/dwds/lib/src/servers/devtools.dart @@ -10,6 +10,8 @@ class DevTools { final int port; final HttpServer _server; + Uri get uri => Uri(scheme: 'http', host: hostname, port: port); + /// Null until [close] is called. /// /// All subsequent calls to [close] will return this future. diff --git a/dwds/lib/src/services/app_debug_services.dart b/dwds/lib/src/services/app_debug_services.dart index 4d262281b..474386f8e 100644 --- a/dwds/lib/src/services/app_debug_services.dart +++ b/dwds/lib/src/services/app_debug_services.dart @@ -13,6 +13,7 @@ abstract class AppDebugServices { DwdsVmClient get dwdsVmClient; DwdsStats? get dwdsStats; Uri? get ddsUri; + Uri? get devToolsUri; String? get connectedInstanceId; set connectedInstanceId(String? id); Future close(); @@ -25,6 +26,7 @@ class ChromeAppDebugServices implements AppDebugServices { final ChromeDwdsVmClient _dwdsVmClient; final DwdsStats _dwdsStats; final Uri? _ddsUri; + final Uri? _devToolsUri; Future? _closed; String? _connectedInstanceId; @@ -33,6 +35,7 @@ class ChromeAppDebugServices implements AppDebugServices { this._dwdsVmClient, this._dwdsStats, this._ddsUri, + this._devToolsUri, ); @override @@ -47,6 +50,9 @@ class ChromeAppDebugServices implements AppDebugServices { @override Uri? get ddsUri => _ddsUri; + @override + Uri? get devToolsUri => _devToolsUri; + @override String? get connectedInstanceId => _connectedInstanceId; @@ -81,7 +87,10 @@ class WebSocketAppDebugServices implements AppDebugServices { @override DwdsStats? get dwdsStats => null; @override + // TODO(bkonyi): DDS should still start in WebSocket mode. Uri? get ddsUri => null; + @override + Uri? get devToolsUri => null; @override ProxyService get proxyService => _debugService.webSocketProxyService; diff --git a/dwds/lib/src/services/debug_service.dart b/dwds/lib/src/services/debug_service.dart index 57cb01e43..ebd84257c 100644 --- a/dwds/lib/src/services/debug_service.dart +++ b/dwds/lib/src/services/debug_service.dart @@ -168,8 +168,7 @@ class ChromeDebugService implements DebugService { final String authToken; final HttpServer _server; final bool _useSse; - final bool _spawnDds; - final int? _ddsPort; + final DartDevelopmentServiceConfiguration _ddsConfig; final UrlEncoder? _urlEncoder; DartDevelopmentServiceLauncher? _dds; @@ -186,8 +185,7 @@ class ChromeDebugService implements DebugService { this.serviceExtensionRegistry, this._server, this._useSse, - this._spawnDds, - this._ddsPort, + this._ddsConfig, this._urlEncoder, ); @@ -208,7 +206,13 @@ class ChromeDebugService implements DebugService { port: port, path: authToken, ), - serviceUri: Uri(scheme: 'http', host: hostname, port: _ddsPort ?? 0), + serviceUri: Uri( + scheme: 'http', + host: hostname, + port: _ddsConfig.port ?? 0, + ), + devToolsServerAddress: _ddsConfig.devToolsServerAddress, + serveDevTools: _ddsConfig.serveDevTools, ); return _dds!; } @@ -216,7 +220,7 @@ class ChromeDebugService implements DebugService { @override String get uri { final dds = _dds; - if (_spawnDds && dds != null) { + if (_ddsConfig.enable && dds != null) { return (_useSse ? dds.sseUri : dds.wsUri).toString(); } return (_useSse @@ -263,8 +267,7 @@ class ChromeDebugService implements DebugService { UrlEncoder? urlEncoder, { void Function(Map)? onRequest, void Function(Map)? onResponse, - bool spawnDds = true, - int? ddsPort, + required DartDevelopmentServiceConfiguration ddsConfig, bool useSse = false, ExpressionCompiler? expressionCompiler, }) async { @@ -281,7 +284,7 @@ class ChromeDebugService implements DebugService { final serviceExtensionRegistry = ServiceExtensionRegistry(); Handler handler; // DDS will always connect to DWDS via web sockets. - if (useSse && !spawnDds) { + if (useSse && !ddsConfig.enable) { final sseHandler = SseHandler( Uri.parse('/$authToken/$_kSseHandlerPath'), keepAlive: const Duration(seconds: 5), @@ -332,8 +335,7 @@ class ChromeDebugService implements DebugService { serviceExtensionRegistry, server, useSse, - spawnDds, - ddsPort, + ddsConfig, urlEncoder, ); } diff --git a/dwds/lib/src/version.dart b/dwds/lib/src/version.dart index e04de9427..5309029da 100644 --- a/dwds/lib/src/version.dart +++ b/dwds/lib/src/version.dart @@ -1,2 +1,2 @@ // Generated code. Do not modify. -const packageVersion = '25.0.4'; +const packageVersion = '25.1.0'; diff --git a/dwds/pubspec.yaml b/dwds/pubspec.yaml index 5fdc6e599..7c2f9bc0b 100644 --- a/dwds/pubspec.yaml +++ b/dwds/pubspec.yaml @@ -1,6 +1,6 @@ name: dwds # Every time this changes you need to run `dart run build_runner build`. -version: 25.0.4 +version: 25.1.0 description: >- A service that proxies between the Chrome debug protocol and the Dart VM diff --git a/dwds/test/common/hot_restart_common.dart b/dwds/test/common/hot_restart_common.dart index de546ba08..980e4e30f 100644 --- a/dwds/test/common/hot_restart_common.dart +++ b/dwds/test/common/hot_restart_common.dart @@ -119,7 +119,7 @@ void runTests({ moduleFormat: provider.ddcModuleFormat, canaryFeatures: provider.canaryFeatures, ), - debugSettings: TestDebugSettings.noDevTools().copyWith( + debugSettings: TestDebugSettings.noDevToolsLaunch().copyWith( enableDebugging: false, ), ); @@ -147,7 +147,7 @@ void runTests({ moduleFormat: provider.ddcModuleFormat, canaryFeatures: provider.canaryFeatures, ), - debugSettings: TestDebugSettings.noDevTools().copyWith( + debugSettings: TestDebugSettings.noDevToolsLaunch().copyWith( enableDebugging: false, useSse: false, ), @@ -540,7 +540,7 @@ void runTests({ moduleFormat: provider.ddcModuleFormat, canaryFeatures: provider.canaryFeatures, ), - debugSettings: TestDebugSettings.noDevTools().copyWith( + debugSettings: TestDebugSettings.noDevToolsLaunch().copyWith( enableDebugging: false, ), ); diff --git a/dwds/test/common/hot_restart_correctness_common.dart b/dwds/test/common/hot_restart_correctness_common.dart index 36ac8e942..2b1bacc2e 100644 --- a/dwds/test/common/hot_restart_correctness_common.dart +++ b/dwds/test/common/hot_restart_correctness_common.dart @@ -180,7 +180,7 @@ void runTests({ moduleFormat: provider.ddcModuleFormat, canaryFeatures: provider.canaryFeatures, ), - debugSettings: TestDebugSettings.noDevTools().copyWith( + debugSettings: TestDebugSettings.noDevToolsLaunch().copyWith( enableDebugging: false, ), ); diff --git a/dwds/test/dds_port_test.dart b/dwds/test/dds_port_test.dart index 9d977064c..5d03b85e9 100644 --- a/dwds/test/dds_port_test.dart +++ b/dwds/test/dds_port_test.dart @@ -8,6 +8,7 @@ library; import 'dart:io'; +import 'package:dwds/dwds.dart'; import 'package:test/test.dart'; import 'package:test_common/test_sdk_configuration.dart'; @@ -16,29 +17,46 @@ import 'fixtures/project.dart'; import 'fixtures/utilities.dart'; void main() { - late final TestSdkConfigurationProvider provider; + late TestSdkConfigurationProvider provider; + late TestContext context; setUp(() { provider = TestSdkConfigurationProvider(); + context = TestContext(TestProject.test, provider); }); - tearDown(() { + tearDown(() async { + await context.tearDown(); provider.dispose(); }); - test('DWDS starts DDS with a specified port', () async { - final context = TestContext(TestProject.test, provider); - + test('DWDS starts DDS with a specified port (deprecated)', () async { // Find a unused port for the test. final server = await HttpServer.bind(InternetAddress.loopbackIPv4, 0); final expectedPort = server.port; await server.close(); await context.setUp( - debugSettings: TestDebugSettings.noDevTools().copyWith( + debugSettings: TestDebugSettings.noDevToolsLaunch().copyWith( ddsPort: expectedPort, ), ); expect(Uri.parse(context.debugConnection.ddsUri!).port, expectedPort); }); + + test('DWDS starts DDS with a specified port', () async { + // Find a unused port for the test. + final server = await HttpServer.bind(InternetAddress.loopbackIPv4, 0); + final expectedPort = server.port; + await server.close(); + + await context.setUp( + debugSettings: TestDebugSettings.noDevToolsLaunch().copyWith( + ddsConfiguration: DartDevelopmentServiceConfiguration( + port: expectedPort, + ), + ), + ); + expect(Uri.parse(context.debugConnection.ddsUri!).port, expectedPort); + }); } diff --git a/dwds/test/debug_extension_test.dart b/dwds/test/debug_extension_test.dart index 21129adcf..92707c0f4 100644 --- a/dwds/test/debug_extension_test.dart +++ b/dwds/test/debug_extension_test.dart @@ -62,7 +62,7 @@ void main() async { group('Without encoding', () { setUp(() async { await context.setUp( - debugSettings: TestDebugSettings.withDevTools( + debugSettings: TestDebugSettings.withDevToolsLaunch( context, ).copyWith(enableDebugExtension: true, useSse: useSse), ); @@ -125,7 +125,7 @@ void main() async { group('With a sharded Dart app', () { setUp(() async { await context.setUp( - debugSettings: TestDebugSettings.withDevTools( + debugSettings: TestDebugSettings.withDevToolsLaunch( context, ).copyWith(enableDebugExtension: true, useSse: useSse), ); @@ -161,7 +161,7 @@ void main() async { group('With an internal Dart app', () { setUp(() async { await context.setUp( - debugSettings: TestDebugSettings.withDevTools( + debugSettings: TestDebugSettings.withDevToolsLaunch( context, ).copyWith(enableDebugExtension: true, useSse: false), ); @@ -231,7 +231,7 @@ void main() async { group('With encoding', () { setUp(() async { await context.setUp( - debugSettings: TestDebugSettings.noDevTools().copyWith( + debugSettings: TestDebugSettings.noDevToolsLaunch().copyWith( enableDebugExtension: true, urlEncoder: (url) async => @@ -263,7 +263,7 @@ void main() async { setUp(() async { await context.setUp( appMetadata: TestAppMetadata.externalApp().copyWith(hostname: 'any'), - debugSettings: TestDebugSettings.noDevTools().copyWith( + debugSettings: TestDebugSettings.noDevToolsLaunch().copyWith( enableDebugExtension: true, ), ); diff --git a/dwds/test/debug_service_test.dart b/dwds/test/debug_service_test.dart index ae9c8db8d..67089ca82 100644 --- a/dwds/test/debug_service_test.dart +++ b/dwds/test/debug_service_test.dart @@ -8,6 +8,7 @@ library; import 'dart:io'; +import 'package:dwds/dwds.dart'; import 'package:test/test.dart'; import 'package:test_common/test_sdk_configuration.dart'; import 'package:vm_service/vm_service.dart'; @@ -26,7 +27,10 @@ void main() { setUpAll(() async { // Disable DDS as we're testing DWDS behavior. await context.setUp( - debugSettings: TestDebugSettings.noDevTools().copyWith(spawnDds: false), + debugSettings: TestDebugSettings.noDevToolsLaunch().copyWith( + spawnDds: false, + ddsConfiguration: DartDevelopmentServiceConfiguration(enable: false), + ), ); }); diff --git a/dwds/test/devtools_test.dart b/dwds/test/devtools_test.dart index 94eeb70fd..eafc76885 100644 --- a/dwds/test/devtools_test.dart +++ b/dwds/test/devtools_test.dart @@ -34,116 +34,134 @@ void main() { final context = TestContext(TestProject.test, provider); - group('Injected client', () { - setUp(() async { - await context.setUp( - debugSettings: TestDebugSettings.withDevTools(context), - ); - await context.webDriver.driver.keyboard.sendChord([Keyboard.alt, 'd']); - // Wait for DevTools to actually open. - await Future.delayed(const Duration(seconds: 2)); - }); - - tearDown(() async { - await context.tearDown(); - }); - - test('can launch devtools', () async { - final windows = await context.webDriver.windows.toList(); - await context.webDriver.driver.switchTo.window(windows.last); - expect(await context.webDriver.pageSource, contains('DevTools')); - expect(await context.webDriver.currentUrl, contains('ide=Dwds')); - // TODO(https://github.com/dart-lang/webdev/issues/1888): Re-enable. - }, skip: Platform.isWindows); - - test( - 'can not launch devtools for the same app in multiple tabs', - () async { - final appUrl = await context.webDriver.currentUrl; - // Open a new tab, select it, and navigate to the app - await context.webDriver.driver.execute( - "window.open('$appUrl', '_blank');", - [], - ); - await Future.delayed(const Duration(seconds: 2)); - final newAppWindow = await context.webDriver.windows.last; - await newAppWindow.setAsActive(); - - // Wait for the page to be ready before trying to open DevTools again. - await _waitForPageReady(context); - - // Try to open devtools and check for the alert. - await context.webDriver.driver.keyboard.sendChord([Keyboard.alt, 'd']); - await Future.delayed(const Duration(seconds: 2)); - final alert = context.webDriver.driver.switchTo.alert; - expect(alert, isNotNull); - expect( - await alert.text, - contains('This app is already being debugged in a different tab'), - ); - await alert.accept(); + for (final serveFromDds in [true, false]) { + group( + 'Injected client with DevTools served from ${serveFromDds ? 'DDS' : 'DevTools Launcher'}', + () { + setUp(() async { + await context.setUp( + debugSettings: TestDebugSettings.withDevToolsLaunch( + context, + serveFromDds: serveFromDds, + ), + ); + await context.webDriver.driver.keyboard.sendChord([ + Keyboard.alt, + 'd', + ]); + // Wait for DevTools to actually open. + await Future.delayed(const Duration(seconds: 2)); + }); - var windows = await context.webDriver.windows.toList(); - for (final window in windows) { - if (window.id != newAppWindow.id) { - await window.setAsActive(); - await window.close(); - } - } + tearDown(() async { + await context.tearDown(); + }); - await newAppWindow.setAsActive(); - await context.webDriver.driver.keyboard.sendChord([Keyboard.alt, 'd']); - await Future.delayed(const Duration(seconds: 2)); - windows = await context.webDriver.windows.toList(); - final devToolsWindow = windows.firstWhere( - (window) => window != newAppWindow, + test('can launch devtools', () async { + final windows = await context.webDriver.windows.toList(); + await context.webDriver.driver.switchTo.window(windows.last); + expect(await context.webDriver.pageSource, contains('DevTools')); + expect(await context.webDriver.currentUrl, contains('ide=Dwds')); + // TODO(https://github.com/dart-lang/webdev/issues/1888): Re-enable. + }, skip: Platform.isWindows); + + test( + 'can not launch devtools for the same app in multiple tabs', + () async { + final appUrl = await context.webDriver.currentUrl; + // Open a new tab, select it, and navigate to the app + await context.webDriver.driver.execute( + "window.open('$appUrl', '_blank');", + [], + ); + await Future.delayed(const Duration(seconds: 2)); + final newAppWindow = await context.webDriver.windows.last; + await newAppWindow.setAsActive(); + + // Wait for the page to be ready before trying to open DevTools again. + await _waitForPageReady(context); + + // Try to open devtools and check for the alert. + await context.webDriver.driver.keyboard.sendChord([ + Keyboard.alt, + 'd', + ]); + await Future.delayed(const Duration(seconds: 2)); + final alert = context.webDriver.driver.switchTo.alert; + expect(alert, isNotNull); + expect( + await alert.text, + contains('This app is already being debugged in a different tab'), + ); + await alert.accept(); + + var windows = await context.webDriver.windows.toList(); + for (final window in windows) { + if (window.id != newAppWindow.id) { + await window.setAsActive(); + await window.close(); + } + } + + await newAppWindow.setAsActive(); + await context.webDriver.driver.keyboard.sendChord([ + Keyboard.alt, + 'd', + ]); + await Future.delayed(const Duration(seconds: 2)); + windows = await context.webDriver.windows.toList(); + final devToolsWindow = windows.firstWhere( + (window) => window != newAppWindow, + ); + await devToolsWindow.setAsActive(); + expect(await context.webDriver.pageSource, contains('DevTools')); + }, + skip: 'See https://github.com/dart-lang/webdev/issues/2462', ); - await devToolsWindow.setAsActive(); - expect(await context.webDriver.pageSource, contains('DevTools')); - }, - skip: 'See https://github.com/dart-lang/webdev/issues/2462', - ); - test( - 'destroys and recreates the isolate during a page refresh', - () async { - // This test is the same as one in reload_test, but runs here when there - // is a connected client (DevTools) since it can behave differently. - // https://github.com/dart-lang/webdev/pull/901#issuecomment-586438132 - final client = context.debugConnection.vmService; - await client.streamListen('Isolate'); - await context.makeEdits([ - ( - file: context.project.dartEntryFileName, - originalString: 'Hello World!', - newString: 'Bonjour le monde!', - ), - ]); - await context.waitForSuccessfulBuild(propagateToBrowser: true); - - final eventsDone = expectLater( - client.onIsolateEvent, - emitsThrough( - emitsInOrder([ - _hasKind(EventKind.kIsolateExit), - _hasKind(EventKind.kIsolateStart), - _hasKind(EventKind.kIsolateRunnable), - ]), - ), + test( + 'destroys and recreates the isolate during a page refresh', + () async { + // This test is the same as one in reload_test, but runs here when there + // is a connected client (DevTools) since it can behave differently. + // https://github.com/dart-lang/webdev/pull/901#issuecomment-586438132 + final client = context.debugConnection.vmService; + await client.streamListen('Isolate'); + await context.makeEdits([ + ( + file: context.project.dartEntryFileName, + originalString: 'Hello World!', + newString: 'Bonjour le monde!', + ), + ]); + await context.waitForSuccessfulBuild(propagateToBrowser: true); + + final eventsDone = expectLater( + client.onIsolateEvent, + emitsThrough( + emitsInOrder([ + _hasKind(EventKind.kIsolateExit), + _hasKind(EventKind.kIsolateStart), + _hasKind(EventKind.kIsolateRunnable), + ]), + ), + ); + + await context.webDriver.driver.refresh(); + + await eventsDone; + }, + skip: 'https://github.com/dart-lang/webdev/issues/1888', ); - - await context.webDriver.driver.refresh(); - - await eventsDone; }, - skip: 'https://github.com/dart-lang/webdev/issues/1888', + timeout: Timeout.factor(2), ); - }, timeout: Timeout.factor(2)); + } group('Injected client without a DevTools server', () { setUp(() async { await context.setUp( - debugSettings: TestDebugSettings.noDevTools().copyWith( + debugSettings: TestDebugSettings.noDevToolsLaunch().copyWith( enableDevToolsLaunch: true, ), ); @@ -169,7 +187,7 @@ void main() { () { setUp(() async { await context.setUp( - debugSettings: TestDebugSettings.noDevTools().copyWith( + debugSettings: TestDebugSettings.noDevToolsLaunch().copyWith( enableDebugExtension: true, ), ); diff --git a/dwds/test/events_test.dart b/dwds/test/events_test.dart index 5e90b22bd..cb8e5434f 100644 --- a/dwds/test/events_test.dart +++ b/dwds/test/events_test.dart @@ -141,7 +141,7 @@ void main() { ); await context.setUp( testSettings: TestSettings(enableExpressionEvaluation: true), - debugSettings: TestDebugSettings.withDevTools(context), + debugSettings: TestDebugSettings.withDevToolsLaunch(context), ); keyboard = context.webDriver.driver.keyboard; events = context.testServer.dwds.events; diff --git a/dwds/test/fixtures/context.dart b/dwds/test/fixtures/context.dart index e515f277a..095f66cef 100644 --- a/dwds/test/fixtures/context.dart +++ b/dwds/test/fixtures/context.dart @@ -134,7 +134,8 @@ class TestContext { Future setUp({ TestSettings testSettings = const TestSettings(), TestAppMetadata appMetadata = const TestAppMetadata.externalApp(), - TestDebugSettings debugSettings = const TestDebugSettings.noDevTools(), + TestDebugSettings debugSettings = + const TestDebugSettings.noDevToolsLaunch(), }) async { try { // Build settings to return from load strategy. diff --git a/dwds/test/fixtures/utilities.dart b/dwds/test/fixtures/utilities.dart index 6d779c1bc..a03156ff7 100644 --- a/dwds/test/fixtures/utilities.dart +++ b/dwds/test/fixtures/utilities.dart @@ -101,23 +101,36 @@ Future retryFnAsync( } class TestDebugSettings extends DebugSettings { - TestDebugSettings.withDevTools(TestContext context) - : super( - devToolsLauncher: (hostname) async { - final server = await DevToolsServer().serveDevTools( - hostname: hostname, - enableStdinCommands: false, - customDevToolsPath: - context.sdkConfigurationProvider.sdkLayout.devToolsDirectory, - ); - if (server == null) { - throw StateError('DevTools server could not be started.'); - } - return DevTools(server.address.host, server.port, server); - }, - ); - - const TestDebugSettings.noDevTools() : super(enableDevToolsLaunch: false); + TestDebugSettings.withDevToolsLaunch( + TestContext context, { + bool serveFromDds = false, + }) : super( + // ignore: deprecated_member_use_from_same_package + devToolsLauncher: + serveFromDds + ? null + : (hostname) async { + final server = await DevToolsServer().serveDevTools( + hostname: hostname, + enableStdinCommands: false, + customDevToolsPath: + context + .sdkConfigurationProvider + .sdkLayout + .devToolsDirectory, + ); + if (server == null) { + throw StateError('DevTools server could not be started.'); + } + return DevTools(server.address.host, server.port, server); + }, + ddsConfiguration: DartDevelopmentServiceConfiguration( + serveDevTools: serveFromDds, + ), + ); + + const TestDebugSettings.noDevToolsLaunch() + : super(enableDevToolsLaunch: false); TestDebugSettings._({ required super.enableDebugging, @@ -133,6 +146,7 @@ class TestDebugSettings extends DebugSettings { required super.devToolsLauncher, required super.expressionCompiler, required super.urlEncoder, + required super.ddsConfiguration, }); TestDebugSettings copyWith({ @@ -147,6 +161,7 @@ class TestDebugSettings extends DebugSettings { DevToolsLauncher? devToolsLauncher, ExpressionCompiler? expressionCompiler, UrlEncoder? urlEncoder, + DartDevelopmentServiceConfiguration? ddsConfiguration, }) { return TestDebugSettings._( enableDebugging: enableDebugging ?? this.enableDebugging, @@ -154,15 +169,19 @@ class TestDebugSettings extends DebugSettings { useSseForDebugProxy: useSse ?? useSseForDebugProxy, useSseForDebugBackend: useSse ?? useSseForDebugBackend, useSseForInjectedClient: useSse ?? useSseForInjectedClient, + // ignore: deprecated_member_use_from_same_package spawnDds: spawnDds ?? this.spawnDds, + // ignore: deprecated_member_use_from_same_package ddsPort: ddsPort ?? this.ddsPort, enableDevToolsLaunch: enableDevToolsLaunch ?? this.enableDevToolsLaunch, launchDevToolsInNewWindow: launchDevToolsInNewWindow ?? this.launchDevToolsInNewWindow, emitDebugEvents: emitDebugEvents ?? this.emitDebugEvents, + // ignore: deprecated_member_use_from_same_package devToolsLauncher: devToolsLauncher ?? this.devToolsLauncher, expressionCompiler: expressionCompiler ?? this.expressionCompiler, urlEncoder: urlEncoder ?? this.urlEncoder, + ddsConfiguration: ddsConfiguration ?? this.ddsConfiguration, ); } } @@ -194,14 +213,14 @@ class TestToolConfiguration extends ToolConfiguration { TestToolConfiguration.withDefaultLoadStrategy({ TestAppMetadata super.appMetadata = const TestAppMetadata.externalApp(), TestDebugSettings super.debugSettings = - const TestDebugSettings.noDevTools(), + const TestDebugSettings.noDevToolsLaunch(), TestBuildSettings buildSettings = const TestBuildSettings.dart(), }) : super(loadStrategy: TestStrategy(FakeAssetReader(), buildSettings)); TestToolConfiguration.withLoadStrategy({ TestAppMetadata super.appMetadata = const TestAppMetadata.externalApp(), TestDebugSettings super.debugSettings = - const TestDebugSettings.noDevTools(), + const TestDebugSettings.noDevToolsLaunch(), required super.loadStrategy, }); } diff --git a/dwds/test/handlers/injector_test.dart b/dwds/test/handlers/injector_test.dart index c51d35ae1..1d87d166d 100644 --- a/dwds/test/handlers/injector_test.dart +++ b/dwds/test/handlers/injector_test.dart @@ -311,7 +311,9 @@ void main() { late DwdsInjector injector; setUp(() async { final toolConfiguration = TestToolConfiguration.withDefaultLoadStrategy( - debugSettings: TestDebugSettings.noDevTools().copyWith(useSse: false), + debugSettings: TestDebugSettings.noDevToolsLaunch().copyWith( + useSse: false, + ), ); setGlobalsForTesting(toolConfiguration: toolConfiguration); injector = DwdsInjector(); diff --git a/dwds/test/puppeteer/test_utils.dart b/dwds/test/puppeteer/test_utils.dart index 16a659c4c..b95013a55 100644 --- a/dwds/test/puppeteer/test_utils.dart +++ b/dwds/test/puppeteer/test_utils.dart @@ -47,10 +47,10 @@ Future setUpExtensionTest( ), debugSettings: serveDevTools - ? TestDebugSettings.withDevTools( + ? TestDebugSettings.withDevToolsLaunch( context, ).copyWith(enableDebugExtension: true, useSse: useSse) - : TestDebugSettings.noDevTools().copyWith( + : TestDebugSettings.noDevToolsLaunch().copyWith( enableDebugExtension: true, useSse: useSse, ), From bf7b1e59d75381189bc593f4658a9bc1ff4d142e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Sep 2025 10:46:39 -0400 Subject: [PATCH 2/2] Bump the github-actions group with 2 updates (#2684) Bumps the github-actions group with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [actions/cache](https://github.com/actions/cache). Updates `actions/checkout` from 4.2.2 to 5.0.0 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/11bd71901bbe5b1630ceea73d27597364c9af683...08c6903cd8c0fde910a37f88322edcfb5dd907a8) Updates `actions/cache` from 4.2.3 to 4.2.4 - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/5a3ec84eff668545956fd18022155c47e93e2684...0400d5f644dc74513175e3cd8d07132dd4860809) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 5.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: actions/cache dependency-version: 4.2.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/changelog_reminder.yml | 2 +- .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/release_reminder.yml | 2 +- 6 files changed, 65 insertions(+), 65 deletions(-) diff --git a/.github/workflows/changelog_reminder.yml b/.github/workflows/changelog_reminder.yml index a4a22344e..0d04eec2f 100644 --- a/.github/workflows/changelog_reminder.yml +++ b/.github/workflows/changelog_reminder.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - name: Check changed files run: | git fetch origin main diff --git a/.github/workflows/daily_stable_testing.yml b/.github/workflows/daily_stable_testing.yml index 0039739ba..4273bd47f 100644 --- a/.github/workflows/daily_stable_testing.yml +++ b/.github/workflows/daily_stable_testing.yml @@ -29,7 +29,7 @@ jobs: echo "VERSION_TAG=$(webdev --version)" >> $GITHUB_OUTPUT - name: Checkout Webdev at version tag id: checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 with: ref: webdev-v${{ steps.version.outputs.VERSION_TAG }} - name: Upgrade deps diff --git a/.github/workflows/daily_testing.yml b/.github/workflows/daily_testing.yml index 108df81d9..82d65b0fc 100644 --- a/.github/workflows/daily_testing.yml +++ b/.github/workflows/daily_testing.yml @@ -17,7 +17,7 @@ jobs: sdk: main - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 631855faa..8e09fd06b 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@5a3ec84eff668545956fd18022155c47e93e2684 + uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable" @@ -35,7 +35,7 @@ jobs: sdk: stable - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - name: mono_repo self validate run: dart pub global activate mono_repo 6.6.2 - name: mono_repo self validate @@ -45,7 +45,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 + uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds;commands:format-analyze_0-test_0" @@ -60,7 +60,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -83,7 +83,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 + uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:example-fixtures/_webdev_smoke-frontend_server_client-frontend_server_common-test_common;commands:format-analyze_0" @@ -98,7 +98,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: example_pub_upgrade name: example; dart pub upgrade run: dart pub upgrade @@ -169,7 +169,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 + uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:webdev;commands:format-analyze_0-test_7" @@ -184,7 +184,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: webdev_pub_upgrade name: webdev; dart pub upgrade run: dart pub upgrade @@ -207,7 +207,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 + uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds;commands:command-test_1" @@ -222,7 +222,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -246,7 +246,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 + uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds;commands:test_2" @@ -261,7 +261,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -281,7 +281,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 + uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds;commands:test_3" @@ -296,7 +296,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -316,7 +316,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 + uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds;commands:test_4" @@ -331,7 +331,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -351,7 +351,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 + uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:frontend_server_client;commands:test_5" @@ -366,7 +366,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: frontend_server_client_pub_upgrade name: frontend_server_client; dart pub upgrade run: dart pub upgrade @@ -386,7 +386,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 + uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:test_common;commands:command-test_6" @@ -401,7 +401,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: test_common_pub_upgrade name: test_common; dart pub upgrade run: dart pub upgrade @@ -425,7 +425,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 + uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:webdev;commands:command-test_5" @@ -440,7 +440,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: webdev_pub_upgrade name: webdev; dart pub upgrade run: dart pub upgrade @@ -464,7 +464,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 + uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:main;packages:dwds;commands:command-test_1" @@ -479,7 +479,7 @@ jobs: sdk: main - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -503,7 +503,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 + uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:main;packages:dwds;commands:test_2" @@ -518,7 +518,7 @@ jobs: sdk: main - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -538,7 +538,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 + uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:main;packages:dwds;commands:test_3" @@ -553,7 +553,7 @@ jobs: sdk: main - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -573,7 +573,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 + uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:main;packages:dwds;commands:test_4" @@ -588,7 +588,7 @@ jobs: sdk: main - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -608,7 +608,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 + uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:main;packages:frontend_server_client;commands:test_5" @@ -623,7 +623,7 @@ jobs: sdk: main - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: frontend_server_client_pub_upgrade name: frontend_server_client; dart pub upgrade run: dart pub upgrade @@ -643,7 +643,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 + uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:main;packages:test_common;commands:command-test_6" @@ -658,7 +658,7 @@ jobs: sdk: main - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: test_common_pub_upgrade name: test_common; dart pub upgrade run: dart pub upgrade @@ -682,7 +682,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 + uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:main;packages:webdev;commands:command-test_5" @@ -697,7 +697,7 @@ jobs: sdk: main - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: webdev_pub_upgrade name: webdev; dart pub upgrade run: dart pub upgrade @@ -726,7 +726,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -751,7 +751,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -776,7 +776,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -801,7 +801,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -826,7 +826,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: frontend_server_client_pub_upgrade name: frontend_server_client; dart pub upgrade run: dart pub upgrade @@ -851,7 +851,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: webdev_pub_upgrade name: webdev; dart pub upgrade run: dart pub upgrade @@ -876,7 +876,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: test_common_pub_upgrade name: test_common; dart pub upgrade run: dart pub upgrade @@ -901,7 +901,7 @@ jobs: sdk: main - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -926,7 +926,7 @@ jobs: sdk: main - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -951,7 +951,7 @@ jobs: sdk: main - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -976,7 +976,7 @@ jobs: sdk: main - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -1001,7 +1001,7 @@ jobs: sdk: main - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: frontend_server_client_pub_upgrade name: frontend_server_client; dart pub upgrade run: dart pub upgrade @@ -1026,7 +1026,7 @@ jobs: sdk: main - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: webdev_pub_upgrade name: webdev; dart pub upgrade run: dart pub upgrade @@ -1051,7 +1051,7 @@ jobs: sdk: main - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: test_common_pub_upgrade name: test_common; dart pub upgrade run: dart pub upgrade @@ -1072,7 +1072,7 @@ jobs: if: "github.event_name == 'schedule'" steps: - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 + uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:beta;packages:dwds;commands:command-test_5" @@ -1087,7 +1087,7 @@ jobs: sdk: beta - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -1140,7 +1140,7 @@ jobs: if: "github.event_name == 'schedule'" steps: - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 + uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:beta;packages:webdev;commands:command-test_5" @@ -1155,7 +1155,7 @@ jobs: sdk: beta - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: webdev_pub_upgrade name: webdev; dart pub upgrade run: dart pub upgrade @@ -1208,7 +1208,7 @@ jobs: if: "github.event_name == 'schedule'" steps: - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 + uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:beta;packages:dwds;commands:analyze_1" @@ -1223,7 +1223,7 @@ jobs: sdk: beta - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -1272,7 +1272,7 @@ jobs: if: "github.event_name == 'schedule'" steps: - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 + uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:beta;packages:webdev;commands:analyze_1" @@ -1287,7 +1287,7 @@ jobs: sdk: beta - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: webdev_pub_upgrade name: webdev; dart pub upgrade run: dart pub upgrade @@ -1341,7 +1341,7 @@ jobs: sdk: beta - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -1395,7 +1395,7 @@ jobs: sdk: beta - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - id: webdev_pub_upgrade name: webdev; dart pub upgrade run: dart pub upgrade diff --git a/.github/workflows/dcm.yml b/.github/workflows/dcm.yml index 9344bd976..13d9b3476 100644 --- a/.github/workflows/dcm.yml +++ b/.github/workflows/dcm.yml @@ -27,7 +27,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 with: ref: "${{ github.event.pull_request.head.sha }}" - id: dwds_pub_upgrade diff --git a/.github/workflows/release_reminder.yml b/.github/workflows/release_reminder.yml index ea3180c0c..431f98e2b 100644 --- a/.github/workflows/release_reminder.yml +++ b/.github/workflows/release_reminder.yml @@ -18,7 +18,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - name: Run proper release test run: dart test test/proper_release_test.dart working-directory: test_common