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

Unified Diff: sdk/lib/_internal/pub/lib/src/pubspec.dart

Issue 632483002: Printing a useful error message if a version field is a num (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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 | « no previous file | sdk/lib/_internal/pub_generated/lib/src/pubspec.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/pubspec.dart
diff --git a/sdk/lib/_internal/pub/lib/src/pubspec.dart b/sdk/lib/_internal/pub/lib/src/pubspec.dart
index 55b2df7ba57935ac2744e369b76012169e6515e1..75cfd8c76f9e3fcb700d36ce59a2caf8f237757f 100644
--- a/sdk/lib/_internal/pub/lib/src/pubspec.dart
+++ b/sdk/lib/_internal/pub/lib/src/pubspec.dart
@@ -74,6 +74,9 @@ class Pubspec {
}
var span = fields.nodes['version'].span;
+ if (version is num) {
+ _error('"version" field must be written in MAJOR.MINOR.PATCH[SUFFIX] format', span);
Bob Nystrom 2014/10/06 16:19:34 I think the all caps part might confuse users a bi
srawlins 2014/10/06 17:33:08 Love it! Done.
+ }
if (version is! String) {
_error('"version" field must be a string.', span);
}
« no previous file with comments | « no previous file | sdk/lib/_internal/pub_generated/lib/src/pubspec.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698