| Index: lib/src/source.dart
|
| diff --git a/lib/src/source.dart b/lib/src/source.dart
|
| index 85218d349791722d4552b8c3c3eafa9298dd3338..e49b17f737a4cfda1ef444b231f2bb912751e47f 100644
|
| --- a/lib/src/source.dart
|
| +++ b/lib/src/source.dart
|
| @@ -107,10 +107,10 @@ abstract class Source {
|
|
|
| /// Returns the directory where this package can (or could) be found locally.
|
| ///
|
| - /// If the source is cached, this will be a path in the system cache. In that
|
| - /// case, this will return a directory even if the package has not been
|
| - /// installed into the cache yet.
|
| - Future<String> getDirectory(PackageId id);
|
| + /// If the source is cached, this will be a path in the system cache.
|
| + /// Depending on the source, this may throw an [ArgumentError] if [id] isn't
|
| + /// resolved using [resolveId].
|
| + String getDirectory(PackageId id);
|
|
|
| /// Gives the source a chance to interpret and validate the description for
|
| /// a package coming from this source.
|
| @@ -182,6 +182,9 @@ abstract class Source {
|
| /// By default, this just returns [id].
|
| Future<PackageId> resolveId(PackageId id) => new Future.value(id);
|
|
|
| + /// Returns whether [id] is fully-resolved, according to [resolveId].
|
| + bool isResolved(PackageId id) => true;
|
| +
|
| /// Returns the source's name.
|
| String toString() => name;
|
| }
|
|
|