[swift-build-dev] Git Branch support
rballard at apple.com
Mon Dec 7 16:54:46 CST 2015
> On Dec 5, 2015, at 5:59 AM, Ankit Agarwal <ankit at ankit.im> wrote:
> Is pointing to a branch instead of version for a package in scope of SPM?
> if it is, I'd love to try to implement it
This is in scope, though not yet designed. Prior to anyone working on an implementation, we should agree on a design for how you'd do this. While this isn't at the top of our priority list at the moment, we'd welcome both design contributions and eventual implementation.
If you'd like to put a proposal together for this, please see the Swift evolution process at https://github.com/apple/swift-evolution/blob/master/process.md. We'd be happy to discuss this here as part of your process for putting a proposal together. Some things to think about in this area are:
– How should refs (branches or tags) that aren't simple version numbers be specified?
– Right now we require you to tag something as a versioned "release". Should we require that you tag a branch before someone can make a package depend on it? It could be convenient to be able to just depend on a branch, but the meaning of depending on a branch changes over time as more commits come in. Is it harmful to allow packages to depend on something that's not an identified commit?
– Note that we have yet to design our security story (https://github.com/apple/swift-package-manager/blob/master/Documentation/PackageManagerCommunityProposal.md#security-and-signing); what we settle on there might require dependencies to be specified as a specific tagged commit, so that it can be signed.
– Should it be possible to override a package's dependency to use a different branch, without having to modify and commit a change to that package's Package.swift?
– We may want to design a way for packages to support different versions of the Swift language, as the language continues to change – e.g. a branch of the package for the last released swift vs the current under development swift snapshot. Is supporting dependencies on package branches a part of how we'll do that?
More information about the swift-build-dev