@@ -611,22 +611,14 @@ internal async Task EnqueueItemAsync(IDocument doc, AnalysisPriority priority =
611
611
// since otherwise Complete() may come before the change is enqueued
612
612
// for processing and the completion list will be driven off the stale data.
613
613
var p = pending ;
614
- OnDocumentChangeProcessingComplete ( doc , cookie as VersionCookie , enqueueForAnalysis , priority , p ) ;
614
+ await OnDocumentChangeProcessingCompleteAsync ( doc , cookie as VersionCookie , enqueueForAnalysis , priority , p ) ;
615
615
pending = null ;
616
-
617
- if ( entry != null ) {
618
- var reanalyzeEntries = Analyzer . GetEntriesThatImportModule ( entry . ModuleName , false ) ;
619
- foreach ( IDocument d in reanalyzeEntries ) {
620
- await EnqueueItemAsync ( d ) ;
621
- }
622
- }
623
-
624
616
} finally {
625
617
pending ? . Dispose ( ) ;
626
618
}
627
619
}
628
620
629
- private void OnDocumentChangeProcessingComplete ( IDocument doc , VersionCookie vc , bool enqueueForAnalysis , AnalysisPriority priority , IDisposable disposeWhenEnqueued ) {
621
+ private async Task OnDocumentChangeProcessingCompleteAsync ( IDocument doc , VersionCookie vc , bool enqueueForAnalysis , AnalysisPriority priority , IDisposable disposeWhenEnqueued ) {
630
622
try {
631
623
_disposableBag . ThrowIfDisposed ( ) ;
632
624
if ( vc != null ) {
@@ -647,6 +639,13 @@ private void OnDocumentChangeProcessingComplete(IDocument doc, VersionCookie vc,
647
639
if ( vc != null ) {
648
640
_editorFiles . GetDocument ( doc . DocumentUri ) . UpdateParseDiagnostics ( vc , doc . DocumentUri ) ;
649
641
}
642
+
643
+ if ( doc is ProjectEntry entry ) {
644
+ var reanalyzeEntries = Analyzer . GetEntriesThatImportModule ( entry . ModuleName , false ) ;
645
+ foreach ( IDocument d in reanalyzeEntries ) {
646
+ await EnqueueItemAsync ( d ) ;
647
+ }
648
+ }
650
649
} catch ( BadSourceException ) {
651
650
} catch ( ObjectDisposedException ) when ( _disposableBag . IsDisposed ) {
652
651
} catch ( OperationCanceledException ex ) {
0 commit comments