Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
derekxu16 committed Nov 13, 2023
1 parent 3eda91e commit 0fe4b74
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
9 changes: 8 additions & 1 deletion frontend_server_client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
8 changes: 6 additions & 2 deletions frontend_server_client/lib/src/frontend_server_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<FrontendServerClient> start(
String entrypoint,
String outputDillPath,
Expand Down Expand Up @@ -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,
<String>[_feServerAotSnapshotPath] + commonArguments,
Expand Down
2 changes: 1 addition & 1 deletion frontend_server_client/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 4 additions & 0 deletions frontend_server_common/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion test_common/lib/test_sdk_layout.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 0fe4b74

Please sign in to comment.