| OLD | NEW |
| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 (transformer is DeclaringTransformer && primary.deferred) { | 137 (transformer is DeclaringTransformer && primary.deferred) { |
| 138 _awaitingForce = deferred; | 138 _awaitingForce = deferred; |
| 139 | 139 |
| 140 _onLogPool.add(_onLogController.stream); | 140 _onLogPool.add(_onLogController.stream); |
| 141 | 141 |
| 142 _primarySubscription = primary.onStateChange.listen((state) { | 142 _primarySubscription = primary.onStateChange.listen((state) { |
| 143 if (state.isRemoved) { | 143 if (state.isRemoved) { |
| 144 remove(); | 144 remove(); |
| 145 } else { | 145 } else { |
| 146 if (state.isDirty && !deferred) primary.force(); | 146 if (state.isDirty && !deferred) primary.force(); |
| 147 // If this is deferred but applying, that means it must have been |
| 148 // forced, so we should ensure its input remains forced as well. |
| 149 if (deferred && _state == _State.APPLYING) primary.force(); |
| 147 _dirty(); | 150 _dirty(); |
| 148 } | 151 } |
| 149 }); | 152 }); |
| 150 | 153 |
| 151 _phaseSubscription = phase.previous.onAsset.listen((node) { | 154 _phaseSubscription = phase.previous.onAsset.listen((node) { |
| 152 if (!_missingInputs.contains(node.id)) return; | 155 if (!_missingInputs.contains(node.id)) return; |
| 153 if (!deferred) node.force(); | 156 if (!deferred) node.force(); |
| 154 _dirty(); | 157 _dirty(); |
| 155 }); | 158 }); |
| 156 | 159 |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 /// | 559 /// |
| 557 /// This will never transition to another state. | 560 /// This will never transition to another state. |
| 558 static final NOT_PRIMARY = const _State._("not primary"); | 561 static final NOT_PRIMARY = const _State._("not primary"); |
| 559 | 562 |
| 560 final String name; | 563 final String name; |
| 561 | 564 |
| 562 const _State._(this.name); | 565 const _State._(this.name); |
| 563 | 566 |
| 564 String toString() => name; | 567 String toString() => name; |
| 565 } | 568 } |
| OLD | NEW |