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

Migrate from CocoaPods to SPM #305

Closed
ilyapuchka opened this issue May 18, 2017 · 10 comments
Closed

Migrate from CocoaPods to SPM #305

ilyapuchka opened this issue May 18, 2017 · 10 comments
Assignees
Milestone

Comments

@ilyapuchka
Copy link
Collaborator

It seems like it should be possible to replace CocoaPods with SPM, using which should remove any need for using containing mac os app to embed frameworks, as they should be linked to the binary at build time. We might though need to get rid of SwiftTryCatch as SPM packages can not contain mixed language code.

@krzysztofzablocki
Copy link
Owner

Keep in mind its important to maintain ability to easily debug and work on the code, SPM isn't ideal for that

@Antondomashnev
Copy link
Collaborator

I see the drawback also in terms of introducing another dependency manager for the developer. I don't know the real numbers but I think the usage of dependency management systems is like:

  1. CocoaPods
  2. Carthage
  3. SPM

So I think most likely developer will have to introduce SPM as a dependency manager for her project if she wants to integrate Sourcery.

@ilyapuchka
Copy link
Collaborator Author

I mean that we should use SPM for managing our own dependencies. This should not, as far as I understand, affect the end users. Using CocoaPods they are going to load latest release artefacts, not the source code. The same with Carthage, most likely users will just load binaries. And even if they load source code to build it with SPM is easier than with Xcode because it produces artefacts in a more predictable path.

@ilyapuchka
Copy link
Collaborator Author

@krzysztofzablocki regarding debugging we can use project that SPM generates, it should have all dependencies as separate targets, if I'm not wrong, pretty much as with CocoaPods but with simpler setup.

@Antondomashnev
Copy link
Collaborator

@ilyapuchka could it have a restriction for us if one of the dependency we will require doesn't support SPM?

@ilyapuchka
Copy link
Collaborator Author

Yes, that's a valid point, but that will mean that Sourcery will be not buildable on Linux, so only binary could be used. Using SPM will bring us closer to supporting Linux I think.

@Antondomashnev
Copy link
Collaborator

Seems we have to decide what is more likely to happen - Sourcery dependency doesn't support SPM or somebody wants to build a source on Linux 😄

The issue with the dependency could be painful because it can not support SPM, because it's dependencies don't support SPM and so on and so on.

@ilyapuchka
Copy link
Collaborator Author

And if we are likely or not to add any other dependencies =)

@ilyapuchka ilyapuchka self-assigned this Jun 2, 2017
@ilyapuchka ilyapuchka mentioned this issue Jan 25, 2018
6 tasks
@ilyapuchka ilyapuchka added this to the Linux milestone Mar 9, 2018
@ilyapuchka
Copy link
Collaborator Author

Another benefit of using SPM is that we can use it to build binaries distributed through all dependency managers and we need to step packages versions only in one place, so we will not have issues related to different versions of dependencies in different binaries.

@krzysztofzablocki
Copy link
Owner

I migrated distribution for all channels to SPM a month or so ago, will migrate main app too sometime soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants