Allow workspace options to affect build system search

There were a few places that options only took place *after* determining
a build system, even though we have multiple that impact the search (eg.
`defaultBuildSystem` and `searchPaths`).

Additionally track project root and configuration paths separately, so
that when searching for implicit workspaces we can make sure to skip
creating duplicates.

(cherry picked from commit 0c896696c9)
This commit is contained in:
Ben Barham
2024-12-13 16:59:57 -08:00
parent b7fbb47b65
commit 333e950df2
20 changed files with 528 additions and 379 deletions

View File

@@ -27,8 +27,6 @@ import ToolchainRegistry
/// Build system to be used for testing BuildSystem and BuildSystemDelegate functionality with SourceKitLSPServer
/// and other components.
package actor TestBuildSystem: BuiltInBuildSystem {
package let projectRoot: URL
package let fileWatchers: [FileSystemWatcher] = []
package let indexStorePath: URL? = nil
@@ -46,11 +44,7 @@ package actor TestBuildSystem: BuiltInBuildSystem {
package nonisolated var supportsPreparation: Bool { false }
package init(
projectRoot: URL,
connectionToSourceKitLSP: any Connection
) {
self.projectRoot = projectRoot
package init(connectionToSourceKitLSP: any Connection) {
self.connectionToSourceKitLSP = connectionToSourceKitLSP
}