From 0fe4b7417bb3a3d3b44b5ae877c8bb79d256251a Mon Sep 17 00:00:00 2001 From: Derek Xu Date: Mon, 13 Nov 2023 14:13:31 -0500 Subject: [PATCH] Update --- frontend_server_client/CHANGELOG.md | 9 ++++++++- .../lib/src/frontend_server_client.dart | 8 ++++++-- frontend_server_client/pubspec.yaml | 2 +- frontend_server_common/CHANGELOG.md | 4 ++++ test_common/lib/test_sdk_layout.dart | 2 +- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/frontend_server_client/CHANGELOG.md b/frontend_server_client/CHANGELOG.md index baedcf926..eccbcfca5 100644 --- a/frontend_server_client/CHANGELOG.md +++ b/frontend_server_client/CHANGELOG.md @@ -1,4 +1,11 @@ -## 3.3.0-wip +## 4.0.0-wip + +- By default, start the frontend server from the AOT snapshot shipped in the + Dart SDK. +- Throw an `ArgumentError` when `FrontendServerClient.start` is called with the + `frontendServerPath` argument omitted and the `debug` argument set to true. + +## 3.3.0 - Update Dart SDK constraint to `>=3.0.0 <4.0.0`. - Support changes in the SDK layout for Dart 3.0. diff --git a/frontend_server_client/lib/src/frontend_server_client.dart b/frontend_server_client/lib/src/frontend_server_client.dart index 563ea446a..cd8110247 100644 --- a/frontend_server_client/lib/src/frontend_server_client.dart +++ b/frontend_server_client/lib/src/frontend_server_client.dart @@ -47,8 +47,8 @@ class FrontendServerClient { /// /// When the [frontendServerPath] argument is provided, setting [debug] to /// true permits debuggers to attach to the frontend server. When the - /// [frontendServerPath] argument is omitted, the value of the [debug] - /// argument is ignored. + /// [frontendServerPath] argument is omitted, setting [debug] to true will + /// cause an [ArgumentError] to be thrown. static Future start( String entrypoint, String outputDillPath, @@ -109,6 +109,10 @@ class FrontendServerClient { commonArguments, ); } else if (File(_feServerAotSnapshotPath).existsSync()) { + if (debug) { + throw ArgumentError('The debug argument cannot be set to true when the ' + 'frontendServerPath argument is omitted.'); + } feServer = await Process.start( _dartAotRuntimePath, [_feServerAotSnapshotPath] + commonArguments, diff --git a/frontend_server_client/pubspec.yaml b/frontend_server_client/pubspec.yaml index 5ef52a2f2..4b70bd14e 100644 --- a/frontend_server_client/pubspec.yaml +++ b/frontend_server_client/pubspec.yaml @@ -1,5 +1,5 @@ name: frontend_server_client -version: 3.3.0-wip +version: 4.0.0-wip description: >- Client code to start and interact with the frontend_server compiler from the Dart SDK. diff --git a/frontend_server_common/CHANGELOG.md b/frontend_server_common/CHANGELOG.md index aa64921d0..6704b3872 100644 --- a/frontend_server_common/CHANGELOG.md +++ b/frontend_server_common/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.2 + +- Start the frontend server from the AOT snapshot shipped in the Dart SDK. + ## 0.2.1 - Doe not pass `-debugger-module-names` flag to the frontend server. diff --git a/test_common/lib/test_sdk_layout.dart b/test_common/lib/test_sdk_layout.dart index 072bd3f1f..49a2c7c08 100644 --- a/test_common/lib/test_sdk_layout.dart +++ b/test_common/lib/test_sdk_layout.dart @@ -94,7 +94,7 @@ class TestSdkLayout { sdkLayout.sdkDirectory, 'bin', 'snapshots', - 'frontend_server.dart.snapshot', + 'frontend_server_aot.dart.snapshot', ), dartdevcSnapshotPath: sdkLayout.dartdevcSnapshotPath, kernelWorkerSnapshotPath: p.join(