Skip to content

Replace compile-time directives with target platform conditions #143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pepicrft
Copy link

Summary

  • Replace compile-time #if \!os(Linux) directives with Swift Package Manager's native target platform conditions
  • Use .when(platforms: [...]) condition for EventSource dependency instead of compile-time checks
  • Leverages SPM's built-in dependency support for platform-specific targets at runtime

Benefits

  • Eliminates need for compile-time directives
  • Uses Swift Package Manager's native platform condition support
  • Cleaner and more maintainable Package.swift configuration
  • Runtime platform detection instead of compile-time preprocessing

Test plan

  • Verify package builds successfully on all supported platforms
  • Confirm EventSource dependency is only linked on Apple platforms
  • Test that Linux builds continue to work without EventSource

🤖 Generated with Claude Code

Use Package.swift target platform conditions instead of compile-time #if directives for EventSource dependency. This leverages Swift Package Manager's native dependency support for platform-specific targets at runtime rather than compile-time.

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

Co-Authored-By: Claude <[email protected]>
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.

1 participant