pointfreeco / swift-custom-dump

A collection of tools for debugging, diffing, and testing your application's data structures.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash when dumping a key path in release build with Xcode 14

arthuang-ui opened this issue · comments

Describe the bug
Dumping a key path crashes CustomDump. But this only happens in release build that builds on Xcode 14.
Our app uses CustomDump to do logging and now it always crashes when there's a BindingAction gets logged.
Tried on Xcode 13.4.1 and there's no problem.

To Reproduce
Just dump any key paths in release build in Xcode 14.
Sample project: https://github.com/jutoart/DumpKeyPath

public struct DumpKeyPath {
  public private(set) var text = "Hello, World!"
  private let keyPath: WritableKeyPath<DumpKeyPath, String> = \.text
  
  public static func main() {
    customDump(testObject.keyPath) // <-- crash here
  }
}

Screenshots

CleanShot 2022-11-07 at 10 10 53@2x

Environment

  • swift-custom-dump 0.6.0
  • Xcode 14.1.0 (tried on Xcode 14.0.1 and it's the same)
  • Swift 5.7