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
Generating mocks for protocols exposed from a Swift Package #1152
Comments
Hello no news on this so far? |
You need to get at least definition scanned, you can add conformance in your own project code |
How may I achieve this? |
You'd need to use the spm cache |
I tried to use the swiftpm cache in the config file like this:
However it's still trying to access my folder locally instead of accessing it from the user folde, in fact the script fails saying: Of course since the sourcery script should also work across multiple collaborators and on the CI, I can't use multiple ../ to reach the user folder. How would I achieve that with the .yml configuration? |
@Velin92 you might want to consider using a build tool plugin like I've mentioned in here https://www.polpiella.dev/sourcery-swift-package-command-plugin |
Hello!
I would like to generate mocks for a protocols that are not in my codebase, but are exposed from the codebase of a Swift Package.
How may I be able to generate those mocks for such protocols in my codebase?
Since I am not able to extend a protocol with AutoMockable or // sourcery: AutoMockable, and since also they do not belong directly in my codebase and not get scanned.
The text was updated successfully, but these errors were encountered: