diff --git a/Sources/SemanticIndex/CheckedIndex.swift b/Sources/SemanticIndex/CheckedIndex.swift index d223d515..ca8069bd 100644 --- a/Sources/SemanticIndex/CheckedIndex.swift +++ b/Sources/SemanticIndex/CheckedIndex.swift @@ -344,7 +344,7 @@ package final actor UncheckedIndex: Sendable { /// The set of unit output paths that are currently registered in the underlying `IndexStoreDB`. private var unitOutputPaths: Set = [] - package init?(_ index: IndexStoreDB?, usesExplicitOutputPaths: Bool) { + package init?(_ index: sending IndexStoreDB?, usesExplicitOutputPaths: Bool) { guard let index else { return nil } diff --git a/Sources/SourceKitLSP/Workspace.swift b/Sources/SourceKitLSP/Workspace.swift index 97698e44..171b511d 100644 --- a/Sources/SourceKitLSP/Workspace.swift +++ b/Sources/SourceKitLSP/Workspace.swift @@ -262,13 +262,13 @@ package final class Workspace: Sendable, BuildServerManagerDelegate { hooks: hooks.indexHooks, indexTaskScheduler: indexTaskScheduler, preparationBatchingStrategy: options.preparationBatchingStrategy, - logMessageToIndexLog: { + logMessageToIndexLog: { [weak sourceKitLSPServer] in sourceKitLSPServer?.logMessageToIndexLog(message: $0, type: $1, structure: $2) }, - indexTasksWereScheduled: { + indexTasksWereScheduled: { [weak sourceKitLSPServer] in sourceKitLSPServer?.indexProgressManager.indexTasksWereScheduled(count: $0) }, - indexProgressStatusDidChange: { + indexProgressStatusDidChange: { [weak sourceKitLSPServer] in sourceKitLSPServer?.indexProgressManager.indexProgressStatusDidChange() } ) @@ -399,7 +399,7 @@ package final class Workspace: Sendable, BuildServerManagerDelegate { [weak sourceKitLSPServer] (initializationData, mainFilesChangedCallback) -> (any MainFilesProvider)? in await createIndex( initializationData: initializationData, - indexChangedCallback: { + indexChangedCallback: { [weak sourceKitLSPServer] in // Notify that main files may have changed. await mainFilesChangedCallback()