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

Don't add PBXContainerItemProxy when reusing PBXReferenceProxy #1377

Merged

Conversation

liamnichols
Copy link
Contributor

Fixes #1354 (comment)

In an unrelated test, I spotted that the recent changes in #1354 were mistakenly creating orphaned PBXContainerItemProxy objects in the project file. This change updates the fixture tests to reproduce the issue and applies a patch (check out the individual commits to see the impact).

@liamnichols
Copy link
Contributor Author

On a side note, I became aware of this because we use R.swift in our project, which uses XcodeEdit, which has a validator to check for orphaned object references in the project file:

https://github.com/tomlokhorst/XcodeEdit/blob/cd466d6e8c5ffd2f2b61165d37b0646f09068e1e/Sources/XcodeEdit/AllObjects.swift#L142-L176

I wonder if it would be beneficial/possible for XcodeGen to perform a similar validation 🤔 Either just in the unit tests, or maybe even at runtime

@liamnichols liamnichols reopened this Jul 26, 2023
Copy link
Owner

@yonaskolb yonaskolb left a comment

Choose a reason for hiding this comment

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

Nice one, thank you @liamnichols! 🙏 Could you please add a CHANGELOG fix entry as well

@yonaskolb yonaskolb merged commit 98ce051 into yonaskolb:master Jul 26, 2023
@liamnichols liamnichols deleted the ln/orphaned-container-item-proxy branch July 26, 2023 15:19
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