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

Unified Diff: utils/pub/entrypoint.dart

Issue 13196007: Replace defer() with Future.of in pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 | « utils/pub/command_uploader.dart ('k') | utils/pub/error_group.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/entrypoint.dart
diff --git a/utils/pub/entrypoint.dart b/utils/pub/entrypoint.dart
index c17d310faccc1eb1ddb0c2e5b175fac417420c4a..db6ad47c5fcad1ec4ef6f9077c5a5e280a1a13c0 100644
--- a/utils/pub/entrypoint.dart
+++ b/utils/pub/entrypoint.dart
@@ -71,7 +71,7 @@ class Entrypoint {
if (pendingOrCompleted != null) return pendingOrCompleted;
var packageDir = path.join(packagesDir, id.name);
- var future = defer(() {
+ var future = new Future.of(() {
ensureDir(path.dirname(packageDir));
if (entryExists(packageDir)) {
@@ -102,7 +102,7 @@ class Entrypoint {
/// directory, respecting the [LockFile] if present. Returns a [Future] that
/// completes when all dependencies are installed.
Future installDependencies() {
- return defer(() {
+ return new Future.of(() {
return resolveVersions(cache.sources, root, loadLockFile());
}).then(_installDependencies);
}
@@ -119,7 +119,7 @@ class Entrypoint {
/// other dependencies as specified by the [LockFile] if possible. Returns a
/// [Future] that completes when all dependencies are installed.
Future updateDependencies(List<String> dependencies) {
- return defer(() {
+ return new Future.of(() {
var solver = new VersionSolver(cache.sources, root, loadLockFile());
for (var dependency in dependencies) {
solver.useLatestVersion(dependency);
@@ -148,7 +148,7 @@ class Entrypoint {
/// reached packages. This should only be called after the lockfile has been
/// successfully generated.
Future<List<Pubspec>> walkDependencies() {
- return defer(() {
+ return new Future.of(() {
var lockFile = loadLockFile();
var group = new FutureGroup<Pubspec>();
var visited = new Set<String>();
« no previous file with comments | « utils/pub/command_uploader.dart ('k') | utils/pub/error_group.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698