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

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

Issue 25094002: Adapt streams for additional stackTrace argument. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 2 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.package_graph; 5 library barback.package_graph;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'asset_cascade.dart'; 9 import 'asset_cascade.dart';
10 import 'asset_id.dart'; 10 import 'asset_id.dart';
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 cascade.results.listen((result) { 76 cascade.results.listen((result) {
77 _cascadeResults[cascade.package] = result; 77 _cascadeResults[cascade.package] = result;
78 // If any cascade hasn't yet finished, the overall build isn't finished 78 // If any cascade hasn't yet finished, the overall build isn't finished
79 // either. 79 // either.
80 if (_cascadeResults.values.any((result) => result == null)) return; 80 if (_cascadeResults.values.any((result) => result == null)) return;
81 81
82 // Include all build errors for all cascades. If no cascades have 82 // Include all build errors for all cascades. If no cascades have
83 // errors, the result will automatically be considered a success. 83 // errors, the result will automatically be considered a success.
84 _resultsController.add(new BuildResult(unionAll( 84 _resultsController.add(new BuildResult(unionAll(
85 _cascadeResults.values.map((result) => result.errors)))); 85 _cascadeResults.values.map((result) => result.errors))));
86 }, onError: (error) { 86 }, onError: (error, [StackTrace stackTrace]) {
nweiz 2013/10/07 18:49:51 Does this mean that [getAttachedStackTrace] is no
floitsch 2013/10/10 14:22:52 Yes. 'getAttachedStackTrace' will be deprecated.
87 _lastUnexpectedError = error; 87 _lastUnexpectedError = error;
88 _resultsController.addError(error); 88 _resultsController.addError(error, stackTrace);
89 }); 89 });
90 } 90 }
91 91
92 _errors = mergeStreams(_cascades.values.map((cascade) => cascade.errors), 92 _errors = mergeStreams(_cascades.values.map((cascade) => cascade.errors),
93 broadcast: true); 93 broadcast: true);
94 } 94 }
95 95
96 /// Gets the asset node identified by [id]. 96 /// Gets the asset node identified by [id].
97 /// 97 ///
98 /// If [id] is for a generated or transformed asset, this will wait until it 98 /// If [id] is for a generated or transformed asset, this will wait until it
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 if (cascade == null) throw new ArgumentError("Unknown package $package."); 158 if (cascade == null) throw new ArgumentError("Unknown package $package.");
159 cascade.removeSources(ids); 159 cascade.removeSources(ids);
160 }); 160 });
161 } 161 }
162 162
163 void updateTransformers(String package, 163 void updateTransformers(String package,
164 Iterable<Iterable<Transformer>> transformers) { 164 Iterable<Iterable<Transformer>> transformers) {
165 _cascades[package].updateTransformers(transformers); 165 _cascades[package].updateTransformers(transformers);
166 } 166 }
167 } 167 }
OLDNEW
« no previous file with comments | « no previous file | pkg/barback/lib/src/stream_replayer.dart » ('j') | pkg/barback/lib/src/stream_replayer.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698