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

Unified Diff: lib/src/system_cache.dart

Issue 1276673006: Make Source.getDirectory synchronous. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Created 5 years, 4 months 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/unknown.dart ('k') | test/lock_file_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/system_cache.dart
diff --git a/lib/src/system_cache.dart b/lib/src/system_cache.dart
index 424585da3a091c116a287c7ee6f1d688cc82f0e8..f0e627ca2e790d7dc282f7c345ebbbf054021e92 100644
--- a/lib/src/system_cache.dart
+++ b/lib/src/system_cache.dart
@@ -4,7 +4,6 @@
library pub.system_cache;
-import 'dart:async';
import 'dart:io';
import 'package:path/path.dart' as path;
@@ -79,7 +78,10 @@ class SystemCache {
}
/// Determines if the system cache contains the package identified by [id].
- Future<bool> contains(PackageId id) {
+ ///
+ /// Depending on the source, this may throw an [ArgumentError] if [id] isn't
+ /// resolved using [Source.resolveId].
+ bool contains(PackageId id) {
var source = sources[id.source];
if (source is! CachedSource) {
« no previous file with comments | « lib/src/source/unknown.dart ('k') | test/lock_file_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698