Skip to content

Write the whole PBXProject in pbxproj_prefix - #3381

Open
erneestoc wants to merge 2 commits into
MobileNativeFoundation:mainfrom
erneestoc:ec/pbxproj-prefix-whole-project
Open

erneestoc wants to merge 2 commits into
MobileNativeFoundation:mainfrom
erneestoc:ec/pbxproj-prefix-whole-project

Conversation

@erneestoc

Copy link
Copy Markdown
Contributor

The PBXProject object is the only one split across partials: pbxproj_prefix writes its start (with attributes last), and the TargetAttributes, knownRegions, and targets partials are concatenated after it. That puts attributes and knownRegions out of the order Xcode writes.

pbxproj_prefix already runs after pbxtargetdependencies and files_and_groups (it reads resolved_repositories_file), so it now takes those three partials as inputs and writes the whole object in Xcode's order: isa, attributes, buildConfigurationList, compatibilityVersion, developmentRegion, hasScannedForEncodings, knownRegions, mainGroup, productRefGroup, projectDirPath, projectRoot, targets. The final cat no longer takes them.

No other change: the final step is still cat, and the three partials' formats are unchanged. This is a prerequisite for #3375.

The `PBXProject` object was split across four partials: `pbxproj_prefix`
wrote its start with `attributes` last, and the `TargetAttributes`,
`knownRegions`, and `targets` partials were concatenated after it. This
put `attributes` after `projectRoot` and `knownRegions` after
`attributes`, which isn't the order Xcode writes.

`pbxproj_prefix` already runs after `pbxtargetdependencies` and
`files_and_groups`, so it now takes those three partials as inputs and
writes the whole object in Xcode's order. The final `cat` no longer needs
them.

Signed-off-by: Ernesto Cambuston <e.cambuston@gmail.com>
Comment thread tools/generators/pbxproj_prefix/src/Generator/ReadPBXProjectPartial.swift Outdated
…rtial.swift

Co-authored-by: Brentley Jones <github@brentleyjones.com>
Signed-off-by: Ernesto Cambuston <e.cambuston@gmail.com>
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