From 4692bb7b86c5e72dce1f18f16c2e58d92267b551 Mon Sep 17 00:00:00 2001 From: Alex Hoppen Date: Wed, 30 Oct 2024 09:43:17 -0700 Subject: [PATCH] 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 --- ...axParsable+ExpressibleByStringInterpolation.swift | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Sources/SwiftSyntaxBuilder/SyntaxParsable+ExpressibleByStringInterpolation.swift b/Sources/SwiftSyntaxBuilder/SyntaxParsable+ExpressibleByStringInterpolation.swift index f87f7e324ec..ad516fb38d0 100644 --- a/Sources/SwiftSyntaxBuilder/SyntaxParsable+ExpressibleByStringInterpolation.swift +++ b/Sources/SwiftSyntaxBuilder/SyntaxParsable+ExpressibleByStringInterpolation.swift @@ -15,17 +15,23 @@ internal import SwiftDiagnostics public import SwiftParser internal import SwiftParserDiagnostics internal import SwiftSyntax +// Don't introduce a dependency on OSLog when building SwiftSyntax using CMake +// for the compiler. +#if canImport(os) && !SWIFTSYNTAX_NO_OSLOG_DEPENDENCY +private import os +#endif + #else import SwiftDiagnostics import SwiftParser import SwiftParserDiagnostics import SwiftSyntax -#endif // Don't introduce a dependency on OSLog when building SwiftSyntax using CMake // for the compiler. -#if canImport(OSLog) && !SWIFTSYNTAX_NO_OSLOG_DEPENDENCY -import OSLog +#if canImport(os) && !SWIFTSYNTAX_NO_OSLOG_DEPENDENCY +import os +#endif #endif /// Only set from `withStringInterpolationParsingErrorsSuppressed`, which is only intended for testing purposes that are