Skip to content
This repository was archived by the owner on Feb 26, 2026. It is now read-only.

feat: Add support for Swift Package Manager traits#352

Merged
pepicrft merged 2 commits intomainfrom
feat/add-package-traits-support
Oct 29, 2025
Merged

feat: Add support for Swift Package Manager traits#352
pepicrft merged 2 commits intomainfrom
feat/add-package-traits-support

Conversation

@pepicrft
Copy link
Contributor

Summary

  • Added PackageTrait model to represent Swift Package Manager traits
  • Integrated traits support into PackageInfo structure
  • Updated Codable conformance and initializers to handle traits

This enables XcodeGraph to model Swift Package Manager's traits feature, which allows packages to define conditional compilation flags and configurations.

Changes

  • New file: Sources/XcodeGraph/PackageTrait.swift - Data structure for modeling package traits
  • Modified: Sources/XcodeGraph/PackageInfo.swift - Added traits property, updated initializers and Codable implementation

Test plan

  • Verify existing tests pass
  • Test that PackageInfo can encode/decode traits correctly
  • Verify backward compatibility with existing PackageInfo usage

🤖 Generated with Claude Code

Add PackageTrait model and integrate it into PackageInfo to support
Swift Package Manager's traits feature, which allows packages to define
conditional compilation flags and behavior.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. enhancement New feature or request labels Oct 29, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 29, 2025
@pepicrft pepicrft merged commit 4707882 into main Oct 29, 2025
7 checks passed
@pepicrft pepicrft deleted the feat/add-package-traits-support branch October 29, 2025 12:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants