Skip to content

Commit f44489c

Browse files
committed
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.
1 parent 3f1568c commit f44489c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/SKLogging/CustomLogStringConvertible.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13+
#if SOURCEKIT_LSP_FORCE_NON_DARWIN_LOGGER
1314
package import Foundation
15+
#else
16+
import Foundation
17+
#endif
1418

1519
#if !NO_CRYPTO_DEPENDENCY
1620
import Crypto

0 commit comments

Comments
 (0)