yonaskolb / XcodeGen

A Swift command line tool for generating your Xcode project
MIT License
6.88k stars 809 forks source link

XcodeGen stops generating schemes when using 'preAction' in a project with lots of schemes #1409

Open arkonxu opened 8 months ago

arkonxu commented 8 months ago

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

Steps to Reproduce

  1. Create a project.yml with more than 150 schemes.
  2. Set up a "preAction" in all schemes to run XcodeGen.
  3. 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

arkonxu commented 8 months ago

I made a PR with the fix that worked for me: https://github.com/yonaskolb/XcodeGen/pull/1410