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

Issue 11543006: Add a validator that checks that the lib directory is not empty. (Closed)

Created:
8 years ago by nweiz
Modified:
8 years ago
Reviewers:
Bob Nystrom
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Add a validator that checks that the lib directory is not empty. BUG=7045 Committed: https://code.google.com/p/dart/source/detail?r=16010

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+96 lines, -20 lines) Patch
M utils/pub/validator.dart View 2 chunks +2 lines, -0 lines 0 comments Download
A utils/pub/validator/lib.dart View 1 chunk +43 lines, -0 lines 2 comments Download
M utils/tests/pub/oauth2_test.dart View 1 chunk +1 line, -6 lines 0 comments Download
M utils/tests/pub/pub_lish_test.dart View 1 chunk +1 line, -6 lines 0 comments Download
M utils/tests/pub/test_pub.dart View 1 chunk +9 lines, -0 lines 0 comments Download
M utils/tests/pub/validator_test.dart View 4 chunks +40 lines, -8 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
nweiz
8 years ago (2012-12-12 00:01:38 UTC) #1
Bob Nystrom
One suggestion. Otherwise LGTM. https://codereview.chromium.org/11543006/diff/1/utils/pub/validator/lib.dart File utils/pub/validator/lib.dart (right): https://codereview.chromium.org/11543006/diff/1/utils/pub/validator/lib.dart#newcode26 utils/pub/validator/lib.dart:26: errors.add('Your package must have a ...
8 years ago (2012-12-12 00:11:51 UTC) #2
nweiz
https://codereview.chromium.org/11543006/diff/1/utils/pub/validator/lib.dart File utils/pub/validator/lib.dart (right): https://codereview.chromium.org/11543006/diff/1/utils/pub/validator/lib.dart#newcode26 utils/pub/validator/lib.dart:26: errors.add('Your package must have a "lib/" directory so users ...
8 years ago (2012-12-12 00:53:34 UTC) #3
Bob Nystrom
8 years ago (2012-12-12 01:03:56 UTC) #4
Message was sent while issue was closed.
On 2012/12/12 00:53:34, nweiz wrote:
> https://codereview.chromium.org/11543006/diff/1/utils/pub/validator/lib.dart
> File utils/pub/validator/lib.dart (right):
> 
>
https://codereview.chromium.org/11543006/diff/1/utils/pub/validator/lib.dart#...
> utils/pub/validator/lib.dart:26: errors.add('Your package must have a "lib/"
> directory so users have '
> On 2012/12/12 00:11:51, Bob Nystrom wrote:
> > In pub install, it's only a warning if you depend on a package with no lib
> > directory. Can it be a warning here too?
> 
> We decided to make this an error because there's no utility at all in
publishing
> a package that contains no resources and is un-importable, other than
squatting
> on a package name, which I don't think we want to encourage.

OK.

> 
> I thought the warning from depending on a package without a lib directory was
> just a holdover from when we supported both package layouts. There's no reason
> that shouldn't be an error, either.

That definitely shouldn't be an error. Imagine your app uses foo which uses bar.
The latest version of bar lacks a lib dir but apparently foo isn't using it
anyway. It would be cruel for pub to not allow you to run your app just because
of that.

Powered by Google App Engine
This is Rietveld 408576698