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

Unified Diff: lib/src/source/cached.dart

Issue 1528523003: Clean up the semantics of package descriptions. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Code review changes Created 5 years 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 | « lib/src/source.dart ('k') | lib/src/source/git.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/source/cached.dart
diff --git a/lib/src/source/cached.dart b/lib/src/source/cached.dart
index bdfc34cf4c2d04ecfdbfbdbaaa7dde23746c7342..bd1736b106e6ff931761db4d4f8260dec43ce426 100644
--- a/lib/src/source/cached.dart
+++ b/lib/src/source/cached.dart
@@ -30,7 +30,7 @@ abstract class CachedSource extends Source {
///
/// Otherwise, defers to the subclass.
Future<Pubspec> doDescribe(PackageId id) async {
- var packageDir = getDirectory(await resolveId(id));
+ var packageDir = getDirectory(id);
if (fileExists(path.join(packageDir, "pubspec.yaml"))) {
return new Pubspec.load(packageDir, systemCache.sources,
expectedName: id.name);
@@ -52,11 +52,8 @@ abstract class CachedSource extends Source {
});
}
- /// Determines if the package with [id] is already downloaded to the system
- /// cache.
- ///
- /// Depending on the source, this may throw an [ArgumentError] if [id] isn't
- /// resolved using [resolveId].
+ /// Determines if the package identified by [id] is already downloaded to the
+ /// system cache.
bool isInSystemCache(PackageId id) => dirExists(getDirectory(id));
/// Downloads the package identified by [id] to the system cache.
« no previous file with comments | « lib/src/source.dart ('k') | lib/src/source/git.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698