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 {
382
382
let changedFiles = events. filter { $0. type != . deleted } . map ( \. uri)
383
383
await indexStoreUpToDateTracker. markOutOfDate ( changedFiles)
384
384
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
388
385
var outOfDateTargets = Set < BuildTargetIdentifier > ( )
386
+ var targetsOfChangedFiles = Set < BuildTargetIdentifier > ( )
389
387
for file in changedFiles {
390
388
let changedTargets = await buildSystemManager. targets ( for: file)
389
+ targetsOfChangedFiles. formUnion ( changedTargets)
391
390
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
392
394
outOfDateTargets. formUnion ( changedTargets)
393
395
}
394
-
395
- let dependentTargets = await buildSystemManager. targets ( dependingOn: changedTargets)
396
- outOfDateTargets. formUnion ( dependentTargets)
397
396
}
397
+ outOfDateTargets. formUnion ( await buildSystemManager. targets ( dependingOn: targetsOfChangedFiles) )
398
398
if !outOfDateTargets. isEmpty {
399
399
logger. info (
400
400
"""
You can’t perform that action at this time.
0 commit comments