Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Sources/BuildServerIntegration/DetermineBuildServer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ private func searchForCompilationDatabaseConfig(
options: SourceKitLSPOptions
) -> BuildServerSpec? {
let searchPaths =
(options.compilationDatabaseOrDefault.searchPaths ?? []).compactMap {
try? RelativePath(validating: $0)
(options.compilationDatabaseOrDefault.searchPaths ?? []).compactMap { searchPath in
orLog("Compilation DB search path") {
try RelativePath(validating: searchPath)
}
} + [
// These default search paths match the behavior of `clangd`
try! RelativePath(validating: "."),
Expand Down
8 changes: 1 addition & 7 deletions Sources/SourceKitLSP/SourceKitLSPServer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -912,13 +912,7 @@ extension SourceKitLSPServer {
logger.log("Cannot open workspace before server is initialized")
throw NoCapabilityRegistryError()
}
let options = SourceKitLSPOptions.merging(
base: self.options,
override: SourceKitLSPOptions(
path: workspaceFolder.fileURL?
.appending(components: ".sourcekit-lsp", "config.json")
)
)

logger.log("Creating workspace at \(workspaceFolder.forLogging)")
logger.logFullObjectInMultipleLogMessages(header: "Workspace options", options.loggingProxy)

Expand Down