Skip to content

Support converting groups to and from Xcode 16 buildable folders - #142

Open
Ryan Zulkoski (rzulkoski) wants to merge 1 commit into
Lightricks:mainfrom
hallow-inc:fix/group-to-buildable-folder-conversion
Open

Support converting groups to and from Xcode 16 buildable folders#142
Ryan Zulkoski (rzulkoski) wants to merge 1 commit into
Lightricks:mainfrom
hallow-inc:fix/group-to-buildable-folder-conversion

Conversation

@rzulkoski

Copy link
Copy Markdown
Contributor

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-place isa change on a node that keeps its name and location, which the resolver couldn't apply — it raised Unsupported removed change type for PBXGroup.

This builds on the buildable-folder support added in #141 and handles the conversion case, in both directions:

  • folder → group is applied before files are added, so restored child files land in the new group (a buildable folder has no navigable children).
  • group → folder is applied after the group's explicit children are removed, so those removals can still navigate the group.

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

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>
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.

1 participant