From 66a8415763a570a6b681bf62633f9d7387a3b11b Mon Sep 17 00:00:00 2001 From: Alex Hoppen Date: Wed, 12 Nov 2025 13:24:03 +0100 Subject: [PATCH] Adjust formatting to account for swift-format change Adjust formatting to account for https://github.com/swiftlang/swift-format/pull/1086 --- .../BuildServerIntegration/BuildServerManager.swift | 3 ++- Sources/SemanticIndex/PreparationTaskDescription.swift | 10 ++++++---- Sources/SemanticIndex/SemanticIndexManager.swift | 10 ++++++---- .../UpdateIndexStoreTaskDescription.swift | 10 ++++++---- Sources/SourceKitLSP/SourceKitLSPServer.swift | 3 ++- 5 files changed, 22 insertions(+), 14 deletions(-) diff --git a/Sources/BuildServerIntegration/BuildServerManager.swift b/Sources/BuildServerIntegration/BuildServerManager.swift index 9e9a7d407..300c4866d 100644 --- a/Sources/BuildServerIntegration/BuildServerManager.swift +++ b/Sources/BuildServerIntegration/BuildServerManager.swift @@ -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 { diff --git a/Sources/SemanticIndex/PreparationTaskDescription.swift b/Sources/SemanticIndex/PreparationTaskDescription.swift index 664f0abe0..05c261a82 100644 --- a/Sources/SemanticIndex/PreparationTaskDescription.swift +++ b/Sources/SemanticIndex/PreparationTaskDescription.swift @@ -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 @@ -67,7 +68,8 @@ package struct PreparationTaskDescription: IndexTaskDescription { buildServerManager: BuildServerManager, preparationUpToDateTracker: UpToDateTracker, logMessageToIndexLog: - @escaping @Sendable ( + @escaping @Sendable + ( _ message: String, _ type: WindowMessageType, _ structure: LanguageServerProtocol.StructuredLogKind ) -> Void, hooks: IndexHooks diff --git a/Sources/SemanticIndex/SemanticIndexManager.swift b/Sources/SemanticIndex/SemanticIndexManager.swift index c0202e6cf..61cab1a19 100644 --- a/Sources/SemanticIndex/SemanticIndexManager.swift +++ b/Sources/SemanticIndex/SemanticIndexManager.swift @@ -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. /// @@ -273,7 +274,8 @@ package final actor SemanticIndexManager { hooks: IndexHooks, indexTaskScheduler: TaskScheduler, logMessageToIndexLog: - @escaping @Sendable ( + @escaping @Sendable + ( _ message: String, _ type: WindowMessageType, _ structure: LanguageServerProtocol.StructuredLogKind ) -> Void, indexTasksWereScheduled: @escaping @Sendable (Int) -> Void, diff --git a/Sources/SemanticIndex/UpdateIndexStoreTaskDescription.swift b/Sources/SemanticIndex/UpdateIndexStoreTaskDescription.swift index af170b2fb..6480220b8 100644 --- a/Sources/SemanticIndex/UpdateIndexStoreTaskDescription.swift +++ b/Sources/SemanticIndex/UpdateIndexStoreTaskDescription.swift @@ -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 @@ -180,7 +181,8 @@ package struct UpdateIndexStoreTaskDescription: IndexTaskDescription { indexStoreUpToDateTracker: UpToDateTracker, indexFilesWithUpToDateUnit: Bool, logMessageToIndexLog: - @escaping @Sendable ( + @escaping @Sendable + ( _ message: String, _ type: WindowMessageType, _ structure: LanguageServerProtocol.StructuredLogKind ) -> Void, timeout: Duration, diff --git a/Sources/SourceKitLSP/SourceKitLSPServer.swift b/Sources/SourceKitLSP/SourceKitLSPServer.swift index e58186f41..6d62ab262 100644 --- a/Sources/SourceKitLSP/SourceKitLSPServer.swift +++ b/Sources/SourceKitLSP/SourceKitLSPServer.swift @@ -383,7 +383,8 @@ package actor SourceKitLSPServer { private func handleRequest( for request: RequestAndReply, requestHandler: - @Sendable @escaping ( + @Sendable @escaping + ( RequestType, Workspace, LanguageService ) async throws -> RequestType.Response