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

Unified Diff: pkg/analyzer/tool/task_dependency_graph/generate.dart

Issue 2351833002: Fix pkg/analyzer/tool/task_dependency_graph/check_test. (Closed)
Patch Set: Created 4 years, 3 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/pkg.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/tool/task_dependency_graph/generate.dart
diff --git a/pkg/analyzer/tool/task_dependency_graph/generate.dart b/pkg/analyzer/tool/task_dependency_graph/generate.dart
index db2cd09ddca72a07fe114162fdbbb7b843a7f7cf..068790f5787d3e45e9c50f3d6ca8ed47e5a4978c 100644
--- a/pkg/analyzer/tool/task_dependency_graph/generate.dart
+++ b/pkg/analyzer/tool/task_dependency_graph/generate.dart
@@ -154,14 +154,15 @@ ${generateGraphData()}
DartSdk sdk = new FolderBasedDartSdk(resourceProvider,
FolderBasedDartSdk.defaultSdkDirectory(resourceProvider));
context = AnalysisEngine.instance.createAnalysisContext();
- String packageRootPath;
+ ContextBuilder builder = new ContextBuilder(resourceProvider, null, null);
if (Platform.packageRoot != null) {
- packageRootPath = Uri.parse(Platform.packageRoot).toFilePath();
+ builder.defaultPackagesDirectoryPath = Uri.parse(Platform.packageRoot).toFilePath();
+ } else if (Platform.packageConfig != null) {
+ builder.defaultPackageFilePath = Platform.packageConfig;
} else {
- packageRootPath = path.join(rootDir, 'packages');
+ // Let the context builder use the default algorithm for package
+ // resolution.
}
- ContextBuilder builder = new ContextBuilder(resourceProvider, null, null);
- builder.defaultPackagesDirectoryPath = packageRootPath;
List<UriResolver> uriResolvers = [
new DartUriResolver(sdk),
new PackageMapUriResolver(resourceProvider,
« no previous file with comments | « no previous file | pkg/pkg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698