Skip to content

Commit 4692bb7

Browse files
committed
Import os instead of OSLog
`OSLog` is a module to consume logs and `os` is the module to produce them. Also, make the import `private` rdar://137790052
1 parent d145cb2 commit 4692bb7

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Sources/SwiftSyntaxBuilder/SyntaxParsable+ExpressibleByStringInterpolation.swift

+9-3
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,23 @@ internal import SwiftDiagnostics
1515
public import SwiftParser
1616
internal import SwiftParserDiagnostics
1717
internal import SwiftSyntax
18+
// Don't introduce a dependency on OSLog when building SwiftSyntax using CMake
19+
// for the compiler.
20+
#if canImport(os) && !SWIFTSYNTAX_NO_OSLOG_DEPENDENCY
21+
private import os
22+
#endif
23+
1824
#else
1925
import SwiftDiagnostics
2026
import SwiftParser
2127
import SwiftParserDiagnostics
2228
import SwiftSyntax
23-
#endif
2429

2530
// Don't introduce a dependency on OSLog when building SwiftSyntax using CMake
2631
// for the compiler.
27-
#if canImport(OSLog) && !SWIFTSYNTAX_NO_OSLOG_DEPENDENCY
28-
import OSLog
32+
#if canImport(os) && !SWIFTSYNTAX_NO_OSLOG_DEPENDENCY
33+
import os
34+
#endif
2935
#endif
3036

3137
/// Only set from `withStringInterpolationParsingErrorsSuppressed`, which is only intended for testing purposes that are

0 commit comments

Comments
 (0)