<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="">(+swift-build-dev, which is more focused for SwiftPM work)</div><div class=""><br class=""></div>Hi Said,<div class=""><br class=""></div><div class="">I agree, this is something we need.</div><div class=""><br class=""></div><div class="">One of the things that a complete proposal for adding this needs is a precise definition for the workflow and exploration about the impact on other features. Some of my questions are:</div><div class=""><br class=""></div><div class="">1. When will those commits be resolved and packages updated? For example, we might find it useful for `swift build` to automatically fetch packages and prompt when new versions are available when using tagged dependencies -- is that behavior appropriate when tracking a branch?</div><div class=""><br class=""></div><div class="">2. How do we manage the presence of these attributes w.r.t. producing reliable package graphs. For example, should this be allowed in all circumstances, or should it only be allowed when accessing a package via an "untagged" path? If I depend on B, and B updates and pushes a tag to start referencing a branch, do I see an error, or a warning, to let me know my product is no longer being built from tagged repositories?</div><div class=""><br class=""></div><div class="">3. We anticipate needing an explicit workflow for development against an untagged group of packages (we've been colloquially calling this "master"-style development). If we had that feature, which let you just use a bunch of packages in whatever state they were in on the local filesystem, would that change how you felt about wanting this in the `Package.swift` manifest?</div><div class=""><br class=""></div><div class="">I am in favor of getting a complete proposal for this feature on the books, and agree with you that implementing it should be relatively easy. The proposal doesn't have to be elaborate, but I think it does need to work through some of the impact of this feature and ways we can mitigate potential problems.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class=""> - Daniel</div><div class=""><br class=""></div><div class=""><div class=""><div><blockquote type="cite" class=""><div class="">On Sep 6, 2016, at 7:31 AM, Daniel Leping via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">+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 class=""><div class="gmail_quote">On Tue, Sep 6, 2016 at 5:08 PM, Said Sikira via swift-evolution <span dir="ltr" class=""><<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div style="font-family: Helvetica, Arial; font-size: 13px; margin: 0px;" class="">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" class=""> <br class=""> <div class="">Said</div></font></span><div class=""><div class="h5"> <br class=""><p class="">On September 6, 2016 at 3:49:06 PM, Guillaume DIDIER (<a href="mailto:guillaume.didier.2014@polytechnique.org" target="_blank" class="">guillaume.didier.2014@<wbr class="">polytechnique.org</a>) wrote:</p> <blockquote type="cite" class=""><span class=""><div style="word-wrap:break-word" class=""><div class=""></div><div class="">
<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="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="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-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="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;" class=""><span style="color:rgb(7,55,99);font-family:'Century Gothic';font-size:13px" class="">—</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:'Century Gothic'" class=""><span style="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;" class="">
<b class="">É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:'Century Gothic'" class=""><span style="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;" class="">
91128 PALAISEAU CEDEX<br class="">
<a href="mailto:guillaume.didier@polytechnique.edu?subject=" target="_blank" class=""><span style="line-height:normal" class="">guillaume.didier@<wbr class="">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:'Century Gothic'" class=""><span style="text-decoration:underline" class=""><a href="http://www.polytechnique.edu/" target="_blank" class="">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:'Century Gothic'" 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 class="">
<blockquote type="cite" class="">
<div class="">Le 6 sept. 2016 à 15:41, Said Sikira via
swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>> a écrit :</div>
<br class="">
<div class=""><p style="margin:15px 0px;font-family:'Helvetica Neue',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)" class="">Hi,</p><p style="margin:15px 0px;font-family:'Helvetica Neue',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)" 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:'Helvetica Neue',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)" 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:'Helvetica Neue',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)" 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:'Helvetica Neue',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)" 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 ->
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:'Helvetica Neue',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)" 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:'Helvetica Neue',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)" 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:'Helvetica Neue',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)" class="">Example:</p>
<pre style="margin:15px 0px;font-family:Menlo,Consolas,'Liberation Mono',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" class=""><code style="font-family:Menlo,Consolas,'Liberation Mono',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: "SomePackage",
dependencies: [
.Package(url: "<a href="https://repo-source.git/" style="color:rgb(65,131,196);background-color:inherit;text-decoration:none" target="_blank" class="">https://repo-source.git</a>", branch: "new-feature")
]
)
</code></pre>
<pre style="margin:15px 0px;font-family:Menlo,Consolas,'Liberation Mono',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" class=""><code style="font-family:Menlo,Consolas,'Liberation Mono',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: "SomePackage",
dependencies: [
.Package(url: "<a href="https://repo-source.git/" style="color:rgb(65,131,196);background-color:inherit;text-decoration:none" target="_blank" class="">https://repo-source.git</a>", commit: "<wbr class="">c336664020v4f94ed78cbe7447a39a<wbr class="">e5ca0b6c11")
]
)
</code></pre><p style="margin:15px 0px;font-family:'Helvetica Neue',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)" class="">What are your thoughts on this subject?</p>
<span style="font-family:'Helvetica Neue',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" class="">______________________________<wbr class="">_________________</span><br style="font-family:'Helvetica Neue',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)" class="">
<span style="font-family:'Helvetica Neue',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" class="">swift-evolution mailing list</span><br style="font-family:'Helvetica Neue',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)" 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:'Helvetica Neue',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" class="">swift-evolution@swift.org</a><br style="font-family:'Helvetica Neue',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)" 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:'Helvetica Neue',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" class="">https://lists.swift.org/<wbr class="">mailman/listinfo/swift-<wbr class="">evolution</a><br style="font-family:'Helvetica Neue',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)" class=""></div>
</blockquote>
</div>
<br class="">
</div></div></span></blockquote></div></div></div>
<br class="">______________________________<wbr class="">_________________<br class="">
swift-evolution mailing list<br class="">
<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="">https://lists.swift.org/<wbr class="">mailman/listinfo/swift-<wbr class="">evolution</a><br class="">
<br class=""></blockquote></div><br class=""></div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></div></div></body></html>