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

Unified Diff: utils/pub/entrypoint.dart

Issue 12047096: Get rid of RootSource. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 | « no previous file | utils/pub/package.dart » ('j') | utils/pub/package.dart » ('J')
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 c250897c8ab5a641123c99e2a6ea479d5298cec1..30bfeb1650a37f6af89274ae9180f255b30578eb 100644
--- a/utils/pub/entrypoint.dart
+++ b/utils/pub/entrypoint.dart
@@ -9,7 +9,6 @@ import 'io.dart';
import 'lock_file.dart';
import 'log.dart' as log;
import 'package.dart';
-import 'root_source.dart';
import 'system_cache.dart';
import 'utils.dart';
import 'version.dart';
@@ -132,7 +131,7 @@ class Entrypoint {
Future _installDependencies(List<PackageId> packageVersions) {
return cleanDir(path).then((_) {
return Future.wait(packageVersions.mappedBy((id) {
- if (id.source is RootSource) return new Future.immediate(id);
+ if (id.isRoot) return new Future.immediate(id);
return install(id);
}));
}).then(_saveLockFile)
@@ -161,7 +160,7 @@ class Entrypoint {
Future _saveLockFile(List<PackageId> packageIds) {
var lockFile = new LockFile.empty();
for (var id in packageIds) {
- if (id.source is! RootSource) lockFile.packages[id.name] = id;
+ if (!id.isRoot) lockFile.packages[id.name] = id;
}
var lockFilePath = join(root.dir, 'pubspec.lock');
« no previous file with comments | « no previous file | utils/pub/package.dart » ('j') | utils/pub/package.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698