[swift-build-dev] Proposal: Git Branch and ref support for dependencies in Swift Package Manager

Max Howell max.howell at apple.com
Tue Dec 22 12:47:52 CST 2015


> I think we need the bootstrap property because `swift build` will read the local state of packages and builds the package where as bootstrap will be always reading from lock file and reproducing exact versions of the already present lock file. for eg : 
> 
> Person A: 
> Runs `swift build`
> fetches dependencies Foo at v1.2.3 and Bar at v2.3.4 and locks it.
> 
> Person B:
> Runs `swift build`
> fetches dependencies Foo at v1.2.4 and Bar at v2.3.6 (this can differ in patch versions which might not be the intention as both want to replicate exact versions, as running swift build will fetch the latest patch and minor version if only major is specified)
> but if he runs `swift build --bootstrap` he'll get Foo at v1.2.3 and Bar at v2.3.4

If the lock file is committed I think swift-build should always use it. If the user wants newer updates they can execute `swift build —update`.

This makes understanding what happens simpler: `swift build` always uses the lock file if it is present.

This makes reliably building apps possible since you will always be building what everyone else built when the sources where committed.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-build-dev/attachments/20151222/0204d357/attachment.html>


More information about the swift-build-dev mailing list