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 76019f04bb51d5c8018327b3310f33a502d86081..d37bb32d547a2c8281401e212e7c2f8b2368d9b4 100644 |
--- a/pkg/analyzer/lib/src/task/dart_work_manager.dart |
+++ b/pkg/analyzer/lib/src/task/dart_work_manager.dart |
@@ -67,6 +67,10 @@ class DartWorkManager implements WorkManager { |
// library queue |
librarySourceQueue.removeAll(changedSources); |
librarySourceQueue.removeAll(removedSources); |
+ // TODO(scheglov) This is an inefficient implementation. |
+ // We could make the cache to return invalidated results and use them |
+ // to allow work managers to schedule work request. |
+ librarySourceQueue.addAll(librarySources); |
} |
@override |
@@ -104,6 +108,14 @@ class DartWorkManager implements WorkManager { |
} |
@override |
+ WorkOrderPriority getNextResultPriority() { |
+ if (unknownSourceQueue.isNotEmpty || librarySourceQueue.isNotEmpty) { |
+ return WorkOrderPriority.NORMAL; |
+ } |
+ return WorkOrderPriority.NONE; |
+ } |
+ |
+ @override |
void resultsComputed( |
AnalysisTarget target, Map<ResultDescriptor, dynamic> outputs) { |
// Organize sources. |