Skip to content

Commit 53e89e3

Browse files
authored
Add deprecation warnings (#72)
Motivation: gRPC Swift v2 has moved to a new repo, grpc-swift-2 and as a result this package has a new major version. That's not all that discoverable. Modifications: Deprecate commonly used high-level types with a link to a forums post explaining the move. Result: Users are notified about the move
1 parent f0f110a commit 53e89e3

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Sources/GRPCProtobuf/Coding.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public import SwiftProtobuf
1919

2020
/// Serializes a Protobuf message into a sequence of bytes.
2121
@available(gRPCSwiftProtobuf 1.0, *)
22+
@available(*, deprecated, message: "See https://forums.swift.org/t/80177")
2223
public struct ProtobufSerializer<Message: SwiftProtobuf.Message>: GRPCCore.MessageSerializer {
2324
public init() {}
2425

@@ -43,6 +44,7 @@ public struct ProtobufSerializer<Message: SwiftProtobuf.Message>: GRPCCore.Messa
4344

4445
/// Deserializes a sequence of bytes into a Protobuf message.
4546
@available(gRPCSwiftProtobuf 1.0, *)
47+
@available(*, deprecated, message: "See https://forums.swift.org/t/80177")
4648
public struct ProtobufDeserializer<Message: SwiftProtobuf.Message>: GRPCCore.MessageDeserializer {
4749
public init() {}
4850

Sources/GRPCProtobuf/Errors/GoogleRPCStatus.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public import SwiftProtobuf
3636
/// > the serialized bytes of a "google.rpc.Status" protocol buffers message containing the status
3737
/// > code, message, and details.
3838
@available(gRPCSwiftProtobuf 1.0, *)
39+
@available(*, deprecated, message: "See https://forums.swift.org/t/80177")
3940
public struct GoogleRPCStatus: Error, Hashable {
4041
/// A code representing the high-level domain of the error.
4142
public var code: RPCError.Code

0 commit comments

Comments
 (0)