yonaskolb / XcodeGen

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

Aggregate target with spaces #1406

Closed jonnyijapan closed 9 months ago

jonnyijapan commented 9 months ago

I have this project.yml

/.../
aggregateTargets:
  Find unused code:
    buildScripts:
      - name: "Find unused code"
        script: |
          PERIPHERY=$(~/.mint/bin/mint which periphery | tail -n 1) && $PERIPHERY scan --format xcode
        basedOnDependencyAnalysis: false
/.../

Until last week it worked fine, it generated both:

For some reason this week it does no longer generate the scheme.

If I change the project.yml to something like this, replacing the first space with an underscore, I can have it generate the scheme also

/.../
aggregateTargets:
  Find_unused code:
    buildScripts:
      - name: "Find unused code"
        script: |
          PERIPHERY=$(~/.mint/bin/mint which periphery | tail -n 1) && $PERIPHERY scan --format xcode
        basedOnDependencyAnalysis: false
/.../

I'm not sure what's going on, because this all worked last week. YAML-wise it seems that using spaces should be fine.

jonnyijapan commented 9 months ago

Seems like this version of xcodegen is in use: 2.33.0 I'll see if a newer version helps.

jonnyijapan commented 9 months ago

2.37.0 does not fix the problem.

jonnyijapan commented 9 months ago

I found out that the problems still occurs sometime even if I change all spaces to underscores. So it seems that sometimes schemes are not created, and sometimes they are. Maybe I'm using the scheme creation feature incorrectly altogether?

jonnyijapan commented 9 months ago

I think I found the problem...

If I make sure to delete a previously existing xcodeproj file before running xcodegen, the schemes are generated properly.