Support converting groups to and from Xcode 16 buildable folders - #142
Open
Ryan Zulkoski (rzulkoski) wants to merge 1 commit into
Open
Conversation
Xcode 16 can convert a plain group (PBXGroup) into a buildable folder (PBXFileSystemSynchronizedRootGroup) or back. The two are unrelated classes, so the change appears as an in-place `isa` change on a node that keeps its name and location, which the resolver could not apply (it raised "Unsupported removed change type for PBXGroup"). Handle both directions: folder->group before files are added (so restored children land in the new group), group->folder after the group's explicit children are removed (so those removals can still navigate the group). Tear the old node down through a build-file-cleaning removal so none are left dangling, and make any group/file addition whose path is at or under a buildable folder a no-op, since a folder includes its descendants implicitly. When both sides convert the same node with diverging attributes -- which a conversion diff cannot merge automatically -- surface a conflict for manual resolution rather than dropping the change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Xcode 16 can convert a plain group (
PBXGroup) into a buildable folder (PBXFileSystemSynchronizedRootGroup) or back. Because the two are unrelated classes, the change appears in a project diff as an in-placeisachange on a node that keeps its name and location, which the resolver couldn't apply — it raisedUnsupported removed change type for PBXGroup.This builds on the buildable-folder support added in #141 and handles the conversion case, in both directions:
children).The old node is torn down through a build-file-cleaning removal so none are left dangling, and any group/file addition whose path is at or under a buildable folder becomes a no-op (a folder includes its descendants implicitly). When both sides convert the same node with diverging attributes — which a conversion diff can't merge automatically — the conflict is surfaced for manual resolution rather than silently dropped.
Testing
Adds specs for both directions, three-way divergence, both-sides conversions, and additions under a converted folder; full suite green. Validated end-to-end on a real conflict from an Xcode 26 project that adopted buildable folders.
Disclosure
Developed with Claude Code, including several rounds of automated adversarial review before submission.
🤖 Generated with Claude Code