Skip to content

Commit a02f073

Browse files
authored
Support --source in FrontendServerClient (#1760)
1 parent 5343edb commit a02f073

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

frontend_server_client/CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 3.1.0
2+
3+
- Add `additionalSources` parameter to `FrontendServerClient`, for passing
4+
additional `--source`s to the kernel compiler.
5+
16
## 3.0.0
27

38
- Update the `compile` api to return a non-null `CompileResult`, and instead

frontend_server_client/lib/src/frontend_server_client.dart

+5
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ class FrontendServerClient {
5757
String target = 'vm', // The kernel target type.
5858
bool verbose = false, // Verbose logs, including server/client messages
5959
bool printIncrementalDependencies = true,
60+
List<String> additionalSources = const [],
6061
}) async {
6162
var feServer = await Process.start(Platform.resolvedExecutable, [
6263
if (debug) '--observe',
@@ -80,6 +81,10 @@ class FrontendServerClient {
8081
if (enabledExperiments != null)
8182
for (var experiment in enabledExperiments)
8283
'--enable-experiment=$experiment',
84+
for (var source in additionalSources) ...[
85+
'--source',
86+
source,
87+
],
8388
]);
8489
var feServerStdoutLines = StreamQueue(feServer.stdout
8590
.transform(utf8.decoder)

frontend_server_client/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: frontend_server_client
2-
version: 3.0.0
2+
version: 3.1.0
33
description: >-
44
Client code to start and interact with the frontend_server compiler from the
55
Dart SDK.

0 commit comments

Comments
 (0)