Index: sdk/lib/_internal/pub/lib/src/barback/load_all_transformers.dart |
diff --git a/sdk/lib/_internal/pub/lib/src/barback/load_all_transformers.dart b/sdk/lib/_internal/pub/lib/src/barback/load_all_transformers.dart |
index 3b156de5fccd80ab632e8773fbb69809541d5dd1..89a3761383c67e43bf88b840c776d3ce3bbfc8e5 100644 |
--- a/sdk/lib/_internal/pub/lib/src/barback/load_all_transformers.dart |
+++ b/sdk/lib/_internal/pub/lib/src/barback/load_all_transformers.dart |
@@ -28,8 +28,7 @@ import 'transformers_needed_by_transformers.dart'; |
Future loadAllTransformers(AssetEnvironment environment, |
BarbackServer transformerServer) async { |
var transformersNeededByTransformers = |
- computeTransformersNeededByTransformers(environment.graph, |
- packages: environment.packages); |
+ computeTransformersNeededByTransformers(environment.graph); |
var buffer = new StringBuffer(); |
buffer.writeln("Transformer dependencies:"); |
@@ -44,15 +43,14 @@ Future loadAllTransformers(AssetEnvironment environment, |
var stagedTransformers = _stageTransformers(transformersNeededByTransformers); |
- var packagesThatUseTransformers = |
- _packagesThatUseTransformers(environment.graph); |
+ var packagesThatUseTransformers = _packagesThatUseTransformers(environment); |
var loader = new TransformerLoader(environment, transformerServer); |
// Add a rewrite transformer for each package, so that we can resolve |
// "package:" imports while loading transformers. |
var rewrite = new RewriteImportTransformer(); |
- for (var package in environment.packages) { |
+ for (var package in environment.graph.packages.keys) { |
environment.barback.updateTransformers(package, [[rewrite]]); |
} |
environment.barback.updateTransformers(r'$pub', [[rewrite]]); |
@@ -145,9 +143,9 @@ List<Set<TransformerId>> _stageTransformers( |
/// Returns a map from transformer ids to all packages in [graph] that use each |
/// transformer. |
Map<TransformerId, Set<String>> _packagesThatUseTransformers( |
- PackageGraph graph) { |
+ AssetEnvironment environment) { |
var results = {}; |
- for (var package in graph.packages.values) { |
+ for (var package in environment.graph.packages.values) { |
for (var phase in package.pubspec.transformers) { |
for (var config in phase) { |
results.putIfAbsent(config.id, () => new Set()).add(package.name); |