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

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

Issue 1963023002: Issue 26426. Don't use SDK summarie when analyzing SDK itself. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Don't disable in batch runs. Created 4 years, 7 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/analyzer_cli/lib/src/driver.dart
diff --git a/pkg/analyzer_cli/lib/src/driver.dart b/pkg/analyzer_cli/lib/src/driver.dart
index 4942015e2c192b1339f78f610338d0d1cbfd69f7..6effac46e8c23428412b34e87664bc549de731c1 100644
--- a/pkg/analyzer_cli/lib/src/driver.dart
+++ b/pkg/analyzer_cli/lib/src/driver.dart
@@ -587,8 +587,13 @@ class Driver implements CommandLineStarter {
// the command lines sent to stdin. So process it before deciding whether
// to activate batch mode.
if (sdk == null) {
- sdk = new DirectoryBasedDartSdk(new JavaFile(options.dartSdkPath));
- sdk.useSummary = true;
+ String dartSdkPath = options.dartSdkPath;
+ sdk = new DirectoryBasedDartSdk(new JavaFile(dartSdkPath));
+ sdk.useSummary = options.sourceFiles.every((String sourcePath) {
+ sourcePath = path.absolute(sourcePath);
+ sourcePath = path.normalize(sourcePath);
+ return !path.isWithin(dartSdkPath, sourcePath);
+ });
sdk.analysisOptions = createAnalysisOptionsForCommandLineOptions(options);
}
_isBatch = options.shouldBatch;
« 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