Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Introduce the new Xcode 16 models PBXFileSystemSynchronizedRootGroup and PBXFileSystemSynchronizedBuildFileExceptionSet #827

Merged
merged 12 commits into from
Aug 10, 2024

Conversation

pepicrft
Copy link
Contributor

Apple is introducing two new models, PBXFileSystemSynchronizedRootGroup and PBXFileSystemSynchronizedBuildFileExceptionSet, to reduce Git conflicts. Those types allow targets to reference a folder, whose files get automatically synchronized instead of creating references for every single file.
This PR adds those models along with the serialization logic. Once we use them from Tuist, I'll get ideas for convenient APIs that we might consider pushing down to the XcodeProj layer.

@pepicrft pepicrft self-assigned this Jul 20, 2024
Copy link
Collaborator

@kwridan kwridan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this @pepicrft

Worth adding a fixture to test out reading / writing.

From a quick test it seems there might be a few missing integrations to wire up the new models up as it still doesn't recognise them when attempt to read an Xcode 16 project that uses the new folder references.

failed: caught error: "The element PBXFileSystemSynchronizedRootGroup is not supported."

@pepicrft pepicrft force-pushed the PBXFileSystemSynchronizedRootGroup branch from 2c206e8 to e25feb8 Compare July 26, 2024 15:47
@pepicrft
Copy link
Contributor Author

@kwridan I uncovered the missing pieces through tests and fixed some minor issues. I'd appreciate a look when you have some spare time.

Copy link
Collaborator

@kwridan kwridan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the updates @pepicrft - XcodeProj now successfully reads / write a sample Xcode 16 project 🎉

I spotted a few missing bits from testing that are cause diffs after a read / write.

@pepicrft
Copy link
Contributor Author

pepicrft commented Aug 8, 2024

@kwridan this should be ready for another look.

@pepicrft pepicrft force-pushed the PBXFileSystemSynchronizedRootGroup branch from eb64294 to 5f6c53b Compare August 8, 2024 12:07
@pepicrft pepicrft force-pushed the PBXFileSystemSynchronizedRootGroup branch from 5f6c53b to fe6311f Compare August 8, 2024 13:56
Copy link
Collaborator

@kwridan kwridan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome thank you @pepicrft 🎉

There are a few additional properties that can be set but can be done as a follow up:

  • compilerFlags
  • platformFilters

@pepicrft
Copy link
Contributor Author

There are a few additional properties that can be set but can be done as a follow up:

I'll add those as part of this PR. Thanks for the review @kwridan

@pepicrft pepicrft changed the title Introduce the new Xcode 16 models PBXFileSystemSynchronizedRootGroup and PBXFileSystemSynchronizedBuildFileExceptionSet feat: Introduce the new Xcode 16 models PBXFileSystemSynchronizedRootGroup and PBXFileSystemSynchronizedBuildFileExceptionSet Aug 10, 2024
@pepicrft
Copy link
Contributor Author

@kwridan could you remind me of where platform filters are used? I also noticed that there's another object type to define exception for files referenced by copy build phases. I created an issue to tackle that in a follow-up PR.

@pepicrft pepicrft merged commit b32ae62 into main Aug 10, 2024
7 of 8 checks passed
@pepicrft pepicrft deleted the PBXFileSystemSynchronizedRootGroup branch August 10, 2024 16:23
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