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

Unified Diff: sdk/lib/_internal/pub/lib/src/barback/load_all_transformers.dart

Issue 583853002: Use precompiled dependencies in pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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: 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);

Powered by Google App Engine
This is Rietveld 408576698