You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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 aprebuildCommand
? Doing so would eliminate my hack while maintaining optimal build times.Thanks,
--David
The text was updated successfully, but these errors were encountered: