Skip to content

chore: Remove no longer relevant warning in Designing dependencies documentation page #357

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -232,25 +232,5 @@ dependency from the implementation (see
<doc:LivePreviewTest#Separating-interface-and-implementation> for more information). But now there
is no need to maintain that code as it is automatically provided for you by the macro.

> Warning: Due to a [bug in the Swift compiler](https://github.com/apple/swift/issues/71070),
> endpoints that are not throwing will not emit a test failure when invoked. This applies to
> dependencies with endpoints like this:
>
> ```swift
> @DependencyClient
> struct NumberFetcher {
> var get: () async -> Int = { 42 }
> }
> ```
>
> The workaround is to invoke `reportIssue` directly in the closure:
>
> ```swift
> @DependencyClient
> struct NumberFetcher {
> var get: () async -> Int = { reportIssue("\(Self.self).get"); return 42 }
> }
> ```

[designing-deps]: https://www.pointfree.co/collections/dependencies
[issue-reporting-gh]: http://github.com/pointfreeco/swift-issue-reporting