Hive
Generate the project only if it needs to be generated
GitHub issue · Open
Why is this needed?
Currently when running tuist generate, the project is regenerated regardless of whether it has actually changed. Each regeneration causes Xcode to detect “changes” and rebuild files, which can take significant time. For our Projects its up to a minute instead of just a couple seconds without regenerating.
Steps to address the need
This was already discussed in this issue which was closed without comment 5 years ago, but its not clear to me why it was closed. https://github.com/tuist/tuist/issues/956
Hey @pascalniklaspaul
While we could build a system to detect whether a regeneration is needed and make the command noop, we don’t expect users to have to regenerate the project that regularly; hence, we haven’t invested in it, especially now with buildable folders, where there’s even less need for it.
we don’t expect users to have to regenerate the project that regularly
Maybe I am using the tool the wrong way, but isn’t it necessary, to regenerate in every case of a git branch switch or a git pull when files have been added or removed? This happens very regulary, doen’t it? 🤔
Maybe I am using the tool the wrong way, but isn’t it necessary, to regenerate in every case of a git branch switch or a git pull when files have been added or removed? This happens very regulary, doen’t it? 🤔
You no longer need to regenerate when files are added or removed if you are using buildable folders.
Would still generating every project, but then only replacing the existing project if there is a diff between the old and new one solve this problem of Xcode building more without having to account for all various inputs that cause a project to be different?
I can’t find the post but somewhere I read that Xcode detects changes based on timestamp rather than content.