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

Unified Diff: utils/pub/hosted_source.dart

Issue 12092080: Validate packages against their SDK constraints. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. Created 7 years, 11 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 | « utils/pub/git_source.dart ('k') | utils/pub/io.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/hosted_source.dart
diff --git a/utils/pub/hosted_source.dart b/utils/pub/hosted_source.dart
index b774bc01ef8d8c005a0cef55a7b3ca20537d9240..c6cdc0d67eec6266bb1d65795f53eb37d2768a43 100644
--- a/utils/pub/hosted_source.dart
+++ b/utils/pub/hosted_source.dart
@@ -93,13 +93,15 @@ class HostedSource extends Source {
/// for each separate repository URL that's used on the system. Each of these
/// subdirectories then contains a subdirectory for each package installed
/// from that site.
- String systemCacheDirectory(PackageId id) {
+ Future<String> systemCacheDirectory(PackageId id) {
var parsed = _parseDescription(id.description);
var url = parsed.last.replaceAll(new RegExp(r"^https?://"), "");
var urlDir = replace(url, new RegExp(r'[<>:"\\/|?*%]'), (match) {
return '%${match[0].charCodeAt(0)}';
});
- return join(systemCacheRoot, urlDir, "${parsed.first}-${id.version}");
+
+ return new Future.immediate(
+ join(systemCacheRoot, urlDir, "${parsed.first}-${id.version}"));
}
String packageName(description) => _parseDescription(description).first;
« no previous file with comments | « utils/pub/git_source.dart ('k') | utils/pub/io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698