Kolos65 / Mockable

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

feat: rename MockService to MockableService to avoid name collision #43

Closed gaelfoppolo closed 2 months ago

gaelfoppolo commented 2 months ago

Summary

This PR renames MockService to MockableService in order to fix a name collision.

Details

This happens when we try to mock a protocol named Service. This is common inside a local Swift package, to expose a particular service (API, storage, etc.). The generated macro will have a MockService class and will collide with the MockService protocol (public) inside the Mockable package.

We got the following build errors:

'MockService' inherits from itself
Type 'MyPackage.MockService' does not conform to protocol 'Mockable.MockService'

Renaming MockService to MockableService fix it.

Kolos65 commented 2 months ago

Thanks @gaelfoppolo, merged and released in 0.0.8

mihaicris-adoreme commented 2 months ago

Thanks. Just a note: I would rename it even further with an underscore, to be clear that it is an internal protocol. _MockableService