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

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

Issue 1868663002: Update worker mode to use the bazel protos directly instead of json (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: s/setInputBytes/addInputBytes 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 | « pkg/analyzer_cli/lib/src/message_grouper.dart ('k') | pkg/analyzer_cli/lib/src/worker_protocol.pb.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_cli/lib/src/options.dart
diff --git a/pkg/analyzer_cli/lib/src/options.dart b/pkg/analyzer_cli/lib/src/options.dart
index 2c543fa99a5b599d17bdaee0865e3c4ad505b032..a8fec7965abec4bf7ab191b19d0b34a273e2d964 100644
--- a/pkg/analyzer_cli/lib/src/options.dart
+++ b/pkg/analyzer_cli/lib/src/options.dart
@@ -263,6 +263,12 @@ class CommandLineOptions {
}
static CommandLineOptions _parse(List<String> args) {
+ // Check if the args are in a file (bazel worker mode).
+ if (args.last.startsWith('@')) {
+ var argsFile = new File(args.last.substring(1));
+ args = argsFile.readAsLinesSync();
+ }
+
args = args.expand((String arg) => arg.split('=')).toList();
var parser = new CommandLineParser()
..addFlag('batch',
« no previous file with comments | « pkg/analyzer_cli/lib/src/message_grouper.dart ('k') | pkg/analyzer_cli/lib/src/worker_protocol.pb.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698