Index: sdk/lib/_internal/pub/lib/src/validator/dependency.dart |
diff --git a/sdk/lib/_internal/pub/lib/src/validator/dependency.dart b/sdk/lib/_internal/pub/lib/src/validator/dependency.dart |
index c147f7b2f7492e4d3e041ce68b7878b3cfa659e3..a1a8f992e4b7847d94c4921b09dd6edbed685a91 100644 |
--- a/sdk/lib/_internal/pub/lib/src/validator/dependency.dart |
+++ b/sdk/lib/_internal/pub/lib/src/validator/dependency.dart |
@@ -22,7 +22,7 @@ class DependencyValidator extends Validator { |
Future validate() { |
return Future.forEach(entrypoint.root.pubspec.dependencies, (dependency) { |
- if (dependency.source is! HostedSource) { |
+ if (dependency.source != "hosted") { |
return _warnAboutSource(dependency); |
} |
@@ -59,11 +59,11 @@ class DependencyValidator extends Validator { |
// Path sources are errors. Other sources are just warnings. |
var messages = warnings; |
- if (dep.source is PathSource) { |
+ if (dep.source == "path") { |
messages = errors; |
} |
- messages.add('Don\'t depend on "${dep.name}" from the ${dep.source.name} ' |
+ messages.add('Don\'t depend on "${dep.name}" from the ${dep.source} ' |
'source. Use the hosted source instead. For example:\n' |
'\n' |
'dependencies:\n' |