| 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('package'); | 5 library package; |
| 6 | 6 |
| 7 #import('io.dart'); | 7 import 'io.dart'; |
| 8 #import('pubspec.dart'); | 8 import 'pubspec.dart'; |
| 9 #import('source.dart'); | 9 import 'source.dart'; |
| 10 #import('source_registry.dart'); | 10 import 'source_registry.dart'; |
| 11 #import('version.dart'); | 11 import 'version.dart'; |
| 12 | 12 |
| 13 /** | 13 /** |
| 14 * A named, versioned, unit of code and resource reuse. | 14 * A named, versioned, unit of code and resource reuse. |
| 15 */ | 15 */ |
| 16 class Package { | 16 class Package { |
| 17 /** | 17 /** |
| 18 * Loads the package whose root directory is [packageDir]. [name] is the | 18 * Loads the package whose root directory is [packageDir]. [name] is the |
| 19 * expected name of that package (e.g. the name given in the dependency), or | 19 * expected name of that package (e.g. the name given in the dependency), or |
| 20 * null if the package being loaded is the entrypoint package. | 20 * null if the package being loaded is the entrypoint package. |
| 21 */ | 21 */ |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 | 213 |
| 214 class PubspecNameMismatchException implements Exception { | 214 class PubspecNameMismatchException implements Exception { |
| 215 final String expectedName; | 215 final String expectedName; |
| 216 final String actualName; | 216 final String actualName; |
| 217 | 217 |
| 218 PubspecNameMismatchException(this.expectedName, this.actualName); | 218 PubspecNameMismatchException(this.expectedName, this.actualName); |
| 219 | 219 |
| 220 String toString() => 'The name you specified for your dependency, ' | 220 String toString() => 'The name you specified for your dependency, ' |
| 221 '"$expectedName", doesn\'t match the name "$actualName" in its pubspec.'; | 221 '"$expectedName", doesn\'t match the name "$actualName" in its pubspec.'; |
| 222 } | 222 } |
| OLD | NEW |