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

Unified Diff: pkg/testing/lib/src/analyze.dart

Issue 2790143002: Run analyzer from sources instead of built SDK. (Closed)
Patch Set: Created 3 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/testing/lib/src/analyze.dart
diff --git a/pkg/testing/lib/src/analyze.dart b/pkg/testing/lib/src/analyze.dart
index 781b408c70887c3a440c9bd6e61a9f72a35a9f4e..e3a6303287139908ae83ea7eb07b844b71b72aee 100644
--- a/pkg/testing/lib/src/analyze.dart
+++ b/pkg/testing/lib/src/analyze.dart
@@ -10,7 +10,7 @@ import 'dart:convert' show LineSplitter, UTF8;
import 'dart:io' show File, Process;
-import '../testing.dart' show dartSdk;
+import '../testing.dart' show startDart;
import 'log.dart' show isVerbose;
@@ -107,10 +107,10 @@ Stream<AnalyzerDiagnostic> parseAnalyzerOutput(
Future<Null> analyzeUris(Uri analysisOptions, Uri packages, List<Uri> uris,
List<RegExp> exclude) async {
if (uris.isEmpty) return;
- const String analyzerPath = "bin/dartanalyzer";
- Uri analyzer = dartSdk.resolve(analyzerPath);
+ const String analyzerPath = "pkg/analyzer_cli/bin/analyzer.dart";
+ Uri analyzer = Uri.base.resolve(analyzerPath);
if (!await new File.fromUri(analyzer).exists()) {
- throw "Couldn't find '$analyzerPath' in '${dartSdk.toFilePath()}'";
+ throw "Couldn't find '$analyzerPath' in '${Uri.base.toFilePath()}'";
}
List<String> arguments = <String>[
"--packages=${packages.toFilePath()}",
@@ -127,7 +127,7 @@ Future<Null> analyzeUris(Uri analysisOptions, Uri packages, List<Uri> uris,
print("Running dartanalyzer.");
}
Stopwatch sw = new Stopwatch()..start();
- Process process = await Process.start(analyzer.toFilePath(), arguments);
+ Process process = await startDart(analyzer, arguments);
process.stdin.close();
Future stdoutFuture = parseAnalyzerOutput(process.stdout).toList();
Future stderrFuture = parseAnalyzerOutput(process.stderr).toList();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698