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

Unified Diff: pkg/barback/lib/src/errors.dart

Issue 267393009: Transition barback's infrastructure to an aggregate-based model. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/barback/lib/src/asset/asset_set.dart ('k') | pkg/barback/lib/src/graph/transform_node.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/barback/lib/src/errors.dart
diff --git a/pkg/barback/lib/src/errors.dart b/pkg/barback/lib/src/errors.dart
index 290d534897d1e790a509072edb144fd4bb498ae1..0c2b5c5dd5e3eb33eceb424152b6665406607350 100644
--- a/pkg/barback/lib/src/errors.dart
+++ b/pkg/barback/lib/src/errors.dart
@@ -7,7 +7,7 @@ library barback.errors;
import 'package:stack_trace/stack_trace.dart';
import 'asset/asset_id.dart';
-import 'transformer/transformer.dart';
+import 'transformer/wrapping_aggregate_transformer.dart';
import 'utils.dart';
/// Error thrown when an asset with [id] cannot be found.
@@ -167,12 +167,17 @@ class AssetLoadException extends _WrappedException {
/// the transformer that is applied to it.
class TransformInfo {
/// The transformer that's run for this transform.
- final Transformer transformer;
+ ///
+ /// This may be a [Transformer] or a [WrappingAggregateTransformer]. It may
+ /// also return additional types in the future.
+ final transformer;
/// The id of this transform's primary asset.
final AssetId primaryId;
- TransformInfo(this.transformer, this.primaryId);
+ TransformInfo(transformer, this.primaryId)
+ : transformer = transformer is WrappingAggregateTransformer ?
+ transformer.transformer : transformer;
bool operator==(other) =>
other is TransformInfo &&
« no previous file with comments | « pkg/barback/lib/src/asset/asset_set.dart ('k') | pkg/barback/lib/src/graph/transform_node.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698