Index: utils/pub/entrypoint.dart |
diff --git a/utils/pub/entrypoint.dart b/utils/pub/entrypoint.dart |
index b162859cf49385bab3f929c8ef30496491664a69..321ee59f8aa1f99146b02f3f07bf7dc41ab139a3 100644 |
--- a/utils/pub/entrypoint.dart |
+++ b/utils/pub/entrypoint.dart |
@@ -142,70 +142,6 @@ class Entrypoint { |
}); |
} |
- /// Traverses the root's package dependency graph and loads each of the |
- /// reached packages. This should only be called after the lockfile has been |
- /// successfully generated. |
- Future<List<Pubspec>> walkDependencies() { |
- return new Future.sync(() { |
- var lockFile = loadLockFile(); |
- var group = new FutureGroup<Pubspec>(); |
- var visited = new Set<String>(); |
- |
- // Include the root package in the results. |
- group.add(new Future.value(root.pubspec)); |
- |
- visitPackage(Pubspec pubspec) { |
- for (var ref in pubspec.dependencies) { |
- if (visited.contains(ref.name)) continue; |
- |
- // Look up the concrete version. |
- var id = lockFile.packages[ref.name]; |
- |
- visited.add(ref.name); |
- var future; |
- if (ref.name == root.name) { |
- future = new Future<Pubspec>.value(root.pubspec); |
- } else { |
- future = cache.describe(id); |
- } |
- group.add(future.then(visitPackage)); |
- } |
- |
- return pubspec; |
- } |
- |
- visited.add(root.name); |
- visitPackage(root.pubspec); |
- return group.future; |
- }); |
- } |
- |
- /// Validates that the current Dart SDK version matches the SDK constraints |
- /// of every package in the dependency graph. If a package's constraint does |
- /// not match, prints an error. |
- Future validateSdkConstraints() { |
- return walkDependencies().then((pubspecs) { |
- var errors = []; |
- |
- for (var pubspec in pubspecs) { |
- var sdkConstraint = pubspec.environment.sdkVersion; |
- if (!sdkConstraint.allows(sdk.version)) { |
- errors.add("- '${pubspec.name}' requires ${sdkConstraint}"); |
- } |
- } |
- |
- if (errors.length > 0) { |
- log.error("Some packages that were installed are not compatible with " |
- "your SDK version ${sdk.version} and may not work:\n" |
- "${errors.join('\n')}\n\n" |
- "You may be able to resolve this by upgrading to the latest Dart " |
- "SDK\n" |
- "or adding a version constraint to use an older version of a " |
- "package."); |
- } |
- }); |
- } |
- |
/// Loads the list of concrete package versions from the `pubspec.lock`, if it |
/// exists. If it doesn't, this completes to an empty [LockFile]. |
LockFile loadLockFile() { |