Index: pkg/analyzer_cli/lib/src/incremental_analyzer.dart |
diff --git a/pkg/analyzer_cli/lib/src/incremental_analyzer.dart b/pkg/analyzer_cli/lib/src/incremental_analyzer.dart |
index f9d8d4c63a7abe25fa0efe7823144d4c5dd4d363..d57327a6b1e20b5e22af050aa3556e243040699d 100644 |
--- a/pkg/analyzer_cli/lib/src/incremental_analyzer.dart |
+++ b/pkg/analyzer_cli/lib/src/incremental_analyzer.dart |
@@ -48,7 +48,7 @@ IncrementalAnalysisSession configureIncrementalAnalysis( |
context.resultProvider = new _CacheBasedResultProvider(context, cache); |
// Listen for new libraries to put into the cache. |
_IncrementalAnalysisSession session = |
- new _IncrementalAnalysisSession(options, context, cache); |
+ new _IncrementalAnalysisSession(options, storage, context, cache); |
context |
.onResultChanged(LIBRARY_ELEMENT1) |
.listen((ResultChangedEvent event) { |
@@ -172,13 +172,14 @@ class _CacheBasedResultProvider extends ResynthesizerResultProvider { |
class _IncrementalAnalysisSession implements IncrementalAnalysisSession { |
final CommandLineOptions commandLineOptions; |
+ final CacheStorage cacheStorage; |
final AnalysisContext context; |
final IncrementalCache cache; |
final Set<Source> newLibrarySources = new Set<Source>(); |
_IncrementalAnalysisSession( |
- this.commandLineOptions, this.context, this.cache); |
+ this.commandLineOptions, this.cacheStorage, this.context, this.cache); |
@override |
void finish() { |
@@ -189,6 +190,8 @@ class _IncrementalAnalysisSession implements IncrementalAnalysisSession { |
} |
_putLibrary(librarySource); |
} |
+ // Compact the cache. |
+ cacheStorage.compact(); |
} |
@override |