Skip to content

Commit 0a5bff0

Browse files
committed
Fix Xcode 15.3 Release Crash (#108)
A SIL function we load seems to be unavailable, so let's limit old key path printing to DEBUG builds.
1 parent 4a87bb7 commit 0a5bff0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/CustomDump/Conformances/KeyPath.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ extension AnyKeyPath: CustomDumpStringConvertible {
88
return self.debugDescription
99
}
1010
#endif
11-
#if os(iOS) || os(macOS) || os(tvOS) || os(watchOS)
11+
#if DEBUG && (os(iOS) || os(macOS) || os(tvOS) || os(watchOS))
1212
keyPathToNameLock.lock()
1313
defer { keyPathToNameLock.unlock() }
1414

@@ -49,7 +49,7 @@ extension AnyKeyPath: CustomDumpStringConvertible {
4949
}
5050
}
5151

52-
#if os(iOS) || os(macOS) || os(tvOS) || os(watchOS)
52+
#if DEBUG && (os(iOS) || os(macOS) || os(tvOS) || os(watchOS))
5353
private var keyPathToNameLock = NSRecursiveLock()
5454
private var keyPathToName: [AnyKeyPath: String] = [:]
5555

0 commit comments

Comments
 (0)