<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap:break-word"><div id="bloop_customfont" 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> <br> <div id="bloop_sign_1473170509996278016" class="bloop_sign">Said</div> <br><p class="airmail_on">On September 6, 2016 at 3:49:06 PM, Guillaume DIDIER (<a href="mailto:guillaume.didier.2014@polytechnique.org">guillaume.didier.2014@polytechnique.org</a>) wrote:</p> <blockquote type="cite" class="clean_bq"><span><div style="word-wrap:break-word" class=""><div></div><div>



<title></title>


<div class="">I think that the ability to fetch a branch or a
commit may be interesting</div>
<div class="">(basically anything that git understands), would be
nice,</div>
<div class="">but with the caveat that for production use it is far
better to use à fixed version (i.e. a tag).</div>
<div class="">We do not want that most packages are used by
specifying the master branch.</div>
<div class=""><br class=""></div>
<br class="">
<div class="">
<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" class="">
<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" class="">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="">
<div style="text-align:start;text-indent:0px;word-wrap:break-word" class="">
<div style="text-align:start;text-indent:0px;word-wrap:break-word" class="">
<div style="font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian: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" class=""><b class="">Guillaume DIDIER </b></div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian: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" class=""><span style="color:rgb(7,55,99);font-family:&#39;Century Gothic&#39;;font-size:13px" class="">—</span></div>
<div style="font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian: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;" class=""><span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<b class="">ÉCOLE POLYTECHNIQUE</b></span></div>
<div style="font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian: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;" class=""><span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian: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 class="">
<a href="mailto:guillaume.didier@polytechnique.edu?subject=" class=""><span style="line-height:normal" class="">guillaume.didier@polytechnique.edu</span></a></span></div>
<div style="font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian: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;" class=""><span style="text-decoration:underline" class=""><a href="http://www.polytechnique.edu/" class="">www.polytechnique.edu</a></span></div>
<div style="font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian: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;" class="">—</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class=""><br class=""></div>
<div class="">PS : I am new here, do not hesitate to correct
me.</div>
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">Le 6 sept. 2016 à 15:41, Said Sikira via
swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; a écrit :</div>
<br class="Apple-interchange-newline">
<div class="">
<p style="margin:15px 0px;font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-variant-caps: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)" class="">Hi,</p>
<p style="margin:15px 0px;font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-variant-caps: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)" class="">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-variant-caps: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)" class="">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-variant-caps: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)" class="">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-variant-caps: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)" class="">
<li style="margin:15px 0px" class="">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" class="">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-variant-caps: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)" class="">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-variant-caps: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)" class="">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-variant-caps: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)" class="">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-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px" class=""><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" class="">// 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" class="">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-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px" class=""><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" class="">// 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" class="">https://repo-source.git</a>&quot;, commit: &quot;c336664020v4f94ed78cbe7447a39ae5ca0b6c11&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-variant-caps: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)" class="">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-variant-caps: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" class="">_______________________________________________</span><br style="font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-variant-caps: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)" class="">
<span style="font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-variant-caps: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" class="">swift-evolution mailing list</span><br style="font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-variant-caps: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)" class="">
<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-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">swift-evolution@swift.org</a><br style="font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-variant-caps: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)" class="">
<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-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br style="font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-variant-caps: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)" class=""></div>
</blockquote>
</div>
<br class="">


</div></div></span></blockquote></body></html>