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

Unified Diff: bin/dartdevc.dart

Issue 1884073003: Add bazel worker support to the dev compiler. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: remove hacks since they are no longer necessary 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 | lib/src/compiler/command.dart » ('j') | lib/src/compiler/command.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/dartdevc.dart
diff --git a/bin/dartdevc.dart b/bin/dartdevc.dart
index 6be7a969f9cb54b4436749b15489cd80169cf8f8..096b7fe5fd25407cab5da0faa51e6dd7dfbcf55c 100755
--- a/bin/dartdevc.dart
+++ b/bin/dartdevc.dart
@@ -40,6 +40,8 @@ import 'package:args/command_runner.dart';
import 'package:dev_compiler/src/compiler/command.dart';
main(List<String> args) async {
+ args = _preprocessArgs(args);
+
var runner = new CommandRunner('dartdevc', 'Dart Development Compiler');
runner.addCommand(new CompileCommand());
try {
@@ -76,3 +78,14 @@ main(List<String> args) async {
print("```");
}
}
+
+/// If the final arg is `@file_path` then read in all the lines of that file
+/// and add those as args.
Jennifer Messerly 2016/04/14 21:02:14 add a comment that this is required by Bazel worke
jakemac 2016/04/14 21:48:25 Done.
+List<String> _preprocessArgs(List<String> args) {
+ if (args.last.startsWith('@')) {
+ return new List.from(args)
+ ..addAll(new File(args.last.substring(1)).readAsLinesSync());
+ } else {
+ return args;
+ }
+}
« no previous file with comments | « no previous file | lib/src/compiler/command.dart » ('j') | lib/src/compiler/command.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698