Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Unified Diff: pkg/analyzer_cli/lib/src/build_mode.dart

Issue 1859363003: allow --dart-sdk with --persisent_worker (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: code review updates Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analyzer_cli/lib/src/driver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_cli/lib/src/build_mode.dart
diff --git a/pkg/analyzer_cli/lib/src/build_mode.dart b/pkg/analyzer_cli/lib/src/build_mode.dart
index b04535f2b34d88d43d679eb721f2949b0ae44f42..042cde2de86bd07996654de619d1d6e6cd26fdaf 100644
--- a/pkg/analyzer_cli/lib/src/build_mode.dart
+++ b/pkg/analyzer_cli/lib/src/build_mode.dart
@@ -314,20 +314,24 @@ class WorkerLoop {
final StringBuffer errorBuffer = new StringBuffer();
final StringBuffer outBuffer = new StringBuffer();
- WorkerLoop(this.connection);
+ final String dartSdkPath;
- factory WorkerLoop.std({io.Stdin stdinStream, io.Stdout stdoutStream}) {
+ WorkerLoop(this.connection, {this.dartSdkPath});
+
+ factory WorkerLoop.std(
+ {io.Stdin stdinStream, io.Stdout stdoutStream, String dartSdkPath}) {
stdinStream ??= io.stdin;
stdoutStream ??= io.stdout;
WorkerConnection connection =
new StdWorkerConnection(stdinStream, stdoutStream);
- return new WorkerLoop(connection);
+ return new WorkerLoop(connection, dartSdkPath: dartSdkPath);
}
/**
* Performs analysis with given [options].
*/
void analyze(CommandLineOptions options) {
+ options.dartSdkPath ??= dartSdkPath;
new BuildMode(options, new AnalysisStats()).analyze();
}
« no previous file with comments | « no previous file | pkg/analyzer_cli/lib/src/driver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698