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

Add a new command line argument to allow setting an optional build directory for .swifttemplates #1147

Merged
merged 3 commits into from
Feb 28, 2023

Conversation

swwol
Copy link
Contributor

@swwol swwol commented Feb 25, 2023

what:

This adds a new command line argument to allow setting an optional build directory for .swifttemplates. When this is set the custom directory is used. If it's not set, then the system temp directory is used as before.

why:

As documented in 1142, when running several concurrent instances of sourcery there can be conflicts if they are all trying to write to the same temporary directory.

This scenario in which this happened for me is after creating a swift package manager plugin to generate mocks, and running that plugin on multiple targets within the same project or package file. This was causing build failures.

Allowing the plugin to set this new command line argument to its own work directory has resolved this issue as each target the plugin operates on has its own work directory.

@swwol
Copy link
Contributor Author

swwol commented Feb 27, 2023

Not sure why the validate_docs step is failing on the CI - same command is ok locally..

@krzysztofzablocki
Copy link
Owner

I'll update it with next release, thanks!

@krzysztofzablocki krzysztofzablocki merged commit e4e3971 into krzysztofzablocki:master Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants