Repository navigation
Conversation
Xcode rewrites `project.pbxproj` when it saves a project whose file differs from how it would serialize it, and that includes object comments. Match it in two places: - A group's comment uses its `name`, falling back to its `path`. - The project's configuration list comment includes the project name (`Build configuration list for PBXProject "Foo"`). Signed-off-by: Ernesto Cambuston <e.cambuston@gmail.com>
brentleyjones
pushed a commit
that referenced
this pull request
Oct 13, 2026
For files with extensions Xcode doesn't know (e.g. `.graphql`, `LICENSE`), Xcode sniffs the contents and writes `lastKnownFileType = text` for text files. We wrote `file`, so Xcode rewrote `project.pbxproj` the next time it saved the project. Unknown files in source trees are overwhelmingly text, so we now write `text`. The group comment, project name and `TargetAttributes` ordering changes that were here are now in #3379 and #3380. Signed-off-by: Ernesto Cambuston <e.cambuston@gmail.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.
Split out of #3374, per review.
Xcode rewrites
project.pbxprojwhen its serialization differs from ours, and that includes object comments:name, falling back to itspath.Build configuration list for PBXProject "Foo"). The name is passed topbxproj_prefixwith a new--project-nameflag, derived from the.xcodeprojbasename.The project name only reaches the
pbxproj_prefixaction, whose inputs already include the absolute workspace directory, so this doesn't affect caching.