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

Unified Diff: pkg/analyzer/lib/source/pub_package_map_provider.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/lib/source/pub_package_map_provider.dart
diff --git a/pkg/analyzer/lib/source/pub_package_map_provider.dart b/pkg/analyzer/lib/source/pub_package_map_provider.dart
index a7b2c4229c4a376dbfcb1b3d1add7989b488202d..c56223292df450f32089cf5dbb29b4c1b6c19f71 100644
--- a/pkg/analyzer/lib/source/pub_package_map_provider.dart
+++ b/pkg/analyzer/lib/source/pub_package_map_provider.dart
@@ -11,8 +11,8 @@ import 'dart:io' as io;
import 'package:analyzer/file_system/file_system.dart';
import 'package:analyzer/source/package_map_provider.dart';
+import 'package:analyzer/src/dart/sdk/sdk.dart';
import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/sdk_io.dart';
/**
* The function used to run pub list.
@@ -40,7 +40,7 @@ class PubPackageMapProvider implements PackageMapProvider {
/**
* Sdk that we use to find the pub executable.
*/
- final DirectoryBasedDartSdk sdk;
+ final FolderBasedDartSdk sdk;
/**
* The function used to run pub list.
@@ -146,6 +146,7 @@ class PubPackageMapProvider implements PackageMapProvider {
packageMap[packageName] = folders;
}
}
+
packages.forEach((key, value) {
if (value is String) {
processPaths(key, [value]);
@@ -169,7 +170,7 @@ class PubPackageMapProvider implements PackageMapProvider {
* Run pub list to determine the packages and input files.
*/
io.ProcessResult _runPubListDefault(Folder folder) {
- String executablePath = sdk.pubExecutable.getAbsolutePath();
+ String executablePath = sdk.pubExecutable.path;
List<String> arguments = [PUB_LIST_COMMAND];
String workingDirectory = folder.path;
int subprocessId = AnalysisEngine.instance.instrumentationService

Powered by Google App Engine
This is Rietveld 408576698