Skip to content

Commit fa69229

Browse files
committed
[Gardening] De-RST DependencyAnalysis
1 parent 4b555bb commit fa69229

File tree

6 files changed

+27
-29
lines changed

6 files changed

+27
-29
lines changed

docs/CompilerPerformance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1143,7 +1143,7 @@ driver. These files contain the driver's summary-view of the dependencies
11431143
between entities defined and referenced in each source file; it is from these
11441144
files that the driver decides when a file "needs" to be rebuilt because it
11451145
depends on another file that needs to be rebuilt, and so on transitively. The
1146-
file format is [documented here](DependencyAnalysis.rst).
1146+
file format is [documented here](DependencyAnalysis.md).
11471147
11481148
### Finding areas in need of general improvement
11491149

docs/DependencyAnalysis.rst renamed to docs/DependencyAnalysis.md

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
:orphan:
2-
3-
===================
41
Dependency Analysis
52
===================
63

@@ -20,25 +17,25 @@ Kinds of Dependency
2017

2118
There are four major kinds of dependency between files:
2219

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,
2421
and definition of a name at module scope. This includes free functions,
2522
top-level type definitions, and global constants and variables.
2623

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
2825
change the "shape" of the type (the original definition, and extensions that
2926
add conformances). The type is identified by its mangled name.
3027

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
3229
*accessing* a specific member of a type. This has some complications; see
3330
below.
3431

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.
3835

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
4037
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
4239
listed as a dependency, it means that something in the file needs to be
4340
recompiled whenever *any* members are added to the type in question. This is
4441
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
5148
dependencies not modeled by a query of some kind. These latter dependencies
5249
must be handled on a case-by-case basis.
5350

54-
.. note::
51+
Note:
5552

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.
6057
6158

6259
Cascading vs. Non-Cascading Dependencies
@@ -78,18 +75,19 @@ not a particular dependency should be considered cascading. If there's not
7875
enough context to decide, the compiler has to go with the conservative choice
7976
and record it as cascading.
8077

81-
.. note::
8278

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.
8684
8785

8886
External Dependencies
8987
=====================
9088

9189
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
9391
to files that are external to the module. The Swift driver
9492
interprets this set specially and decides whether or not the cross-module
9593
dependencies have changed.

docs/Driver.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ compiler into their build system, rather than using Xcode or the package
1515
manager (`swift build`). If you're looking to work on the driver itself...well,
1616
this is probably still useful to you, but you should also check out
1717
[DriverInternals.rst](DriverInternals.rst) and maybe
18-
[DependencyAnalysis.rst](DependencyAnalysis.rst) as well. If you're just using
18+
[DependencyAnalysis.md](DependencyAnalysis.md) as well. If you're just using
1919
Xcode or SwiftPM and want to find out what mysterious command-line options you
2020
could be passing, `swiftc --help` is a better choice.
2121

@@ -206,7 +206,7 @@ in becoming more like non-whole-module builds.
206206
## Incremental Builds ##
207207

208208
Incremental builds in Swift work by primarily by cross-file dependency
209-
analysis, described in [DependencyAnalysis.rst](DependencyAnalysis.rst).
209+
analysis, described in [DependencyAnalysis.md](DependencyAnalysis.md).
210210
Compiling a single file might be necessary because that file has changed, but
211211
it could also be because that file depends on something else that might have
212212
changed. From a build system perspective, the files in a particular module

docs/Lexicon.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ name when incremental compilation is enabled. A cascading dependency is much
8888
safer to produce than its private counterpart, but it comes at the cost of
8989
increased usage of compilation resources - even if those resources are being
9090
wasted on rebuilding a file that didn't actually require rebuilding.
91-
See [DependencyAnalysis.rst](DependencyAnalysis.rst).
91+
See [DependencyAnalysis.md](DependencyAnalysis.md).
9292

9393
## Clang importer
9494

@@ -399,7 +399,7 @@ require further transitive evaluation of dependency edges by the Swift
399399
driver. Private dependencies are therefore cheaper than cascading
400400
dependencies, but must be used with the utmost care or dependent files will
401401
fail to rebuild and the result will most certainly be a miscompile.
402-
See [DependencyAnalysis.rst](DependencyAnalysis.rst).
402+
See [DependencyAnalysis](DependencyAnalysis.md).
403403

404404
## QoI
405405

include/swift/AST/SimpleRequest.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ enum class RequestFlags {
4848
/// (e.g. \c TypeCheckSourceFileRequest) will require it.
4949
///
5050
/// For further discussion on incremental dependencies
51-
/// see DependencyAnalysis.rst.
51+
/// see DependencyAnalysis.md.
5252
DependencySource = 1 << 3,
5353
/// This request introduces the sink component of a source-sink
5454
/// incremental dependency pair and is a consumer of the current
@@ -58,7 +58,7 @@ enum class RequestFlags {
5858
/// (e.g. \c DirectLookupRequest) will require it.
5959
///
6060
/// For further discussion on incremental dependencies
61-
/// see DependencyAnalysis.rst.
61+
/// see DependencyAnalysis.md.
6262
DependencySink = 1 << 4,
6363
};
6464

include/swift/Basic/SupplementaryOutputPaths.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ struct SupplementaryOutputPaths {
7777
/// visibility" within a module, that becomes very important for any sort of
7878
/// incremental build. These files are consumed by the Swift driver to decide
7979
/// whether a source file needs to be recompiled during a build. See
80-
/// docs/DependencyAnalysis.rst for more information.
80+
/// docs/DependencyAnalysis.md for more information.
8181
///
8282
/// \sa swift::emitReferenceDependencies
8383
/// \sa DependencyGraph

0 commit comments

Comments
 (0)