Skip to content

feat: Add support for package traits#1629

Merged
yonaskolb merged 1 commit into
yonaskolb:masterfrom
philprime:philprime/package-traits
Jul 15, 2026
Merged

feat: Add support for package traits#1629
yonaskolb merged 1 commit into
yonaskolb:masterfrom
philprime:philprime/package-traits

Conversation

@philprime

Copy link
Copy Markdown
Contributor

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

packages:
  Sentry:
    path: ../..
    traits:
      - NoUIFramework

Remote packages support the same traits array. Omitted traits remain distinct from an explicit empty array, matching Xcode project serialization behavior.

Compatibility

Existing package declarations continue to generate without a traits key. The legacy localPackages syntax 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 test
  • ProjectSpec and XcodeGenKit focused test suites

Closes #1585

Preserve optional package traits through project spec parsing, encoding, and Xcode project generation. Update XcodeProj and document the top-level package syntax.

@yonaskolb yonaskolb left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Looks good! Thank you @philprime

@yonaskolb yonaskolb merged commit 20bd16d into yonaskolb:master Jul 15, 2026
3 checks passed
@philprime philprime deleted the philprime/package-traits branch July 15, 2026 05:27
@philprime

Copy link
Copy Markdown
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?

@yonaskolb

Copy link
Copy Markdown
Owner

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?

No, that's fine. We used to require that, in the past, but it will get filled in on release

@philprime

Copy link
Copy Markdown
Contributor Author

Thanks @yonaskolb 🙏 Do you have an estimate for when the next release of xcodegen will become available?

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.

feat: Package traits

2 participants