Skip to content
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

Use Swift Package Manager with Xcode #672

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

tonyarnold
Copy link
Contributor

This PR proposes to update our Xcode project to use Swift Packages, rather than Carthage-compiled frameworks. This has a few knock-on effects:

  • It should resolve the build issues we've been seeing when adding this project to the Swift Source Compatibility Suite.
  • It will require developers to use Xcode 11.x or a newer version.
  • The Playgrounds still use the Carthage-compiled frameworks - I couldn't see a way to get these to use SPM-provided packages.

I've also raised the Swift tools version to Swift 5.1. It's not required, but it's implied by requiring Xcode 11.

@tonyarnold
Copy link
Contributor Author

Not sure if you'd like to remove the carthage bootstrap and caching components of the CI configuration.

I considered adding GitHub Actions support, too, but I think that can wait for a future PR.

@srdanrasic
Copy link
Contributor

Thanks @tonyarnold for working on this!

There is one issue though.... With this change, when using Carthage to integrate Bond, during Carthage build process, Bond will be built against ReactiveKit and Differ resolved by SPM, not by Carthage. It means that ReactiveKit and Differ will be statically linked into the Bond dynamic library, which is incompatible with the Carthage flow.

I'm not sure if there is a way around that...

Regarding Swift Source Compatibility Suite, I suggest that we add only ReactiveKit for now. It would get us moving, and we can solve Bond's problem later if possible.

@tonyarnold
Copy link
Contributor Author

There is one issue though.... With this change, when using Carthage to integrate Bond, during Carthage build process, Bond will be built against ReactiveKit and Differ resolved by SPM, not by Carthage. It means that ReactiveKit and Differ will be statically linked into the Bond dynamic library, which is incompatible with the Carthage flow.

Ah, yes. You are correct, and this is a big issue for Carthage users 😦

Regarding Swift Source Compatibility Suite, I suggest that we add only ReactiveKit for now. It would get us moving, and we can solve Bond's problem later if possible.

Good call. I'll reduce that PR's scope now.

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