[swift-build-dev] How to use the Package.pins file
orta
orta.therox at gmail.com
Mon Dec 19 15:23:52 CST 2016
It’s normal to define your dependencies using a looser interpretation of a
version, using things like “~> 1.3” implying anything from 1.3.0 -> 1.4.0 (
here’s a cute video from Google showing the use-case in CocoaPods
<https://www.youtube.com/watch?v=x4ARXyovvPc> ) so you would define your
dependencies pretty loosely in the manifest ( e.g. package.swift ) but then
let the lock/pin file keep track of the exact resolution of those
dependencies.
This tends to make more sense when you have more than a few dependencies.
--
[·/ ] Orta Therox
w/ Artsy <http://artsy.net/>
CocoaPods <http://cocoapods.org/> / CocoaDocs <http://cocoadocs.org/>
@orta / orta.github.com
Artsy is totally hiring iOS Devs <http://artsy.net/job/developer> ATM
On Mon, Dec 19, 2016 at 4:09 PM, Steven Clukey via swift-build-dev <
swift-build-dev at swift.org> wrote:
> Perhaps the pinning feature and how to use it together with the version
> specification in the manifest could be documented somewhere? I am sorting
> through how to use the Package.pins file on my own projects and I am coming
> up a bit confused, and I assume that I am just missing the point of this
> somewhat intrusive change.
>
>
>
> If it is of any interest, my initial impressions of using this behavior
> are these:
>
>
> Currently in my package manifests I have been specifying my dependencies
> with exact versions (e.g. `.Package(url: "URL.git", Version(0,1,2))`), so
> the pins file seems entirely redundant. The statement in SE-0145 that "there
> has heretofore been no way to share that pinning information with other
> team members" seems wrong. Hasn't my package manifest with dependency
> versions been being shared?
>
>
> I see that the pins file is supposed to disambiguate the dependency
> version "independent from the semantic versioning specification". Does that
> mean that I could have a completely different version in the pins file than
> the manifest and the pins file would override the manifest? Can the
> "version" field in the pins file accept commit hashes or branch names or
> other things not supported by semantic version tags? Currently, neither of
> these are possible (in the first case swift gives "error: unsatisfiable"
> and in the second case swift crashes if the pins "version" is anything but
> a valid semantic version), so again I am missing what benefit the pins file
> has over simply giving an exact `Version(...)` in the manifest. On the
> other hand, if the pins file is intended to override the manifest, than
> what is the point of specifying any version in the manifest at all?
>
>
>
> Steven
>
>
>
> _______________________________________________
> swift-build-dev mailing list
> swift-build-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-build-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-build-dev/attachments/20161219/b9538de9/attachment.html>
More information about the swift-build-dev
mailing list