Index: lib/src/graph/package_graph.dart |
diff --git a/lib/src/graph/package_graph.dart b/lib/src/graph/package_graph.dart |
index 75730819e636aa6ce406ff0870bab9d19e86ee29..1c2b534e08113ba55e616cbb24bc33e28d6e43ec 100644 |
--- a/lib/src/graph/package_graph.dart |
+++ b/lib/src/graph/package_graph.dart |
@@ -127,7 +127,7 @@ class PackageGraph { |
/// |
/// If the asset cannot be found, returns null. |
Future<AssetNode> getAssetNode(AssetId id) { |
- return _inErrorZone(() { |
+ return _inErrorZone/*<Future<AssetNode>>*/(() { |
var cascade = _cascades[id.package]; |
if (cascade != null) return cascade.getAssetNode(id); |
return new Future.value(null); |
@@ -158,7 +158,7 @@ class PackageGraph { |
if (_status != NodeStatus.IDLE) { |
// A build is still ongoing, so wait for it to complete and try again. |
- return results.first.then((_) => getAllAssets()); |
+ return results.first.then/*<Future<AssetSet>>*/((_) => getAllAssets()); |
} |
// If an unexpected error occurred, complete with that. |
@@ -178,7 +178,7 @@ class PackageGraph { |
(cascade) => cascade.availableOutputs)) |
.then((assetSets) { |
var assets = unionAll(assetSets.map((assetSet) => assetSet.toSet())); |
- return new Future.value(new AssetSet.from(assets)); |
+ return new AssetSet.from(assets); |
}); |
} |
@@ -274,10 +274,11 @@ class PackageGraph { |
/// [Future]. If it throws a [BarbackException], that exception will be piped |
/// to the returned [Future] as well. Any other exceptions will be piped to |
/// [results]. |
- Future _inErrorZone(body()) { |
- var completer = new Completer.sync(); |
+ Future/*<T>*/ _inErrorZone/*<T>*/(/*=T*/ body()) { |
+ var completer = new Completer/*<T>*/.sync(); |
runZoned(() { |
- syncFuture(body).then(completer.complete).catchError((error, stackTrace) { |
+ new Future.sync(body).then(completer.complete) |
+ .catchError((error, stackTrace) { |
if (error is! BarbackException) throw error; |
completer.completeError(error, stackTrace); |
}); |