File tree Expand file tree Collapse file tree 1 file changed +0
-20
lines changed
Sources/Dependencies/Documentation.docc/Articles Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -232,25 +232,5 @@ dependency from the implementation (see
232
232
< doc:LivePreviewTest#Separating-interface-and-implementation > for more information). But now there
233
233
is no need to maintain that code as it is automatically provided for you by the macro.
234
234
235
- > Warning: Due to a [ bug in the Swift compiler] ( https://github.com/apple/swift/issues/71070 ) ,
236
- > endpoints that are not throwing will not emit a test failure when invoked. This applies to
237
- > dependencies with endpoints like this:
238
- >
239
- > ``` swift
240
- > @DependencyClient
241
- > struct NumberFetcher {
242
- > var get: () async -> Int = { 42 }
243
- > }
244
- > ```
245
- >
246
- > The workaround is to invoke `reportIssue` directly in the closure:
247
- >
248
- > ```swift
249
- > @DependencyClient
250
- > struct NumberFetcher {
251
- > var get: () async -> Int = { reportIssue (" \( Self .self ) .get" ); return 42 }
252
- > }
253
- > ```
254
-
255
235
[ designing-deps ] : https://www.pointfree.co/collections/dependencies
256
236
[ issue-reporting-gh ] : http://github.com/pointfreeco/swift-issue-reporting
You can’t perform that action at this time.
0 commit comments