Chromium Code Reviews| 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.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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 51 /// This emits errors as they're detected. If an error occurs in one part of | 51 /// This emits errors as they're detected. If an error occurs in one part of |
| 52 /// the graph, unrelated parts will continue building. | 52 /// the graph, unrelated parts will continue building. |
| 53 /// | 53 /// |
| 54 /// This will not emit programming errors from barback itself. Those will be | 54 /// This will not emit programming errors from barback itself. Those will be |
| 55 /// emitted through the [results] stream's error channel. | 55 /// emitted through the [results] stream's error channel. |
| 56 Stream<BarbackException> get errors => _errors; | 56 Stream<BarbackException> get errors => _errors; |
| 57 Stream<BarbackException> _errors; | 57 Stream<BarbackException> _errors; |
| 58 | 58 |
| 59 /// The stream of [LogEntry] objects used to report transformer log entries. | 59 /// The stream of [LogEntry] objects used to report transformer log entries. |
| 60 Stream<LogEntry> get log => _logController.stream; | 60 Stream<LogEntry> get log => _logController.stream; |
| 61 final _logController = new StreamController<LogEntry>.broadcast(); | 61 final _logController = new StreamController<LogEntry>.broadcast(sync: true); |
|
Bob Nystrom
2014/01/29 20:56:46
Don't forget to bump the barback version.
nweiz
2014/01/29 21:26:55
Done.
| |
| 62 | 62 |
| 63 /// The most recent error emitted from a cascade's result stream. | 63 /// The most recent error emitted from a cascade's result stream. |
| 64 /// | 64 /// |
| 65 /// This is used to pipe an unexpected error from a build to the resulting | 65 /// This is used to pipe an unexpected error from a build to the resulting |
| 66 /// [Future] returned by [getAllAssets]. | 66 /// [Future] returned by [getAllAssets]. |
| 67 var _lastUnexpectedError; | 67 var _lastUnexpectedError; |
| 68 | 68 |
| 69 /// The stack trace for [_lastUnexpectedError]. | 69 /// The stack trace for [_lastUnexpectedError]. |
| 70 StackTrace _lastUnexpectedErrorTrace; | 70 StackTrace _lastUnexpectedErrorTrace; |
| 71 | 71 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 185 if (cascade == null) throw new ArgumentError("Unknown package $package."); | 185 if (cascade == null) throw new ArgumentError("Unknown package $package."); |
| 186 cascade.removeSources(ids); | 186 cascade.removeSources(ids); |
| 187 }); | 187 }); |
| 188 } | 188 } |
| 189 | 189 |
| 190 void updateTransformers(String package, | 190 void updateTransformers(String package, |
| 191 Iterable<Iterable<Transformer>> transformers) { | 191 Iterable<Iterable<Transformer>> transformers) { |
| 192 _cascades[package].updateTransformers(transformers); | 192 _cascades[package].updateTransformers(transformers); |
| 193 } | 193 } |
| 194 } | 194 } |
| OLD | NEW |