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

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

Issue 651993006: "pub get" doesn't choke on previously-cached unknown transformers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes. Created 6 years, 2 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
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/test/transformer/cache_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/transformer_cache.dart
diff --git a/sdk/lib/_internal/pub/lib/src/barback/transformer_cache.dart b/sdk/lib/_internal/pub/lib/src/barback/transformer_cache.dart
index 5433ce159335954619e8fa6c2588190112a69b42..e6c9a538acc4d32e015626cea801084b4b3762d4 100644
--- a/sdk/lib/_internal/pub/lib/src/barback/transformer_cache.dart
+++ b/sdk/lib/_internal/pub/lib/src/barback/transformer_cache.dart
@@ -56,6 +56,10 @@ class TransformerCache {
/// Clear the cache if it depends on any package in [changedPackages].
void clearIfOutdated(Set<String> changedPackages) {
var snapshotDependencies = unionAll(_oldTransformers.map((id) {
+ // If the transformer cache contains transformers we don't know about,
+ // that's fine; we just won't load them.
+ if (!_graph.packages.containsKey(id.package)) return new Set();
+
return _graph.transitiveDependencies(id.package)
.map((package) => package.name).toSet();
}));
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/test/transformer/cache_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698