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

Unified Diff: pkg/dev_compiler/bin/dartdevc.dart

Issue 2572813002: update DDC and analyzer cli preprocessArgs (Closed)
Patch Set: merge Created 4 years 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/options.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/bin/dartdevc.dart
diff --git a/pkg/dev_compiler/bin/dartdevc.dart b/pkg/dev_compiler/bin/dartdevc.dart
index e6ca6a7f64d0cd9b5378f49233df31f38121b916..4a0ccbe410fcfff622ed5501e292d2d7a0246e5c 100755
--- a/pkg/dev_compiler/bin/dartdevc.dart
+++ b/pkg/dev_compiler/bin/dartdevc.dart
@@ -37,13 +37,15 @@
import 'dart:async';
import 'dart:io';
+import 'package:analyzer/file_system/physical_file_system.dart';
+import 'package:analyzer/src/command_line/arguments.dart';
import 'package:analyzer/src/generated/engine.dart' show AnalysisEngine;
import 'package:bazel_worker/bazel_worker.dart';
import 'package:dev_compiler/src/compiler/command.dart';
Future main(List<String> args) async {
// Always returns a new modifiable list.
- args = _preprocessArgs(args);
+ args = preprocessArgs(PhysicalResourceProvider.INSTANCE, args);
if (args.contains('--persistent_worker')) {
new _CompilerWorker(args..remove('--persistent_worker')).run();
@@ -71,19 +73,3 @@ class _CompilerWorker extends AsyncWorkerLoop {
..output = output.toString();
}
}
-
-/// Always returns a new modifiable list.
-///
-/// If the final arg is `@file_path` then read in all the lines of that file
-/// and add those as args.
-///
-/// Bazel actions that support workers must provide all their per-WorkRequest
-/// arguments in a file like this instead of as normal args.
-List<String> _preprocessArgs(List<String> args) {
- args = new List.from(args);
- if (args.isNotEmpty && args.last.startsWith('@')) {
- var fileArg = args.removeLast();
- args.addAll(new File(fileArg.substring(1)).readAsLinesSync());
- }
- return args;
-}
« no previous file with comments | « pkg/analyzer_cli/lib/src/options.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698