diff --git a/Sources/BuildSystemIntegration/BuildSystemManager.swift b/Sources/BuildSystemIntegration/BuildSystemManager.swift index 1d8ee044..cd9349a3 100644 --- a/Sources/BuildSystemIntegration/BuildSystemManager.swift +++ b/Sources/BuildSystemIntegration/BuildSystemManager.swift @@ -132,7 +132,7 @@ private enum BuildSystemAdapter { } } -private extension BuildSystemKind { +private extension BuildSystemSpec { private static func createBuiltInBuildSystemAdapter( projectRoot: AbsolutePath, messagesToSourceKitLSPHandler: any MessageHandler, @@ -172,8 +172,8 @@ private extension BuildSystemKind { buildSystemTestHooks testHooks: BuildSystemTestHooks, messagesToSourceKitLSPHandler: any MessageHandler ) async -> BuildSystemAdapter? { - switch self { - case .buildServer(projectRoot: let projectRoot): + switch self.kind { + case .buildServer: let buildSystem = await orLog("Creating external build system") { try await ExternalBuildSystemAdapter( projectRoot: projectRoot, @@ -186,7 +186,7 @@ private extension BuildSystemKind { } logger.log("Created external build server at \(projectRoot.pathString)") return .external(buildSystem) - case .compilationDatabase(projectRoot: let projectRoot): + case .compilationDatabase: return await Self.createBuiltInBuildSystemAdapter( projectRoot: projectRoot, messagesToSourceKitLSPHandler: messagesToSourceKitLSPHandler, @@ -200,7 +200,7 @@ private extension BuildSystemKind { connectionToSourceKitLSP: connectionToSourceKitLSP ) } - case .swiftPM(projectRoot: let projectRoot): + case .swiftPM: return await Self.createBuiltInBuildSystemAdapter( projectRoot: projectRoot, messagesToSourceKitLSPHandler: messagesToSourceKitLSPHandler, @@ -214,7 +214,7 @@ private extension BuildSystemKind { testHooks: testHooks.swiftPMTestHooks ) } - case .testBuildSystem(projectRoot: let projectRoot): + case .testBuildSystem: return await Self.createBuiltInBuildSystemAdapter( projectRoot: projectRoot, messagesToSourceKitLSPHandler: messagesToSourceKitLSPHandler, @@ -349,7 +349,7 @@ package actor BuildSystemManager: QueueBasedMessageHandler { } package init( - buildSystemKind: BuildSystemKind?, + buildSystemSpec: BuildSystemSpec?, toolchainRegistry: ToolchainRegistry, options: SourceKitLSPOptions, connectionToClient: BuildSystemManagerConnectionToClient, @@ -358,8 +358,8 @@ package actor BuildSystemManager: QueueBasedMessageHandler { self.toolchainRegistry = toolchainRegistry self.options = options self.connectionToClient = connectionToClient - self.projectRoot = buildSystemKind?.projectRoot - self.buildSystemAdapter = await buildSystemKind?.createBuildSystemAdapter( + self.projectRoot = buildSystemSpec?.projectRoot + self.buildSystemAdapter = await buildSystemSpec?.createBuildSystemAdapter( toolchainRegistry: toolchainRegistry, options: options, buildSystemTestHooks: buildSystemTestHooks, @@ -388,8 +388,8 @@ package actor BuildSystemManager: QueueBasedMessageHandler { guard let buildSystemAdapter else { return nil } - guard let buildSystemKind else { - logger.fault("If we have a connectionToBuildSystem, we must have had a buildSystemKind") + guard let buildSystemSpec else { + logger.fault("If we have a connectionToBuildSystem, we must have had a buildSystemSpec") return nil } let initializeResponse = await orLog("Initializing build system") { @@ -398,7 +398,7 @@ package actor BuildSystemManager: QueueBasedMessageHandler { displayName: "SourceKit-LSP", version: "", bspVersion: "2.2.0", - rootUri: URI(buildSystemKind.projectRoot.asURL), + rootUri: URI(buildSystemSpec.projectRoot.asURL), capabilities: BuildClientCapabilities(languageIds: [.c, .cpp, .objective_c, .objective_cpp, .swift]) ) ) @@ -411,7 +411,7 @@ package actor BuildSystemManager: QueueBasedMessageHandler { // the build server. logger.log("Launched a legacy BSP server. Using push-based build settings model.") let legacyBuildServer = await LegacyBuildServerBuildSystem( - projectRoot: buildSystemKind.projectRoot, + projectRoot: buildSystemSpec.projectRoot, initializationData: initializeResponse, externalBuildSystemAdapter ) diff --git a/Sources/BuildSystemIntegration/BuiltInBuildSystemAdapter.swift b/Sources/BuildSystemIntegration/BuiltInBuildSystemAdapter.swift index 002c35ae..a50e38d3 100644 --- a/Sources/BuildSystemIntegration/BuiltInBuildSystemAdapter.swift +++ b/Sources/BuildSystemIntegration/BuiltInBuildSystemAdapter.swift @@ -27,19 +27,22 @@ import struct TSCBasic.AbsolutePath import struct TSCBasic.RelativePath #endif -package enum BuildSystemKind { - case buildServer(projectRoot: AbsolutePath) - case compilationDatabase(projectRoot: AbsolutePath) - case swiftPM(projectRoot: AbsolutePath) - case testBuildSystem(projectRoot: AbsolutePath) +/// The details necessary to create a `BuildSystemAdapter`. +package struct BuildSystemSpec { + package enum Kind { + case buildServer + case compilationDatabase + case swiftPM + case testBuildSystem + } - package var projectRoot: AbsolutePath { - switch self { - case .buildServer(let projectRoot): return projectRoot - case .compilationDatabase(let projectRoot): return projectRoot - case .swiftPM(let projectRoot): return projectRoot - case .testBuildSystem(let projectRoot): return projectRoot - } + package var kind: Kind + + package var projectRoot: AbsolutePath + + package init(kind: BuildSystemSpec.Kind, projectRoot: AbsolutePath) { + self.kind = kind + self.projectRoot = projectRoot } } diff --git a/Sources/BuildSystemIntegration/DetermineBuildSystem.swift b/Sources/BuildSystemIntegration/DetermineBuildSystem.swift index d8cac4e4..e564f93a 100644 --- a/Sources/BuildSystemIntegration/DetermineBuildSystem.swift +++ b/Sources/BuildSystemIntegration/DetermineBuildSystem.swift @@ -35,7 +35,7 @@ import struct TSCBasic.AbsolutePath package func determineBuildSystem( forWorkspaceFolder workspaceFolder: DocumentURI, options: SourceKitLSPOptions -) -> BuildSystemKind? { +) -> BuildSystemSpec? { var buildSystemPreference: [WorkspaceType] = [ .buildServer, .swiftPM, .compilationDatabase, ] @@ -52,17 +52,17 @@ package func determineBuildSystem( switch buildSystemType { case .buildServer: if let projectRoot = ExternalBuildSystemAdapter.projectRoot(for: workspaceFolderPath, options: options) { - return .buildServer(projectRoot: projectRoot) + return BuildSystemSpec(kind: .buildServer, projectRoot: projectRoot) } case .compilationDatabase: if let projectRoot = CompilationDatabaseBuildSystem.projectRoot(for: workspaceFolderPath, options: options) { - return .compilationDatabase(projectRoot: projectRoot) + return BuildSystemSpec(kind: .compilationDatabase, projectRoot: projectRoot) } case .swiftPM: if let projectRootURL = SwiftPMBuildSystem.projectRoot(for: workspaceFolderUrl, options: options), let projectRoot = try? AbsolutePath(validating: projectRootURL.filePath) { - return .swiftPM(projectRoot: projectRoot) + return BuildSystemSpec(kind: .swiftPM, projectRoot: projectRoot) } } } diff --git a/Sources/SourceKitLSP/SourceKitLSPServer.swift b/Sources/SourceKitLSP/SourceKitLSPServer.swift index 671fd8d8..b8b13582 100644 --- a/Sources/SourceKitLSP/SourceKitLSPServer.swift +++ b/Sources/SourceKitLSP/SourceKitLSPServer.swift @@ -229,16 +229,16 @@ package actor SourceKitLSPServer { // was added to it and thus currently doesn't know that it can handle that file. In that case, we shouldn't open // a new workspace for the same root. Instead, the existing workspace's build system needs to be reloaded. let uri = DocumentURI(url) - guard let buildSystemKind = determineBuildSystem(forWorkspaceFolder: uri, options: self.options) else { + guard let buildSystemSpec = determineBuildSystem(forWorkspaceFolder: uri, options: self.options) else { continue } - guard !projectRoots.contains(buildSystemKind.projectRoot) else { + guard !projectRoots.contains(buildSystemSpec.projectRoot) else { continue } guard let workspace = await orLog( "Creating workspace", - { try await createWorkspace(workspaceFolder: uri, buildSystemKind: buildSystemKind) } + { try await createWorkspace(workspaceFolder: uri, buildSystemSpec: buildSystemSpec) } ) else { continue @@ -809,7 +809,7 @@ extension SourceKitLSPServer { /// If the build system that was determined for the workspace does not satisfy `condition`, `nil` is returned. private func createWorkspace( workspaceFolder: DocumentURI, - buildSystemKind: BuildSystemKind? + buildSystemSpec: BuildSystemSpec? ) async throws -> Workspace { guard let capabilityRegistry = capabilityRegistry else { struct NoCapabilityRegistryError: Error {} @@ -833,7 +833,7 @@ extension SourceKitLSPServer { documentManager: self.documentManager, rootUri: workspaceFolder, capabilityRegistry: capabilityRegistry, - buildSystemKind: buildSystemKind, + buildSystemSpec: buildSystemSpec, toolchainRegistry: self.toolchainRegistry, options: options, testHooks: testHooks, @@ -918,7 +918,7 @@ extension SourceKitLSPServer { await orLog("Creating workspace from workspaceFolders") { let workspace = try await self.createWorkspace( workspaceFolder: workspaceFolder.uri, - buildSystemKind: determineBuildSystem(forWorkspaceFolder: workspaceFolder.uri, options: self.options) + buildSystemSpec: determineBuildSystem(forWorkspaceFolder: workspaceFolder.uri, options: self.options) ) return (workspace: workspace, isImplicit: false) } @@ -927,7 +927,7 @@ extension SourceKitLSPServer { let workspace = await orLog("Creating workspace from rootURI") { try await self.createWorkspace( workspaceFolder: uri, - buildSystemKind: determineBuildSystem(forWorkspaceFolder: uri, options: self.options) + buildSystemSpec: determineBuildSystem(forWorkspaceFolder: uri, options: self.options) ) } if let workspace { @@ -938,7 +938,7 @@ extension SourceKitLSPServer { let workspace = await orLog("Creating workspace from rootPath") { try await self.createWorkspace( workspaceFolder: uri, - buildSystemKind: determineBuildSystem(forWorkspaceFolder: uri, options: self.options) + buildSystemSpec: determineBuildSystem(forWorkspaceFolder: uri, options: self.options) ) } if let workspace { @@ -955,7 +955,7 @@ extension SourceKitLSPServer { documentManager: self.documentManager, rootUri: req.rootURI, capabilityRegistry: self.capabilityRegistry!, - buildSystemKind: nil, + buildSystemSpec: nil, toolchainRegistry: self.toolchainRegistry, options: options, testHooks: testHooks, @@ -1342,7 +1342,7 @@ extension SourceKitLSPServer { await orLog("Creating workspace after workspace folder change") { try await self.createWorkspace( workspaceFolder: workspaceFolder.uri, - buildSystemKind: determineBuildSystem(forWorkspaceFolder: workspaceFolder.uri, options: self.options) + buildSystemSpec: determineBuildSystem(forWorkspaceFolder: workspaceFolder.uri, options: self.options) ) } } diff --git a/Sources/SourceKitLSP/Workspace.swift b/Sources/SourceKitLSP/Workspace.swift index d98203b0..0e3636ac 100644 --- a/Sources/SourceKitLSP/Workspace.swift +++ b/Sources/SourceKitLSP/Workspace.swift @@ -172,7 +172,7 @@ package final class Workspace: Sendable, BuildSystemManagerDelegate { documentManager: DocumentManager, rootUri: DocumentURI?, capabilityRegistry: CapabilityRegistry, - buildSystemKind: BuildSystemKind?, + buildSystemSpec: BuildSystemSpec?, toolchainRegistry: ToolchainRegistry, options: SourceKitLSPOptions, testHooks: TestHooks, @@ -222,7 +222,7 @@ package final class Workspace: Sendable, BuildSystemManagerDelegate { } let buildSystemManager = await BuildSystemManager( - buildSystemKind: buildSystemKind, + buildSystemSpec: buildSystemSpec, toolchainRegistry: toolchainRegistry, options: options, connectionToClient: ConnectionToClient(sourceKitLSPServer: sourceKitLSPServer), @@ -230,7 +230,7 @@ package final class Workspace: Sendable, BuildSystemManagerDelegate { ) logger.log( - "Created workspace at \(rootUri.forLogging) with project root \(buildSystemKind?.projectRoot.pathString ?? "")" + "Created workspace at \(rootUri.forLogging) with project root \(buildSystemSpec?.projectRoot.pathString ?? "")" ) var index: IndexStoreDB? = nil diff --git a/Tests/BuildSystemIntegrationTests/BuildSystemManagerTests.swift b/Tests/BuildSystemIntegrationTests/BuildSystemManagerTests.swift index 28e1f7d4..4a33b97d 100644 --- a/Tests/BuildSystemIntegrationTests/BuildSystemManagerTests.swift +++ b/Tests/BuildSystemIntegrationTests/BuildSystemManagerTests.swift @@ -44,7 +44,7 @@ final class BuildSystemManagerTests: XCTestCase { ) let bsm = await BuildSystemManager( - buildSystemKind: nil, + buildSystemSpec: nil, toolchainRegistry: ToolchainRegistry.forTesting, options: SourceKitLSPOptions(), connectionToClient: DummyBuildSystemManagerConnectionToClient(), @@ -103,7 +103,7 @@ final class BuildSystemManagerTests: XCTestCase { let a = try DocumentURI(string: "bsm:a.swift") let mainFiles = ManualMainFilesProvider([a: [a]]) let bsm = await BuildSystemManager( - buildSystemKind: .testBuildSystem(projectRoot: try AbsolutePath(validating: "/")), + buildSystemSpec: BuildSystemSpec(kind: .testBuildSystem, projectRoot: try AbsolutePath(validating: "/")), toolchainRegistry: ToolchainRegistry.forTesting, options: SourceKitLSPOptions(), connectionToClient: DummyBuildSystemManagerConnectionToClient(), @@ -136,7 +136,7 @@ final class BuildSystemManagerTests: XCTestCase { let a = try DocumentURI(string: "bsm:a.swift") let mainFiles = ManualMainFilesProvider([a: [a]]) let bsm = await BuildSystemManager( - buildSystemKind: .testBuildSystem(projectRoot: try AbsolutePath(validating: "/")), + buildSystemSpec: BuildSystemSpec(kind: .testBuildSystem, projectRoot: try AbsolutePath(validating: "/")), toolchainRegistry: ToolchainRegistry.forTesting, options: SourceKitLSPOptions(), connectionToClient: DummyBuildSystemManagerConnectionToClient(), @@ -158,7 +158,7 @@ final class BuildSystemManagerTests: XCTestCase { let a = try DocumentURI(string: "bsm:a.swift") let mainFiles = ManualMainFilesProvider([a: [a]]) let bsm = await BuildSystemManager( - buildSystemKind: .testBuildSystem(projectRoot: try AbsolutePath(validating: "/")), + buildSystemSpec: BuildSystemSpec(kind: .testBuildSystem, projectRoot: try AbsolutePath(validating: "/")), toolchainRegistry: ToolchainRegistry.forTesting, options: SourceKitLSPOptions(), connectionToClient: DummyBuildSystemManagerConnectionToClient(), @@ -202,7 +202,7 @@ final class BuildSystemManagerTests: XCTestCase { ) let bsm = await BuildSystemManager( - buildSystemKind: .testBuildSystem(projectRoot: try AbsolutePath(validating: "/")), + buildSystemSpec: BuildSystemSpec(kind: .testBuildSystem, projectRoot: try AbsolutePath(validating: "/")), toolchainRegistry: ToolchainRegistry.forTesting, options: SourceKitLSPOptions(), connectionToClient: DummyBuildSystemManagerConnectionToClient(), @@ -266,7 +266,7 @@ final class BuildSystemManagerTests: XCTestCase { ) let bsm = await BuildSystemManager( - buildSystemKind: .testBuildSystem(projectRoot: try AbsolutePath(validating: "/")), + buildSystemSpec: BuildSystemSpec(kind: .testBuildSystem, projectRoot: try AbsolutePath(validating: "/")), toolchainRegistry: ToolchainRegistry.forTesting, options: SourceKitLSPOptions(), connectionToClient: DummyBuildSystemManagerConnectionToClient(), diff --git a/Tests/BuildSystemIntegrationTests/SwiftPMBuildSystemTests.swift b/Tests/BuildSystemIntegrationTests/SwiftPMBuildSystemTests.swift index 63d8008e..962a369f 100644 --- a/Tests/BuildSystemIntegrationTests/SwiftPMBuildSystemTests.swift +++ b/Tests/BuildSystemIntegrationTests/SwiftPMBuildSystemTests.swift @@ -108,7 +108,7 @@ final class SwiftPMBuildSystemTests: XCTestCase { ) let packageRoot = try resolveSymlinks(tempDir.appending(component: "pkg")) let buildSystemManager = await BuildSystemManager( - buildSystemKind: .swiftPM(projectRoot: packageRoot), + buildSystemSpec: BuildSystemSpec(kind: .swiftPM, projectRoot: packageRoot), toolchainRegistry: .forTesting, options: SourceKitLSPOptions(), connectionToClient: DummyBuildSystemManagerConnectionToClient(), @@ -176,7 +176,7 @@ final class SwiftPMBuildSystemTests: XCTestCase { ) let packageRoot = try AbsolutePath(validating: tempDir.appending(component: "pkg").asURL.realpath.filePath) let buildSystemManager = await BuildSystemManager( - buildSystemKind: .swiftPM(projectRoot: packageRoot), + buildSystemSpec: BuildSystemSpec(kind: .swiftPM, projectRoot: packageRoot), toolchainRegistry: .forTesting, options: SourceKitLSPOptions(), connectionToClient: DummyBuildSystemManagerConnectionToClient(), @@ -241,7 +241,7 @@ final class SwiftPMBuildSystemTests: XCTestCase { ) let buildSystemManager = await BuildSystemManager( - buildSystemKind: .swiftPM(projectRoot: packageRoot), + buildSystemSpec: BuildSystemSpec(kind: .swiftPM, projectRoot: packageRoot), toolchainRegistry: .forTesting, options: SourceKitLSPOptions(swiftPM: options), connectionToClient: DummyBuildSystemManagerConnectionToClient(), @@ -322,7 +322,7 @@ final class SwiftPMBuildSystemTests: XCTestCase { ) let packageRoot = tempDir.appending(component: "pkg") let buildSystemManager = await BuildSystemManager( - buildSystemKind: .swiftPM(projectRoot: packageRoot), + buildSystemSpec: BuildSystemSpec(kind: .swiftPM, projectRoot: packageRoot), toolchainRegistry: .forTesting, options: SourceKitLSPOptions(), connectionToClient: DummyBuildSystemManagerConnectionToClient(), @@ -362,7 +362,7 @@ final class SwiftPMBuildSystemTests: XCTestCase { ) let packageRoot = try resolveSymlinks(tempDir.appending(component: "pkg")) let buildSystemManager = await BuildSystemManager( - buildSystemKind: .swiftPM(projectRoot: packageRoot), + buildSystemSpec: BuildSystemSpec(kind: .swiftPM, projectRoot: packageRoot), toolchainRegistry: .forTesting, options: SourceKitLSPOptions(), connectionToClient: DummyBuildSystemManagerConnectionToClient(), @@ -419,7 +419,7 @@ final class SwiftPMBuildSystemTests: XCTestCase { ) let packageRoot = try resolveSymlinks(tempDir.appending(component: "pkg")) let buildSystemManager = await BuildSystemManager( - buildSystemKind: .swiftPM(projectRoot: packageRoot), + buildSystemSpec: BuildSystemSpec(kind: .swiftPM, projectRoot: packageRoot), toolchainRegistry: .forTesting, options: SourceKitLSPOptions(), connectionToClient: DummyBuildSystemManagerConnectionToClient(), @@ -482,7 +482,7 @@ final class SwiftPMBuildSystemTests: XCTestCase { ) let packageRoot = tempDir.appending(component: "pkg") let buildSystemManager = await BuildSystemManager( - buildSystemKind: .swiftPM(projectRoot: packageRoot), + buildSystemSpec: BuildSystemSpec(kind: .swiftPM, projectRoot: packageRoot), toolchainRegistry: .forTesting, options: SourceKitLSPOptions(), connectionToClient: DummyBuildSystemManagerConnectionToClient(), @@ -539,7 +539,7 @@ final class SwiftPMBuildSystemTests: XCTestCase { ) let packageRoot = try resolveSymlinks(tempDir.appending(component: "pkg")) let buildSystemManager = await BuildSystemManager( - buildSystemKind: .swiftPM(projectRoot: packageRoot), + buildSystemSpec: BuildSystemSpec(kind: .swiftPM, projectRoot: packageRoot), toolchainRegistry: .forTesting, options: SourceKitLSPOptions(), connectionToClient: DummyBuildSystemManagerConnectionToClient(), @@ -623,7 +623,7 @@ final class SwiftPMBuildSystemTests: XCTestCase { ) let packageRoot = tempDir.appending(component: "pkg") let buildSystemManager = await BuildSystemManager( - buildSystemKind: .swiftPM(projectRoot: packageRoot), + buildSystemSpec: BuildSystemSpec(kind: .swiftPM, projectRoot: packageRoot), toolchainRegistry: .forTesting, options: SourceKitLSPOptions(), connectionToClient: DummyBuildSystemManagerConnectionToClient(), @@ -678,7 +678,10 @@ final class SwiftPMBuildSystemTests: XCTestCase { let projectRoot = try XCTUnwrap(SwiftPMBuildSystem.projectRoot(for: packageRoot.asURL, options: .testDefault())) let buildSystemManager = await BuildSystemManager( - buildSystemKind: .swiftPM(projectRoot: try AbsolutePath(validating: projectRoot.filePath)), + buildSystemSpec: BuildSystemSpec( + kind: .swiftPM, + projectRoot: try AbsolutePath(validating: projectRoot.filePath) + ), toolchainRegistry: .forTesting, options: SourceKitLSPOptions(), connectionToClient: DummyBuildSystemManagerConnectionToClient(), @@ -766,7 +769,10 @@ final class SwiftPMBuildSystemTests: XCTestCase { let projectRoot = try XCTUnwrap(SwiftPMBuildSystem.projectRoot(for: symlinkRoot.asURL, options: .testDefault())) let buildSystemManager = await BuildSystemManager( - buildSystemKind: .swiftPM(projectRoot: try AbsolutePath(validating: projectRoot.filePath)), + buildSystemSpec: BuildSystemSpec( + kind: .swiftPM, + projectRoot: try AbsolutePath(validating: projectRoot.filePath) + ), toolchainRegistry: .forTesting, options: SourceKitLSPOptions(), connectionToClient: DummyBuildSystemManagerConnectionToClient(), @@ -808,7 +814,7 @@ final class SwiftPMBuildSystemTests: XCTestCase { ) let packageRoot = try resolveSymlinks(tempDir.appending(component: "pkg")) let buildSystemManager = await BuildSystemManager( - buildSystemKind: .swiftPM(projectRoot: packageRoot), + buildSystemSpec: BuildSystemSpec(kind: .swiftPM, projectRoot: packageRoot), toolchainRegistry: .forTesting, options: SourceKitLSPOptions(), connectionToClient: DummyBuildSystemManagerConnectionToClient(), @@ -884,7 +890,7 @@ final class SwiftPMBuildSystemTests: XCTestCase { ) let packageRoot = tempDir.appending(component: "pkg") let buildSystemManager = await BuildSystemManager( - buildSystemKind: .swiftPM(projectRoot: packageRoot), + buildSystemSpec: BuildSystemSpec(kind: .swiftPM, projectRoot: packageRoot), toolchainRegistry: .forTesting, options: SourceKitLSPOptions(), connectionToClient: DummyBuildSystemManagerConnectionToClient(), diff --git a/Tests/SourceKitLSPTests/BuildSystemTests.swift b/Tests/SourceKitLSPTests/BuildSystemTests.swift index 8eb8ea52..7d00dacd 100644 --- a/Tests/SourceKitLSPTests/BuildSystemTests.swift +++ b/Tests/SourceKitLSPTests/BuildSystemTests.swift @@ -49,7 +49,7 @@ final class BuildSystemTests: XCTestCase { let server = testClient.server let buildSystemManager = await BuildSystemManager( - buildSystemKind: .testBuildSystem(projectRoot: try AbsolutePath(validating: "/")), + buildSystemSpec: BuildSystemSpec(kind: .testBuildSystem, projectRoot: try AbsolutePath(validating: "/")), toolchainRegistry: .forTesting, options: .testDefault(), connectionToClient: DummyBuildSystemManagerConnectionToClient(),