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

Side by Side Diff: pkg/barback/lib/src/transform_node.dart

Issue 19473002: Fix a barback bug that triggered when an asset was removed. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library barback.transform_node; 5 library barback.transform_node;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'asset.dart'; 9 import 'asset.dart';
10 import 'asset_id.dart'; 10 import 'asset_id.dart';
(...skipping 25 matching lines...) Expand all
36 var _isDirty = true; 36 var _isDirty = true;
37 37
38 /// The inputs read by this transform the last time it was run. 38 /// The inputs read by this transform the last time it was run.
39 /// 39 ///
40 /// Used to tell if an input was removed in a later run. 40 /// Used to tell if an input was removed in a later run.
41 var _inputs = new Set<AssetNode>(); 41 var _inputs = new Set<AssetNode>();
42 42
43 /// The outputs created by this transform the last time it was run. 43 /// The outputs created by this transform the last time it was run.
44 /// 44 ///
45 /// Used to tell if an output was removed in a later run. 45 /// Used to tell if an output was removed in a later run.
46 Set<AssetId> get outputs => _outputs;
Bob Nystrom 2013/07/17 17:18:26 Instead of making this public, how about defining:
nweiz 2013/07/17 18:29:55 I thought about that, but I couldn't come up with
46 var _outputs = new Set<AssetId>(); 47 var _outputs = new Set<AssetId>();
47 48
48 TransformNode(this.phase, this._transformer, this.primary); 49 TransformNode(this.phase, this._transformer, this.primary);
49 50
50 /// Marks this transform as needing to be run. 51 /// Marks this transform as needing to be run.
51 void dirty() { 52 void dirty() {
52 _isDirty = true; 53 _isDirty = true;
53 } 54 }
54 55
55 /// Applies this transform. 56 /// Applies this transform.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 class TransformOutputs { 109 class TransformOutputs {
109 /// The outputs that are new or were modified since the last run. 110 /// The outputs that are new or were modified since the last run.
110 final AssetSet updated; 111 final AssetSet updated;
111 112
112 /// The outputs that were created by the previous run but were not generated 113 /// The outputs that were created by the previous run but were not generated
113 /// by the most recent run. 114 /// by the most recent run.
114 final Set<AssetId> removed; 115 final Set<AssetId> removed;
115 116
116 TransformOutputs(this.updated, this.removed); 117 TransformOutputs(this.updated, this.removed);
117 } 118 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698