diff --git a/Examples/echo/Sources/Subcommands/Serve.swift b/Examples/echo/Sources/Subcommands/Serve.swift index 396ecef55..4e12baa5d 100644 --- a/Examples/echo/Sources/Subcommands/Serve.swift +++ b/Examples/echo/Sources/Subcommands/Serve.swift @@ -42,7 +42,6 @@ struct Serve: AsyncParsableCommand { } } -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) struct EchoService: Echo_Echo_ServiceProtocol { func get( request: ServerRequest, diff --git a/Examples/route-guide/Sources/RouteGuide.swift b/Examples/route-guide/Sources/RouteGuide.swift index d53882726..425fe2103 100644 --- a/Examples/route-guide/Sources/RouteGuide.swift +++ b/Examples/route-guide/Sources/RouteGuide.swift @@ -17,7 +17,6 @@ import ArgumentParser @main -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) struct RouteGuide: AsyncParsableCommand { static let configuration = CommandConfiguration( commandName: "route-guide", diff --git a/Package.swift b/Package.swift index e14774b1a..c1aa65bfc 100644 --- a/Package.swift +++ b/Package.swift @@ -105,6 +105,13 @@ let targets: [Target] = [ let package = Package( name: "grpc-swift", + platforms: [ + .macOS(.v15), + .iOS(.v18), + .tvOS(.v18), + .watchOS(.v11), + .visionOS(.v2), + ], products: products, dependencies: dependencies, targets: targets diff --git a/Sources/GRPCCore/Call/Client/CallOptions.swift b/Sources/GRPCCore/Call/Client/CallOptions.swift index ce6388050..2e6f8d939 100644 --- a/Sources/GRPCCore/Call/Client/CallOptions.swift +++ b/Sources/GRPCCore/Call/Client/CallOptions.swift @@ -21,7 +21,6 @@ /// /// You can create the default set of options, which defers all possible /// configuration to the transport, by using ``CallOptions/defaults``. -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) public struct CallOptions: Sendable { /// The default timeout for the RPC. /// @@ -108,7 +107,6 @@ public struct CallOptions: Sendable { } } -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) extension CallOptions { /// Default call options. /// @@ -125,7 +123,6 @@ extension CallOptions { } } -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) extension CallOptions { package mutating func formUnion(with methodConfig: MethodConfig?) { guard let methodConfig = methodConfig else { return } diff --git a/Sources/GRPCCore/Call/Client/ClientInterceptor.swift b/Sources/GRPCCore/Call/Client/ClientInterceptor.swift index 2a81a0ddc..939461e54 100644 --- a/Sources/GRPCCore/Call/Client/ClientInterceptor.swift +++ b/Sources/GRPCCore/Call/Client/ClientInterceptor.swift @@ -88,7 +88,6 @@ /// ``` /// /// For server-side interceptors see ``ServerInterceptor``. -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) public protocol ClientInterceptor: Sendable { /// Intercept a request object. /// diff --git a/Sources/GRPCCore/Call/Client/ClientRequest.swift b/Sources/GRPCCore/Call/Client/ClientRequest.swift index fbbf686e6..ebb25316e 100644 --- a/Sources/GRPCCore/Call/Client/ClientRequest.swift +++ b/Sources/GRPCCore/Call/Client/ClientRequest.swift @@ -61,7 +61,6 @@ public struct ClientRequest: Sendable { /// /// See ``ClientRequest`` for single-message requests and ``StreamingServerRequest`` for the /// servers representation of a streaming-message request. -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public struct StreamingClientRequest: Sendable { /// Caller-specified metadata sent to the server at the start of the RPC. /// diff --git a/Sources/GRPCCore/Call/Client/ClientResponse.swift b/Sources/GRPCCore/Call/Client/ClientResponse.swift index dd2e71a38..e88ab1d77 100644 --- a/Sources/GRPCCore/Call/Client/ClientResponse.swift +++ b/Sources/GRPCCore/Call/Client/ClientResponse.swift @@ -198,7 +198,6 @@ public struct ClientResponse: Sendable { /// print("RPC failed with code '\(error.code)'") /// } /// ``` -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) public struct StreamingClientResponse: Sendable { public struct Contents: Sendable { /// Metadata received from the server at the beginning of the response. @@ -325,7 +324,6 @@ extension ClientResponse { } } -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension StreamingClientResponse { /// Creates a new accepted response. /// diff --git a/Sources/GRPCCore/Call/Client/Internal/ClientRPCExecutor+HedgingExecutor.swift b/Sources/GRPCCore/Call/Client/Internal/ClientRPCExecutor+HedgingExecutor.swift index ca85fabdb..cb44fefff 100644 --- a/Sources/GRPCCore/Call/Client/Internal/ClientRPCExecutor+HedgingExecutor.swift +++ b/Sources/GRPCCore/Call/Client/Internal/ClientRPCExecutor+HedgingExecutor.swift @@ -16,7 +16,6 @@ public import Synchronization // would be internal but for usableFromInline -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension ClientRPCExecutor { @usableFromInline struct HedgingExecutor< @@ -62,7 +61,6 @@ extension ClientRPCExecutor { } } -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension ClientRPCExecutor.HedgingExecutor { @inlinable func execute( @@ -545,7 +543,6 @@ extension ClientRPCExecutor.HedgingExecutor { } } -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) @usableFromInline enum _HedgingTaskResult: Sendable { case rpcHandled(Result) @@ -553,7 +550,6 @@ enum _HedgingTaskResult: Sendable { case timedOut(Result) } -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) @usableFromInline enum _HedgingAttemptTaskResult: Sendable { case attemptPicked(Bool) diff --git a/Sources/GRPCCore/Call/Client/Internal/ClientRPCExecutor+OneShotExecutor.swift b/Sources/GRPCCore/Call/Client/Internal/ClientRPCExecutor+OneShotExecutor.swift index 493949fbc..32dde4a66 100644 --- a/Sources/GRPCCore/Call/Client/Internal/ClientRPCExecutor+OneShotExecutor.swift +++ b/Sources/GRPCCore/Call/Client/Internal/ClientRPCExecutor+OneShotExecutor.swift @@ -14,7 +14,6 @@ * limitations under the License. */ -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension ClientRPCExecutor { /// An executor for requests which doesn't apply retries or hedging. The request has just one /// attempt at execution. @@ -54,7 +53,6 @@ extension ClientRPCExecutor { } } -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension ClientRPCExecutor.OneShotExecutor { @inlinable func execute( @@ -90,7 +88,6 @@ extension ClientRPCExecutor.OneShotExecutor { } } -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension ClientRPCExecutor.OneShotExecutor { @inlinable func _execute( @@ -129,7 +126,6 @@ extension ClientRPCExecutor.OneShotExecutor { } } -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) @inlinable func withDeadline( _ deadline: ContinuousClock.Instant, diff --git a/Sources/GRPCCore/Call/Client/Internal/ClientRPCExecutor+RetryExecutor.swift b/Sources/GRPCCore/Call/Client/Internal/ClientRPCExecutor+RetryExecutor.swift index 7188b4a6f..6e7da3433 100644 --- a/Sources/GRPCCore/Call/Client/Internal/ClientRPCExecutor+RetryExecutor.swift +++ b/Sources/GRPCCore/Call/Client/Internal/ClientRPCExecutor+RetryExecutor.swift @@ -14,7 +14,6 @@ * limitations under the License. */ -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension ClientRPCExecutor { @usableFromInline struct RetryExecutor< @@ -60,7 +59,6 @@ extension ClientRPCExecutor { } } -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension ClientRPCExecutor.RetryExecutor { @inlinable func execute( @@ -302,7 +300,6 @@ extension ClientRPCExecutor.RetryExecutor { } } -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) @usableFromInline enum _RetryExecutorTask: Sendable { case timedOut(Result) diff --git a/Sources/GRPCCore/Call/Client/Internal/ClientRPCExecutor.swift b/Sources/GRPCCore/Call/Client/Internal/ClientRPCExecutor.swift index f6e91d94f..ade536d65 100644 --- a/Sources/GRPCCore/Call/Client/Internal/ClientRPCExecutor.swift +++ b/Sources/GRPCCore/Call/Client/Internal/ClientRPCExecutor.swift @@ -14,7 +14,6 @@ * limitations under the License. */ -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) @usableFromInline enum ClientRPCExecutor { /// Execute the request and handle its response. @@ -100,7 +99,6 @@ enum ClientRPCExecutor { } } -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension ClientRPCExecutor { /// Executes a request on a given stream processor. /// diff --git a/Sources/GRPCCore/Call/Client/Internal/ClientRequest+Convenience.swift b/Sources/GRPCCore/Call/Client/Internal/ClientRequest+Convenience.swift index 9f9b3223b..477378599 100644 --- a/Sources/GRPCCore/Call/Client/Internal/ClientRequest+Convenience.swift +++ b/Sources/GRPCCore/Call/Client/Internal/ClientRequest+Convenience.swift @@ -14,7 +14,6 @@ * limitations under the License. */ -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension StreamingClientRequest { internal init(single request: ClientRequest) { self.init(metadata: request.metadata) { diff --git a/Sources/GRPCCore/Call/Client/Internal/ClientResponse+Convenience.swift b/Sources/GRPCCore/Call/Client/Internal/ClientResponse+Convenience.swift index c6e315ba8..30b381e72 100644 --- a/Sources/GRPCCore/Call/Client/Internal/ClientResponse+Convenience.swift +++ b/Sources/GRPCCore/Call/Client/Internal/ClientResponse+Convenience.swift @@ -14,7 +14,6 @@ * limitations under the License. */ -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension ClientResponse { /// Converts a streaming response into a single response. /// @@ -82,7 +81,6 @@ extension ClientResponse { } } -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension StreamingClientResponse { /// Creates a streaming response from the given status and metadata. /// @@ -103,7 +101,6 @@ extension StreamingClientResponse { } } -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension StreamingClientResponse { /// Returns a new response which maps the messages of this response. /// diff --git a/Sources/GRPCCore/Call/Client/Internal/ClientStreamExecutor.swift b/Sources/GRPCCore/Call/Client/Internal/ClientStreamExecutor.swift index 728f4e337..f4cf1c482 100644 --- a/Sources/GRPCCore/Call/Client/Internal/ClientStreamExecutor.swift +++ b/Sources/GRPCCore/Call/Client/Internal/ClientStreamExecutor.swift @@ -14,7 +14,6 @@ * limitations under the License. */ -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) @usableFromInline internal enum ClientStreamExecutor { /// Execute a request on the stream executor. @@ -165,7 +164,6 @@ internal enum ClientStreamExecutor { } @usableFromInline - @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) struct RawBodyPartToMessageSequence< Base: AsyncSequence, Message: Sendable, diff --git a/Sources/GRPCCore/Call/Client/Internal/RetryDelaySequence.swift b/Sources/GRPCCore/Call/Client/Internal/RetryDelaySequence.swift index d1ef417f3..f07606f5c 100644 --- a/Sources/GRPCCore/Call/Client/Internal/RetryDelaySequence.swift +++ b/Sources/GRPCCore/Call/Client/Internal/RetryDelaySequence.swift @@ -19,7 +19,6 @@ public import Darwin // should be @usableFromInline public import Glibc // should be @usableFromInline #endif -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) @usableFromInline struct RetryDelaySequence: Sequence { @usableFromInline diff --git a/Sources/GRPCCore/Call/Server/Internal/ServerRPCExecutor.swift b/Sources/GRPCCore/Call/Server/Internal/ServerRPCExecutor.swift index 79fba9b5c..f85cbe318 100644 --- a/Sources/GRPCCore/Call/Server/Internal/ServerRPCExecutor.swift +++ b/Sources/GRPCCore/Call/Server/Internal/ServerRPCExecutor.swift @@ -14,7 +14,6 @@ * limitations under the License. */ -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) @usableFromInline struct ServerRPCExecutor { /// Executes an RPC using the provided handler. @@ -296,7 +295,6 @@ struct ServerRPCExecutor { } } -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension ServerRPCExecutor { @inlinable static func _intercept( diff --git a/Sources/GRPCCore/Call/Server/RPCRouter.swift b/Sources/GRPCCore/Call/Server/RPCRouter.swift index 35d14cbd5..a574a1186 100644 --- a/Sources/GRPCCore/Call/Server/RPCRouter.swift +++ b/Sources/GRPCCore/Call/Server/RPCRouter.swift @@ -32,7 +32,6 @@ /// 1. Remove individual methods by calling ``removeHandler(forMethod:)``, or /// 2. Implement ``RegistrableRPCService/registerMethods(with:)`` to register only the methods you /// want to be served. -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) public struct RPCRouter: Sendable { @usableFromInline struct RPCHandler: Sendable { @@ -145,7 +144,6 @@ public struct RPCRouter: Sendable { } } -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension RPCRouter { internal func handle( stream: RPCStream< diff --git a/Sources/GRPCCore/Call/Server/RegistrableRPCService.swift b/Sources/GRPCCore/Call/Server/RegistrableRPCService.swift index d9236c75b..f2a9bee03 100644 --- a/Sources/GRPCCore/Call/Server/RegistrableRPCService.swift +++ b/Sources/GRPCCore/Call/Server/RegistrableRPCService.swift @@ -22,7 +22,6 @@ /// generated conformance by implementing ``registerMethods(with:)`` manually by calling /// ``RPCRouter/registerHandler(forMethod:deserializer:serializer:handler:)`` for each method /// you want to register with the router. -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) public protocol RegistrableRPCService: Sendable { /// Registers methods to server with the provided ``RPCRouter``. /// diff --git a/Sources/GRPCCore/Call/Server/ServerInterceptor.swift b/Sources/GRPCCore/Call/Server/ServerInterceptor.swift index aa1fff090..3c71cd3e5 100644 --- a/Sources/GRPCCore/Call/Server/ServerInterceptor.swift +++ b/Sources/GRPCCore/Call/Server/ServerInterceptor.swift @@ -59,7 +59,6 @@ /// ``` /// /// For client-side interceptors see ``ClientInterceptor``. -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) public protocol ServerInterceptor: Sendable { /// Intercept a request object. /// diff --git a/Sources/GRPCCore/Call/Server/ServerRequest.swift b/Sources/GRPCCore/Call/Server/ServerRequest.swift index b0318ee15..40ec6b568 100644 --- a/Sources/GRPCCore/Call/Server/ServerRequest.swift +++ b/Sources/GRPCCore/Call/Server/ServerRequest.swift @@ -36,7 +36,6 @@ public struct ServerRequest: Sendable { } } -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) /// A request received at the server containing a stream of messages. public struct StreamingServerRequest: Sendable { /// Metadata received from the client at the start of the RPC. @@ -63,14 +62,12 @@ public struct StreamingServerRequest: Sendable { // MARK: - Conversion -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension StreamingServerRequest { public init(single request: ServerRequest) { self.init(metadata: request.metadata, messages: .one(request.message)) } } -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension ServerRequest { public init(stream request: StreamingServerRequest) async throws { var iterator = request.messages.makeAsyncIterator() diff --git a/Sources/GRPCCore/Call/Server/ServerResponse.swift b/Sources/GRPCCore/Call/Server/ServerResponse.swift index 778d1b395..15509f8ff 100644 --- a/Sources/GRPCCore/Call/Server/ServerResponse.swift +++ b/Sources/GRPCCore/Call/Server/ServerResponse.swift @@ -168,7 +168,6 @@ public struct ServerResponse: Sendable { /// return ["goodbye": "trailing metadata"] /// } /// ``` -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public struct StreamingServerResponse: Sendable { /// The contents of a response to a request which has been accepted for processing. public struct Contents: Sendable { @@ -279,7 +278,6 @@ extension ServerResponse { } } -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension StreamingServerResponse { /// Creates a new accepted response. /// @@ -318,7 +316,6 @@ extension StreamingServerResponse { } } -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension StreamingServerResponse { public init(single response: ServerResponse) { switch response.accepted { diff --git a/Sources/GRPCCore/Configuration/MethodConfig.swift b/Sources/GRPCCore/Configuration/MethodConfig.swift index 295d049a3..9e1543636 100644 --- a/Sources/GRPCCore/Configuration/MethodConfig.swift +++ b/Sources/GRPCCore/Configuration/MethodConfig.swift @@ -17,7 +17,6 @@ /// Configuration values for executing an RPC. /// /// See also: https://github.com/grpc/grpc-proto/blob/master/grpc/service_config/service_config.proto -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) public struct MethodConfig: Hashable, Sendable { public struct Name: Sendable, Hashable { /// The name of the service, including the namespace. @@ -144,7 +143,6 @@ public struct MethodConfig: Hashable, Sendable { } } -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) public struct RPCExecutionPolicy: Hashable, Sendable { @usableFromInline enum Wrapped: Hashable, Sendable { @@ -214,7 +212,6 @@ public struct RPCExecutionPolicy: Hashable, Sendable { /// /// For more information see [gRFC A6 Client /// Retries](https://github.com/grpc/proposal/blob/master/A6-client-retries.md). -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) public struct RetryPolicy: Hashable, Sendable { /// The maximum number of RPC attempts, including the original attempt. /// @@ -332,7 +329,6 @@ public struct RetryPolicy: Hashable, Sendable { /// /// For more information see [gRFC A6 Client /// Retries](https://github.com/grpc/proposal/blob/master/A6-client-retries.md). -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) public struct HedgingPolicy: Hashable, Sendable { /// The maximum number of RPC attempts, including the original attempt. /// @@ -397,7 +393,6 @@ private func validateMaxAttempts(_ value: Int) throws -> Int { return min(value, 5) } -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) extension Duration { fileprivate init(googleProtobufDuration duration: String) throws { guard duration.utf8.last == UInt8(ascii: "s"), @@ -413,7 +408,6 @@ extension Duration { } } -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) extension MethodConfig: Codable { private enum CodingKeys: String, CodingKey { case name @@ -472,7 +466,6 @@ extension MethodConfig: Codable { } } -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) extension MethodConfig.Name: Codable { private enum CodingKeys: String, CodingKey { case service @@ -498,7 +491,6 @@ extension MethodConfig.Name: Codable { } } -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) extension RetryPolicy: Codable { private enum CodingKeys: String, CodingKey { case maxAttempts @@ -546,7 +538,6 @@ extension RetryPolicy: Codable { } } -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) extension HedgingPolicy: Codable { private enum CodingKeys: String, CodingKey { case maxAttempts @@ -578,7 +569,6 @@ extension HedgingPolicy: Codable { } } -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) struct GoogleProtobufDuration: Codable { var duration: Duration diff --git a/Sources/GRPCCore/Configuration/ServiceConfig.swift b/Sources/GRPCCore/Configuration/ServiceConfig.swift index f0e41c4bc..a13bf08dc 100644 --- a/Sources/GRPCCore/Configuration/ServiceConfig.swift +++ b/Sources/GRPCCore/Configuration/ServiceConfig.swift @@ -17,7 +17,6 @@ /// Service configuration values. /// /// See also: https://github.com/grpc/grpc-proto/blob/master/grpc/service_config/service_config.proto -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) public struct ServiceConfig: Hashable, Sendable { /// Per-method configuration. public var methodConfig: [MethodConfig] @@ -63,7 +62,6 @@ public struct ServiceConfig: Hashable, Sendable { } } -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) extension ServiceConfig: Codable { private enum CodingKeys: String, CodingKey { case methodConfig @@ -100,7 +98,6 @@ extension ServiceConfig: Codable { } } -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) extension ServiceConfig { /// Configuration used by clients for load-balancing. public struct LoadBalancingConfig: Hashable, Sendable { @@ -166,7 +163,6 @@ extension ServiceConfig { } } -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) extension ServiceConfig.LoadBalancingConfig { /// Configuration for the pick-first load balancing policy. public struct PickFirst: Hashable, Sendable, Codable { @@ -194,7 +190,6 @@ extension ServiceConfig.LoadBalancingConfig { } } -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) extension ServiceConfig.LoadBalancingConfig: Codable { private enum CodingKeys: String, CodingKey { case roundRobin = "round_robin" @@ -225,7 +220,6 @@ extension ServiceConfig.LoadBalancingConfig: Codable { } } -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) extension ServiceConfig { public struct RetryThrottling: Hashable, Sendable, Codable { /// The initial, and maximum number of tokens. diff --git a/Sources/GRPCCore/GRPCClient.swift b/Sources/GRPCCore/GRPCClient.swift index 31a1aed67..98c1c4f3d 100644 --- a/Sources/GRPCCore/GRPCClient.swift +++ b/Sources/GRPCCore/GRPCClient.swift @@ -108,7 +108,6 @@ private import Synchronization /// more abruptly you can cancel the task running your client. If your application requires /// additional resources that need their lifecycles managed you should consider using [Swift Service /// Lifecycle](https://github.com/swift-server/swift-service-lifecycle). -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) public final class GRPCClient: Sendable { /// The transport which provides a bidirectional communication channel with the server. private let transport: any ClientTransport diff --git a/Sources/GRPCCore/GRPCServer.swift b/Sources/GRPCCore/GRPCServer.swift index feb218b19..8ba69985d 100644 --- a/Sources/GRPCCore/GRPCServer.swift +++ b/Sources/GRPCCore/GRPCServer.swift @@ -69,7 +69,6 @@ private import Synchronization /// you can cancel the task running your server. If your application requires additional resources /// that need their lifecycles managed you should consider using [Swift Service /// Lifecycle](https://github.com/swift-server/swift-service-lifecycle). -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) public final class GRPCServer: Sendable { typealias Stream = RPCStream diff --git a/Sources/GRPCCore/Internal/Metadata+GRPC.swift b/Sources/GRPCCore/Internal/Metadata+GRPC.swift index 9bff423e3..8920140f6 100644 --- a/Sources/GRPCCore/Internal/Metadata+GRPC.swift +++ b/Sources/GRPCCore/Internal/Metadata+GRPC.swift @@ -14,7 +14,6 @@ * limitations under the License. */ -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) extension Metadata { @inlinable var previousRPCAttempts: Int? { @@ -77,7 +76,6 @@ extension Metadata { } extension Metadata { - @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) @usableFromInline enum RetryPushback: Hashable, Sendable { case retryAfter(Duration) diff --git a/Sources/GRPCCore/Internal/MethodConfigs.swift b/Sources/GRPCCore/Internal/MethodConfigs.swift index 1992b59a8..163122dfe 100644 --- a/Sources/GRPCCore/Internal/MethodConfigs.swift +++ b/Sources/GRPCCore/Internal/MethodConfigs.swift @@ -22,7 +22,6 @@ /// service, or set a default configuration for all methods by calling ``setDefaultConfig(_:)``. /// /// Use the subscript to get and set configurations for specific methods. -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) package struct MethodConfigs: Sendable, Hashable { private var elements: [MethodConfig.Name: MethodConfig] diff --git a/Sources/GRPCCore/Internal/Result+Catching.swift b/Sources/GRPCCore/Internal/Result+Catching.swift index 68bbbebd7..bf2393752 100644 --- a/Sources/GRPCCore/Internal/Result+Catching.swift +++ b/Sources/GRPCCore/Internal/Result+Catching.swift @@ -14,7 +14,6 @@ * limitations under the License. */ -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension Result where Failure == any Error { /// Like `Result(catching:)`, but `async`. /// diff --git a/Sources/GRPCCore/Internal/TaskGroup+CancellableTask.swift b/Sources/GRPCCore/Internal/TaskGroup+CancellableTask.swift index 454a85b85..d0f38d6d3 100644 --- a/Sources/GRPCCore/Internal/TaskGroup+CancellableTask.swift +++ b/Sources/GRPCCore/Internal/TaskGroup+CancellableTask.swift @@ -14,7 +14,6 @@ * limitations under the License. */ -@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) extension TaskGroup { /// Adds a child task to the group which is individually cancellable. /// @@ -65,7 +64,6 @@ extension TaskGroup { } @usableFromInline -@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) struct CancellableTaskHandle: Sendable { @usableFromInline private(set) var continuation: AsyncStream.Continuation diff --git a/Sources/GRPCCore/Streaming/Internal/AsyncSequenceOfOne.swift b/Sources/GRPCCore/Streaming/Internal/AsyncSequenceOfOne.swift index c0a72e176..40ea25e71 100644 --- a/Sources/GRPCCore/Streaming/Internal/AsyncSequenceOfOne.swift +++ b/Sources/GRPCCore/Streaming/Internal/AsyncSequenceOfOne.swift @@ -14,7 +14,6 @@ * limitations under the License. */ -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension RPCAsyncSequence { /// Returns an ``RPCAsyncSequence`` containing just the given element. @inlinable @@ -33,7 +32,6 @@ extension RPCAsyncSequence { /// An `AsyncSequence` of a single value. @usableFromInline -@available(macOS 10.15, iOS 13.0, tvOS 13, watchOS 6, *) struct AsyncSequenceOfOne: AsyncSequence, Sendable { @usableFromInline let result: Result diff --git a/Sources/GRPCCore/Streaming/Internal/BroadcastAsyncSequence+RPCWriter.swift b/Sources/GRPCCore/Streaming/Internal/BroadcastAsyncSequence+RPCWriter.swift index ff54d9814..f7e4f72ff 100644 --- a/Sources/GRPCCore/Streaming/Internal/BroadcastAsyncSequence+RPCWriter.swift +++ b/Sources/GRPCCore/Streaming/Internal/BroadcastAsyncSequence+RPCWriter.swift @@ -14,7 +14,6 @@ * limitations under the License. */ -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension BroadcastAsyncSequence.Source: ClosableRPCWriterProtocol { @inlinable func write(contentsOf elements: some Sequence) async throws { diff --git a/Sources/GRPCCore/Streaming/Internal/BroadcastAsyncSequence.swift b/Sources/GRPCCore/Streaming/Internal/BroadcastAsyncSequence.swift index 5f812eb11..ac7e6c084 100644 --- a/Sources/GRPCCore/Streaming/Internal/BroadcastAsyncSequence.swift +++ b/Sources/GRPCCore/Streaming/Internal/BroadcastAsyncSequence.swift @@ -30,7 +30,6 @@ public import DequeModule // should be @usableFromInline /// /// The expectation is that the number of subscribers will be low; for retries there will be at most /// one subscriber at a time, for hedging there may be at most five subscribers at a time. -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) @usableFromInline struct BroadcastAsyncSequence: Sendable, AsyncSequence { @usableFromInline @@ -85,7 +84,6 @@ struct BroadcastAsyncSequence: Sendable, AsyncSequence { // MARK: - AsyncIterator -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension BroadcastAsyncSequence { @usableFromInline struct AsyncIterator: AsyncIteratorProtocol { @@ -112,7 +110,6 @@ extension BroadcastAsyncSequence { // MARK: - Continuation -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension BroadcastAsyncSequence { @usableFromInline struct Source: Sendable { @@ -156,7 +153,6 @@ enum BroadcastAsyncSequenceError: Error { // MARK: - Storage -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) @usableFromInline final class _BroadcastSequenceStorage: Sendable { @usableFromInline @@ -331,7 +327,6 @@ final class _BroadcastSequenceStorage: Sendable { // MARK: - State machine -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) @usableFromInline struct _BroadcastSequenceStateMachine: Sendable { @usableFromInline @@ -1369,7 +1364,6 @@ struct _BroadcastSequenceStateMachine: Sendable { } } -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension _BroadcastSequenceStateMachine { /// A collection of elements tagged with an identifier. /// @@ -1524,7 +1518,6 @@ extension _BroadcastSequenceStateMachine { } } -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension _BroadcastSequenceStateMachine { /// A collection of subscriptions. @usableFromInline @@ -1788,7 +1781,6 @@ extension _BroadcastSequenceStateMachine { } } -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension _BroadcastSequenceStateMachine { // TODO: tiny array @usableFromInline diff --git a/Sources/GRPCCore/Streaming/Internal/GRPCAsyncThrowingStream.swift b/Sources/GRPCCore/Streaming/Internal/GRPCAsyncThrowingStream.swift index 5b4bcb58b..3eadd1d85 100644 --- a/Sources/GRPCCore/Streaming/Internal/GRPCAsyncThrowingStream.swift +++ b/Sources/GRPCCore/Streaming/Internal/GRPCAsyncThrowingStream.swift @@ -19,7 +19,6 @@ // 'RPCWriterProtocol'. (Adding a constrained conformance to 'RPCWriterProtocol' on // 'AsyncThrowingStream.Continuation' isn't possible because 'Sendable' is a marker protocol.) -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) package struct GRPCAsyncThrowingStream: AsyncSequence, Sendable { package typealias Element = Element package typealias Failure = any Error @@ -78,7 +77,6 @@ package struct GRPCAsyncThrowingStream: AsyncSequence, Sendab } } -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension GRPCAsyncThrowingStream.Continuation: RPCWriterProtocol { package func write(_ element: Element) async throws { self.yield(element) @@ -91,7 +89,6 @@ extension GRPCAsyncThrowingStream.Continuation: RPCWriterProtocol { } } -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension GRPCAsyncThrowingStream.Continuation: ClosableRPCWriterProtocol { package func finish() async { self.finish(throwing: nil) diff --git a/Sources/GRPCCore/Streaming/Internal/RPCWriter+Map.swift b/Sources/GRPCCore/Streaming/Internal/RPCWriter+Map.swift index 7755b46e1..41332f1f2 100644 --- a/Sources/GRPCCore/Streaming/Internal/RPCWriter+Map.swift +++ b/Sources/GRPCCore/Streaming/Internal/RPCWriter+Map.swift @@ -14,7 +14,6 @@ * limitations under the License. */ -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) @usableFromInline struct MapRPCWriter< Value: Sendable, @@ -47,7 +46,6 @@ struct MapRPCWriter< } } -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension RPCWriter { @inlinable static func map( diff --git a/Sources/GRPCCore/Streaming/Internal/RPCWriter+MessageToRPCResponsePart.swift b/Sources/GRPCCore/Streaming/Internal/RPCWriter+MessageToRPCResponsePart.swift index c3dc290e9..15dd4b6cd 100644 --- a/Sources/GRPCCore/Streaming/Internal/RPCWriter+MessageToRPCResponsePart.swift +++ b/Sources/GRPCCore/Streaming/Internal/RPCWriter+MessageToRPCResponsePart.swift @@ -14,7 +14,6 @@ * limitations under the License. */ -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) @usableFromInline struct MessageToRPCResponsePartWriter< Serializer: MessageSerializer @@ -48,7 +47,6 @@ struct MessageToRPCResponsePartWriter< } } -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension RPCWriter { @inlinable static func serializingToRPCResponsePart( diff --git a/Sources/GRPCCore/Streaming/Internal/RPCWriter+Serialize.swift b/Sources/GRPCCore/Streaming/Internal/RPCWriter+Serialize.swift index f2a9acd22..d3d93d74d 100644 --- a/Sources/GRPCCore/Streaming/Internal/RPCWriter+Serialize.swift +++ b/Sources/GRPCCore/Streaming/Internal/RPCWriter+Serialize.swift @@ -14,7 +14,6 @@ * limitations under the License. */ -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) @usableFromInline struct SerializingRPCWriter< Base: RPCWriterProtocol<[UInt8]>, @@ -49,7 +48,6 @@ struct SerializingRPCWriter< } } -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension RPCWriter { @inlinable static func serializing( diff --git a/Sources/GRPCCore/Streaming/Internal/UncheckedAsyncIteratorSequence.swift b/Sources/GRPCCore/Streaming/Internal/UncheckedAsyncIteratorSequence.swift index e3bdcafee..5b963e3bd 100644 --- a/Sources/GRPCCore/Streaming/Internal/UncheckedAsyncIteratorSequence.swift +++ b/Sources/GRPCCore/Streaming/Internal/UncheckedAsyncIteratorSequence.swift @@ -16,7 +16,6 @@ public import Synchronization // should be @usableFromInline -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) @usableFromInline /// An `AsyncSequence` which wraps an existing async iterator. final class UncheckedAsyncIteratorSequence< diff --git a/Sources/GRPCCore/Streaming/RPCAsyncSequence.swift b/Sources/GRPCCore/Streaming/RPCAsyncSequence.swift index d3603fe00..edf451179 100644 --- a/Sources/GRPCCore/Streaming/RPCAsyncSequence.swift +++ b/Sources/GRPCCore/Streaming/RPCAsyncSequence.swift @@ -15,7 +15,6 @@ */ /// A type-erasing `AsyncSequence`. -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) public struct RPCAsyncSequence< Element: Sendable, Failure: Error diff --git a/Sources/GRPCCore/Streaming/RPCWriter+Closable.swift b/Sources/GRPCCore/Streaming/RPCWriter+Closable.swift index dda689464..075c05ad8 100644 --- a/Sources/GRPCCore/Streaming/RPCWriter+Closable.swift +++ b/Sources/GRPCCore/Streaming/RPCWriter+Closable.swift @@ -14,7 +14,6 @@ * limitations under the License. */ -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension RPCWriter { public struct Closable: ClosableRPCWriterProtocol { @usableFromInline diff --git a/Sources/GRPCCore/Streaming/RPCWriter.swift b/Sources/GRPCCore/Streaming/RPCWriter.swift index d0b7b940b..cc680b01d 100644 --- a/Sources/GRPCCore/Streaming/RPCWriter.swift +++ b/Sources/GRPCCore/Streaming/RPCWriter.swift @@ -15,7 +15,6 @@ */ /// A type-erasing ``RPCWriterProtocol``. -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public struct RPCWriter: Sendable, RPCWriterProtocol { private let writer: any RPCWriterProtocol diff --git a/Sources/GRPCCore/Streaming/RPCWriterProtocol.swift b/Sources/GRPCCore/Streaming/RPCWriterProtocol.swift index 63e3ee26d..076043e30 100644 --- a/Sources/GRPCCore/Streaming/RPCWriterProtocol.swift +++ b/Sources/GRPCCore/Streaming/RPCWriterProtocol.swift @@ -15,7 +15,6 @@ */ /// A sink for values which are produced over time. -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public protocol RPCWriterProtocol: Sendable { /// The type of value written. associatedtype Element: Sendable @@ -37,7 +36,6 @@ public protocol RPCWriterProtocol: Sendable { func write(contentsOf elements: some Sequence) async throws } -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension RPCWriterProtocol { /// Writes an `AsyncSequence` of values into the sink. /// @@ -51,7 +49,6 @@ extension RPCWriterProtocol { } } -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public protocol ClosableRPCWriterProtocol: RPCWriterProtocol { /// Indicate to the writer that no more writes are to be accepted. /// diff --git a/Sources/GRPCCore/Timeout.swift b/Sources/GRPCCore/Timeout.swift index 4640a5cca..68dfcd145 100644 --- a/Sources/GRPCCore/Timeout.swift +++ b/Sources/GRPCCore/Timeout.swift @@ -22,7 +22,6 @@ internal import Dispatch /// one of ``Timeout/Unit`` (hours, minutes, seconds, milliseconds, microseconds or nanoseconds). /// /// Timeouts must be positive and at most 8-digits long. -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) @usableFromInline struct Timeout: CustomStringConvertible, Hashable, Sendable { /// Possible units for a ``Timeout``. @@ -182,7 +181,6 @@ extension Int64 { } } -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) extension Duration { /// Construct a `Duration` given a number of minutes represented as an `Int64`. /// diff --git a/Sources/GRPCCore/Transport/ClientTransport.swift b/Sources/GRPCCore/Transport/ClientTransport.swift index 800aa5b64..a86a79fea 100644 --- a/Sources/GRPCCore/Transport/ClientTransport.swift +++ b/Sources/GRPCCore/Transport/ClientTransport.swift @@ -14,7 +14,6 @@ * limitations under the License. */ -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) public protocol ClientTransport: Sendable { typealias Inbound = RPCAsyncSequence typealias Outbound = RPCWriter.Closable diff --git a/Sources/GRPCCore/Transport/RPCStream.swift b/Sources/GRPCCore/Transport/RPCStream.swift index eca345c2a..445d27f45 100644 --- a/Sources/GRPCCore/Transport/RPCStream.swift +++ b/Sources/GRPCCore/Transport/RPCStream.swift @@ -15,7 +15,6 @@ */ /// A bidirectional communication channel between a client and server for a given method. -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public struct RPCStream< Inbound: AsyncSequence & Sendable, Outbound: ClosableRPCWriterProtocol & Sendable diff --git a/Sources/GRPCCore/Transport/RetryThrottle.swift b/Sources/GRPCCore/Transport/RetryThrottle.swift index 70c934dfc..e3f3ead4f 100644 --- a/Sources/GRPCCore/Transport/RetryThrottle.swift +++ b/Sources/GRPCCore/Transport/RetryThrottle.swift @@ -30,7 +30,6 @@ private import Synchronization /// the server. /// /// See also [gRFC A6: client retries](https://github.com/grpc/proposal/blob/master/A6-client-retries.md). -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) public final class RetryThrottle: Sendable { // Note: only three figures after the decimal point from the original token ratio are used so // all computation is done a scaled number of tokens (tokens * 1000). This allows us to do all diff --git a/Sources/GRPCCore/Transport/ServerTransport.swift b/Sources/GRPCCore/Transport/ServerTransport.swift index 79c5c0fc6..15148c78e 100644 --- a/Sources/GRPCCore/Transport/ServerTransport.swift +++ b/Sources/GRPCCore/Transport/ServerTransport.swift @@ -15,7 +15,6 @@ */ /// A protocol server transport implementations must conform to. -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) public protocol ServerTransport: Sendable { typealias Inbound = RPCAsyncSequence typealias Outbound = RPCWriter.Closable diff --git a/Sources/GRPCInProcessTransport/InProcessTransport+Client.swift b/Sources/GRPCInProcessTransport/InProcessTransport+Client.swift index 08c6b3476..84c7f85a7 100644 --- a/Sources/GRPCInProcessTransport/InProcessTransport+Client.swift +++ b/Sources/GRPCInProcessTransport/InProcessTransport+Client.swift @@ -17,7 +17,6 @@ public import GRPCCore private import Synchronization -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension InProcessTransport { /// An in-process implementation of a ``ClientTransport``. /// @@ -36,7 +35,6 @@ extension InProcessTransport { /// block until ``connect()`` is called or the task is cancelled. /// /// - SeeAlso: ``ClientTransport`` - @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) public final class Client: ClientTransport { private enum State: Sendable { struct UnconnectedState { diff --git a/Sources/GRPCInProcessTransport/InProcessTransport+Server.swift b/Sources/GRPCInProcessTransport/InProcessTransport+Server.swift index 5079fad5c..66e32d06f 100644 --- a/Sources/GRPCInProcessTransport/InProcessTransport+Server.swift +++ b/Sources/GRPCInProcessTransport/InProcessTransport+Server.swift @@ -16,7 +16,6 @@ public import GRPCCore -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension InProcessTransport { /// An in-process implementation of a ``ServerTransport``. /// @@ -28,7 +27,6 @@ extension InProcessTransport { /// To stop listening to new requests, call ``beginGracefulShutdown()``. /// /// - SeeAlso: ``ClientTransport`` - @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) public struct Server: ServerTransport, Sendable { public typealias Inbound = RPCAsyncSequence public typealias Outbound = RPCWriter.Closable diff --git a/Sources/GRPCInProcessTransport/InProcessTransport.swift b/Sources/GRPCInProcessTransport/InProcessTransport.swift index e1bee0ae5..1a563f079 100644 --- a/Sources/GRPCInProcessTransport/InProcessTransport.swift +++ b/Sources/GRPCInProcessTransport/InProcessTransport.swift @@ -16,7 +16,6 @@ public import GRPCCore -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) public struct InProcessTransport: Sendable { public let server: Self.Server public let client: Self.Client diff --git a/Tests/GRPCCoreTests/Call/Client/ClientRequestTests.swift b/Tests/GRPCCoreTests/Call/Client/ClientRequestTests.swift index 5e802a622..c5f0dbb9f 100644 --- a/Tests/GRPCCoreTests/Call/Client/ClientRequestTests.swift +++ b/Tests/GRPCCoreTests/Call/Client/ClientRequestTests.swift @@ -18,7 +18,6 @@ import XCTest @testable import GRPCCore -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) final class ClientRequestTests: XCTestCase { func testSingleToStreamConversion() async throws { let (messages, continuation) = AsyncStream.makeStream(of: String.self) diff --git a/Tests/GRPCCoreTests/Call/Client/ClientResponseTests.swift b/Tests/GRPCCoreTests/Call/Client/ClientResponseTests.swift index d0fcf3611..01557d02c 100644 --- a/Tests/GRPCCoreTests/Call/Client/ClientResponseTests.swift +++ b/Tests/GRPCCoreTests/Call/Client/ClientResponseTests.swift @@ -18,7 +18,6 @@ import XCTest @testable import GRPCCore -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) final class ClientResponseTests: XCTestCase { func testAcceptedSingleResponseConvenienceMethods() { let response = ClientResponse( diff --git a/Tests/GRPCCoreTests/Call/Client/Internal/ClientRPCExecutorTestSupport/ClientRPCExecutorTestHarness+ServerBehavior.swift b/Tests/GRPCCoreTests/Call/Client/Internal/ClientRPCExecutorTestSupport/ClientRPCExecutorTestHarness+ServerBehavior.swift index 0c2ab936f..4a6e17ed2 100644 --- a/Tests/GRPCCoreTests/Call/Client/Internal/ClientRPCExecutorTestSupport/ClientRPCExecutorTestHarness+ServerBehavior.swift +++ b/Tests/GRPCCoreTests/Call/Client/Internal/ClientRPCExecutorTestSupport/ClientRPCExecutorTestHarness+ServerBehavior.swift @@ -18,7 +18,6 @@ import XCTest @testable import GRPCCore -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension ClientRPCExecutorTestHarness { struct ServerStreamHandler: Sendable { private let handler: @@ -59,7 +58,6 @@ extension ClientRPCExecutorTestHarness { } } -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension ClientRPCExecutorTestHarness.ServerStreamHandler { static var echo: Self { return Self { stream in diff --git a/Tests/GRPCCoreTests/Call/Client/Internal/ClientRPCExecutorTestSupport/ClientRPCExecutorTestHarness+Transport.swift b/Tests/GRPCCoreTests/Call/Client/Internal/ClientRPCExecutorTestSupport/ClientRPCExecutorTestHarness+Transport.swift index 4198c9b31..aa5a21332 100644 --- a/Tests/GRPCCoreTests/Call/Client/Internal/ClientRPCExecutorTestSupport/ClientRPCExecutorTestHarness+Transport.swift +++ b/Tests/GRPCCoreTests/Call/Client/Internal/ClientRPCExecutorTestSupport/ClientRPCExecutorTestHarness+Transport.swift @@ -17,7 +17,6 @@ import GRPCCore import GRPCInProcessTransport -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension InProcessTransport.Server { func spawnClientTransport( throttle: RetryThrottle = RetryThrottle(maxTokens: 10, tokenRatio: 0.1) diff --git a/Tests/GRPCCoreTests/Call/Client/Internal/ClientRPCExecutorTestSupport/ClientRPCExecutorTestHarness.swift b/Tests/GRPCCoreTests/Call/Client/Internal/ClientRPCExecutorTestSupport/ClientRPCExecutorTestHarness.swift index 4ead582fd..9a456c7b0 100644 --- a/Tests/GRPCCoreTests/Call/Client/Internal/ClientRPCExecutorTestSupport/ClientRPCExecutorTestHarness.swift +++ b/Tests/GRPCCoreTests/Call/Client/Internal/ClientRPCExecutorTestSupport/ClientRPCExecutorTestHarness.swift @@ -25,7 +25,6 @@ import XCTest /// of the server to allow for flexible testing scenarios with minimal boilerplate. The harness /// also tracks how many streams the client has opened, how many streams the server accepted, and /// how many streams the client failed to open. -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) struct ClientRPCExecutorTestHarness { private let server: ServerStreamHandler private let clientTransport: StreamCountingClientTransport diff --git a/Tests/GRPCCoreTests/Call/Client/Internal/ClientRPCExecutorTests+Hedging.swift b/Tests/GRPCCoreTests/Call/Client/Internal/ClientRPCExecutorTests+Hedging.swift index ae924eea8..14b31b0c5 100644 --- a/Tests/GRPCCoreTests/Call/Client/Internal/ClientRPCExecutorTests+Hedging.swift +++ b/Tests/GRPCCoreTests/Call/Client/Internal/ClientRPCExecutorTests+Hedging.swift @@ -16,7 +16,6 @@ import GRPCCore import XCTest -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension ClientRPCExecutorTests { func testHedgingWhenAllAttemptsResultInNonFatalCodes() async throws { let harness = ClientRPCExecutorTestHarness( @@ -186,7 +185,6 @@ extension ClientRPCExecutorTests { } } -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) extension CallOptions { fileprivate static func hedge( maxAttempts: Int = 5, diff --git a/Tests/GRPCCoreTests/Call/Client/Internal/ClientRPCExecutorTests+Retries.swift b/Tests/GRPCCoreTests/Call/Client/Internal/ClientRPCExecutorTests+Retries.swift index 2c5ab960d..d4e1e210c 100644 --- a/Tests/GRPCCoreTests/Call/Client/Internal/ClientRPCExecutorTests+Retries.swift +++ b/Tests/GRPCCoreTests/Call/Client/Internal/ClientRPCExecutorTests+Retries.swift @@ -16,7 +16,6 @@ import GRPCCore import XCTest -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension ClientRPCExecutorTests { fileprivate func makeHarnessForRetries( rejectUntilAttempt firstSuccessfulAttempt: Int, @@ -289,7 +288,6 @@ extension ClientRPCExecutorTests { } } -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) extension CallOptions { fileprivate static func retry( _ policy: RetryPolicy diff --git a/Tests/GRPCCoreTests/Call/Client/Internal/ClientRPCExecutorTests.swift b/Tests/GRPCCoreTests/Call/Client/Internal/ClientRPCExecutorTests.swift index 310486aa3..1d3e78d69 100644 --- a/Tests/GRPCCoreTests/Call/Client/Internal/ClientRPCExecutorTests.swift +++ b/Tests/GRPCCoreTests/Call/Client/Internal/ClientRPCExecutorTests.swift @@ -18,7 +18,6 @@ import XCTest @testable import GRPCCore -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) final class ClientRPCExecutorTests: XCTestCase { func testUnaryEcho() async throws { let tester = ClientRPCExecutorTestHarness(server: .echo) diff --git a/Tests/GRPCCoreTests/Call/Client/RetryDelaySequenceTests.swift b/Tests/GRPCCoreTests/Call/Client/RetryDelaySequenceTests.swift index cbe0d7a09..71fa0a495 100644 --- a/Tests/GRPCCoreTests/Call/Client/RetryDelaySequenceTests.swift +++ b/Tests/GRPCCoreTests/Call/Client/RetryDelaySequenceTests.swift @@ -17,7 +17,6 @@ import XCTest @testable import GRPCCore -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) final class RetryDelaySequenceTests: XCTestCase { func testSequence() { let policy = RetryPolicy( diff --git a/Tests/GRPCCoreTests/Call/Server/Internal/ServerRPCExecutorTestSupport/ServerRPCExecutorTestHarness.swift b/Tests/GRPCCoreTests/Call/Server/Internal/ServerRPCExecutorTestSupport/ServerRPCExecutorTestHarness.swift index f53c46232..6cca2d4d2 100644 --- a/Tests/GRPCCoreTests/Call/Server/Internal/ServerRPCExecutorTestSupport/ServerRPCExecutorTestHarness.swift +++ b/Tests/GRPCCoreTests/Call/Server/Internal/ServerRPCExecutorTestSupport/ServerRPCExecutorTestHarness.swift @@ -17,7 +17,6 @@ import XCTest @testable import GRPCCore -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) struct ServerRPCExecutorTestHarness { struct ServerHandler: Sendable { let fn: @@ -134,7 +133,6 @@ struct ServerRPCExecutorTestHarness { } } -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension ServerRPCExecutorTestHarness.ServerHandler where Input == Output { static var echo: Self { return Self { request in diff --git a/Tests/GRPCCoreTests/Call/Server/Internal/ServerRPCExecutorTests.swift b/Tests/GRPCCoreTests/Call/Server/Internal/ServerRPCExecutorTests.swift index df894dd8e..f047955da 100644 --- a/Tests/GRPCCoreTests/Call/Server/Internal/ServerRPCExecutorTests.swift +++ b/Tests/GRPCCoreTests/Call/Server/Internal/ServerRPCExecutorTests.swift @@ -18,7 +18,6 @@ import XCTest @testable import GRPCCore -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) final class ServerRPCExecutorTests: XCTestCase { func testEchoNoMessages() async throws { let harness = ServerRPCExecutorTestHarness() diff --git a/Tests/GRPCCoreTests/Call/Server/RPCRouterTests.swift b/Tests/GRPCCoreTests/Call/Server/RPCRouterTests.swift index 86fe1bd1e..af02f2894 100644 --- a/Tests/GRPCCoreTests/Call/Server/RPCRouterTests.swift +++ b/Tests/GRPCCoreTests/Call/Server/RPCRouterTests.swift @@ -17,7 +17,6 @@ import GRPCCore import XCTest -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) final class RPCRouterTests: XCTestCase { func testEmptyRouter() async throws { var router = RPCRouter() diff --git a/Tests/GRPCCoreTests/Call/Server/ServerRequestTests.swift b/Tests/GRPCCoreTests/Call/Server/ServerRequestTests.swift index 658a2855e..c341bc992 100644 --- a/Tests/GRPCCoreTests/Call/Server/ServerRequestTests.swift +++ b/Tests/GRPCCoreTests/Call/Server/ServerRequestTests.swift @@ -16,7 +16,6 @@ @_spi(Testing) import GRPCCore import XCTest -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) final class ServerRequestTests: XCTestCase { func testSingleToStreamConversion() async throws { let single = ServerRequest(metadata: ["bar": "baz"], message: "foo") diff --git a/Tests/GRPCCoreTests/Call/Server/ServerResponseTests.swift b/Tests/GRPCCoreTests/Call/Server/ServerResponseTests.swift index 02196a9dd..99e76fc56 100644 --- a/Tests/GRPCCoreTests/Call/Server/ServerResponseTests.swift +++ b/Tests/GRPCCoreTests/Call/Server/ServerResponseTests.swift @@ -16,7 +16,6 @@ @_spi(Testing) import GRPCCore import XCTest -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) final class ServerResponseTests: XCTestCase { func testSingleConvenienceInit() { var response = ServerResponse( diff --git a/Tests/GRPCCoreTests/Configuration/ServiceConfigCodingTests.swift b/Tests/GRPCCoreTests/Configuration/ServiceConfigCodingTests.swift index 8dbcd7340..cb5e38b7a 100644 --- a/Tests/GRPCCoreTests/Configuration/ServiceConfigCodingTests.swift +++ b/Tests/GRPCCoreTests/Configuration/ServiceConfigCodingTests.swift @@ -18,7 +18,6 @@ import Foundation import GRPCCore import XCTest -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) final class ServiceConfigCodingTests: XCTestCase { private let encoder = JSONEncoder() private let decoder = JSONDecoder() diff --git a/Tests/GRPCCoreTests/GRPCClientTests.swift b/Tests/GRPCCoreTests/GRPCClientTests.swift index f55f921dd..42a6e3b3b 100644 --- a/Tests/GRPCCoreTests/GRPCClientTests.swift +++ b/Tests/GRPCCoreTests/GRPCClientTests.swift @@ -18,7 +18,6 @@ import GRPCCore import GRPCInProcessTransport import XCTest -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) final class GRPCClientTests: XCTestCase { func withInProcessConnectedClient( services: [any RegistrableRPCService], diff --git a/Tests/GRPCCoreTests/GRPCServerTests.swift b/Tests/GRPCCoreTests/GRPCServerTests.swift index a513f5d15..b7866c80c 100644 --- a/Tests/GRPCCoreTests/GRPCServerTests.swift +++ b/Tests/GRPCCoreTests/GRPCServerTests.swift @@ -18,7 +18,6 @@ import GRPCCore import GRPCInProcessTransport import XCTest -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) final class GRPCServerTests: XCTestCase { func withInProcessClientConnectedToServer( services: [any RegistrableRPCService], diff --git a/Tests/GRPCCoreTests/Internal/Metadata+GRPCTests.swift b/Tests/GRPCCoreTests/Internal/Metadata+GRPCTests.swift index 25ded0048..a6bb11a84 100644 --- a/Tests/GRPCCoreTests/Internal/Metadata+GRPCTests.swift +++ b/Tests/GRPCCoreTests/Internal/Metadata+GRPCTests.swift @@ -18,7 +18,6 @@ import XCTest @testable import GRPCCore -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) final class MetadataGRPCTests: XCTestCase { func testPreviousRPCAttemptsValidValues() { let testData = [("0", 0), ("1", 1), ("-1", -1)] diff --git a/Tests/GRPCCoreTests/Internal/MethodConfigsTests.swift b/Tests/GRPCCoreTests/Internal/MethodConfigsTests.swift index 58ddcde4f..095a5eded 100644 --- a/Tests/GRPCCoreTests/Internal/MethodConfigsTests.swift +++ b/Tests/GRPCCoreTests/Internal/MethodConfigsTests.swift @@ -16,7 +16,6 @@ import GRPCCore import XCTest -@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) final class MethodConfigsTests: XCTestCase { func testGetConfigurationForKnownMethod() async throws { let policy = HedgingPolicy( diff --git a/Tests/GRPCCoreTests/Internal/Result+CatchingTests.swift b/Tests/GRPCCoreTests/Internal/Result+CatchingTests.swift index aee39daf4..cbe5ac742 100644 --- a/Tests/GRPCCoreTests/Internal/Result+CatchingTests.swift +++ b/Tests/GRPCCoreTests/Internal/Result+CatchingTests.swift @@ -18,7 +18,6 @@ import XCTest @testable import GRPCCore -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) final class ResultCatchingTests: XCTestCase { func testResultCatching() async { let result = await Result { diff --git a/Tests/GRPCCoreTests/RuntimeErrorTests.swift b/Tests/GRPCCoreTests/RuntimeErrorTests.swift index 2d30f96f0..fb8411687 100644 --- a/Tests/GRPCCoreTests/RuntimeErrorTests.swift +++ b/Tests/GRPCCoreTests/RuntimeErrorTests.swift @@ -16,7 +16,6 @@ import GRPCCore import XCTest -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) final class RuntimeErrorTests: XCTestCase { func testCopyOnWrite() { // RuntimeError has a heap based storage, so check CoW semantics are correctly implemented. diff --git a/Tests/GRPCCoreTests/Streaming/Internal/AsyncSequenceOfOne.swift b/Tests/GRPCCoreTests/Streaming/Internal/AsyncSequenceOfOne.swift index 648e935e9..79cfef19d 100644 --- a/Tests/GRPCCoreTests/Streaming/Internal/AsyncSequenceOfOne.swift +++ b/Tests/GRPCCoreTests/Streaming/Internal/AsyncSequenceOfOne.swift @@ -18,7 +18,6 @@ import XCTest @testable import GRPCCore -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) internal final class AsyncSequenceOfOneTests: XCTestCase { func testSuccessPath() async throws { let sequence = RPCAsyncSequence.one("foo") diff --git a/Tests/GRPCCoreTests/Streaming/Internal/BroadcastAsyncSequenceTests.swift b/Tests/GRPCCoreTests/Streaming/Internal/BroadcastAsyncSequenceTests.swift index 6195977c6..55479d38c 100644 --- a/Tests/GRPCCoreTests/Streaming/Internal/BroadcastAsyncSequenceTests.swift +++ b/Tests/GRPCCoreTests/Streaming/Internal/BroadcastAsyncSequenceTests.swift @@ -18,7 +18,6 @@ import XCTest @testable import GRPCCore -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) final class BroadcastAsyncSequenceTests: XCTestCase { func testSingleSubscriberToEmptyStream() async throws { let (stream, source) = BroadcastAsyncSequence.makeStream(of: Int.self, bufferSize: 16) diff --git a/Tests/GRPCCoreTests/Test Utilities/AsyncSequence+Utilities.swift b/Tests/GRPCCoreTests/Test Utilities/AsyncSequence+Utilities.swift index b82b7185e..0e05a407d 100644 --- a/Tests/GRPCCoreTests/Test Utilities/AsyncSequence+Utilities.swift +++ b/Tests/GRPCCoreTests/Test Utilities/AsyncSequence+Utilities.swift @@ -14,7 +14,6 @@ * limitations under the License. */ -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension AsyncSequence { func collect() async throws -> [Element] { return try await self.reduce(into: []) { $0.append($1) } diff --git a/Tests/GRPCCoreTests/Test Utilities/AtomicCounter.swift b/Tests/GRPCCoreTests/Test Utilities/AtomicCounter.swift index b9e9fb5b8..cf9c4f679 100644 --- a/Tests/GRPCCoreTests/Test Utilities/AtomicCounter.swift +++ b/Tests/GRPCCoreTests/Test Utilities/AtomicCounter.swift @@ -16,7 +16,6 @@ import Synchronization -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) final class AtomicCounter: Sendable { private let counter: Atomic diff --git a/Tests/GRPCCoreTests/Test Utilities/Call/Client/ClientInterceptors.swift b/Tests/GRPCCoreTests/Test Utilities/Call/Client/ClientInterceptors.swift index dd73cb96d..e13228b3e 100644 --- a/Tests/GRPCCoreTests/Test Utilities/Call/Client/ClientInterceptors.swift +++ b/Tests/GRPCCoreTests/Test Utilities/Call/Client/ClientInterceptors.swift @@ -16,7 +16,6 @@ import GRPCCore -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension ClientInterceptor where Self == RejectAllClientInterceptor { static func rejectAll(with error: RPCError) -> Self { return RejectAllClientInterceptor(error: error, throw: false) @@ -28,7 +27,6 @@ extension ClientInterceptor where Self == RejectAllClientInterceptor { } -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension ClientInterceptor where Self == RequestCountingClientInterceptor { static func requestCounter(_ counter: AtomicCounter) -> Self { return RequestCountingClientInterceptor(counter: counter) @@ -36,7 +34,6 @@ extension ClientInterceptor where Self == RequestCountingClientInterceptor { } /// Rejects all RPCs with the provided error. -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) struct RejectAllClientInterceptor: ClientInterceptor { /// The error to reject all RPCs with. let error: RPCError @@ -65,7 +62,6 @@ struct RejectAllClientInterceptor: ClientInterceptor { } } -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) struct RequestCountingClientInterceptor: ClientInterceptor { /// The number of requests made. let counter: AtomicCounter diff --git a/Tests/GRPCCoreTests/Test Utilities/Call/Server/ServerInterceptors.swift b/Tests/GRPCCoreTests/Test Utilities/Call/Server/ServerInterceptors.swift index 1467cddad..4356fdc1f 100644 --- a/Tests/GRPCCoreTests/Test Utilities/Call/Server/ServerInterceptors.swift +++ b/Tests/GRPCCoreTests/Test Utilities/Call/Server/ServerInterceptors.swift @@ -16,7 +16,6 @@ import GRPCCore -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension ServerInterceptor where Self == RejectAllServerInterceptor { static func rejectAll(with error: RPCError) -> Self { return RejectAllServerInterceptor(error: error, throw: false) @@ -27,7 +26,6 @@ extension ServerInterceptor where Self == RejectAllServerInterceptor { } } -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension ServerInterceptor where Self == RequestCountingServerInterceptor { static func requestCounter(_ counter: AtomicCounter) -> Self { return RequestCountingServerInterceptor(counter: counter) @@ -35,7 +33,6 @@ extension ServerInterceptor where Self == RequestCountingServerInterceptor { } /// Rejects all RPCs with the provided error. -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) struct RejectAllServerInterceptor: ServerInterceptor { /// The error to reject all RPCs with. let error: RPCError @@ -64,7 +61,6 @@ struct RejectAllServerInterceptor: ServerInterceptor { } } -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) struct RequestCountingServerInterceptor: ServerInterceptor { /// The number of requests made. let counter: AtomicCounter diff --git a/Tests/GRPCCoreTests/Test Utilities/RPCAsyncSequence+Utilities.swift b/Tests/GRPCCoreTests/Test Utilities/RPCAsyncSequence+Utilities.swift index b996e3d27..950e2c61a 100644 --- a/Tests/GRPCCoreTests/Test Utilities/RPCAsyncSequence+Utilities.swift +++ b/Tests/GRPCCoreTests/Test Utilities/RPCAsyncSequence+Utilities.swift @@ -15,7 +15,6 @@ */ import GRPCCore -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension RPCAsyncSequence where Failure == any Error { static func elements(_ elements: Element...) -> Self { return .elements(elements) diff --git a/Tests/GRPCCoreTests/Test Utilities/RPCWriter+Utilities.swift b/Tests/GRPCCoreTests/Test Utilities/RPCWriter+Utilities.swift index 923ab267d..eafd569ab 100644 --- a/Tests/GRPCCoreTests/Test Utilities/RPCWriter+Utilities.swift +++ b/Tests/GRPCCoreTests/Test Utilities/RPCWriter+Utilities.swift @@ -16,7 +16,6 @@ import GRPCCore import XCTest -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension RPCWriter { /// Returns a writer which calls `XCTFail(_:)` on every write. static func failTestOnWrite(elementType: Element.Type = Element.self) -> Self { @@ -29,7 +28,6 @@ extension RPCWriter { } } -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) private struct FailOnWrite: RPCWriterProtocol { func write(_ element: Element) async throws { XCTFail("Unexpected write") @@ -40,7 +38,6 @@ private struct FailOnWrite: RPCWriterProtocol { } } -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) private struct AsyncStreamGatheringWriter: RPCWriterProtocol { let continuation: AsyncStream.Continuation diff --git a/Tests/GRPCCoreTests/Test Utilities/Services/BinaryEcho.swift b/Tests/GRPCCoreTests/Test Utilities/Services/BinaryEcho.swift index 817539a9d..3859eec24 100644 --- a/Tests/GRPCCoreTests/Test Utilities/Services/BinaryEcho.swift +++ b/Tests/GRPCCoreTests/Test Utilities/Services/BinaryEcho.swift @@ -16,7 +16,6 @@ import GRPCCore import XCTest -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) struct BinaryEcho: RegistrableRPCService { func get( _ request: ServerRequest<[UInt8]> diff --git a/Tests/GRPCCoreTests/Test Utilities/Transport/AnyTransport.swift b/Tests/GRPCCoreTests/Test Utilities/Transport/AnyTransport.swift index eb8208b72..7ca178fef 100644 --- a/Tests/GRPCCoreTests/Test Utilities/Transport/AnyTransport.swift +++ b/Tests/GRPCCoreTests/Test Utilities/Transport/AnyTransport.swift @@ -15,7 +15,6 @@ */ @testable import GRPCCore -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) struct AnyClientTransport: ClientTransport, Sendable { typealias Inbound = RPCAsyncSequence typealias Outbound = RPCWriter.Closable @@ -81,7 +80,6 @@ struct AnyClientTransport: ClientTransport, Sendable { } } -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) struct AnyServerTransport: ServerTransport, Sendable { typealias Inbound = RPCAsyncSequence typealias Outbound = RPCWriter.Closable diff --git a/Tests/GRPCCoreTests/Test Utilities/Transport/StreamCountingTransport.swift b/Tests/GRPCCoreTests/Test Utilities/Transport/StreamCountingTransport.swift index 835c81b79..970109286 100644 --- a/Tests/GRPCCoreTests/Test Utilities/Transport/StreamCountingTransport.swift +++ b/Tests/GRPCCoreTests/Test Utilities/Transport/StreamCountingTransport.swift @@ -16,7 +16,6 @@ @testable import GRPCCore -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) struct StreamCountingClientTransport: ClientTransport, Sendable { typealias Inbound = RPCAsyncSequence typealias Outbound = RPCWriter.Closable @@ -78,7 +77,6 @@ struct StreamCountingClientTransport: ClientTransport, Sendable { } } -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) struct StreamCountingServerTransport: ServerTransport, Sendable { typealias Inbound = RPCAsyncSequence typealias Outbound = RPCWriter.Closable diff --git a/Tests/GRPCCoreTests/Test Utilities/Transport/ThrowingTransport.swift b/Tests/GRPCCoreTests/Test Utilities/Transport/ThrowingTransport.swift index 804be7d52..e73bdbdf1 100644 --- a/Tests/GRPCCoreTests/Test Utilities/Transport/ThrowingTransport.swift +++ b/Tests/GRPCCoreTests/Test Utilities/Transport/ThrowingTransport.swift @@ -15,7 +15,6 @@ */ @testable import GRPCCore -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) struct ThrowOnStreamCreationTransport: ClientTransport { typealias Inbound = RPCAsyncSequence typealias Outbound = RPCWriter.Closable @@ -51,7 +50,6 @@ struct ThrowOnStreamCreationTransport: ClientTransport { } } -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) struct ThrowOnRunServerTransport: ServerTransport { func listen( streamHandler: ( @@ -70,7 +68,6 @@ struct ThrowOnRunServerTransport: ServerTransport { } } -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) struct ThrowOnSignalServerTransport: ServerTransport { let signal: AsyncStream diff --git a/Tests/GRPCCoreTests/Test Utilities/XCTest+Utilities.swift b/Tests/GRPCCoreTests/Test Utilities/XCTest+Utilities.swift index 400ab3037..cc50b14b9 100644 --- a/Tests/GRPCCoreTests/Test Utilities/XCTest+Utilities.swift +++ b/Tests/GRPCCoreTests/Test Utilities/XCTest+Utilities.swift @@ -25,7 +25,6 @@ func XCTAssertDescription( XCTAssertEqual(String(describing: subject), expected, file: file, line: line) } -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) func XCTAssertThrowsErrorAsync( _ expression: () async throws -> T, errorHandler: (any Error) -> Void @@ -51,7 +50,6 @@ func XCTAssertThrowsError( } } -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) func XCTAssertThrowsErrorAsync( ofType: E.Type = E.self, _ expression: () async throws -> T, @@ -80,7 +78,6 @@ func XCTAssertThrowsRPCError( } } -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) func XCTAssertThrowsRPCErrorAsync( _ expression: () async throws -> T, errorHandler: (RPCError) -> Void @@ -95,7 +92,6 @@ func XCTAssertThrowsRPCErrorAsync( } } -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) func XCTAssertRejected( _ response: StreamingClientResponse, errorHandler: (RPCError) -> Void @@ -132,7 +128,6 @@ func XCTAssertMetadata( } } -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) func XCTAssertMetadata( _ part: RPCRequestPart?, metadataHandler: (Metadata) async throws -> Void = { _ in } @@ -157,7 +152,6 @@ func XCTAssertMessage( } } -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) func XCTAssertMessage( _ part: RPCRequestPart?, messageHandler: ([UInt8]) async throws -> Void = { _ in } diff --git a/Tests/GRPCCoreTests/Transport/RetryThrottleTests.swift b/Tests/GRPCCoreTests/Transport/RetryThrottleTests.swift index ee2ad3742..9e89e032d 100644 --- a/Tests/GRPCCoreTests/Transport/RetryThrottleTests.swift +++ b/Tests/GRPCCoreTests/Transport/RetryThrottleTests.swift @@ -18,7 +18,6 @@ import XCTest @testable import GRPCCore -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) final class RetryThrottleTests: XCTestCase { func testThrottleOnInit() { let throttle = RetryThrottle(maxTokens: 10, tokenRatio: 0.1) diff --git a/Tests/GRPCInProcessTransportTests/InProcessClientTransportTests.swift b/Tests/GRPCInProcessTransportTests/InProcessClientTransportTests.swift index 5730ccf46..16b915f41 100644 --- a/Tests/GRPCInProcessTransportTests/InProcessClientTransportTests.swift +++ b/Tests/GRPCInProcessTransportTests/InProcessClientTransportTests.swift @@ -18,7 +18,6 @@ import GRPCCore import GRPCInProcessTransport import XCTest -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) final class InProcessClientTransportTests: XCTestCase { struct FailTest: Error {} diff --git a/Tests/GRPCInProcessTransportTests/InProcessServerTransportTests.swift b/Tests/GRPCInProcessTransportTests/InProcessServerTransportTests.swift index 5d451fb9d..45baa66e4 100644 --- a/Tests/GRPCInProcessTransportTests/InProcessServerTransportTests.swift +++ b/Tests/GRPCInProcessTransportTests/InProcessServerTransportTests.swift @@ -19,7 +19,6 @@ import XCTest @testable import GRPCCore @testable import GRPCInProcessTransport -@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) final class InProcessServerTransportTests: XCTestCase { func testStartListening() async throws { let transport = InProcessTransport.Server() diff --git a/Tests/GRPCInProcessTransportTests/Test Utilities/XCTest+Utilities.swift b/Tests/GRPCInProcessTransportTests/Test Utilities/XCTest+Utilities.swift index 67d381073..b49af0ec9 100644 --- a/Tests/GRPCInProcessTransportTests/Test Utilities/XCTest+Utilities.swift +++ b/Tests/GRPCInProcessTransportTests/Test Utilities/XCTest+Utilities.swift @@ -28,7 +28,6 @@ func XCTAssertThrowsError( } } -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) func XCTAssertThrowsErrorAsync( ofType: E.Type = E.self, _ expression: () async throws -> T,