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

Issue 12089076: Add a pub validator for compiled dartdoc output. (Closed)

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

Description

Add a pub validator for compiled dartdoc output. BUG=7045 Committed: https://code.google.com/p/dart/source/detail?r=17943

Patch Set 1 #

Total comments: 6

Patch Set 2 : Code review changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+92 lines, -1 line) Patch
M utils/pub/utils.dart View 1 chunk +12 lines, -0 lines 0 comments Download
M utils/pub/validator.dart View 2 chunks +3 lines, -1 line 0 comments Download
A utils/pub/validator/compiled_dartdoc.dart View 1 1 chunk +47 lines, -0 lines 0 comments Download
M utils/tests/pub/validator_test.dart View 4 chunks +30 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
nweiz
7 years, 10 months ago (2013-01-30 23:45:09 UTC) #1
Bob Nystrom
I worry that this will just annoy users for little benefit. But otherwise LGTM. https://codereview.chromium.org/12089076/diff/1/utils/pub/utils.dart ...
7 years, 10 months ago (2013-01-31 18:54:54 UTC) #2
nweiz
7 years, 10 months ago (2013-01-31 20:31:54 UTC) #3
https://codereview.chromium.org/12089076/diff/1/utils/pub/utils.dart
File utils/pub/utils.dart (right):

https://codereview.chromium.org/12089076/diff/1/utils/pub/utils.dart#newcode131
utils/pub/utils.dart:131: }
On 2013/01/31 18:54:54, Bob Nystrom wrote:
> It took me a surprisingly long while to tease apart how this works.
> 
> One small simplification would be to not allow mixed mode filtering: require
> test() to always return Future<bool>. That would let you type it, and make the
> code a bit simpler.

Doing that makes the code using this worse. I think this is about as clear as it
can be, until Stream.where supports asynchronous return values.

https://codereview.chromium.org/12089076/diff/1/utils/pub/validator/compiled_...
File utils/pub/validator/compiled_dartdoc.dart (right):

https://codereview.chromium.org/12089076/diff/1/utils/pub/validator/compiled_...
utils/pub/validator/compiled_dartdoc.dart:16: /// A validator that validates
that a package doesn't contain compiled Dartdoc
On 2013/01/31 18:54:54, Bob Nystrom wrote:
> "A validator that validates" -> "Validates".

Done.

https://codereview.chromium.org/12089076/diff/1/utils/pub/validator/compiled_...
utils/pub/validator/compiled_dartdoc.dart:40: "$relativePath.\n"
On 2013/01/31 18:54:54, Bob Nystrom wrote:
> How about:
> 
> Avoid putting generated documentation in doc/.
> That directory is intended to contain hand-created documentation.
> Generated documentation just bloats the package with redundant data.

The "that directory" text only makes sense if they put it in "doc" specifically,
which they won't always do. I'll use the other lines, though.

Powered by Google App Engine
This is Rietveld 408576698