Skip to content

Commit ad842bf

Browse files
authored
Merge pull request #2309 from bnbarham/log-on-absolute-comp-db
Log when absolute compilation DB search paths are skipped
2 parents 3096e53 + 8c4f1ad commit ad842bf

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

Sources/BuildServerIntegration/DetermineBuildServer.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ private func searchForCompilationDatabaseConfig(
2626
options: SourceKitLSPOptions
2727
) -> BuildServerSpec? {
2828
let searchPaths =
29-
(options.compilationDatabaseOrDefault.searchPaths ?? []).compactMap {
30-
try? RelativePath(validating: $0)
29+
(options.compilationDatabaseOrDefault.searchPaths ?? []).compactMap { searchPath in
30+
orLog("Compilation DB search path") {
31+
try RelativePath(validating: searchPath)
32+
}
3133
} + [
3234
// These default search paths match the behavior of `clangd`
3335
try! RelativePath(validating: "."),

Sources/SourceKitLSP/SourceKitLSPServer.swift

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -912,13 +912,7 @@ extension SourceKitLSPServer {
912912
logger.log("Cannot open workspace before server is initialized")
913913
throw NoCapabilityRegistryError()
914914
}
915-
let options = SourceKitLSPOptions.merging(
916-
base: self.options,
917-
override: SourceKitLSPOptions(
918-
path: workspaceFolder.fileURL?
919-
.appending(components: ".sourcekit-lsp", "config.json")
920-
)
921-
)
915+
922916
logger.log("Creating workspace at \(workspaceFolder.forLogging)")
923917
logger.logFullObjectInMultipleLogMessages(header: "Workspace options", options.loggingProxy)
924918

0 commit comments

Comments
 (0)