| Index: pkg/analyzer/lib/src/task/dart_work_manager.dart
|
| diff --git a/pkg/analyzer/lib/src/task/dart_work_manager.dart b/pkg/analyzer/lib/src/task/dart_work_manager.dart
|
| index 6e7ba5b50ad74a02732252d74f1254861d8f1cdc..fab0ed11d86a48e83e098fc194afa88d52dab0be 100644
|
| --- a/pkg/analyzer/lib/src/task/dart_work_manager.dart
|
| +++ b/pkg/analyzer/lib/src/task/dart_work_manager.dart
|
| @@ -83,7 +83,16 @@ class DartWorkManager implements WorkManager {
|
| /**
|
| * Initialize a newly created manager.
|
| */
|
| - DartWorkManager(this.context);
|
| + DartWorkManager(this.context) {
|
| + analysisCache.onResultInvalidated.listen((InvalidatedResult event) {
|
| + if (event.descriptor == LIBRARY_ERRORS_READY) {
|
| + CacheEntry entry = event.entry;
|
| + if (entry.getValue(SOURCE_KIND) == SourceKind.LIBRARY) {
|
| + librarySourceQueue.add(entry.target);
|
| + }
|
| + }
|
| + });
|
| + }
|
|
|
| /**
|
| * Returns the correctly typed result of `context.analysisCache`.
|
| @@ -128,21 +137,6 @@ class DartWorkManager implements WorkManager {
|
| partLibrariesMap.remove(removedSource);
|
| _onLibrarySourceChangedOrRemoved(removedSource);
|
| }
|
| - // Some of the libraries might have been invalidated, reschedule them.
|
| - {
|
| - MapIterator<AnalysisTarget, CacheEntry> iterator =
|
| - analysisCache.iterator();
|
| - while (iterator.moveNext()) {
|
| - AnalysisTarget target = iterator.key;
|
| - if (_isDartSource(target)) {
|
| - CacheEntry entry = iterator.value;
|
| - if (entry.getValue(SOURCE_KIND) == SourceKind.LIBRARY &&
|
| - entry.getValue(LIBRARY_ERRORS_READY) != true) {
|
| - librarySourceQueue.add(target);
|
| - }
|
| - }
|
| - }
|
| - }
|
| }
|
|
|
| @override
|
|
|