Chromium Code Reviews

Unified Diff: lib/src/validator/dependency.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.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « lib/src/system_cache.dart ('k') | test/get/git/require_pubspec_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/validator/dependency.dart
diff --git a/lib/src/validator/dependency.dart b/lib/src/validator/dependency.dart
index 8f09cdbb37ff36b9db40588b7debd51fbecc6c37..ccb5e23d38eb60a8f8806622523f73604c940c72 100644
--- a/lib/src/validator/dependency.dart
+++ b/lib/src/validator/dependency.dart
@@ -11,6 +11,7 @@ import 'package:pub_semver/pub_semver.dart';
import '../entrypoint.dart';
import '../log.dart' as log;
import '../package.dart';
+import '../source/hosted.dart';
import '../validator.dart';
/// The range of all pub versions that don't support `^` version constraints.
@@ -67,8 +68,8 @@ class DependencyValidator extends Validator {
Future _warnAboutSource(PackageDep dep) async {
var versions;
try {
- var ref = new PackageRef(dep.name, 'hosted', dep.name);
- var ids = await entrypoint.cache.sources['hosted'].getVersions(ref);
+ var ids = await entrypoint.cache.sources['hosted']
+ .getVersions(HostedSource.refFor(dep.name));
versions = ids.map((id) => id.version).toList();
} catch (error) {
versions = [];
« no previous file with comments | « lib/src/system_cache.dart ('k') | test/get/git/require_pubspec_test.dart » ('j') | no next file with comments »

Powered by Google App Engine