Skip to content

Commit 4220b7f

Browse files
authored
Merge pull request #2078 from ahoppen/no-reindex-deleted-files
Do not re-index deleted files
2 parents 87dd406 + fa32cbc commit 4220b7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SemanticIndex/SemanticIndexManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ package final actor SemanticIndexManager {
379379
package func filesDidChange(_ events: [FileEvent]) async {
380380
// We only re-index the files that were changed and don't re-index any of their dependencies. See the
381381
// `Documentation/Files_To_Reindex.md` file.
382-
let changedFiles = events.map(\.uri)
382+
let changedFiles = events.filter { $0.type != .deleted }.map(\.uri)
383383
await indexStoreUpToDateTracker.markOutOfDate(changedFiles)
384384

385385
// Preparation tracking should be per file. For now consider any non-known-language change as having to re-prepare

0 commit comments

Comments
 (0)