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

Unified Diff: lib/src/command/deps.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/command/cache_repair.dart ('k') | lib/src/command/global_activate.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/command/deps.dart
diff --git a/lib/src/command/deps.dart b/lib/src/command/deps.dart
index 8822978d469cdf3e8652e6328441d61dcc3a34e5..dbbec13872d0167ba0220716d0f3784bba33e93a 100644
--- a/lib/src/command/deps.dart
+++ b/lib/src/command/deps.dart
@@ -144,11 +144,11 @@ class DepsCommand extends PubCommand {
// The work list for the breadth-first traversal. It contains the package
// being added to the tree, and the parent map that will receive that
// package.
- var toWalk = new Queue<Pair<Package, Map>>();
+ var toWalk = new Queue<Pair<Package, Map<String, Map>>>();
var visited = new Set<String>.from([entrypoint.root.name]);
// Start with the root dependencies.
- var packageTree = {};
+ var packageTree = <String, Map>{};
var immediateDependencies = entrypoint.root.immediateDependencies.toSet();
if (!_includeDev) {
immediateDependencies.removeAll(entrypoint.root.devDependencies);
@@ -171,7 +171,7 @@ class DepsCommand extends PubCommand {
visited.add(package.name);
// Populate the map with this package's dependencies.
- var childMap = {};
+ var childMap = <String, Map>{};
map[_labelPackage(package)] = childMap;
for (var dep in package.dependencies) {
@@ -221,5 +221,6 @@ class DepsCommand extends PubCommand {
if (package != null) return package;
dataError('The pubspec.yaml file has changed since the pubspec.lock file '
'was generated, please run "pub get" again.');
+ return null;
}
}
« no previous file with comments | « lib/src/command/cache_repair.dart ('k') | lib/src/command/global_activate.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698