Skip to content

Commit f2011a5

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 de8ba65 commit f2011a5

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
@@ -7,7 +7,7 @@ extension AnyKeyPath: CustomDumpStringConvertible {
77
return self.debugDescription
88
}
99
#endif
10-
#if os(iOS) || os(macOS) || os(tvOS) || os(watchOS)
10+
#if DEBUG && (os(iOS) || os(macOS) || os(tvOS) || os(watchOS))
1111
keyPathToNameLock.lock()
1212
defer { keyPathToNameLock.unlock() }
1313

@@ -44,7 +44,7 @@ extension AnyKeyPath: CustomDumpStringConvertible {
4444
}
4545
}
4646

47-
#if os(iOS) || os(macOS) || os(tvOS) || os(watchOS)
47+
#if DEBUG && (os(iOS) || os(macOS) || os(tvOS) || os(watchOS))
4848
private var keyPathToNameLock = NSRecursiveLock()
4949
private var keyPathToName: [AnyKeyPath: String] = [:]
5050

0 commit comments

Comments
 (0)