Expose all BSP messages used by SourceKit-LSP to BSP servers

The interaction to an out-of-process BSP server still went through the `BuildServerBuildSystem`, which doesn’t forward all messages to the build system and uses the old push-based model for build settings.

If we discover that the BSP server supports the new pull-based build settings model, we now forward all methods to it directly, without going through `BuiltInBuildSystemAdapter`, which has been renamed to `LegacyBuildServerBuildSystem`.

rdar://136106323
rdar://127606323
rdar://126493405
Fixes #1226
Fixes #1173
This commit is contained in:
Alex Hoppen
2024-09-19 12:43:05 -07:00
parent e75ee23cd6
commit 1fd700b810
26 changed files with 810 additions and 744 deletions

View File

@@ -28,13 +28,6 @@ package struct PrepareNotSupportedError: Error, CustomStringConvertible {
/// Provider of FileBuildSettings and other build-related information.
package protocol BuiltInBuildSystem: AnyObject, Sendable {
/// When opening an LSP workspace at `workspaceFolder`, determine the directory in which a project of this build system
/// starts. For example, a user might open the `Sources` folder of a SwiftPM project, then the project root is the
/// directory containing `Package.swift`.
///
/// Returns `nil` if the build system can't handle the given workspace folder
static func projectRoot(for workspaceFolder: AbsolutePath, options: SourceKitLSPOptions) -> AbsolutePath?
/// The root of the project that this build system manages. For example, for SwiftPM packages, this is the folder
/// containing Package.swift. For compilation databases it is the root folder based on which the compilation database
/// was found.