Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions frontend_server_client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 2.1.2

- Force kill the frontend server after one second when calling shutdown. It
appears to hang on windows sometimes.

## 2.1.1

- Fix a bug where spaces in the output dill path would cause a parse error when
Expand Down
9 changes: 6 additions & 3 deletions frontend_server_client/lib/src/frontend_server_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,13 @@ class FrontendServerClient {
}

/// Stop the service gracefully (using the shutdown command)
Future<int> shutdown() {
_feServerStdoutLines.cancel();
Future<int> shutdown() async {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great to open a bug on the SDK for that!

_sendCommand('quit');
return _feServer.exitCode;
var timer = Timer(const Duration(seconds: 1), _feServer.kill);
var exitCode = await _feServer.exitCode;
timer.cancel();
await _feServerStdoutLines.cancel();
return exitCode;
}

/// Kills the server forcefully by calling `kill` on the process, and
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: 2.1.1
version: 2.1.2
description: >-
Client code to start and interact with the frontend_server compiler from the
Dart SDK.
Expand Down
10 changes: 2 additions & 8 deletions frontend_server_client/test/frontend_sever_client_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,7 @@ String get message => p.join('hello', 'world');

expect(await stdoutLines.next, p.join('goodbye', 'world'));
expect(await process.exitCode, 0);
},
skip: Platform.isWindows
? 'https://github.com/dart-lang/webdev/issues/1383'
: false);
});

test('can handle compile errors and reload fixes', () async {
var entrypoint = p.join(packageRoot, 'bin', 'main.dart');
Expand Down Expand Up @@ -187,10 +184,7 @@ String get message => p.join('hello', 'world');

expect(await stdoutLines.next, p.join('goodbye', 'world'));
expect(await process.exitCode, 0);
},
skip: Platform.isWindows
? 'https://github.com/dart-lang/webdev/issues/1383'
: false);
});

test('can compile and recompile a dartdevc app', () async {
var entrypoint =
Expand Down