Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Sources/BuildServerIntegration/BuildServerManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,8 @@ package actor BuildServerManager: QueueBasedMessageHandler {
connectionToClient: BuildServerManagerConnectionToClient,
buildServerHooks: BuildServerHooks,
createMainFilesProvider:
@escaping @Sendable (
@escaping @Sendable
(
SourceKitInitializeBuildResponseData?, _ mainFilesChangedCallback: @escaping @Sendable () async -> Void
) async -> MainFilesProvider?
) async {
Expand Down
10 changes: 6 additions & 4 deletions Sources/SemanticIndex/PreparationTaskDescription.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ package struct PreparationTaskDescription: IndexTaskDescription {

/// See `SemanticIndexManager.logMessageToIndexLog`.
private let logMessageToIndexLog:
@Sendable (
_ message: String, _ type: WindowMessageType, _ structure: LanguageServerProtocol.StructuredLogKind
) -> Void
@Sendable
(
_ message: String, _ type: WindowMessageType, _ structure: LanguageServerProtocol.StructuredLogKind
) -> Void

/// Hooks that should be called when the preparation task finishes.
private let hooks: IndexHooks
Expand All @@ -67,7 +68,8 @@ package struct PreparationTaskDescription: IndexTaskDescription {
buildServerManager: BuildServerManager,
preparationUpToDateTracker: UpToDateTracker<BuildTargetIdentifier, DummySecondaryKey>,
logMessageToIndexLog:
@escaping @Sendable (
@escaping @Sendable
(
_ message: String, _ type: WindowMessageType, _ structure: LanguageServerProtocol.StructuredLogKind
) -> Void,
hooks: IndexHooks
Expand Down
10 changes: 6 additions & 4 deletions Sources/SemanticIndex/SemanticIndexManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,10 @@ package final actor SemanticIndexManager {

/// Callback that is called when an indexing task produces output it wants to log to the index log.
private let logMessageToIndexLog:
@Sendable (
_ message: String, _ type: WindowMessageType, _ structure: LanguageServerProtocol.StructuredLogKind
) -> Void
@Sendable
(
_ message: String, _ type: WindowMessageType, _ structure: LanguageServerProtocol.StructuredLogKind
) -> Void

/// Called when files are scheduled to be indexed.
///
Expand Down Expand Up @@ -273,7 +274,8 @@ package final actor SemanticIndexManager {
hooks: IndexHooks,
indexTaskScheduler: TaskScheduler<AnyIndexTaskDescription>,
logMessageToIndexLog:
@escaping @Sendable (
@escaping @Sendable
(
_ message: String, _ type: WindowMessageType, _ structure: LanguageServerProtocol.StructuredLogKind
) -> Void,
indexTasksWereScheduled: @escaping @Sendable (Int) -> Void,
Expand Down
10 changes: 6 additions & 4 deletions Sources/SemanticIndex/UpdateIndexStoreTaskDescription.swift
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,10 @@ package struct UpdateIndexStoreTaskDescription: IndexTaskDescription {

/// See `SemanticIndexManager.logMessageToIndexLog`.
private let logMessageToIndexLog:
@Sendable (
_ message: String, _ type: WindowMessageType, _ structure: LanguageServerProtocol.StructuredLogKind
) -> Void
@Sendable
(
_ message: String, _ type: WindowMessageType, _ structure: LanguageServerProtocol.StructuredLogKind
) -> Void

/// How long to wait until we cancel an update indexstore task. This timeout should be long enough that all
/// `swift-frontend` tasks finish within it. It prevents us from blocking the index if the type checker gets stuck on
Expand Down Expand Up @@ -180,7 +181,8 @@ package struct UpdateIndexStoreTaskDescription: IndexTaskDescription {
indexStoreUpToDateTracker: UpToDateTracker<DocumentURI, BuildTargetIdentifier>,
indexFilesWithUpToDateUnit: Bool,
logMessageToIndexLog:
@escaping @Sendable (
@escaping @Sendable
(
_ message: String, _ type: WindowMessageType, _ structure: LanguageServerProtocol.StructuredLogKind
) -> Void,
timeout: Duration,
Expand Down
3 changes: 2 additions & 1 deletion Sources/SourceKitLSP/SourceKitLSPServer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,8 @@ package actor SourceKitLSPServer {
private func handleRequest<RequestType: TextDocumentRequest>(
for request: RequestAndReply<RequestType>,
requestHandler:
@Sendable @escaping (
@Sendable @escaping
(
RequestType, Workspace, LanguageService
) async throws ->
RequestType.Response
Expand Down