<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="">Hello,</div><div class=""><br class=""></div><div class="">Adding the ability to update your dependencies is high on our priority list to implement soon.</div><div class=""><br class=""></div><div class="">We have an issue in our internal bug database (which we haven't yet migrated to <a href="http://bugs.swift.org" class="">http://bugs.swift.org</a>) for implementing lock files; we haven't scheduled it yet, but it is something we intend to support. Of course, we welcome pull requests!</div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>- Rick</div><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 4, 2015, at 1:21 PM, Kevin Ballard &lt;<a href="mailto:kevin@sb.org" class="">kevin@sb.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class="">


<title class=""></title>

<div class=""><div class="">I assume that a lot of this stuff is coming. However, based on the current state of things, I'm actually really surprised we don't have a Package.lock file (or equivalent). Being able to reproduce the exact build on multiple machines or at multiple points in time is really important. I may specify that I want version 1.x of a package but everyone who checks out my project and builds it should get the exact same version (e.g. 1.0.2) of the dependency, even if there's a newer compatible version.<br class=""></div>
<div class="">&nbsp;</div>
<div class="">-Kevin Ballard<br class=""></div>
<div class="">&nbsp;</div>
<div class="">On Thu, Dec 3, 2015, at 11:48 PM, 王巍 wrote:<br class=""></div>
<blockquote type="cite" class=""><div class="">Hi, all<br class=""></div>
<div class="">&nbsp;</div>
<div class="">It seems currently there is no way to update a dependency to a compatible version unless we remove the cloned dependency folder from Packages manually.<br class=""></div>
<div class="">&nbsp;</div>
<div class="">Take example, consider the Package.swift file as follows:<br class=""></div>
<div class="">&nbsp;</div>
<div class=""><div class="">let package = Package(<br class=""></div>
<div class="">&nbsp; &nbsp; name: "Dealer",<br class=""></div>
<div class="">&nbsp; &nbsp; dependencies: [<br class=""></div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; .Package(url: "<a href="https://github.com/apple/example-package-deckofplayingcards.git" class="">https://github.com/apple/example-package-deckofplayingcards.git</a>", majorVersion: 1),<br class=""></div>
<div class="">&nbsp; &nbsp; ]<br class=""></div>
<div class="">)<br class=""></div>
</div>
<div class="">&nbsp;</div>
<div class="">It will clone and build the latest 1.x.y (currently 1.0.2, <a href="https://github.com/apple/example-package-deckofplayingcards/releases" class="">https://github.com/apple/example-package-deckofplayingcards/releases</a>) for me. Let’s assume later a new compatible version 1.0.3 is released. However, even I run `swift build` again, it seems the package manager will not update this dependency, since the existing version is already match the requirement. ( <a href="https://github.com/apple/swift-package-manager/blob/master/Sources/dep/get.swift#L260-L270" class="">https://github.com/apple/swift-package-manager/blob/master/Sources/dep/get.swift#L260-L270</a> ).<br class=""></div>
<div class="">&nbsp;</div>
<div class="">Even I run a `swift build -k` before building the package, the dependency wouldn’t get updated. The only way to update to a most recent compatible version seems to be a `rm -rf Packages` before build.<br class=""></div>
<div class="">&nbsp;</div>
<div class="">As I specified the major version should be 1, IMO, it means I may want the latest version before 2.0.0. Is current behavior expected, or is there any plan to provide a better way to upgrade the dependencies? Maybe we need some options like `swift build —clean_all` or `swift build upgrade`?<br class=""></div>
<div class="">&nbsp;</div>
<div class="">&nbsp;</div>
<div class=""><div style="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; word-wrap: break-word; -webkit-line-break: after-white-space;" class=""><div class=""><div style="font-family:helvetica, Arial;font-size:13px;background-color:rgb(255, 255, 255);word-wrap:break-word;-webkit-line-break:after-white-space;" class=""><span class="font" style="font-family:Helvetica"><span class="colour" style="color:rgb(81, 81, 81)"><span class="font" style="font-family:Tahoma"><span class="size" style="font-size:12px">Best&nbsp;regards.</span></span></span></span><br class=""></div>
<div style="font-family:helvetica, Arial;font-size:13px;background-color:rgb(255, 255, 255);word-wrap:break-word;-webkit-line-break:after-white-space;" class=""><span class="font" style="font-family:Helvetica">---</span><br class=""></div>
<div style="font-size:13px;background-color:rgb(255, 255, 255);font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;word-wrap:break-word;-webkit-line-break:after-white-space;" class=""><span class="colour" style="color:rgb(81, 81, 81)"><span class="font" style="font-family:Tahoma"><span class="size" style="font-size:12px"><span style="line-height:15px;" class="">Sincerely,</span> <br style="line-height:15px;" class=""><span style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-top-style:initial;border-right-style:initial;border-bottom-style:initial;border-left-style:initial;border-top-color:initial;border-right-color:initial;border-bottom-color:initial;border-left-color:initial;border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;outline-width:0px;outline-color:initial;outline-style:initial;vertical-align:baseline;" class="">Wei Wang (王巍, @onevcat)<br class=""></span></span></span></span><a style="font-family:Tahoma;font-size:12px;background-color:inherit;color:rgb(65, 131, 196);text-decoration:none;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-top-style:initial;border-right-style:initial;border-bottom-style:initial;border-left-style:initial;border-top-color:initial;border-right-color:initial;border-bottom-color:initial;border-left-color:initial;border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;outline-width:0px;outline-color:initial;outline-style:initial;vertical-align:baseline;" href="http://im.onevcat.com/" class="">im.onevcat.com</a></div>
</div>
</div>
</div>
<div class="">&nbsp;</div>
<div class=""> <img style="height:1px !important;width:1px !important;border-top-width:0px !important;border-right-width:0px !important;border-bottom-width:0px !important;border-left-width:0px !important;margin-top:0px !important;margin-bottom:0px !important;margin-right:0px !important;margin-left:0px !important;padding-top:0px !important;padding-bottom:0px !important;padding-right:0px !important;padding-left:0px !important;" border="0" height="1" width="1" alt="" src="https://www.fastmailusercontent.com/proxy/6b046178a8d92321f81f0ac61d5940ed0705fdbe89b1ed52c86d2868fda2f2fa/8647470737a3f2f25723030323431303e23647e23756e64676279646e2e65647f27766f2f60756e6f35707e6d3148765176786c673171614a7d2236454230345272776e475d2236423f49686875744638414f64503265663155383366537a7369314c44315859716a417f45414b44794f654a4a59555a48627930364144587244517f466f6e6439777a497d475966555b6742305a51736d4b63764d6a5465607b415035363169397f433465405d22364c436f6376754a6239646e6d4d223244614858456b465148333f6739695c68526360543d617b4935754849796335794440783960324944305161643d4a777d6e49595831576542587347354166486776343c6a72535d22324455644b677d23344d23344/open" class=""><br class=""></div>
<div class=""><u class="">_______________________________________________</u><br class=""></div>
<div class="">swift-build-dev mailing list<br class=""></div>
<div class=""><a href="mailto:swift-build-dev@swift.org" class="">swift-build-dev@swift.org</a><br class=""></div>
<div class=""><a href="https://lists.swift.org/mailman/listinfo/swift-build-dev" class="">https://lists.swift.org/mailman/listinfo/swift-build-dev</a><br class=""></div>
</blockquote><div class="">&nbsp;</div>

<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=qz0eNO-2BnIaKwfHdqdSEoWDzK1gYoMlfMcRDuURe6g4kKSTt0-2BQsy7-2FruSbeIR8aRT2Ux2EPNh3Xir-2BqZ2agvN0oDm0SzwUtonxYikFN18-2BQ3SX1imVQ1qUtY5-2FXRsel746pYBXHh8KvNzxS4VPIuQM-2BUKV-2FTJlAeCd-2FHCH6CwICur6JpyVF6Pg9CnTiJzrG7N69g0vQOCIFXUtweMzbRshgqVzwZf82vReVNZzH13v0-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" class="">
</div>


_______________________________________________<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="">https://lists.swift.org/mailman/listinfo/swift-build-dev<br class=""></div></blockquote></div><br class=""></body></html>