Skip to content

Import os instead of OSLog #2887

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down