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

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

Issue 22265002: Support cross-package transforms in barback. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove a duplicated test. Created 7 years, 4 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
Index: pkg/barback/lib/src/package_graph.dart
diff --git a/pkg/barback/lib/src/package_graph.dart b/pkg/barback/lib/src/package_graph.dart
index 4dc2719221467bd29fe50a07041910903eb8e35a..9f876eb95c59d62ac2971e87f1014e15e65fdf53 100644
--- a/pkg/barback/lib/src/package_graph.dart
+++ b/pkg/barback/lib/src/package_graph.dart
@@ -11,6 +11,8 @@ import 'package:stack_trace/stack_trace.dart';
import 'asset.dart';
import 'asset_cascade.dart';
import 'asset_id.dart';
+import 'asset_node.dart';
+import 'build_result.dart';
import 'errors.dart';
import 'package_provider.dart';
import 'utils.dart';
@@ -80,14 +82,14 @@ class PackageGraph {
_errors = mergeStreams(_cascades.values.map((cascade) => cascade.errors));
}
- /// Gets the asset identified by [id].
+ /// Gets the asset node identified by [id].
///
/// If [id] is for a generated or transformed asset, this will wait until
/// it has been created and return it. If the asset cannot be found, throws
/// [AssetNotFoundException].
- Future<Asset> getAssetById(AssetId id) {
+ Future<AssetNode> getAssetNode(AssetId id) {
var cascade = _cascades[id.package];
- if (cascade != null) return cascade.getAssetById(id);
+ if (cascade != null) return cascade.getAssetNode(id);
return new Future.error(
new AssetNotFoundException(id),
new Trace.current().vmTrace);

Powered by Google App Engine
This is Rietveld 408576698