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

fix: support sendable conformance #58

Merged
merged 1 commit into from
Jun 24, 2024
Merged

fix: support sendable conformance #58

merged 1 commit into from
Jun 24, 2024

Conversation

Kolos65
Copy link
Owner

@Kolos65 Kolos65 commented Jun 24, 2024

As reported in #57, generated mock implementations will not compile with strict concurrency checking in case of Sendable protocols.

Changing the mocker variable to a let constant and adding @unchecked Sendable to the Mocker class will resolve the issue. @unchecked Sendable is safe to use as Mocker has its own synchronisation implemented for all mutations inside.

@Kolos65 Kolos65 added the bug Something isn't working label Jun 24, 2024
@Kolos65 Kolos65 linked an issue Jun 24, 2024 that may be closed by this pull request
@Kolos65 Kolos65 merged commit 956861a into main Jun 24, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build Warning when Mock a Sendable Protocol
2 participants