Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions TSPL.docc/LanguageGuide/Concurrency.md
Original file line number Diff line number Diff line change
Expand Up @@ -917,10 +917,10 @@ You have complete flexibility to manage unstructured tasks
in whatever way your program needs,
but you're also completely responsible for their correctness.
To create an unstructured task that runs on the current actor,
call the [`Task.init(priority:operation:)`](https://developer.apple.com/documentation/swift/task/3856790-init) initializer.
call the [`Task.init(priority:operation:)`][] initializer.
To create an unstructured task that's not part of the current actor,
known more specifically as a *detached task*,
call the [`Task.detached(priority:operation:)`](https://developer.apple.com/documentation/swift/task/3856786-detached) class method.
call the [`Task.detached(priority:operation:)`][] class method.
Both of these operations return a task that you can interact with ---
for example, to wait for its result or to cancel it.

Expand All @@ -935,6 +935,9 @@ let result = await handle.value
For more information about managing detached tasks,
see [`Task`](https://developer.apple.com/documentation/swift/task).

[`Task.init(priority:operation:)`]: https://developer.apple.com/documentation/swift/task/init(priority:operation:)-7f0zv
[`Task.detached(priority:operation:)`]: https://developer.apple.com/documentation/swift/task/detached(priority:operation:)-d24l

<!--
TODO Add some conceptual guidance about
when to make a method do its work in a detached task
Expand Down
6 changes: 3 additions & 3 deletions TSPL.docc/LanguageGuide/Macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -520,11 +520,11 @@ automatically includes a dependency on SwiftSyntax.
If you're adding macros to an existing project,
add a dependency on SwiftSyntax in your `Package.swift` file:

[SwiftSyntax]: http://github.com/apple/swift-syntax/
[SwiftSyntax]: https://github.com/swiftlang/swift-syntax

```swift
dependencies: [
.package(url: "https://github.com/apple/swift-syntax", from: "509.0.0")
.package(url: "https://github.com/swiftlang/swift-syntax", from: "509.0.0")
],
```

Expand Down Expand Up @@ -633,7 +633,7 @@ so you can use this approach when implementing any kind of macro.
<!--
The return-a-string APIs come from here

https://github.com/apple/swift-syntax/blob/main/Sources/SwiftSyntaxBuilder/Syntax%2BStringInterpolation.swift
https://github.com/swiftlang/swift-syntax/blob/main/Sources/SwiftSyntaxBuilder/Syntax%2BStringInterpolation.swift
-->


Expand Down
2 changes: 1 addition & 1 deletion TSPL.docc/ReferenceManual/Attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ Or are those supported today?
I see #error and #warning as @freestanding(declaration)
in the stdlib already:

https://github.com/apple/swift/blob/main/stdlib/public/core/Macros.swift#L102
https://github.com/swiftlang/swift/blob/main/stdlib/public/core/Macros.swift#L102
-->

### frozen
Expand Down
2 changes: 1 addition & 1 deletion TSPL.docc/ReferenceManual/Declarations.md
Original file line number Diff line number Diff line change
Expand Up @@ -3582,7 +3582,7 @@ Call the `externalMacro(module:type:)` macro from the Swift standard library,
passing in the name of a type that contains the macro's implementation,
and the name of the module that contains that type.

[SwiftSyntax]: http://github.com/apple/swift-syntax/
[SwiftSyntax]: https://github.com/swiftlang/swift-syntax

Macros can be overloaded,
following the same model used by functions.
Expand Down
10 changes: 5 additions & 5 deletions TSPL.docc/ReferenceManual/LexicalStructure.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ The backticks aren't considered part of the identifier;
The paragraph above produces a link-resolution warning
because of a known issue with ` in code voice.

https://github.com/apple/swift-book/issues/71
https://github.com/apple/swift-markdown/issues/93
https://github.com/swiftlang/swift-book/issues/71
https://github.com/swiftlang/swift-markdown/issues/93
-->

Inside a closure with no explicit parameter names,
Expand All @@ -133,8 +133,8 @@ The formal grammar below for 'identifier'
produces a link-resolution warning
because of a known issue with ` in code voice.

https://github.com/apple/swift-book/issues/71
https://github.com/apple/swift-markdown/issues/93
https://github.com/swiftlang/swift-book/issues/71
https://github.com/swiftlang/swift-markdown/issues/93
-->

> Grammar of an identifier:
Expand Down Expand Up @@ -971,7 +971,7 @@ and `/\d/` matches a single digit.
of the supported syntax here.
(Unified dialect/superset of POSIX + PCRE 2 + Oniguruma + .NET)

https://github.com/apple/swift-experimental-string-processing/blob/main/Sources/_StringProcessing/Regex/Core.swift
https://github.com/swiftlang/swift-experimental-string-processing/blob/main/Sources/_StringProcessing/Regex/Core.swift

Regex literals and the DSL take different approaches to captures.
The literals give you more type safety.
Expand Down
4 changes: 2 additions & 2 deletions TSPL.docc/ReferenceManual/Statements.md
Original file line number Diff line number Diff line change
Expand Up @@ -1316,8 +1316,8 @@ the `#warning` and `#error` statements emit a diagnostic during compilation.
This behavior is now provided by
the [`warning(_:)`][] and [`error(_:)`][] macros in the Swift standard library.

[`warning(_:)`]: http://developer.apple.com/documentation/swift/documentation/swift/warning(_:)
[`error(_:)`]: http://developer.apple.com/documentation/swift/documentation/swift/error(_:)
[`warning(_:)`]: https://developer.apple.com/documentation/swift/warning(_:)
[`error(_:)`]: https://developer.apple.com/documentation/swift/error(_:)

## Availability Condition

Expand Down
2 changes: 1 addition & 1 deletion TSPL.docc/ReferenceManual/Types.md
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,7 @@ because those types are already boxed protocol types.

<!--
Contrast P.Type with (any P.Type) and (any P).Type
https://github.com/apple/swift-evolution/blob/main/proposals/0335-existential-any.md#metatypes
https://github.com/swiftlang/swift-evolution/blob/main/proposals/0335-existential-any.md#metatypes
-->

> Grammar of a boxed protocol type:
Expand Down
2 changes: 1 addition & 1 deletion TSPL.docc/header-staging.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h3>Important</h3>
</p>
<p>
For the current shipping book, see <a href="https://docs.swift.org/swift-book/documentation/the-swift-programming-language/">Swift.org</a>.
To contribute to this documentation, see the <a href="https://github.com/apple/swift-book">swift-book project</a> on GitHub.
To contribute to this documentation, see the <a href="https://github.com/swiftlang/swift-book">swift-book project</a> on GitHub.
</p>
</aside>
</div>
Expand Down
2 changes: 1 addition & 1 deletion bin/preflight
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ xpath -q -n -e '//link/@destination' |
sort -u | cut -f2 -d= | grep -v '^"doc:' | sed 's/^"//; s/"$//' |
while read url
do
if curl --silent --output /dev/null --fail --head $url
if curl --silent --output /dev/null --location --fail --head $url
then
echo " $url"
else
Expand Down