pointfreeco / swift-issue-reporting

Report issues in your application and library code as Xcode runtime warnings, breakpoints, assertions, and do so in a testable manner.
https://www.pointfree.co
MIT License
368 stars 60 forks source link

Build error for `unimplemented()` with tuple params (Xcode 16 beta 5) #120

Closed oskarek closed 4 weeks ago

oskarek commented 4 weeks ago

This causes a build error on the current version (1.2.5), and on every 1.2.x version:

let _: ((String, Int)) -> String = unimplemented("")

without any helpful compiler error message. The same thing works without issue on version 1.1.2.

The problem seems to occur for functions with tuple parameters.

Edit: I should have mentioned that this is on Xcode 16 beta 5. And I just noticed that the problem doesn't seem to happen on Xcode 15.4. I updated the title to reflect this. So maybe it's not actually a problem with the library, but with the new Xcode beta. Let me know if I should close this issue.

mbrandonw commented 4 weeks ago

Yes, unfortunately this looks like a compiler bug. Unfortunately it crashes on Xcode 16.0 beta 6 and Xcode 16.1 beta. I have filed a bug report here, and we will just have to wait until that is fixed. In the meantime you may want to bundle that tuple into a proper struct, or just implement an unimplemented closure by hand.

I will going to convert this to a discussion for now since I don't think there is much we can do, but if you find a workaround please let us know!