Skip to content

Commit 10f2c9a

Browse files
committed
[docs] LibraryEvolution: Add a section on minimum library versions.
1 parent 7eaed61 commit 10f2c9a

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

docs/LibraryEvolution.rst

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ We also intend to provide tools to detect inadvertent changes in interfaces.
4848
* A discussion of back-dating, and how it usually is not allowed.
4949
* A revisal of the discussion on fixed-layout classes.
5050
* 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.
5251

5352
Introduction
5453
============
@@ -117,6 +116,25 @@ Swift 2.0, but generalized for checking library versions instead of just OS
117116
versions.
118117

119118

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
135+
document.
136+
137+
120138
Publishing Versioned API
121139
========================
122140

0 commit comments

Comments
 (0)