Merge pull request #2685 from rintaro/workspace-weak-captures-explicit

This commit is contained in:
Rintaro Ishizaki
2026-06-03 03:40:16 -07:00
committed by GitHub
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -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<String> = []
package init?(_ index: IndexStoreDB?, usesExplicitOutputPaths: Bool) {
package init?(_ index: sending IndexStoreDB?, usesExplicitOutputPaths: Bool) {
guard let index else {
return nil
}
+4 -4
View File
@@ -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()