swift-spyable
swift-spyable copied to clipboard
Support `@unchecked Sendable`
Thank you for creating this library 🤝
Is your feature request related to a problem? Please describe.
Coucnrrency compliance is required in Xcode 15.3
or later.
Compliance with Sendable
will result in a warning in the generated Spy
.
- example(on Xcode15.3)
Describe the solution you'd like
You can solve this by adding @unchecked Sendable
to the generated Spy
.
- example code
class XxxxCaseProtocolSpy: XxxxCaseProtocol, @unchecked Sendable {
or
extension XxxxCaseProtocolSpy: @unchecked Sendable {}
Describe alternatives you've considered
It would be nice if implementers could optionally choose whether to unchecked
or not.
- example code
@Spyable(behindPreprocessorFlag: "DEBUG", uncheckedSendable: true)
I was going to make my own PR, but it seemed difficult to modify it with my knowledge, sorry...
I hope you'll address this issue. Thank you 👍