[swift-build-dev] How to use the Package.pins file

Steven Clukey saclukey at live.com
Mon Dec 19 15:09:44 CST 2016


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-build-dev/attachments/20161219/32248a4b/attachment.html>


More information about the swift-build-dev mailing list