mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-06-24 12:21:58 +02:00
Merge pull request #2685 from rintaro/workspace-weak-captures-explicit
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user