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

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

Issue 2720493002: cleanup --batch-mode sourceFiles (Closed)
Patch Set: merge Created 3 years, 10 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/options.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 ba19d8cc0a7666099380ad2a7168d19313fa3d2a..b68476b8b1a2c7d9d39d70c0612449e657d428dd 100644
--- a/pkg/analyzer_cli/lib/src/build_mode.dart
+++ b/pkg/analyzer_cli/lib/src/build_mode.dart
@@ -159,6 +159,15 @@ class BuildMode {
return ErrorSeverity.ERROR;
}
+ // BuildMode expects sourceFiles in the format "<uri>|<filepath>",
+ // but the rest of the code base does not understand this format.
+ // Rewrite sourceFiles, stripping the "<uri>|" prefix, so that it
+ // does not cause problems with code that does not expect this format.
+ options.rewriteSourceFiles(options.sourceFiles
+ .map((String uriPipePath) =>
+ uriPipePath.substring(uriPipePath.indexOf('|') + 1))
+ .toList());
+
// Prepare the analysis context.
_createContext();
« no previous file with comments | « no previous file | pkg/analyzer_cli/lib/src/options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698