<div dir="ltr">+1 here. It becomes much more crucial when you work with finely grained projects with each module in its own repo. Making a new release when you push a fix becomes too much of job to do.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 6, 2016 at 5:08 PM, Said Sikira via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">Yes, I agree that tags are far better option for production use, but development process stage would certainly benefit from possibility to track specific branch or commit. Having to rely completely on versioned tags in development stage would not be easy nor very productive.</div><span class="HOEnZb"><font color="#888888"> <br> <div>Said</div></font></span><div><div class="h5"> <br><p>On September 6, 2016 at 3:49:06 PM, Guillaume DIDIER (<a href="mailto:guillaume.didier.2014@polytechnique.org" target="_blank">guillaume.didier.2014@<wbr>polytechnique.org</a>) wrote:</p> <blockquote type="cite"><span><div style="word-wrap:break-word"><div></div><div>






<div>I think that the ability to fetch a branch or a
commit may be interesting</div>
<div>(basically anything that git understands), would be
nice,</div>
<div>but with the caveat that for production use it is far
better to use à fixed version (i.e. a tag).</div>
<div>We do not want that most packages are used by
specifying the master branch.</div>
<div><br></div>
<br>
<div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="text-align:start;text-indent:0px;word-wrap:break-word">
<div style="text-align:start;text-indent:0px;word-wrap:break-word">
<div style="font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(7,55,99);margin:0px;font-size:13px;line-height:normal;font-family:Georgia"><b>Guillaume DIDIER </b></div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;margin:0px;line-height:normal"><span style="color:rgb(7,55,99);font-family:&#39;Century Gothic&#39;;font-size:13px">—</span></div>
<div style="font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(7,55,99);margin:0px;font-size:11px;line-height:normal;font-family:&#39;Century Gothic&#39;"><span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<b>ÉCOLE POLYTECHNIQUE</b></span></div>
<div style="font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(7,55,99);margin:0px;font-size:11px;line-height:normal;font-family:&#39;Century Gothic&#39;"><span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
91128 PALAISEAU CEDEX<br>
<a href="mailto:guillaume.didier@polytechnique.edu?subject=" target="_blank"><span style="line-height:normal">guillaume.didier@<wbr>polytechnique.edu</span></a></span></div>
<div style="font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(71,135,255);margin:0px;font-size:11px;line-height:normal;font-family:&#39;Century Gothic&#39;"><span style="text-decoration:underline"><a href="http://www.polytechnique.edu/" target="_blank">www.polytechnique.edu</a></span></div>
<div style="font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(7,55,99);margin:0px;font-size:13px;line-height:normal;font-family:&#39;Century Gothic&#39;">—</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div><br></div>
<div>PS : I am new here, do not hesitate to correct
me.</div>
<br>
<div>
<blockquote type="cite">
<div>Le 6 sept. 2016 à 15:41, Said Sikira via
swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; a écrit :</div>
<br>
<div>
<p style="margin:15px 0px;font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(254,254,254)">Hi,</p>
<p style="margin:15px 0px;font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(254,254,254)">Our code is almost always developed and pushed in small
incremental changes. When we implement critical amount of changes
in our code, we push new version.</p>
<p style="margin:15px 0px;font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(254,254,254)">When adding dependencies to Package.swift file, we supply
their repository url and version we want to use. However,
differentiating code only by it’s version is not enough in some
cases. When writing new code features, we use branches. They enable
all the mechanisms one needs to create, test and deploy new
features without polluting production environment.</p>
<p style="margin:15px 0px;font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(254,254,254)">I think that Swift Package Manager should have support for
branches (and commits). There are several reasons why this feature
would greatly improve developer workflow:</p>
<ol style="margin:15px 0px;font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(254,254,254)">
<li style="margin:15px 0px">Writing new features. Being
able to specify branch in Package.swift would make creating and
testing new features easier. You wouldn’t need to push new version
to be able to use it in your Swift program. You would just specify
the branch you’re working on.</li>
<li style="margin:15px 0px">Differentiating between new
Swift versions. This problem comes from the current Swift 2.2 -&gt;
Swift 3.0 migration. Many framework developers use specific
branches (swift–3, swift3.0) to work on migration of their API’s to
Swift 3. However, you can’t use them in your Swift projects because
they don’t live in the master branch in the repository. I’m sure
this will also happen when Swift 3 starts migration to the Swift 4,
until ABI becomes stable.</li>
</ol>
<p style="margin:15px 0px;font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(254,254,254)">SPM should also have support for specifying commits.
Specifying which commit you want to use in your project dependency
is not always a good idea, but it’s necessary in some cases.</p>
<p style="margin:15px 0px;font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(254,254,254)">This shouldn’t be very hard to implement. We would need to
update PackageDescription and Get source from swift-package-manager
repository to enable specifying branches or commits. Pulling the
branch source would just be another parameter in git
instruction.</p>
<p style="margin:15px 0px;font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(254,254,254)">Example:</p>
<pre style="margin:15px 0px;font-family:Menlo,Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:10pt;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:rgb(248,248,248);border:1px solid rgb(204,204,204);overflow:auto;padding:4px 8px;word-break:normal;word-wrap:normal;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px"><code style="font-family:Menlo,Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:10pt;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:rgb(248,248,248);color:inherit;border:0px;margin:0px;padding:0px;word-break:normal;word-wrap:normal">// Specifying branch
let package = Package(
  name: &quot;SomePackage&quot;,
  dependencies: [
    .Package(url: &quot;<a href="https://repo-source.git/" style="color:rgb(65,131,196);background-color:inherit;text-decoration:none" target="_blank">https://repo-source.git</a>&quot;, branch: &quot;new-feature&quot;)
  ]
)
</code></pre>
<pre style="margin:15px 0px;font-family:Menlo,Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:10pt;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:rgb(248,248,248);border:1px solid rgb(204,204,204);overflow:auto;padding:4px 8px;word-break:normal;word-wrap:normal;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px"><code style="font-family:Menlo,Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:10pt;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:rgb(248,248,248);color:inherit;border:0px;margin:0px;padding:0px;word-break:normal;word-wrap:normal">// Specifying commits
let package = Package(
  name: &quot;SomePackage&quot;,
  dependencies: [
    .Package(url: &quot;<a href="https://repo-source.git/" style="color:rgb(65,131,196);background-color:inherit;text-decoration:none" target="_blank">https://repo-source.git</a>&quot;, commit: &quot;<wbr>c336664020v4f94ed78cbe7447a39a<wbr>e5ca0b6c11&quot;)
  ]
)
</code></pre>
<p style="margin:15px 0px;font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(254,254,254)">What are your thoughts on this subject?</p>
<span style="font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(254,254,254);float:none;display:inline!important">______________________________<wbr>_________________</span><br style="font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(254,254,254)">
<span style="font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(254,254,254);float:none;display:inline!important">swift-evolution mailing list</span><br style="font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(254,254,254)">
<a href="mailto:swift-evolution@swift.org" style="color:rgb(65,131,196);background-color:rgb(254,254,254);text-decoration:none;font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">swift-evolution@swift.org</a><br style="font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(254,254,254)">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" style="color:rgb(65,131,196);background-color:rgb(254,254,254);text-decoration:none;font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-<wbr>evolution</a><br style="font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(254,254,254)"></div>
</blockquote>
</div>
<br>


</div></div></span></blockquote></div></div></div>
<br>______________________________<wbr>_________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-<wbr>evolution</a><br>
<br></blockquote></div><br></div>