OLD | NEW |
1 library pub.source; | 1 library pub.source; |
2 import 'dart:async'; | 2 import 'dart:async'; |
| 3 import 'package:pub_semver/pub_semver.dart'; |
3 import 'package.dart'; | 4 import 'package.dart'; |
4 import 'pubspec.dart'; | 5 import 'pubspec.dart'; |
5 import 'system_cache.dart'; | 6 import 'system_cache.dart'; |
6 import 'version.dart'; | |
7 abstract class Source { | 7 abstract class Source { |
8 String get name; | 8 String get name; |
9 final bool hasMultipleVersions = false; | 9 final bool hasMultipleVersions = false; |
10 bool get isDefault => systemCache.sources.defaultSource == this; | 10 bool get isDefault => systemCache.sources.defaultSource == this; |
11 SystemCache get systemCache { | 11 SystemCache get systemCache { |
12 assert(_systemCache != null); | 12 assert(_systemCache != null); |
13 return _systemCache; | 13 return _systemCache; |
14 } | 14 } |
15 SystemCache _systemCache; | 15 SystemCache _systemCache; |
16 void bind(SystemCache systemCache) { | 16 void bind(SystemCache systemCache) { |
(...skipping 19 matching lines...) Expand all Loading... |
36 dynamic serializeDescription(String containingPath, description) { | 36 dynamic serializeDescription(String containingPath, description) { |
37 return description; | 37 return description; |
38 } | 38 } |
39 String formatDescription(String containingPath, description) { | 39 String formatDescription(String containingPath, description) { |
40 return description.toString(); | 40 return description.toString(); |
41 } | 41 } |
42 bool descriptionsEqual(description1, description2); | 42 bool descriptionsEqual(description1, description2); |
43 Future<PackageId> resolveId(PackageId id) => new Future.value(id); | 43 Future<PackageId> resolveId(PackageId id) => new Future.value(id); |
44 String toString() => name; | 44 String toString() => name; |
45 } | 45 } |
OLD | NEW |