File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -382,19 +382,19 @@ package final actor SemanticIndexManager {
382382 let changedFiles = events. map ( \. uri)
383383 await indexStoreUpToDateTracker. markOutOfDate ( changedFiles)
384384
385- // Preparation tracking should be per file. For now consider any non-known-language change as having to re-prepare
386- // the target itself so that we re-prepare potential input files to plugins.
387- // https://github.com/swiftlang/sourcekit-lsp/issues/1975
388385 var outOfDateTargets = Set < BuildTargetIdentifier > ( )
386+ var targetsOfChangedFiles = Set < BuildTargetIdentifier > ( )
389387 for file in changedFiles {
390388 let changedTargets = await buildSystemManager. targets ( for: file)
389+ targetsOfChangedFiles. formUnion ( changedTargets)
391390 if Language ( inferredFromFileExtension: file) == nil {
391+ // Preparation tracking should be per file. For now consider any non-known-language change as having to
392+ // re-prepare the target itself so that we re-prepare potential input files to plugins.
393+ // https://github.com/swiftlang/sourcekit-lsp/issues/1975
392394 outOfDateTargets. formUnion ( changedTargets)
393395 }
394-
395- let dependentTargets = await buildSystemManager. targets ( dependingOn: changedTargets)
396- outOfDateTargets. formUnion ( dependentTargets)
397396 }
397+ outOfDateTargets. formUnion ( await buildSystemManager. targets ( dependingOn: targetsOfChangedFiles) )
398398 if !outOfDateTargets. isEmpty {
399399 logger. info (
400400 """
You can’t perform that action at this time.
0 commit comments