Chromium Code Reviews

Unified Diff: sdk/lib/_internal/pub/lib/src/command/serve.dart

Issue 26933003: Make pub build use barback. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reword doc comment. Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: sdk/lib/_internal/pub/lib/src/command/serve.dart
diff --git a/sdk/lib/_internal/pub/lib/src/command/serve.dart b/sdk/lib/_internal/pub/lib/src/command/serve.dart
index a8ea7e2ec1e2fbcfee727fe11f30d518b3927ab9..4d2dbda5143a46f49a6b4567312880029f6eeec2 100644
--- a/sdk/lib/_internal/pub/lib/src/command/serve.dart
+++ b/sdk/lib/_internal/pub/lib/src/command/serve.dart
@@ -57,7 +57,7 @@ class ServeCommand extends PubCommand {
return flushThenExit(exit_codes.USAGE);
}
- return ensureLockFileIsUpToDate().then((_) {
+ return entrypoint.ensureLockFileIsUpToDate().then((_) {
return entrypoint.loadPackageGraph();
}).then((graph) {
// TODO(rnystrom): Add support for dart2dart transformer here.
@@ -116,24 +116,4 @@ class ServeCommand extends PubCommand {
return completer.future;
});
}
-
- /// Gets dependencies if the lockfile is out of date with respect to the
- /// pubspec.
- Future ensureLockFileIsUpToDate() {
- return new Future.sync(() {
- // The server relies on an up-to-date lockfile, so get first if needed.
- if (!entrypoint.isLockFileUpToDate()) {
- if (entrypoint.lockFileExists) {
- log.message(
- "Your pubspec has changed, so we need to update your lockfile:");
- } else {
- log.message(
- "You don't have a lockfile, so we need to generate that:");
- }
- return entrypoint.getDependencies().then((_) {
- log.message("Got dependencies!");
- });
- }
- });
- }
}

Powered by Google App Engine