Repository navigation
Conversation
Adds an optional `--synchronized-folders-file` to `files_and_groups`. Each folder in it is created as a `PBXFileSystemSynchronizedRootGroup` (Xcode 16's buildable folders) in place of a `PBXFileReference`, and file paths inside it are left out of the tree, since Xcode lists the folder's contents itself. The group's identifier only depends on its path (`Identifiers.FilesAndGroups.synchronizedRootGroup`), so that targets created by other generators can reference it. Nothing passes the flag yet, so generated projects don't change. Signed-off-by: Ernesto Cambuston <e.cambuston@gmail.com>
Targets take a list of synchronized folders after `non_arc_srcs`, and reference each one's `PBXFileSystemSynchronizedRootGroup` in `fileSystemSynchronizedGroups`. For now, the list is always empty. `pbxproj_prefix` gets an optional `--uses-synchronized-folders`, which sets `objectVersion` to 70, what Xcode writes for projects with synchronized folders. Without it, the object version doesn't change. Signed-off-by: Ernesto Cambuston <e.cambuston@gmail.com>
`xcodeproj_synchronized_folders(folders = [...])`, added to a target's `aspect_hints`, makes the given folders (relative to the target's package) Xcode 16 synchronized folders: the target's `srcs` and `non_arc_srcs` in them are replaced by the folder, so files added to it in Xcode or on disk appear without regenerating the project. Sources still come from the target's `srcs` (e.g. a `glob`) when building with Bazel. The folders are passed to `files_and_groups` and `pbxnativetargets`, and projects with any use object version 70. 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.
Last of three PRs adding Xcode 16 synchronized folders, split out of #3373. Based on #3377; only the last commit is new.
Adds the
xcodeproj_synchronized_foldersaspect hint:The target's
srcsandnon_arc_srcsunder those folders are replaced by the folder in Xcode, so files added in Xcode or on disk show up without regenerating the project. Bazel still builds fromsrcs.Tested with
//test/internal/xcodeproj_synchronized_foldersand on a sample app: the project builds and tests in Xcode, a new file appears in the target without regenerating, and indexing and jump to definition work.Xcode rewrites
project.pbxprojthe first time a synchronized folder's contents change, unless the file already matches its format; #3374 and #3375 make it match.