Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
stephencelis committed Dec 30, 2024
1 parent 30af707 commit becf33a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

- ``withDependencies(_:operation:)-4uz6m``
- ``withDependencies(from:operation:fileID:filePath:line:column:)``
- ``prepareDependencies(_:)``

### Escaping contexts

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
### Dependency value

- ``UUIDGenerator``

### Helpers

- ``Foundation/UUID``
2 changes: 1 addition & 1 deletion Sources/Dependencies/Internal/AppEntryPoint.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation

extension Thread {
public static var isPreviewAppEntryPoint: Bool {
static var isPreviewAppEntryPoint: Bool {
guard ProcessInfo.processInfo.environment["XCODE_RUNNING_FOR_PREVIEWS"] == "1"
else { return false }

Expand Down
8 changes: 8 additions & 0 deletions Sources/Dependencies/Internal/Deprecations.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
Use 'withDependencies' or 'prepareDependencies' from the body of the preview, instead.
"""
)
@_documentation(visibility:private)
public static func dependency<Value>(
_ keyPath: WritableKeyPath<DependencyValues, Value> & Sendable,
_ value: Value
Expand All @@ -22,6 +23,7 @@
Use 'withDependencies' or 'prepareDependencies' from the body of the preview, instead.
"""
)
@_documentation(visibility:private)
public static func dependency<Value: TestDependencyKey>(
_ value: Value
) -> PreviewTrait where Value == Value.Value {
Expand All @@ -33,6 +35,7 @@
Use 'withDependencies' or 'prepareDependencies' from the body of the preview, instead.
"""
)
@_documentation(visibility:private)
public static func dependencies(
_ updateValuesForPreview: (inout DependencyValues) -> Void
) -> PreviewTrait {
Expand All @@ -50,6 +53,7 @@

extension AsyncStream {
@available(*, deprecated, renamed: "makeStream(of:bufferingPolicy:)")
@_documentation(visibility:private)
public static func streamWithContinuation(
_ elementType: Element.Type = Element.self,
bufferingPolicy limit: Continuation.BufferingPolicy = .unbounded
Expand All @@ -61,6 +65,7 @@ extension AsyncStream {

extension AsyncThrowingStream where Failure == Error {
@available(*, deprecated, renamed: "makeStream(of:throwing:bufferingPolicy:)")
@_documentation(visibility:private)
public static func streamWithContinuation(
_ elementType: Element.Type = Element.self,
bufferingPolicy limit: Continuation.BufferingPolicy = .unbounded
Expand All @@ -78,6 +83,7 @@ extension ActorIsolated {
deprecated,
message: "Use the non-async version of 'withValue'."
)
@_documentation(visibility:private)
public func withValue<T: Sendable>(
_ operation: @Sendable (inout Value) async throws -> T
) async rethrows -> T where Value: Sendable {
Expand All @@ -93,6 +99,7 @@ extension AsyncStream where Element: Sendable {
deprecated,
message: "Do not configure streams with a buffering policy 'limit' parameter."
)
@_documentation(visibility:private)
public init<S: AsyncSequence & Sendable>(
_ sequence: S,
bufferingPolicy limit: Continuation.BufferingPolicy
Expand Down Expand Up @@ -122,6 +129,7 @@ extension AsyncThrowingStream where Element: Sendable, Failure == Error {
deprecated,
message: "Do not configure streams with a buffering policy 'limit' parameter."
)
@_documentation(visibility:private)
public init<S: AsyncSequence & Sendable>(
_ sequence: S,
bufferingPolicy limit: Continuation.BufferingPolicy
Expand Down

0 comments on commit becf33a

Please sign in to comment.