Conversation
Handle additions under PBXNativeTarget and group-like containers so Xcode 16 synchronized folder changes no longer fail as unsupported components.
|
Ben Yohay (@byohay) Barak Weiss (@barakwei) Yonathan Oren (@oryonatan) are we planning to merge this? |
|
Thanks for picking this up! can you share the pbxproj (or the diff) that motivated it? I want to Relatedly, the Finally, could you add specs (every other supported |
Thanks for the detailed review. Unfortunately, quite a bit of time has passed and I no longer have the original As far as I remember, the project had been created or modified with Xcode 16 and contained a This patch was a narrow fix for that failure. It added dispatching for Looking at the implementation again, I agree that it may be incomplete if the same synchronized root group is also referenced from I no longer have the original fixture to verify whether the synchronized root group was present in both locations, so this should be treated as a project-specific workaround rather than a complete implementation. A proper fix should handle the group in the |
|
fair. it was a long time. is your project still using anything but buildable folders? if so, i'l try to add a proper fix. |
|
Hi Noam Freeman (@noamfreeman) ivoidcat — jumping in from the sidelines. We hit this same failure on an Xcode 26 project that uses buildable folders (introduced in Xcode 16), and used ivoidcat's patch here plus Noam Freeman (@noamfreeman)'s review as the spec to build out a complete implementation (with Claude Code's help — the resulting commit is co-authored accordingly). It follows the review checklist directly:
It also handles Since you mentioned you might take a crack at a proper fix, I didn't want to step on that — would a PR be welcome, or are you already mid-fix? Happy to open one (crediting this thread) whenever suits. |
|
hi Ryan Zulkoski (@rzulkoski)! |
Xcode 16 "buildable folders" are stored as PBXFileSystemSynchronizedRootGroup objects, referenced both from the main group tree and from a target's fileSystemSynchronizedGroups. Kintsugi had no handling for this isa, so merging any conflict touching such a folder failed with "Trying to add unsupported component type PBXFileSystemSynchronizedRootGroup". This implements complete support, addressing the review feedback on Lightricks#139: - Handle the folder in the main group addition/removal pipeline instead of dropping it (also fixing a phantom empty-children key that blocked removals). - Attach it to a target by resolving and reusing the object already created in the group tree, identifying it by hierarchy path so same-named folders in different parent groups (and folders whose path contains "/") resolve correctly; dedup by object identity so one target can link several distinct folders that share a name. - Defer exception target/build-phase resolution to a final pass, so references to targets created in the same change resolve; resolve a build phase via its owning target, avoiding same-named ("Sources") collisions across targets. - Dedup exception sets (which arrive via multiple graph paths), and detach a target's folder reference on unlink instead of deleting the shared object. - Support target-membership and build-phase-membership exceptions, with to_tree_hash monkeypatches that break the target/build_phase reference cycle (which otherwise infinitely recurses) and work around an xcodeproj 1.27.0 bug where the membership exception set's display_name raises. Adds extensive specs (both references, exceptions, removal/unlink, dedup, same-named and slashed-path folders, deferred resolution) plus an integration spec reproducing the original merge failure. Known limitation: relocating a folder between parent groups on one side can drop its target membership on merge, since folders have no stable identity in the diff; re-verify membership after such merges. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Summary
PBXFileSystemSynchronizedRootGroupinadd_child_to_componentPBXNativeTarget.file_system_synchronized_groupsPBXFileSystemSynchronizedRootGroupwhere appropriateTest plan
fileSystemSynchronizedGroups