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

[Feature Request] Make this a "buildCommand" plugin instead of a "prebuildCommand" plugin #17

Open
djehrlich opened this issue Oct 17, 2023 · 0 comments

Comments

@djehrlich
Copy link

djehrlich commented Oct 17, 2023

I work on a project split into ~60 Frameworks. ~40 of those Frameworks utilize SwiftGen via a Run Script Phase to generate type safe asset references - which is wonderful. Build times are acceptable because SwiftGen does not rewrite files that are unchanged.

I've transitioned the project to Packages and I'm now utilizing the SwiftGenPlugin to generate the type safe asset references. After completing the transition, the build times seemed off. Because the SwiftGenPlugin uses a prebuildCommand and erases the contents of its destination folder for each build, the SwiftGen generated code is being rebuilt for each build. To address the issue, I forked the SwiftGenPlugin and removed the code that erases the contents of the destination folder. I recognize this solution is not optimal (ok...it's a hack) and I understand why the decision to erase the destination folder was made. However, in the project I work on, it drops the edit/build/run cycle time from ~30 seconds per build to ~4 seconds per build.

Though I know it wouldn't be pleasant, is there any plan to rewrite this plugin to be a buildCommand instead of a prebuildCommand? Doing so would eliminate my hack while maintaining optimal build times.

Thanks,
--David

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

No branches or pull requests

1 participant