Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support @unchecked Sendable #91

Open
crane-hiromu opened this issue Apr 22, 2024 · 0 comments
Open

Support @unchecked Sendable #91

crane-hiromu opened this issue Apr 22, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@crane-hiromu
Copy link

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)
Screenshot 2024-04-22 at 19 14 37



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 👍

@crane-hiromu crane-hiromu added the enhancement New feature or request label Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant