feat: Add support for package traits#1629
Merged
Merged
Conversation
Preserve optional package traits through project spec parsing, encoding, and Xcode project generation. Update XcodeProj and document the top-level package syntax.
yonaskolb
approved these changes
Jul 15, 2026
yonaskolb
left a comment
Owner
There was a problem hiding this comment.
Looks good! Thank you @philprime
Contributor
Author
|
You are welcome @yonaskolb! I just noticed that I didn't add a CHANGELOG.md entry, do you want me to create a follow-up PR? |
Owner
No, that's fine. We used to require that, in the past, but it will get filled in on release |
Contributor
Author
|
Thanks @yonaskolb 🙏 Do you have an estimate for when the next release of xcodegen will become available? |
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.
Add project-spec support for enabling Swift package traits on remote and local package references. Traits are forwarded to XcodeProj so generated projects preserve the configured trait selections.
Configuration
Remote packages support the same
traitsarray. Omitted traits remain distinct from an explicit empty array, matching Xcode project serialization behavior.Compatibility
Existing package declarations continue to generate without a
traitskey. The legacylocalPackagessyntax remains unchanged, and traits are intentionally configured only on top-level package references rather than target product dependencies.This also updates XcodeProj from 9.10.1 to 9.14.0, the first release with Swift package trait support.
Testing
swift testCloses #1585