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

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

Issue 750973005: Properly handle dart2js being specified before other local transformers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 | « no previous file | sdk/lib/_internal/pub/test/transformer/dart2js_transformer_before_another_transformer_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ca83a878ec73d9fa23d3c0ac8ac9680853e21fa4..99fdad57d1935e47c2371fd0a6c05f03fb813147 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
@@ -132,10 +132,14 @@ List<Set<TransformerId>> _stageTransformers(
var stages = [];
stageNumberFor(id) {
+ // Built-in transformers don't have to be loaded in stages, since they're
+ // run from pub's source. Return -1 so that the "next stage" is 0.
+ if (id.isBuiltInTransformer) return -1;
+
if (stageNumbers.containsKey(id)) return stageNumbers[id];
var dependencies = transformerDependencies[id];
- stageNumbers[id] = dependencies.isEmpty ? 0 :
- maxAll(dependencies.map(stageNumberFor)) + 1;
+ stageNumbers[id] = dependencies.isEmpty ?
+ 0 : maxAll(dependencies.map(stageNumberFor)) + 1;
return stageNumbers[id];
}
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/test/transformer/dart2js_transformer_before_another_transformer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698