You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/LibraryEvolution.rst
+19-1Lines changed: 19 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,6 @@ We also intend to provide tools to detect inadvertent changes in interfaces.
48
48
* A discussion of back-dating, and how it usually is not allowed.
49
49
* A revisal of the discussion on fixed-layout classes.
50
50
* A brief discussion of "deployment files", which represent distribution groupings that are themselves versioned. (For example, OS X 10.10.3 contains Foundation version 1153.20.) Deployment files are likely to provide a concrete implementation of "resilience domains".
51
-
* A way to specify "minimum deployment libraries", like today's minimum deployment targets.
52
51
53
52
Introduction
54
53
============
@@ -117,6 +116,25 @@ Swift 2.0, but generalized for checking library versions instead of just OS
117
116
versions.
118
117
119
118
119
+
Declaring Library Version Dependencies
120
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
121
+
122
+
Swift 2's availability model includes the notion of a *minimum deployment
123
+
target,* the version of an OS that can be assumed present for the program being
124
+
compiled to run at all. For example, a program compiled with a minimum
125
+
deployment target of iOS 9.2 will not launch on iOS 9.0.
126
+
127
+
The generalized model above suggests being able to make similar guarantees for
128
+
individual libraries. For example, a client program may depend on version 1.1
129
+
of the "Magician" library; trying to run using version 1.0 will result in
130
+
errors. By declaring this at compile-time, the client code can omit
131
+
``@available`` and ``#available`` checks that are satisfied by the minimum
132
+
library version.
133
+
134
+
Both the syntax and enforcement of this feature are not covered by this
0 commit comments