From 4d065de19ba9be583845ae31e1d3e1cad630e130 Mon Sep 17 00:00:00 2001 From: clemo97 Date: Sun, 3 Aug 2025 17:31:57 +0300 Subject: [PATCH 1/2] Replace fatalError with proper error handling for non-incremental sync --- Sources/SourceKitLSP/SourceKitLSPServer.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/SourceKitLSP/SourceKitLSPServer.swift b/Sources/SourceKitLSP/SourceKitLSPServer.swift index a684d6d38..de11887be 100644 --- a/Sources/SourceKitLSP/SourceKitLSPServer.swift +++ b/Sources/SourceKitLSP/SourceKitLSPServer.swift @@ -519,7 +519,8 @@ package actor SourceKitLSPServer { syncKind = .incremental } guard syncKind == .incremental else { - fatalError("non-incremental update not implemented") + logger.error("Received non-incremental update request, which is not implemented") + throw ResponseError.internalError("non-incremental update not implemented") } await service.clientInitialized(InitializedNotification()) From 520203786a970e70bdac1f3f73275f575eeba22e Mon Sep 17 00:00:00 2001 From: clemo97 Date: Mon, 4 Aug 2025 19:27:37 +0300 Subject: [PATCH 2/2] Remove redundant error logging in synckind check --- Sources/SourceKitLSP/SourceKitLSPServer.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/Sources/SourceKitLSP/SourceKitLSPServer.swift b/Sources/SourceKitLSP/SourceKitLSPServer.swift index de11887be..7372f7d69 100644 --- a/Sources/SourceKitLSP/SourceKitLSPServer.swift +++ b/Sources/SourceKitLSP/SourceKitLSPServer.swift @@ -519,7 +519,6 @@ package actor SourceKitLSPServer { syncKind = .incremental } guard syncKind == .incremental else { - logger.error("Received non-incremental update request, which is not implemented") throw ResponseError.internalError("non-incremental update not implemented") }