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

Issue 22824023: Start sketching out a buildAll() method. (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

Start sketching out a buildAll() method. BUG= R=nweiz@google.com Committed: https://code.google.com/p/dart/source/detail?r=26452

Patch Set 1 #

Patch Set 2 : Revise and make it actually work. #

Patch Set 3 : Rebase. #

Patch Set 4 : Don't wrap a single error in an aggregate. #

Total comments: 24

Patch Set 5 : Revise. #

Total comments: 8

Patch Set 6 : Revise. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+266 lines, -21 lines) Patch
M pkg/barback/lib/barback.dart View 1 1 chunk +2 lines, -1 line 0 comments Download
M pkg/barback/lib/src/asset_cascade.dart View 1 2 3 4 5 2 chunks +4 lines, -0 lines 0 comments Download
M pkg/barback/lib/src/barback.dart View 1 2 3 4 5 2 chunks +9 lines, -0 lines 0 comments Download
M pkg/barback/lib/src/build_result.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M pkg/barback/lib/src/errors.dart View 1 2 3 4 5 3 chunks +75 lines, -15 lines 0 comments Download
M pkg/barback/lib/src/package_graph.dart View 1 2 3 4 5 4 chunks +44 lines, -1 line 0 comments Download
M pkg/barback/lib/src/phase.dart View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M pkg/barback/test/asset_set_test.dart View 1 2 1 chunk +0 lines, -1 line 0 comments Download
A pkg/barback/test/package_graph/get_all_assets_test.dart View 1 2 3 4 1 chunk +77 lines, -0 lines 0 comments Download
M pkg/barback/test/utils.dart View 1 2 3 4 5 4 chunks +53 lines, -2 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Bob Nystrom
This still needs tests and better docs, but what do you think about this approach?
7 years, 4 months ago (2013-08-17 00:11:00 UTC) #1
Bob Nystrom
This has tests now and actually works. It also patches in your in-flight change, so ...
7 years, 4 months ago (2013-08-19 21:58:54 UTC) #2
nweiz
On 2013/08/19 21:58:54, Bob Nystrom wrote: > This has tests now and actually works. It ...
7 years, 4 months ago (2013-08-20 00:32:24 UTC) #3
Bob Nystrom
Rebased and fixed a bit. PTAL!
7 years, 4 months ago (2013-08-20 16:23:40 UTC) #4
nweiz
https://codereview.chromium.org/22824023/diff/12001/pkg/barback/lib/src/barback.dart File pkg/barback/lib/src/barback.dart (right): https://codereview.chromium.org/22824023/diff/12001/pkg/barback/lib/src/barback.dart#newcode96 pkg/barback/lib/src/barback.dart:96: /// returned future will complete with an error if ...
7 years, 4 months ago (2013-08-20 19:59:26 UTC) #5
Bob Nystrom
Thanks! https://codereview.chromium.org/22824023/diff/12001/pkg/barback/lib/src/barback.dart File pkg/barback/lib/src/barback.dart (right): https://codereview.chromium.org/22824023/diff/12001/pkg/barback/lib/src/barback.dart#newcode96 pkg/barback/lib/src/barback.dart:96: /// returned future will complete with an error ...
7 years, 4 months ago (2013-08-20 21:29:20 UTC) #6
nweiz
A couple more comments, otherwise LGTM. https://codereview.chromium.org/22824023/diff/12001/pkg/barback/lib/src/package_graph.dart File pkg/barback/lib/src/package_graph.dart (right): https://codereview.chromium.org/22824023/diff/12001/pkg/barback/lib/src/package_graph.dart#newcode94 pkg/barback/lib/src/package_graph.dart:94: _lastError = error; ...
7 years, 4 months ago (2013-08-20 22:29:03 UTC) #7
Bob Nystrom
Committed patchset #6 manually as r26452 (presubmit successful).
7 years, 4 months ago (2013-08-21 18:09:49 UTC) #8
Bob Nystrom
7 years, 4 months ago (2013-08-21 18:10:23 UTC) #9
Message was sent while issue was closed.
https://codereview.chromium.org/22824023/diff/12001/pkg/barback/lib/src/packa...
File pkg/barback/lib/src/package_graph.dart (right):

https://codereview.chromium.org/22824023/diff/12001/pkg/barback/lib/src/packa...
pkg/barback/lib/src/package_graph.dart:94: _lastError = error;
On 2013/08/20 22:29:03, nweiz wrote:
> On 2013/08/20 21:29:20, Bob Nystrom wrote:
> > On 2013/08/20 19:59:26, nweiz wrote:
> > > This is definitely not right. The error that's caught here almost
certainly
> > > won't be a BarbackException.
> > 
> > Removed.
> > 
> > I'm not sure what the best thing to do is here. In the case where you're
> calling
> > buildAllAssets(), you probably *aren't* listening to the streams. That means
a
> > programmatic error will get dropped on the floor.
> > 
> > I think I'd prefer to pipe that through the resulting future if that occurs
> > after you've called buildAllAssets(), even though it isn't a
BarbackException.
> > What do you think?
> 
> I think it's reasonable for [getAllAssets] to throw a non-BarbackException;
the
> documentation can explain the semantic difference between the two.
> 
> I think the best thing to do is to resurrect _lastError, but use it only for
> programmatic errors. If there's been a programmatic error at any point,
> [getAllAssets] should throw it, because it means that the package graph is in
an
> inconsistent state.

Done.

https://codereview.chromium.org/22824023/diff/18001/pkg/barback/lib/src/error...
File pkg/barback/lib/src/errors.dart (right):

https://codereview.chromium.org/22824023/diff/18001/pkg/barback/lib/src/error...
pkg/barback/lib/src/errors.dart:23: /// Recursively replaces any occurrences of
[AggregateException] in [errors]
On 2013/08/20 22:29:03, nweiz wrote:
> Remove "Recursively"

Done.

https://codereview.chromium.org/22824023/diff/18001/pkg/barback/lib/src/error...
pkg/barback/lib/src/errors.dart:59: String toString() => "Multiple errors
occurred:\n\n- ${errors.join('\n- ')}";
On 2013/08/20 22:29:03, nweiz wrote:
> We should be prepared for an individual error to be multiple lines long.
Barback
> already has [prefixLines] in utils, so you can use that.

Done.

https://codereview.chromium.org/22824023/diff/18001/pkg/barback/lib/src/error...
pkg/barback/lib/src/errors.dart:104: abstract class WrappedException implements
BarbackException {
On 2013/08/20 22:29:03, nweiz wrote:
> This class should be private.

Done.

https://codereview.chromium.org/22824023/diff/18001/pkg/barback/test/utils.dart
File pkg/barback/test/utils.dart (right):

https://codereview.chromium.org/22824023/diff/18001/pkg/barback/test/utils.da...
pkg/barback/test/utils.dart:236: for (var expected in expected) {
On 2013/08/20 22:29:03, nweiz wrote:
> I'm not a fan of shadowing this variable name.

Done. Mistake.

Powered by Google App Engine
This is Rietveld 408576698