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

Unified Diff: pkg/dev_compiler/lib/src/analyzer/context.dart

Issue 2371113004: Use .packages instead of pubspec.yaml (Closed)
Patch Set: Mark clang as passing 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 | « .travis.yml ('k') | pkg/dev_compiler/lib/src/compiler/js_typeref_codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/lib/src/analyzer/context.dart
diff --git a/pkg/dev_compiler/lib/src/analyzer/context.dart b/pkg/dev_compiler/lib/src/analyzer/context.dart
index 3545bca8a5c43ba27ed99876b548c6c314be7885..6dd239db74bdd7acff0c457ba6a62fbe3a6bfd83 100644
--- a/pkg/dev_compiler/lib/src/analyzer/context.dart
+++ b/pkg/dev_compiler/lib/src/analyzer/context.dart
@@ -51,7 +51,6 @@ class AnalyzerOptions {
String dartSdkPath,
this.dartSdkSummaryPath,
this.customUrlMappings: const {},
- this.packageRoot: 'packages/',
this.packagePaths: const []})
: dartSdkPath = dartSdkPath ?? getSdkDir().path;
@@ -74,9 +73,7 @@ class AnalyzerOptions {
..addOption('dart-sdk-summary',
help: 'Dart SDK Summary Path', defaultsTo: null)
..addOption('package-root',
- abbr: 'p',
- help: 'Package root to resolve "package:" imports',
- defaultsTo: 'packages/')
+ abbr: 'p', help: 'Package root to resolve "package:" imports')
..addOption('url-mapping',
help: '--url-mapping=libraryUri,/path/to/library.dart uses\n'
'library.dart as the source for an import of of "libraryUri".',
@@ -142,7 +139,9 @@ List<UriResolver> createFileResolvers(AnalyzerOptions options,
resourceProvider ??= PhysicalResourceProvider.INSTANCE;
UriResolver packageResolver() {
ContextBuilder builder = new ContextBuilder(resourceProvider, null, null);
- builder.defaultPackagesDirectoryPath = options.packageRoot;
+ if (options.packageRoot != null) {
+ builder.defaultPackagesDirectoryPath = options.packageRoot;
+ }
return new PackageMapUriResolver(resourceProvider,
builder.convertPackagesToMap(builder.createPackageMap('')));
}
« no previous file with comments | « .travis.yml ('k') | pkg/dev_compiler/lib/src/compiler/js_typeref_codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698