[swift-build-dev] How to use the Package.pins file
saclukey at live.com
Mon Dec 19 19:18:32 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
I understand that most often the manifest version is less specific; I am very specific because in my experience the swift community is not very stable at this point. I default to strict then loosen as necessary and acceptable. Anyway, I assume that by "looser" you don't mean loose enough to include versions that are incompatible with the project (intentionally or by negligence, I assume this is bad).
> then let the lock/pin file keep track of the exact resolution of those dependencies.
But the pins file doesn't just "keep track" of the exact resolution, it actually forces it. Unless you disable automatic pinning the loose specification in the manifest is basically meaningless - you have an exact version defined by the pins file. Then you need to manage two files, the manifest with some meaningless loose range and the pins file with the actual version that is being used. Why? Why not just manage the package manifest directly? I still don't see the point.
> This tends to make more sense when you have more than a few dependencies.
I would actually think it the opposite. If I have a project with many dependencies constantly updating and changing I would want to be as strict as possible with the versions that are allowable. I believe many other people would too, this is why the pins file exists to begin with. It allows very specific management of the versions of the dependencies in a way that the package manifest somehow (I do not yet understand this somehow) cannot.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-build-dev