<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">+1 for adding this.</div><div class=""><br class=""></div>Ability to point to commit instead of a tag is crucial.&nbsp;<div class="">Often happens that a bug was fixed in the depended library but it wasn't released/tagged.</div><div class="">As well it helps during development.</div><div class=""><br class=""></div><div class=""><div class=""><div class=""><div class=""><div class="">Kostiantyn</div></div>

</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On 14 Dec 2015, at 20:14, Marc Knaup via swift-build-dev &lt;<a href="mailto:swift-build-dev@swift.org" class="">swift-build-dev@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><p dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">+1 since I had to do exactly that a couple of times with CocoaPods.<br class="">There were issue in third party Pods which were fixed in a specific commit or branch but the official release would still take a while. Delaying our app release because of that was not an option and referring to a fixed yet unreleased version the best solution.<span class="Apple-converted-space">&nbsp;</span></p><div class="gmail_quote" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">On Dec 14, 2015 8:04 PM, "Ankit Agarwal via swift-build-dev" &lt;<a href="mailto:swift-build-dev@swift.org" class="">swift-build-dev@swift.org</a>&gt; wrote:<br type="attribution" class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div dir="ltr" class=""><div class="">Correcting one of the sentences in the Detailed design section</div><div class=""><br class=""></div><div class="">* If pointed to a branch, there might be two broad use cases</div><div class="">1. User wants to point a branch due to active development of that dep and wants latest ref available in that branch</div><div class="">2. User is actively developing a dep in that branch and want to test it out in the current package</div><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Tue, Dec 15, 2015 at 12:13 AM, Ankit Agarwal<span class="Apple-converted-space">&nbsp;</span><span dir="ltr" class="">&lt;<a href="mailto:ankit@ankit.im" target="_blank" class="">ankit@ankit.im</a>&gt;</span><span class="Apple-converted-space">&nbsp;</span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div dir="ltr" class=""><div class=""><br class=""></div><div class="">Hi,</div><div class=""><br class=""></div><div class="">Here is a proposal of the adding git branch support feature in SPM</div><div class=""><br class=""></div><div class=""><b class="">Introduction</b></div><div class=""><br class=""></div><div class="">Pointing to branch or a commit ref for dependencies in Package.swift as opposed to only a tagged release.</div><div class=""><br class=""></div><div class=""><b class="">Motivation</b></div><div class=""><br class=""></div><div class="">* Try a package which is almost stable or useable but not yet ready for a release/pre-release so not tagged (eg: new feature being introduced by a library)</div><div class="">* While developing packages, one would want to point a package that uses the package to a develop branch (eg: Developing Foo package, Bar uses Foo and wants to point Foo dep to develop branch)</div><div class="">* One would want to point to his own fork but not create a release while developing/testing (eg: Fork a library not compatible with SPM to make it compatible)</div><div class="">* One wants to point to some commit but doesn't have a branch/tag created for that</div><div class=""><br class=""></div><div class=""><b class="">Proposed solution</b></div><div class=""><br class=""></div><div class="">Allow refs and branch in Package.swift</div><div class=""><br class=""></div><div class="">let package = Package(</div><div class="">&nbsp; &nbsp;<span class="Apple-converted-space">&nbsp;</span>name: "Hello",</div><div class="">&nbsp; &nbsp;<span class="Apple-converted-space">&nbsp;</span>dependencies: [</div><div class="">&nbsp; &nbsp; &nbsp; &nbsp;<span class="Apple-converted-space">&nbsp;</span>.Package(url: "ssh://<a href="http://git@example.com/Greeter.git" target="_blank" class="">git@example.com/Greeter.git</a>", branch: "develop", shouldFastForward: true),</div><div class="">&nbsp; &nbsp; &nbsp; &nbsp;<span class="Apple-converted-space">&nbsp;</span>.Package(url: "ssh://<a href="http://git@example.com/FooBar.git" target="_blank" class="">git@example.com/FooBar.git</a>", commit: "d8ec7ca398a3ac3990477028117384d05ca7734e"),</div><div class="">&nbsp; &nbsp;<span class="Apple-converted-space">&nbsp;</span>]</div><div class="">)</div><div class=""><br class=""></div><div class=""><b class="">Detailed design</b></div><div class=""><br class=""></div><div class="">* Only the root Package.swift would be able to use branch/ref feature to avoid dependency hell, any other dependency fetched in current Package should not compile if that dependency contains another dependency pointing to a branch/ref</div><div class="">* This feature should strictly be used for testing/developing purpose and should not be deployed to production environments</div><div class=""><br class=""></div><div class="">SPM could have the following behavior when running `swift build` :</div><div class=""><br class=""></div><div class="">* If pointed to a branch, there might be two use cases&nbsp;</div><div class="">Since there is a high probability that user wants to point a branch due to active development of that dep and wants latest ref available in that branch</div><div class="">If a dependency is not cloned, clone it and checkout that branch</div><div class="">If shouldFastForward is on -&gt; Always try to be on the latest ref, disregard any local changes made to the checked out package</div><div class="">If shouldFastForward is false -&gt; Always try to be on the latest ref unless any local changes made to the checked out package</div><div class=""><br class=""></div><div class="">* If pointed to a ref :&nbsp;</div><div class="">If that dependency is not cloned, clone it and checkout that ref.</div><div class="">Consecutive `swift build` will not affect the cloned package</div><div class="">If changes are made in the cloned repo, rebuild that package with those changes</div><div class=""><br class=""></div><div class=""><b class="">Impact on existing code</b></div><div class=""><br class=""></div><div class="">None as this will be a new functionality</div><div class=""><br class=""></div><div class=""><b class="">Alternatives considered</b></div><div class=""><br class=""></div><div class="">One option is to only allow a commit ref and not a branch so SPM will not have to worry about fast forwarding but this is a desired feature.</div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Tue, Dec 8, 2015 at 4:24 AM, Rick Ballard<span class="Apple-converted-space">&nbsp;</span><span dir="ltr" class="">&lt;<a href="mailto:rballard@apple.com" target="_blank" class="">rballard@apple.com</a>&gt;</span><span class="Apple-converted-space">&nbsp;</span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><span class="">&gt; On Dec 5, 2015, at 5:59 AM, Ankit Agarwal &lt;<a href="mailto:ankit@ankit.im" target="_blank" class="">ankit@ankit.im</a>&gt; wrote:<br class="">&gt;<br class="">&gt; Hi,<br class="">&gt;<br class="">&gt; Is pointing to a branch instead of version for a package in scope of SPM?<br class="">&gt; if it is, I'd love to try to implement it<br class=""><br class=""></span>Hi Ankit,<br class=""><br class="">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.<br class=""><br class="">If you'd like to put a proposal together for this, please see the Swift evolution process at<span class="Apple-converted-space">&nbsp;</span><a href="https://github.com/apple/swift-evolution/blob/master/process.md" rel="noreferrer" target="_blank" class="">https://github.com/apple/swift-evolution/blob/master/process.md</a>. 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:<br class=""><br class="">– How should refs (branches or tags) that aren't simple version numbers be specified?<br class=""><br class="">– 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?<br class=""><br class="">&nbsp; &nbsp; &nbsp; &nbsp;<span class="Apple-converted-space">&nbsp;</span>– Note that we have yet to design our security story (<a href="https://github.com/apple/swift-package-manager/blob/master/Documentation/PackageManagerCommunityProposal.md#security-and-signing" rel="noreferrer" target="_blank" class="">https://github.com/apple/swift-package-manager/blob/master/Documentation/PackageManagerCommunityProposal.md#security-and-signing</a>); what we settle on there might require dependencies to be specified as a specific tagged commit, so that it can be signed.<br class=""><br class="">– 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?<br class=""><br class="">– 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?<br class=""><br class="">Thanks,<br class=""><br class="">&nbsp; &nbsp; &nbsp; &nbsp;<span class="Apple-converted-space">&nbsp;</span>- Rick<br class=""><br class=""><span class=""><font color="#888888" class=""></font></span></blockquote></div><span class=""><font color="#888888" class=""><br class=""><br clear="all" class=""><div class=""><br class=""></div>--<span class="Apple-converted-space">&nbsp;</span><br class=""><div class="">Ankit<br class=""><br class=""></div></font></span></div></div></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>--<span class="Apple-converted-space">&nbsp;</span><br class=""><div class="">Ankit<br class=""><br class=""></div></div><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=6ZGE61OxINd5lLe2xYh9Ku-2BXbixWNr2nvfzp2IB1sZitVEVOLMb3PkOgG1oZLriinC-2FhjxzCJITVIxLERxmQg9GykePbiPlZ-2B6zOplZh-2BPGWS-2BgsCVN3Gu5wBtRYUFte73OobYkI8ehlI2z5kWfJRDEEI6SdysmehMyAnR3lsQ16729oOKy-2FUKXtBMRU5ITlM8QMd-2Fn-2Fi47oO2o1t7dhfG7SaMCEoAD7K1rzQQnU2Js-3D" alt="" width="1" height="1" border="0" style="min-height: 1px !important; width: 1px !important; border-width: 0px !important; margin: 0px !important; padding: 0px !important;" class=""><span class="Apple-converted-space">&nbsp;</span><br class="">_______________________________________________<br class="">swift-build-dev mailing list<br class=""><a href="mailto:swift-build-dev@swift.org" class="">swift-build-dev@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-build-dev" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-build-dev</a><br class=""><br class=""></blockquote></div><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=n3jPUXkT5YFxadHQEoaOww8U5ADISS-2FbZlg0rksvZj78wabIoZVrI-2FgONKOZ7HZugOnFJCUauHc2MU6Fiofd-2BtS9Lxq4mTyiXjcTLjyIZBXTLahqTlU3WlQfewKvoBu3pEZ0x6-2BpmPgPf6bcemqi3ZRi-2BgiXfU4dtVUT-2FdceRVxq1A0Si09YAAWXMu3NKKM5CbFrvYBu-2BBlqzUt0Ob-2FmLVmrTqGkqPPvimCHrscYiTo-3D" alt="" width="1" height="1" border="0" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; height: 1px !important; width: 1px !important; border-width: 0px !important; margin: 0px !important; padding: 0px !important;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class=""><span class="Apple-converted-space">&nbsp;</span>_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">swift-build-dev mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="mailto:swift-build-dev@swift.org" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">swift-build-dev@swift.org</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="https://lists.swift.org/mailman/listinfo/swift-build-dev" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">https://lists.swift.org/mailman/listinfo/swift-build-dev</a></div></blockquote></div><br class=""></div></div></body></html>