From 6b4b4b261b1835a5c60ad3b577e1055fea8573bd Mon Sep 17 00:00:00 2001 From: Wilfred Hughes Date: Tue, 13 May 2025 13:29:24 +0100 Subject: [PATCH] Fix visibility on import triggering a compile warning Previously, building sourcekit-lsp would produce the following warning when building on macOS: $ swift build Building for debugging... /Users/wilfred/src/sourcekit-lsp/Sources/SKLogging/CustomLogStringConvertible.swift:13:9: warning: package import of 'Foundation' was not used in package declarations 11 | //===----------------------------------------------------------------------===// 12 | 13 | package import Foundation | `- warning: package import of 'Foundation' was not used in package declarations Remove the visibility modifier, so no warning is produced. --- Sources/SKLogging/CustomLogStringConvertible.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sources/SKLogging/CustomLogStringConvertible.swift b/Sources/SKLogging/CustomLogStringConvertible.swift index 59f24b479..bb88374c7 100644 --- a/Sources/SKLogging/CustomLogStringConvertible.swift +++ b/Sources/SKLogging/CustomLogStringConvertible.swift @@ -10,7 +10,11 @@ // //===----------------------------------------------------------------------===// +#if os(OSX) +import Foundation +#else package import Foundation +#endif #if !NO_CRYPTO_DEPENDENCY import Crypto