1
- :orphan:
2
-
3
- ===================
4
1
Dependency Analysis
5
2
===================
6
3
@@ -20,25 +17,25 @@ Kinds of Dependency
20
17
21
18
There are four major kinds of dependency between files:
22
19
23
- - `` top-level ` `: use of an unqualified name that is looked up at module scope,
20
+ - ` top-level ` : use of an unqualified name that is looked up at module scope,
24
21
and definition of a name at module scope. This includes free functions,
25
22
top-level type definitions, and global constants and variables.
26
23
27
- - `` nominal ` `: use of a particular type, in any way, and declarations that
24
+ - ` nominal ` : use of a particular type, in any way, and declarations that
28
25
change the "shape" of the type (the original definition, and extensions that
29
26
add conformances). The type is identified by its mangled name.
30
27
31
- - `` member ` `: a two-part entry that constitutes either *providing * a member or
28
+ - ` member ` : a two-part entry that constitutes either * providing* a member or
32
29
* accessing* a specific member of a type. This has some complications; see
33
30
below.
34
31
35
- - `` dynamic-lookup `` : use of a specific member accessed through `` AnyObject ` `,
36
- which has special `` id ` `-like rules for member accesses, and definitions of
37
- `` @objc ` ` members that can be accessed this way.
32
+ - ` dynamic-lookup ` : use of a specific member accessed through ` AnyObject ` ,
33
+ which has special ` id ` -like rules for member accesses, and definitions of
34
+ ` @objc ` members that can be accessed this way.
38
35
39
- The `` member ` ` dependency kind has a special entry where the member name is
36
+ The ` member ` dependency kind has a special entry where the member name is
40
37
empty. This is in the "provides" set of * every file that adds non-private
41
- members * to a type, making it a superset of provided `` nominal ` ` entries. When
38
+ members* to a type, making it a superset of provided ` nominal ` entries. When
42
39
listed as a dependency, it means that something in the file needs to be
43
40
recompiled whenever * any* members are added to the type in question. This is
44
41
currently used for cases of inheritance: superclasses and protocol conformances.
@@ -51,12 +48,12 @@ dependencies, but direct lookups into a type or module will not, nor will
51
48
dependencies not modeled by a query of some kind. These latter dependencies
52
49
must be handled on a case-by-case basis.
53
50
54
- .. note : :
51
+ Note :
55
52
56
- The compiler currently does not track `` nominal ` ` dependencies separate from
57
- `` member `` dependencies. Instead, it considers every `` member ` ` dependency
58
- to implicitly be a `` nominal ` ` dependency, since adding a protocol to a type
59
- may change its members drastically.
53
+ > The compiler currently does not track ` nominal ` dependencies separate from
54
+ > ` member ` dependencies. Instead, it considers every ` member ` dependency
55
+ > to implicitly be a ` nominal ` dependency, since adding a protocol to a type
56
+ > may change its members drastically.
60
57
61
58
62
59
Cascading vs. Non-Cascading Dependencies
@@ -78,18 +75,19 @@ not a particular dependency should be considered cascading. If there's not
78
75
enough context to decide, the compiler has to go with the conservative choice
79
76
and record it as cascading.
80
77
81
- .. note ::
82
78
83
- In the current on-disk representation of dependency information, cascading
84
- dependencies are the default. Non-cascading dependencies are marked
85
- ``private `` by analogy with the Swift ``private `` keyword.
79
+ Note:
80
+
81
+ > In the current on-disk representation of dependency information, cascading
82
+ > dependencies are the default. Non-cascading dependencies are marked
83
+ > ` private ` by analogy with the Swift ` private ` keyword.
86
84
87
85
88
86
External Dependencies
89
87
=====================
90
88
91
89
External dependencies, including imported Swift module files and Clang headers,
92
- are tracked using a special `` depends-external ` ` set. These dependencies refer
90
+ are tracked using a special ` depends-external ` set. These dependencies refer
93
91
to files that are external to the module. The Swift driver
94
92
interprets this set specially and decides whether or not the cross-module
95
93
dependencies have changed.
0 commit comments