mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-03-02 18:23:24 +01:00
Split determining which build system to use for a workspace and the workspace creation
This allows us to create the build system from a `BuiltInBuildSystemAdapter` when it receives an `InitializeRequest`, which will be done in a follow-up commit.
This commit is contained in:
@@ -15,6 +15,7 @@ import Foundation
|
||||
import LanguageServerProtocol
|
||||
import LanguageServerProtocolJSONRPC
|
||||
import SKLogging
|
||||
import SKOptions
|
||||
import SKSupport
|
||||
import SwiftExtensions
|
||||
import ToolchainRegistry
|
||||
@@ -259,6 +260,13 @@ private func readReponseDataKey(data: LSPAny?, key: String) -> String? {
|
||||
}
|
||||
|
||||
extension BuildServerBuildSystem: BuiltInBuildSystem {
|
||||
static package func projectRoot(for workspaceFolder: AbsolutePath, options: SourceKitLSPOptions) -> AbsolutePath? {
|
||||
guard localFileSystem.isFile(workspaceFolder.appending(component: "buildServer.json")) else {
|
||||
return nil
|
||||
}
|
||||
return workspaceFolder
|
||||
}
|
||||
|
||||
package nonisolated var supportsPreparation: Bool { false }
|
||||
|
||||
/// The build settings for the given file.
|
||||
|
||||
Reference in New Issue
Block a user