I'd like to start using SwiftPM inside Carthage. Carthage has always been automation on top of other tools (git, xcodebuild, etc.), so I think building on the work of SwiftPM makes a lot of sense.
In particular, I'd like to:
Use SwiftPM's dependency resolver. Carthage's has never been great. Rather than write/maintain our own, I think we could benefit from using SwiftPM's.
Let dependencies use SwiftPM's package descriptions instead of using a
Using the SwiftPM resolver would be the biggest win. But I think both of these things (and others) would help in an eventual transition from Carthage to SwiftPM. (I'm definitely hoping that SwiftPM will subsume all Carthage use and have been trying to push Carthage in that direction.)
But how should I build on top of SwiftPM?
The SwiftPM Community Proposal says:
Currently, the Swift Package Manager is packaged as a command line interface, exposed as a subcommand of the
swiftcommand. In the future, we would like to make it available as a library with a clearly defined API, so that other tools can more easily be built on top of it.
Is SwiftPM at the point where we could build on it as a library? It doesn't have an Xcode project and doesn't seem to have semantic version releases. But if we built Carthage with SwiftPM with SwiftPM as a dependency, would that be likely to work? Are there any caveats we'd need to be mindful of? (I'm not worried about breaking API changes.)
I don't think using the command-line is an option unless we force all dependencies to start using SwiftPM package descriptions—SwiftPM would have no way to resolve versions because it wouldn't know how to get information from the