Skip to content

Commit cd53f96

Browse files
committed
Prepare diagnostics docs for docc generation
Update the diagostic docs so that they can be built with docc: * Add technologyroot (diagnostics.md) to aggregate all markdown files * Fixed warnings in a few diagnostics docs This allows the creation of docc documentation with a single invocation of docc. It will generate the landing page from diagnostics.md and include all of the diagnostics as subarticles. The subarticles are accessible via the name of the markdown file, which is being used as the ID for these diagnostics. E.g. existential-any. The docc docs for these documents can be generated locally with the following command: >docc preview --allow-arbitrary-catalog-directories userdocs/diagnostics
1 parent 1745467 commit cd53f96

File tree

4 files changed

+16
-7
lines changed

4 files changed

+16
-7
lines changed

Diff for: userdocs/diagnostics/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.docc-build

Diff for: userdocs/diagnostics/async-caller-execution.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
# `AsyncCallerExecution`
22

3-
Proposed in [SE-0461], this feature changes the behavior of nonisolated async
3+
This feature changes the behavior of nonisolated async
44
functions to run on the actor to which the caller is isolated (if any) by
55
default, and provides an explicit way to express the execution semantics for
6-
these functions:
6+
these functions.
7+
8+
This feature was proposed in [SE-0461](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0461-async-function-isolation.md)
9+
710
* The `@execution(concurrent)` attribute specifies that a function must always
811
switch off of an actor to run.
912
This is the default behavior without `AsyncCallerExecution`.
1013
* The `@execution(caller)` attribute specifies that a function must always
1114
run on the caller's actor.
1215
This is the default behavior with `AsyncCallerExecution`.
13-
14-
[SE-0461]: https://github.com/swiftlang/swift-evolution/blob/main/proposals/0461-async-function-isolation.md

Diff for: userdocs/diagnostics/diagnostics.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Swift Compiler Diagnostics
2+
3+
@Metadata {
4+
@TechnologyRoot
5+
}
6+
7+
Documentation on diagnostics emitted by the compiler.

Diff for: userdocs/diagnostics/existential-any.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# `ExistentialAny`
22

33
This diagnostic group includes errors and warnings pertaining to the `any` type
4-
syntax proposed in [SE-0335].
4+
syntax.
5+
6+
This syntax was proposed in [SE-0335](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0335-existential-any.md).
57
`any` syntax draws a line between constraint types and existential or boxed
68
types.
79

@@ -20,5 +22,3 @@ func sillyFunction(collection: Collection) { // error
2022
// ...
2123
}
2224
```
23-
24-
[SE-0335]: https://github.com/swiftlang/swift-evolution/blob/main/proposals/0335-existential-any.md

0 commit comments

Comments
 (0)