Chromium Code Reviews| Index: utils/pub/validator/dependency.dart |
| diff --git a/utils/pub/validator/dependency.dart b/utils/pub/validator/dependency.dart |
| index 66d2ae22f53cddb804d42096f8d7c2cb46674fc3..50655f30f982060754fb1075e587115342458f9d 100644 |
| --- a/utils/pub/validator/dependency.dart |
| +++ b/utils/pub/validator/dependency.dart |
| @@ -31,6 +31,14 @@ class DependencyValidator extends Validator { |
| return _warnAboutConstraint(dependency); |
| } |
| + if (dependency.name == entrypoint.root.name) { |
| + warnings.add('You don\'t need to explicitly depend on your own ' |
| + 'package.\n' |
| + 'Pub will make "package:${entrypoint.root.name}" imports work ' |
| + 'automatically.'); |
|
Bob Nystrom
2013/01/03 20:52:45
I find the future tense here a bit confusing. How
nweiz
2013/01/03 21:08:12
Done.
|
| + return; |
| + } |
| + |
| return new Future.immediate(null); |
| }); |
| } |