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

Issue 23199004: Support passing barback assets through phases in which they're unused. (Closed)

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

Description

Support passing barback assets through phases in which they're unused. R=rnystrom@google.com Committed: https://code.google.com/p/dart/source/detail?r=26220

Patch Set 1 #

Total comments: 14

Patch Set 2 : Code review changes #

Patch Set 3 : Fix a logic error. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+259 lines, -63 lines) Patch
M pkg/barback/lib/src/asset_cascade.dart View 3 chunks +6 lines, -24 lines 0 comments Download
M pkg/barback/lib/src/barback.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/barback/lib/src/errors.dart View 1 1 chunk +4 lines, -0 lines 0 comments Download
M pkg/barback/lib/src/package_graph.dart View 1 chunk +4 lines, -2 lines 0 comments Download
M pkg/barback/lib/src/phase.dart View 1 2 9 chunks +78 lines, -31 lines 0 comments Download
M pkg/barback/test/package_graph/errors_test.dart View 1 chunk +49 lines, -0 lines 0 comments Download
M pkg/barback/test/package_graph/transform_test.dart View 1 3 chunks +114 lines, -2 lines 0 comments Download
M pkg/barback/test/transformer/check_content.dart View 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
nweiz
7 years, 4 months ago (2013-08-14 18:13:32 UTC) #1
Bob Nystrom
A couple of suggestions but otherwise LGTM. Very nice. :) https://codereview.chromium.org/23199004/diff/1/pkg/barback/lib/src/errors.dart File pkg/barback/lib/src/errors.dart (right): https://codereview.chromium.org/23199004/diff/1/pkg/barback/lib/src/errors.dart#newcode33 ...
7 years, 4 months ago (2013-08-14 22:43:01 UTC) #2
nweiz
Committed patchset #3 manually as r26220 (presubmit successful).
7 years, 4 months ago (2013-08-15 21:06:46 UTC) #3
nweiz
7 years, 4 months ago (2013-08-15 21:07:01 UTC) #4
Message was sent while issue was closed.
https://codereview.chromium.org/23199004/diff/1/pkg/barback/lib/src/errors.dart
File pkg/barback/lib/src/errors.dart (right):

https://codereview.chromium.org/23199004/diff/1/pkg/barback/lib/src/errors.da...
pkg/barback/lib/src/errors.dart:33: /// This could only contain a single
transform, which indicates that a
On 2013/08/14 22:43:01, Bob Nystrom wrote:
> This took me a few reads to grok. How about "If this only contains a single
> transform, that indicates..."

Done.

https://codereview.chromium.org/23199004/diff/1/pkg/barback/lib/src/phase.dart
File pkg/barback/lib/src/phase.dart (right):

https://codereview.chromium.org/23199004/diff/1/pkg/barback/lib/src/phase.dar...
pkg/barback/lib/src/phase.dart:286: /// whether it's consumed by other
transforms.
On 2013/08/14 22:43:01, Bob Nystrom wrote:
> "transforms" -> "transforms in this phase".

Done.

https://codereview.chromium.org/23199004/diff/1/pkg/barback/lib/src/phase.dar...
pkg/barback/lib/src/phase.dart:294: var controller =
_passThroughControllers[node.id];
On 2013/08/14 22:43:01, Bob Nystrom wrote:
> How about just using putIfAbsent() here?

That doesn't work well when we need to do something different if it does exist
(set it available in this case).

https://codereview.chromium.org/23199004/diff/1/pkg/barback/lib/src/phase.dar...
pkg/barback/lib/src/phase.dart:304: controller.setRemoved();
On 2013/08/14 22:43:01, Bob Nystrom wrote:
> Nit, but I think it's a little cleaner to just do:
> 
> if (controller != null) controller.setRemoved();

Done.

https://codereview.chromium.org/23199004/diff/1/pkg/barback/lib/src/phase.dar...
pkg/barback/lib/src/phase.dart:331: return
!_outputs[output.id].contains(output);
On 2013/08/14 22:43:01, Bob Nystrom wrote:
> Took me a while to parse this. Maybe just:
> 
> return !_outputs.containsKey(...) || ...
> 
> Or maybe go DeMorgan on it?

Done.

https://codereview.chromium.org/23199004/diff/1/pkg/barback/lib/src/phase.dar...
pkg/barback/lib/src/phase.dart:378: Set<AssetId> _passThroughAssets(Set<AssetId>
newPassThroughs) {
On 2013/08/14 22:43:01, Bob Nystrom wrote:
> How about "_passAssetsThrough"? I read it as "pass-through assets" at first.

Done.

https://codereview.chromium.org/23199004/diff/1/pkg/barback/test/package_grap...
File pkg/barback/test/package_graph/transform_test.dart (right):

https://codereview.chromium.org/23199004/diff/1/pkg/barback/test/package_grap...
pkg/barback/test/package_graph/transform_test.dart:829: test("doesn't pass an
asset through a phase in which a transform consumes it",
On 2013/08/14 22:43:01, Bob Nystrom wrote:
> Long line.

Done.

Powered by Google App Engine
This is Rietveld 408576698