[swift-build-dev] Version update and clean option
Kevin Ballard
kevin at sb.org
Fri Dec 4 15:21:34 CST 2015
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.
-Kevin Ballard
On Thu, Dec 3, 2015, at 11:48 PM, 王巍 wrote:
> Hi, all
>
> 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.
>
> Take example, consider the Package.swift file as follows:
>
> let package = Package( name: "Dealer", dependencies: [
> .Package(url: "
> https://github.com/apple/example-package-deckofplayingcards.git",
> majorVersion: 1), ] )
>
> It will clone and build the latest 1.x.y (currently 1.0.2,
> https://github.com/apple/example-package-deckofplayingcards/releases)
> 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. (
> https://github.com/apple/swift-package-manager/blob/master/Sources/dep/get.swift#L260-L270
> ).
>
> 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.
>
> 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`?
>
>
> Best regards.
> ---
> Sincerely, Wei Wang (王巍, @onevcat) im.onevcat.com[1]
>
>
> _________________________________________________
> swift-build-dev mailing list swift-build-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-build-dev
Links:
1. http://im.onevcat.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-build-dev/attachments/20151204/9ce5ac93/attachment.html>
More information about the swift-build-dev
mailing list