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

Discussion about Swift Package Manager and Carthage #969

Closed
mpurland opened this issue Dec 4, 2015 · 9 comments
Closed

Discussion about Swift Package Manager and Carthage #969

mpurland opened this issue Dec 4, 2015 · 9 comments
Labels

Comments

@mpurland
Copy link

mpurland commented Dec 4, 2015

I just wanted to start a discussion around Swift Package Manager and what that means for Carthage.

Any thoughts?

@mdiep mdiep added the question label Dec 4, 2015
@mdiep
Copy link
Member

mdiep commented Dec 4, 2015

Swift Package Manager looks like it's still in its early stages, but… I expect there to still be a place for Carthage.

The Swift Package Manager is focused on sharing Swift code (naturally). Carthage focuses on sharing dynamic frameworks, which may contain Swift code, but are a superset of Swift packages:

  • In some cases (e.g., ReactiveTask), a framework may be entirely Swift code.
  • Others (e.g., ReactiveCocoa) may also contain Objective-C code or may link against AppKit or UIKit.
  • Others (e.g., https://github.com/badoo/Chatto) may also contain non-code assets.

We'll need to monitor this going forward, but I'd expect many Swift packages to also be available as frameworks. Otherwise SPM and Carthage may need to sit side-by-side or Carthage may want to add support for Swift packages.

@NachoSoto
Copy link
Contributor

Adding to @mdiep's response: it's clear that Swift's Package Manager will replace Carthage for some tasks, but Carthage will still play an important role for building dynamic frameworks for iOS/Mac/tvOS/watchOS apps.
Though I'm very excited about replacing frameworks with static libs in several places, frameworks will still be important, especially for apps with extensions.

@fabb
Copy link

fabb commented Sep 11, 2016

Has there come up anything new in the last 9 months, now that the first version of Swift Package Manager is officially released?

@NachoSoto
Copy link
Contributor

Nothing has changed in this respect though. My last comment still applies 100%, as we still have no word of Xcode integration.

@a2
Copy link

a2 commented Oct 13, 2016

Is there any development in this regard, especially now that you can generate Xcode projects for SPM projects using swift package generate-xcodeproj? I'd love if Carthage could generate this Xcode project if it detects an SPM project without a project file. For example, a2/MessagePack.swift#35.

@keith
Copy link
Contributor

keith commented Oct 13, 2016

If you wanted to you could pretty easily generate a Carthage compatible project file from swiftpm now. Using:

swift package generate-xcodeproj --xcconfig-overrides foo.xcconfig

Where foo.xcconfig can be anything you want to be set in the project. I've set this up for a project already and it seems to be working pretty well.

@mdiep
Copy link
Member

mdiep commented Oct 14, 2016

We hope to do something like that eventually. But I've been told that Carthage probably shouldn't rely on that functionality.

You can get it to work, but it doesn't have the required level of support to ship that functionality with Carthage.

@cloutiertyler
Copy link

cloutiertyler commented Oct 16, 2016

Yep, @keith, that does work like a charm. I've set this up to work with https://github.com/SwiftOnEdge/Edge, which even has Swift Package Manager dependencies. The xcodeproj included there was generated by the SwiftPM, and then I added an external build system as a dependency so that Carthage will run a swift build before building the main target.*

*The Devil is in the details regarding SwiftPM package versions though.

@ikesyo
Copy link
Member

ikesyo commented Oct 20, 2017

Closing this due to inactivity.

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

No branches or pull requests

8 participants