Skip to content

Conversation

@yimajo
Copy link

@yimajo yimajo commented Apr 15, 2025

Background

When using "Convert to Folder" on groups in projects within a CocoaPods workspace, an empty exceptions = (); entry is unnecessarily added to the pbxproj file.

Why This Is a Problem

There's no need to include this empty configuration when there are no exceptions. If it were truly necessary, Xcode itself would add exceptions = (); when performing the Convert to Folder operation. These unnecessary entries make the project file needlessly complex and create unwanted diffs.

Solution

The PBXNativeTarget class in this project already overrides the to_hash_as method to exclude empty collections (like packageProductDependencies) from serialization.

By extending the PBXFileSystemSynchronizedRootGroup class with a similar approach, we can prevent empty exceptions collections from being serialized, eliminating the unnecessary exceptions = (); entries in pbxproj files.

@adellibovi
Copy link

Thanks for opening this up, we are experiencing the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants