From 3c0ffbb1443d019b0748626d4c9e536373493f2e Mon Sep 17 00:00:00 2001 From: Anna Gringauze Date: Fri, 27 Jan 2023 12:02:54 -0800 Subject: [PATCH 1/3] Validate only needed summaries in expression_compiler_service --- dwds/lib/src/services/expression_compiler_service.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dwds/lib/src/services/expression_compiler_service.dart b/dwds/lib/src/services/expression_compiler_service.dart index 74cd13510..e94be84c3 100644 --- a/dwds/lib/src/services/expression_compiler_service.dart +++ b/dwds/lib/src/services/expression_compiler_service.dart @@ -71,7 +71,12 @@ class _Compiler { List experiments, bool verbose, ) async { - sdkConfiguration.validate(); + sdkConfiguration.validateSdkDir(); + if (soundNullSafety) { + sdkConfiguration.validateSoundSummaries(); + } else { + sdkConfiguration.validateWeakSummaries(); + } final librariesUri = sdkConfiguration.librariesUri!; final workerUri = sdkConfiguration.compilerWorkerUri!; From 55228c4a7b32ef2e12253464e717e037cb755a29 Mon Sep 17 00:00:00 2001 From: Anna Gringauze Date: Mon, 13 Feb 2023 19:25:32 -0800 Subject: [PATCH 2/3] Re-enable reload test skipped due to sound null safety by default --- dwds/test/reload_test.dart | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dwds/test/reload_test.dart b/dwds/test/reload_test.dart index d9052e314..5a1b60c19 100644 --- a/dwds/test/reload_test.dart +++ b/dwds/test/reload_test.dart @@ -227,10 +227,13 @@ void main() { var isolate = await client.getIsolate(isolateId); var library = isolate.rootLib!.uri!; + final String callback = + '(_, __) async => ServiceExtensionResponse.result("")'; + await client.evaluate( isolateId, library, - "registerExtension('ext.foo', (method, params) {})", + "registerExtension('ext.foo', $callback)", ); expect(await client.callServiceExtension('hotRestart'), @@ -244,7 +247,7 @@ void main() { await client.evaluate( isolateId, library, - "registerExtension('ext.bar', (method, params) {})", + "registerExtension('ext.bar', $callback)", ); await eventsDone; @@ -252,9 +255,7 @@ void main() { final source = await context.webDriver.pageSource; // Main is re-invoked which shouldn't clear the state. expect(source, contains('Hello World!')); - // TODO(https://github.com/dart-lang/webdev/issues/1818): Re-enable. The - // callback passed to registerExtension requires a non-null return type. - }, skip: 'https://github.com/dart-lang/webdev/issues/1818'); + }, solo: true); test('can refresh the page via the fullReload service extension', () async { final client = context.debugConnection.vmService; From 6de1919012f66af66a72d92148739506bf61fd0d Mon Sep 17 00:00:00 2001 From: Anna Gringauze Date: Mon, 13 Feb 2023 19:28:02 -0800 Subject: [PATCH 3/3] Remove solo --- dwds/test/reload_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dwds/test/reload_test.dart b/dwds/test/reload_test.dart index 5a1b60c19..8f8d09db1 100644 --- a/dwds/test/reload_test.dart +++ b/dwds/test/reload_test.dart @@ -255,7 +255,7 @@ void main() { final source = await context.webDriver.pageSource; // Main is re-invoked which shouldn't clear the state. expect(source, contains('Hello World!')); - }, solo: true); + }); test('can refresh the page via the fullReload service extension', () async { final client = context.debugConnection.vmService;