@@ -16,16 +16,17 @@ public import LanguageServerProtocol
16
16
import LanguageServerProtocolExtensions
17
17
import SwiftExtensions
18
18
import TSCExtensions
19
- import ToolchainRegistry
20
19
21
20
import struct TSCBasic. AbsolutePath
22
21
23
22
#if compiler(>=6)
24
23
package import SKOptions
25
24
package import SourceKitLSP
25
+ package import ToolchainRegistry
26
26
#else
27
27
import SKOptions
28
28
import SourceKitLSP
29
+ import ToolchainRegistry
29
30
#endif
30
31
31
32
/// Launches a `SourceKitLSPServer` in-process and allows sending messages to it.
@@ -41,7 +42,7 @@ public final class InProcessSourceKitLSPClient: Sendable {
41
42
messageHandler: any MessageHandler
42
43
) async throws {
43
44
try await self . init (
44
- toolchainPath : toolchainPath,
45
+ toolchainRegistry : ToolchainRegistry ( installPath : toolchainPath) ,
45
46
options: SourceKitLSPOptions ( ) ,
46
47
capabilities: capabilities,
47
48
workspaceFolders: workspaceFolders,
@@ -53,7 +54,7 @@ public final class InProcessSourceKitLSPClient: Sendable {
53
54
///
54
55
/// `messageHandler` handles notifications and requests sent from the SourceKit-LSP server to the client.
55
56
package init (
56
- toolchainPath : URL ? ,
57
+ toolchainRegistry : ToolchainRegistry ,
57
58
options: SourceKitLSPOptions = SourceKitLSPOptions ( ) ,
58
59
hooks: Hooks = Hooks ( ) ,
59
60
capabilities: ClientCapabilities = ClientCapabilities ( ) ,
@@ -63,7 +64,7 @@ public final class InProcessSourceKitLSPClient: Sendable {
63
64
let serverToClientConnection = LocalConnection ( receiverName: " client " )
64
65
self . server = SourceKitLSPServer (
65
66
client: serverToClientConnection,
66
- toolchainRegistry: ToolchainRegistry ( installPath : toolchainPath ) ,
67
+ toolchainRegistry: toolchainRegistry ,
67
68
options: options,
68
69
hooks: hooks,
69
70
onExit: {
0 commit comments