Index: utils/pub/validator/lib.dart |
diff --git a/utils/pub/validator/lib.dart b/utils/pub/validator/lib.dart |
index 8b9707f7b75fc9a9759e1f72c38f8e8a7af9d476..39b71afa45383b2bc9d210c7804b5e37e4dc9292 100644 |
--- a/utils/pub/validator/lib.dart |
+++ b/utils/pub/validator/lib.dart |
@@ -24,8 +24,8 @@ class LibValidator extends Validator { |
return dirExists(libDir).chain((libDirExists) { |
if (!libDirExists) { |
- errors.add('Your package must have a "lib/" directory so users have ' |
- 'something to import.'); |
+ errors.add('You must have a "lib" directory.\n' |
+ "Without that, users cannot import any code from your package."); |
return new Future.immediate(null); |
} |
@@ -39,11 +39,12 @@ class LibValidator extends Validator { |
return listDir(libDir).transform((files) { |
files = files.map((file) => relativeTo(file, libDir)); |
if (files.isEmpty) { |
- errors.add('The "lib/" directory may not be empty so users have ' |
- 'something to import'); |
+ errors.add('You must have a non-empty "lib" directory.\n' |
+ "Without that, users cannot import any code from your package."); |
} else if (files.length == 1 && files.first == "src") { |
- errors.add('The "lib/" directory must contain something other than ' |
- '"src/" so users have something to import'); |
+ errors.add('The "lib" directory must contain something other than ' |
+ '"src".\n' |
+ "Otherwise, users cannot import any code from your package."); |
} |
}); |
}); |