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

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

Issue 2242853002: Deprecate DirectoryBasedDartSdk and transition existing uses to the new API (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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
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 9cddf0de7c6b696c316817458162fcc117141c79..68c9b2506d721e04e593e0c8e80d7773447c1f2e 100644
--- a/pkg/analyzer_cli/lib/src/driver.dart
+++ b/pkg/analyzer_cli/lib/src/driver.dart
@@ -26,7 +26,6 @@ import 'package:analyzer/src/generated/interner.dart';
import 'package:analyzer/src/generated/java_engine.dart';
import 'package:analyzer/src/generated/java_io.dart';
import 'package:analyzer/src/generated/sdk.dart';
-import 'package:analyzer/src/generated/sdk_io.dart';
import 'package:analyzer/src/generated/source.dart';
import 'package:analyzer/src/generated/source_io.dart';
import 'package:analyzer/src/generated/utilities_general.dart'
@@ -625,17 +624,17 @@ class Driver implements CommandLineStarter {
options.dartSdkSummaryPath, options.strongMode);
} else {
String dartSdkPath = options.dartSdkPath;
- DirectoryBasedDartSdk directorySdk = new DirectoryBasedDartSdk(
- new JavaFile(dartSdkPath), options.strongMode);
- directorySdk.useSummary = useSummaries &&
+ FolderBasedDartSdk dartSdk = new FolderBasedDartSdk(resourceProvider,
+ resourceProvider.getFolder(dartSdkPath), options.strongMode);
+ dartSdk.useSummary = useSummaries &&
options.sourceFiles.every((String sourcePath) {
sourcePath = path.absolute(sourcePath);
sourcePath = path.normalize(sourcePath);
return !path.isWithin(dartSdkPath, sourcePath);
});
- directorySdk.analysisOptions = context.analysisOptions;
- sdk = directorySdk;
+ dartSdk.analysisOptions = context.analysisOptions;
+ sdk = dartSdk;
}
}
}

Powered by Google App Engine
This is Rietveld 408576698