Create BuildSystem in BuiltInBuildSystemAdapter

This finalizes the move of `BuiltInBuildSystem` creation into `BuiltInBuildSystemAdapter` and means that we can set the message handler of the `BuiltInBuildSystem` during initialization instead of using a setter method.
This commit is contained in:
Alex Hoppen
2024-08-24 00:37:25 -07:00
parent 9f4088038c
commit ea21175dd7
11 changed files with 115 additions and 93 deletions

View File

@@ -17,6 +17,7 @@ import SKOptions
import ToolchainRegistry
import struct TSCBasic.AbsolutePath
import struct TSCBasic.RelativePath
/// Defines how well a `BuildSystem` can handle a file with a given URI.
package enum FileHandlingCapability: Comparable, Sendable {
@@ -98,11 +99,6 @@ package protocol BuiltInBuildSystem: AnyObject, Sendable {
/// context.
func setDelegate(_ delegate: BuildSystemDelegate?) async
/// Set the message handler that is used to send messages from the build system to SourceKit-LSP.
// FIXME: (BSP Migration) This should be set in the initializer but can't right now because BuiltInBuildSystemAdapter is not
// responsible for creating the build system.
func setMessageHandler(_ messageHandler: BuiltInBuildSystemMessageHandler) async
/// Whether the build system is capable of preparing a target for indexing, ie. if the `prepare` methods has been
/// implemented.
var supportsPreparation: Bool { get }