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

Issue 632483002: Printing a useful error message if a version field is a num (Closed)

Created:
6 years, 2 months ago by srawlins
Modified:
6 years, 2 months ago
Reviewers:
Bob Nystrom
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Printing a useful error message if a version field is a num BUG= https://code.google.com/p/dart/issues/detail?id=21229 Example: $ cat pubspec.yaml name: Name description: A sample command-line application version: 1.0 $ pub get Resolving dependencies... Error on line 3, column 10 of pubspec.yaml: "version" field must have three numeric components: major, minor, and patch. Instead of "1.0", consider "1.0.0". version: 1.0 ^^^ also $ cat pubspec.yaml name: Name description: A sample command-line application version: 1 $ pub get Resolving dependencies... Error on line 3, column 10 of pubspec.yaml: "version" field must have three numeric components: major, minor, and patch. Instead of "1", consider "1.0.0". version: 1 ^ R=rnystrom@google.com Committed: https://code.google.com/p/dart/source/detail?r=40971

Patch Set 1 #

Total comments: 2

Patch Set 2 : Better bad pub version error message #

Patch Set 3 : Adding pubspec bad version tests #

Total comments: 6

Patch Set 4 : Minor comments #

Patch Set 5 : Merging master #

Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -2 lines) Patch
M sdk/lib/_internal/pub/lib/src/pubspec.dart View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download
M sdk/lib/_internal/pub/test/pubspec_test.dart View 1 2 1 chunk +17 lines, -1 line 0 comments Download
M sdk/lib/_internal/pub_generated/lib/src/pubspec.dart View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download
M sdk/lib/_internal/pub_generated/test/pubspec_test.dart View 1 2 1 chunk +15 lines, -1 line 0 comments Download

Messages

Total messages: 9 (1 generated)
srawlins
Hi Bob, would you mind reviewing? Feel free to reassign; I just saw your name ...
6 years, 2 months ago (2014-10-04 19:13:58 UTC) #2
Bob Nystrom
I'm the right person to review this. For anything under sdk/lib/_internal/pub, you can pick me ...
6 years, 2 months ago (2014-10-06 16:19:34 UTC) #3
srawlins
Thanks Bob, I've updated the description with the new output. Much more helpful. https://codereview.chromium.org/632483002/diff/1/sdk/lib/_internal/pub/lib/src/pubspec.dart File ...
6 years, 2 months ago (2014-10-06 17:33:08 UTC) #4
Bob Nystrom
Have you uploaded the changes? Also, tests please. You can add them to pub/test/pubspec_test.dart.
6 years, 2 months ago (2014-10-06 17:35:53 UTC) #5
srawlins
Ooh thanks Bob. I didn't see there were error tests for pubspec. How do these ...
6 years, 2 months ago (2014-10-06 18:03:11 UTC) #6
Bob Nystrom
Two nits, then LGTM. Thanks! https://codereview.chromium.org/632483002/diff/40001/sdk/lib/_internal/pub/lib/src/pubspec.dart File sdk/lib/_internal/pub/lib/src/pubspec.dart (right): https://codereview.chromium.org/632483002/diff/40001/sdk/lib/_internal/pub/lib/src/pubspec.dart#newcode78 sdk/lib/_internal/pub/lib/src/pubspec.dart:78: String fixed = '$version.0'; ...
6 years, 2 months ago (2014-10-06 19:21:10 UTC) #7
srawlins
https://codereview.chromium.org/632483002/diff/40001/sdk/lib/_internal/pub/lib/src/pubspec.dart File sdk/lib/_internal/pub/lib/src/pubspec.dart (right): https://codereview.chromium.org/632483002/diff/40001/sdk/lib/_internal/pub/lib/src/pubspec.dart#newcode78 sdk/lib/_internal/pub/lib/src/pubspec.dart:78: String fixed = '$version.0'; On 2014/10/06 19:21:10, Bob Nystrom ...
6 years, 2 months ago (2014-10-06 19:44:16 UTC) #8
srawlins
6 years, 2 months ago (2014-10-07 18:55:12 UTC) #9
Message was sent while issue was closed.
Committed patchset #5 (id:80001) manually as 40971 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698