Skip to content

Commit

Permalink
Fix Xcode 15.3 Release Crash (#108)
Browse files Browse the repository at this point in the history
A SIL function we load seems to be unavailable, so let's limit old key
path printing to DEBUG builds.
  • Loading branch information
stephencelis committed Mar 19, 2024
1 parent 4a87bb7 commit 0a5bff0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/CustomDump/Conformances/KeyPath.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ extension AnyKeyPath: CustomDumpStringConvertible {
return self.debugDescription
}
#endif
#if os(iOS) || os(macOS) || os(tvOS) || os(watchOS)
#if DEBUG && (os(iOS) || os(macOS) || os(tvOS) || os(watchOS))
keyPathToNameLock.lock()
defer { keyPathToNameLock.unlock() }

Expand Down Expand Up @@ -49,7 +49,7 @@ extension AnyKeyPath: CustomDumpStringConvertible {
}
}

#if os(iOS) || os(macOS) || os(tvOS) || os(watchOS)
#if DEBUG && (os(iOS) || os(macOS) || os(tvOS) || os(watchOS))
private var keyPathToNameLock = NSRecursiveLock()
private var keyPathToName: [AnyKeyPath: String] = [:]

Expand Down

0 comments on commit 0a5bff0

Please sign in to comment.