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

Unified Diff: lib/src/entrypoint.dart

Issue 2184303002: Make pub strong-mode clean. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Code review changes Created 4 years, 5 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 | « lib/src/dart.dart ('k') | lib/src/error_group.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/entrypoint.dart
diff --git a/lib/src/entrypoint.dart b/lib/src/entrypoint.dart
index cc58a3e3ed214e8278c9390c7a4091a890eb2c0c..31aa24d9e43347925535393eb29e1cb51d420941 100644
--- a/lib/src/entrypoint.dart
+++ b/lib/src/entrypoint.dart
@@ -107,7 +107,8 @@ class Entrypoint {
if (_packageGraph != null) return _packageGraph;
assertUpToDate();
- var packages = new Map.fromIterable(lockFile.packages.values,
+ var packages = new Map<String, Package>.fromIterable(
+ lockFile.packages.values,
key: (id) => id.name,
value: (id) => cache.load(id));
packages[root.name] = root;
@@ -294,7 +295,7 @@ class Entrypoint {
///
/// If [changed] is passed, only dependencies whose contents might be changed
/// if one of the given packages changes will be returned.
- Set<String> _dependenciesToPrecompile({Iterable<String> changed}) {
+ Set<String> _dependenciesToPrecompile({Set<String> changed}) {
return packageGraph.packages.values.where((package) {
if (package.pubspec.transformers.isEmpty) return false;
if (packageGraph.isPackageMutable(package.name)) return false;
@@ -695,13 +696,13 @@ class Entrypoint {
/// Recursively lists the contents of [dir], excluding hidden `.DS_Store`
/// files and `package` files.
List<String> _listDirWithoutPackages(dir) {
- return flatten(listDir(dir).map((file) {
+ return listDir(dir).expand/*<String>*/((file) {
if (p.basename(file) == 'packages') return [];
if (!dirExists(file)) return [];
var fileAndSubfiles = [file];
fileAndSubfiles.addAll(_listDirWithoutPackages(file));
return fileAndSubfiles;
- }));
+ });
}
/// If [packageSymlinks] is true, creates a symlink to the "packages"
« no previous file with comments | « lib/src/dart.dart ('k') | lib/src/error_group.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698