Kolos65 / Mockable

A Swift macro driven auto-mocking library.
MIT License
199 stars 14 forks source link

fix: support sendable conformance #58

Closed Kolos65 closed 1 week ago

Kolos65 commented 1 week ago

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.