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

Unified Diff: utils/pub/validator/dependency.dart

Issue 12208138: Take Sam Elkhateeb's path for "path" dependencies and clean it up some. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. Created 7 years, 10 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/system_cache.dart ('k') | utils/tests/pub/install/path/absolute_path_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/validator/dependency.dart
diff --git a/utils/pub/validator/dependency.dart b/utils/pub/validator/dependency.dart
index a848c545574db233111e1e1e698822e96915c8c1..de027385ffdf75a6b7afc640cbc63482ecfb91a4 100644
--- a/utils/pub/validator/dependency.dart
+++ b/utils/pub/validator/dependency.dart
@@ -10,6 +10,7 @@ import '../entrypoint.dart';
import '../hosted_source.dart';
import '../http.dart';
import '../package.dart';
+import '../path_source.dart';
import '../utils.dart';
import '../validator.dart';
import '../version.dart';
@@ -62,7 +63,13 @@ class DependencyValidator extends Validator {
}
}
- warnings.add('Don\'t depend on "${ref.name}" from the ${ref.source.name} '
+ // Path sources are errors. Other sources are just warnings.
+ var messages = warnings;
+ if (ref.source is PathSource) {
+ messages = errors;
+ }
+
+ messages.add('Don\'t depend on "${ref.name}" from the ${ref.source.name} '
'source. Use the hosted source instead. For example:\n'
'\n'
'dependencies:\n'
« no previous file with comments | « utils/pub/system_cache.dart ('k') | utils/tests/pub/install/path/absolute_path_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698