From 949ab20d76c5b49ccadbd07ffb40198afef26c92 Mon Sep 17 00:00:00 2001 From: Alex Hoppen Date: Wed, 7 May 2025 11:04:30 +0200 Subject: [PATCH] Log the path that SourceKit-LSP was launched from Generally helpful to get a hint about whether an open source toolchain is used and to help with toolchain discovery issues. --- Sources/sourcekit-lsp/SourceKitLSP.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/sourcekit-lsp/SourceKitLSP.swift b/Sources/sourcekit-lsp/SourceKitLSP.swift index ec7d4ca34..8e69f5165 100644 --- a/Sources/sourcekit-lsp/SourceKitLSP.swift +++ b/Sources/sourcekit-lsp/SourceKitLSP.swift @@ -237,6 +237,8 @@ struct SourceKitLSP: AsyncParsableCommand { fatalError("failed to redirect stdout -> stderr: \(strerror(errno)!)") } + logger.log("sourcekit-lsp launched from \(ProcessInfo.processInfo.arguments[0])") + let globalConfigurationOptions = globalConfigurationOptions if let logLevelStr = globalConfigurationOptions.loggingOrDefault.level, let logLevel = NonDarwinLogLevel(logLevelStr)