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

Issue 22825024: Don't allow packages to depend on themselves. (Closed)

Created:
7 years, 4 months ago by Bob Nystrom
Modified:
7 years, 4 months ago
Reviewers:
nweiz
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Don't allow packages to depend on themselves. BUG=https://code.google.com/p/dart/issues/detail?id=12300 R=nweiz@google.com Committed: https://code.google.com/p/dart/source/detail?r=26543

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -22 lines) Patch
M sdk/lib/_internal/pub/lib/src/pubspec.dart View 3 chunks +8 lines, -4 lines 2 comments Download
M sdk/lib/_internal/pub/lib/src/validator/dependency.dart View 1 chunk +0 lines, -8 lines 0 comments Download
M sdk/lib/_internal/pub/test/pub_install_and_update_test.dart View 1 chunk +25 lines, -0 lines 0 comments Download
M sdk/lib/_internal/pub/test/pubspec_test.dart View 1 chunk +18 lines, -0 lines 0 comments Download
M sdk/lib/_internal/pub/test/validator/dependency_test.dart View 1 chunk +0 lines, -10 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Bob Nystrom
7 years, 4 months ago (2013-08-21 22:23:12 UTC) #1
nweiz
One suggestion, otherwise lgtm. https://codereview.chromium.org/22825024/diff/1/sdk/lib/_internal/pub/lib/src/pubspec.dart File sdk/lib/_internal/pub/lib/src/pubspec.dart (right): https://codereview.chromium.org/22825024/diff/1/sdk/lib/_internal/pub/lib/src/pubspec.dart#newcode259 sdk/lib/_internal/pub/lib/src/pubspec.dart:259: throw new FormatException("Package '$name' cannot ...
7 years, 4 months ago (2013-08-22 00:18:21 UTC) #2
Bob Nystrom
Committed patchset #1 manually as r26543 (presubmit successful).
7 years, 4 months ago (2013-08-22 18:09:30 UTC) #3
Bob Nystrom
7 years, 4 months ago (2013-08-22 18:09:30 UTC) #4
Message was sent while issue was closed.
Thanks!

https://codereview.chromium.org/22825024/diff/1/sdk/lib/_internal/pub/lib/src...
File sdk/lib/_internal/pub/lib/src/pubspec.dart (right):

https://codereview.chromium.org/22825024/diff/1/sdk/lib/_internal/pub/lib/src...
sdk/lib/_internal/pub/lib/src/pubspec.dart:259: throw new
FormatException("Package '$name' cannot depend on itself.");
On 2013/08/22 00:18:21, nweiz wrote:
> Rather than specifically including the package name for this error, perhaps we
> should catch all FormatExceptions and add the pubspec name, or include it
> manually in each one?

When one of these exceptions is thrown, the output is like:

Error parsing path/to/pubspec.yaml:
<error message here>

so the offending package is usually obvious. I thought putting the name
explicitly in this one made sense since it's the actual name that's the cause of
the error.

Powered by Google App Engine
This is Rietveld 408576698