XcodeGen stops generating schemes when using 'preAction' in a project with lots of schemes
Problem Description
My application has over 150 schemes, and I'm attempting to run XcodeGen as a "preAction" in a scheme to simplify the project file to include only the necessary files. Each scheme is targeted for a different client, and each client has their own set of files for customizing the app's appearance. Originally, I had these files in different targets, but due to performance issues in Xcode, I want to keep the project file as lightweight as possible.
The issue is that when running a scheme, in most cases, XcodeGen stops before completing the project generation, and only a few schemes are actually created. I've logged the output to a log file, and all it shows is:
⚙️ Generating plists...
⚙️ Generating project...
⚙️ Writing project...
Additional Information
- XcodeGen Version: 2.37.0
Steps to Reproduce
- Create a project.yml with more than 150 schemes.
- Set up a "preAction" in all schemes to run XcodeGen.
- Execute a scheme.
Expected Behavior
I expect XcodeGen to successfully generate all schemes and finish building the project without interruptions.
Current Behavior
XcodeGen stops before completing the project generation
I made a PR with the fix that worked for me: https://github.com/yonaskolb/XcodeGen/pull/1410