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

Side by Side Diff: pkg/barback/lib/src/graph/phase.dart

Issue 296743004: Fix a bug that caused the fix in r36391 not to work. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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
« no previous file with comments | « pkg/barback/CHANGELOG.md ('k') | pkg/barback/pubspec.yaml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.graph.phase; 5 library barback.graph.phase;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import '../asset/asset_id.dart'; 9 import '../asset/asset_id.dart';
10 import '../asset/asset_node.dart'; 10 import '../asset/asset_node.dart';
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 /// The streams exposed by this phase. 80 /// The streams exposed by this phase.
81 final _streams = new NodeStreams(); 81 final _streams = new NodeStreams();
82 Stream<NodeStatus> get onStatusChange => _streams.onStatusChange; 82 Stream<NodeStatus> get onStatusChange => _streams.onStatusChange;
83 Stream<AssetNode> get onAsset => _streams.onAsset; 83 Stream<AssetNode> get onAsset => _streams.onAsset;
84 Stream<LogEntry> get onLog => _streams.onLog; 84 Stream<LogEntry> get onLog => _streams.onLog;
85 85
86 /// How far along [this] is in processing its assets. 86 /// How far along [this] is in processing its assets.
87 NodeStatus get status { 87 NodeStatus get status {
88 // Before any transformers are added, the phase should be dirty if and only 88 // Before any transformers are added, the phase should be dirty if and only
89 // if any input is dirty. 89 // if any input is dirty.
90 if (_classifiers.isEmpty && _groups.isEmpty) { 90 if (_classifiers.isEmpty && _groups.isEmpty && previous == null) {
91 return _inputs.any((input) => input.state.isDirty) ? 91 return _inputs.any((input) => input.state.isDirty) ?
92 NodeStatus.RUNNING : NodeStatus.IDLE; 92 NodeStatus.RUNNING : NodeStatus.IDLE;
93 } 93 }
94 94
95 var classifierStatus = NodeStatus.dirtiest( 95 var classifierStatus = NodeStatus.dirtiest(
96 _classifiers.values.map((classifier) => classifier.status)); 96 _classifiers.values.map((classifier) => classifier.status));
97 var groupStatus = NodeStatus.dirtiest( 97 var groupStatus = NodeStatus.dirtiest(
98 _groups.values.map((group) => group.status)); 98 _groups.values.map((group) => group.status));
99 return (previous == null ? NodeStatus.IDLE : previous.status) 99 return (previous == null ? NodeStatus.IDLE : previous.status)
100 .dirtier(classifierStatus) 100 .dirtier(classifierStatus)
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 assert(asset.state.isDirty); 378 assert(asset.state.isDirty);
379 asset.force(); 379 asset.force();
380 asset.whenStateChanges().then((state) { 380 asset.whenStateChanges().then((state) {
381 if (state.isRemoved) return getOutput(asset.id); 381 if (state.isRemoved) return getOutput(asset.id);
382 return asset; 382 return asset;
383 }).then(request.complete).catchError(request.completeError); 383 }).then(request.complete).catchError(request.completeError);
384 } 384 }
385 385
386 String toString() => "phase $_location.$_index"; 386 String toString() => "phase $_location.$_index";
387 } 387 }
OLDNEW
« no previous file with comments | « pkg/barback/CHANGELOG.md ('k') | pkg/barback/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698