| 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('source'); | 5 library source; |
| 6 | 6 |
| 7 #import('io.dart'); | 7 import 'io.dart'; |
| 8 #import('package.dart'); | 8 import 'package.dart'; |
| 9 #import('pubspec.dart'); | 9 import 'pubspec.dart'; |
| 10 #import('system_cache.dart'); | 10 import 'system_cache.dart'; |
| 11 #import('version.dart'); | 11 import 'version.dart'; |
| 12 | 12 |
| 13 /** | 13 /** |
| 14 * A source from which to install packages. | 14 * A source from which to install packages. |
| 15 * | 15 * |
| 16 * Each source has many packages that it looks up using [PackageId]s. The source | 16 * Each source has many packages that it looks up using [PackageId]s. The source |
| 17 * is responsible for installing these packages to the package cache. | 17 * is responsible for installing these packages to the package cache. |
| 18 */ | 18 */ |
| 19 abstract class Source { | 19 abstract class Source { |
| 20 /** | 20 /** |
| 21 * The name of the source. Should be lower-case, suitable for use in a | 21 * The name of the source. Should be lower-case, suitable for use in a |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 * | 183 * |
| 184 * The returned [PackageId] may have a description field that's invalid | 184 * The returned [PackageId] may have a description field that's invalid |
| 185 * according to [validateDescription], although it must still be serializable | 185 * according to [validateDescription], although it must still be serializable |
| 186 * to JSON and YAML. It must also be equal to [id] according to | 186 * to JSON and YAML. It must also be equal to [id] according to |
| 187 * [descriptionsEqual]. | 187 * [descriptionsEqual]. |
| 188 * | 188 * |
| 189 * By default, this just returns [id]. | 189 * By default, this just returns [id]. |
| 190 */ | 190 */ |
| 191 Future<PackageId> resolveId(PackageId id) => new Future.immediate(id); | 191 Future<PackageId> resolveId(PackageId id) => new Future.immediate(id); |
| 192 } | 192 } |
| OLD | NEW |