yonaskolb / XcodeGen

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

Duplicate group generated inconsistently between runs #1339

Closed ghost closed 1 year ago

ghost commented 1 year ago

I have a project which contains 3 targets. The 3 targets all have the same source folder (this will be fixed in the future, but it's what I've got for now). When xcodegen generates the project, usually it deduplicates those groups correctly and I just see one in Xcode with each file being a member of all 3 targets. Sometimes however, it generates two of those groups. In the pbxproj they contain identical contents, but Xcode only loads one of them. With createIntermediateGroups: true this happened every time. With createIntermediateGroups: false it happens maybe 80% of the time.

When checking a diff of the pbxproj between the "good" and "bad" versions, I also noticed a group with the same content but with a TEMP_ prefix. This one however was not added to the root group. It exists without a parent.