[swift-build-dev] How to use the Package.pins file
Jason Dusek
jason.dusek at gmail.com
Tue Dec 20 01:57:01 CST 2016
Loose specifications allow libraries to avoid unnecessarily causing
dependency conflicts for one another. The "pins" file allows application
builds to reliably produce the same resolution, time after time.
Steven Clukey via swift-build-dev <swift-build-dev at swift.org> schrieb am
Mo. 19. Dez. 2016 um 17:18:
> > 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.
>
>
> 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/20161220/1a71e338/attachment.html>
More information about the swift-build-dev
mailing list