| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #library('entrypoint'); |
| 6 |
| 7 #import('io.dart'); |
| 8 #import('package.dart'); |
| 9 #import('system_cache.dart'); |
| 10 #import('version.dart'); |
| 11 #import('utils.dart'); |
| 12 |
| 5 /** | 13 /** |
| 6 * Pub operates over a directed graph of dependencies that starts at a root | 14 * Pub operates over a directed graph of dependencies that starts at a root |
| 7 * "entrypoint" package. This is typically the package where the current | 15 * "entrypoint" package. This is typically the package where the current |
| 8 * working directory is located. An entrypoint knows the [root] package it is | 16 * working directory is located. An entrypoint knows the [root] package it is |
| 9 * associated with and is responsible for managing the "packages" directory | 17 * associated with and is responsible for managing the "packages" directory |
| 10 * for it. | 18 * for it. |
| 11 * | 19 * |
| 12 * That directory contains symlinks to all packages used by an app. These links | 20 * That directory contains symlinks to all packages used by an app. These links |
| 13 * point either to the [SystemCache] or to some other location on the local | 21 * point either to the [SystemCache] or to some other location on the local |
| 14 * filesystem. | 22 * filesystem. |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 * package we should use starting from this entrypoint. | 137 * package we should use starting from this entrypoint. |
| 130 */ | 138 */ |
| 131 Future<PackageId> resolve(PackageRef ref) { | 139 Future<PackageId> resolve(PackageRef ref) { |
| 132 // TODO(rnystrom): This should use the lockfile to select the right version | 140 // TODO(rnystrom): This should use the lockfile to select the right version |
| 133 // once that's implemented. If the lockfile doesn't exist, it should | 141 // once that's implemented. If the lockfile doesn't exist, it should |
| 134 // generate it. In the meantime, here's a dumb implementation: | 142 // generate it. In the meantime, here's a dumb implementation: |
| 135 return new Future.immediate( | 143 return new Future.immediate( |
| 136 new PackageId(ref.source, Version.none, ref.description)); | 144 new PackageId(ref.source, Version.none, ref.description)); |
| 137 } | 145 } |
| 138 } | 146 } |
| OLD | NEW |