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
1 change: 0 additions & 1 deletion Examples/echo/Sources/Subcommands/Serve.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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<Echo_EchoRequest>,
Expand Down
1 change: 0 additions & 1 deletion Examples/route-guide/Sources/RouteGuide.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 7 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions Sources/GRPCCore/Call/Client/CallOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down Expand Up @@ -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.
///
Expand All @@ -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 }
Expand Down
1 change: 0 additions & 1 deletion Sources/GRPCCore/Call/Client/ClientInterceptor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down
1 change: 0 additions & 1 deletion Sources/GRPCCore/Call/Client/ClientRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ public struct ClientRequest<Message: Sendable>: 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<Message: Sendable>: Sendable {
/// Caller-specified metadata sent to the server at the start of the RPC.
///
Expand Down
2 changes: 0 additions & 2 deletions Sources/GRPCCore/Call/Client/ClientResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ public struct ClientResponse<Message: Sendable>: 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<Message: Sendable>: Sendable {
public struct Contents: Sendable {
/// Metadata received from the server at the beginning of the response.
Expand Down Expand Up @@ -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.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<
Expand Down Expand Up @@ -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<R: Sendable>(
Expand Down Expand Up @@ -545,15 +543,13 @@ extension ClientRPCExecutor.HedgingExecutor {
}
}

@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
@usableFromInline
enum _HedgingTaskResult<R: Sendable>: Sendable {
case rpcHandled(Result<R, any Error>)
case finishedRequest(Result<Void, any Error>)
case timedOut(Result<Void, any Error>)
}

@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
@usableFromInline
enum _HedgingAttemptTaskResult<R: Sendable, Output: Sendable>: Sendable {
case attemptPicked(Bool)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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<R: Sendable>(
Expand Down Expand Up @@ -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<R: Sendable>(
Expand Down Expand Up @@ -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<Result: Sendable>(
_ deadline: ContinuousClock.Instant,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<
Expand Down Expand Up @@ -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<R: Sendable>(
Expand Down Expand Up @@ -302,7 +300,6 @@ extension ClientRPCExecutor.RetryExecutor {
}
}

@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
@usableFromInline
enum _RetryExecutorTask<R: Sendable>: Sendable {
case timedOut(Result<Void, any Error>)
Expand Down
2 changes: 0 additions & 2 deletions Sources/GRPCCore/Call/Client/Internal/ClientRPCExecutor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Message>) {
self.init(metadata: request.metadata) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down Expand Up @@ -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.
///
Expand All @@ -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.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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<RPCResponsePart, Failure>,
Message: Sendable,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions Sources/GRPCCore/Call/Server/Internal/ServerRPCExecutor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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<Input, Output>(
Expand Down
2 changes: 0 additions & 2 deletions Sources/GRPCCore/Call/Server/RPCRouter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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<
Expand Down
1 change: 0 additions & 1 deletion Sources/GRPCCore/Call/Server/RegistrableRPCService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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``.
///
Expand Down
1 change: 0 additions & 1 deletion Sources/GRPCCore/Call/Server/ServerInterceptor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down
3 changes: 0 additions & 3 deletions Sources/GRPCCore/Call/Server/ServerRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public struct ServerRequest<Message: Sendable>: 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<Message: Sendable>: Sendable {
/// Metadata received from the client at the start of the RPC.
Expand All @@ -63,14 +62,12 @@ public struct StreamingServerRequest<Message: Sendable>: 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<Message>) {
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<Message>) async throws {
var iterator = request.messages.makeAsyncIterator()
Expand Down
3 changes: 0 additions & 3 deletions Sources/GRPCCore/Call/Server/ServerResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ public struct ServerResponse<Message: Sendable>: Sendable {
/// return ["goodbye": "trailing metadata"]
/// }
/// ```
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public struct StreamingServerResponse<Message: Sendable>: Sendable {
/// The contents of a response to a request which has been accepted for processing.
public struct Contents: Sendable {
Expand Down Expand Up @@ -279,7 +278,6 @@ extension ServerResponse {
}
}

@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
extension StreamingServerResponse {
/// Creates a new accepted response.
///
Expand Down Expand Up @@ -318,7 +316,6 @@ extension StreamingServerResponse {
}
}

@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
extension StreamingServerResponse {
public init(single response: ServerResponse<Message>) {
switch response.accepted {
Expand Down
Loading
Loading