Skip to content

Commit c7a162b

Browse files
authored
Update protos from upstream. (#1826)
Using 276701b29e2301697f06cfcee86642b3263e93ef. Had to leave out updating "Protos/upstream/google/protobuf/unittest_legacy_features.proto" as the current upstream version has some issues for us.
1 parent aac051b commit c7a162b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+749
-124
lines changed

Protos/Sources/SwiftProtobuf/google/protobuf/api.proto

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ option go_package = "google.golang.org/protobuf/types/known/apipb";
5151
// sometimes simply referred to as "APIs" in other contexts, such as the name of
5252
// this message itself. See https://cloud.google.com/apis/design/glossary for
5353
// detailed terminology.
54+
//
55+
// New usages of this message as an alternative to ServiceDescriptorProto are
56+
// strongly discouraged. This message does not reliability preserve all
57+
// information necessary to model the schema and preserve semantics. Instead
58+
// make use of FileDescriptorSet which preserves the necessary information.
5459
message Api {
5560
// The fully qualified name of this interface, including package name
5661
// followed by the interface's simple name.
@@ -99,6 +104,11 @@ message Api {
99104
}
100105

101106
// Method represents a method of an API interface.
107+
//
108+
// New usages of this message as an alternative to MethodDescriptorProto are
109+
// strongly discouraged. This message does not reliability preserve all
110+
// information necessary to model the schema and preserve semantics. Instead
111+
// make use of FileDescriptorSet which preserves the necessary information.
102112
message Method {
103113
// The simple name of this method.
104114
string name = 1;
@@ -119,10 +129,16 @@ message Method {
119129
repeated Option options = 6;
120130

121131
// The source syntax of this method.
122-
Syntax syntax = 7;
132+
//
133+
// This field should be ignored, instead the syntax should be inherited from
134+
// Api. This is similar to Field and EnumValue.
135+
Syntax syntax = 7 [deprecated = true];
123136

124137
// The source edition string, only valid when syntax is SYNTAX_EDITIONS.
125-
string edition = 8;
138+
//
139+
// This field should be ignored, instead the edition should be inherited from
140+
// Api. This is similar to Field and EnumValue.
141+
string edition = 8 [deprecated = true];
126142
}
127143

128144
// Declares an API Interface to be included in this interface. The including

Protos/Sources/SwiftProtobuf/google/protobuf/descriptor.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,9 @@ message ServiceDescriptorProto {
398398
repeated MethodDescriptorProto method = 2;
399399

400400
optional ServiceOptions options = 3;
401+
402+
reserved 4;
403+
reserved "stream";
401404
}
402405

403406
// Describes a method of a service.

Protos/Sources/SwiftProtobuf/google/protobuf/type.proto

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ option csharp_namespace = "Google.Protobuf.WellKnownTypes";
4444
option go_package = "google.golang.org/protobuf/types/known/typepb";
4545

4646
// A protocol buffer message type.
47+
//
48+
// New usages of this message as an alternative to DescriptorProto are strongly
49+
// discouraged. This message does not reliability preserve all information
50+
// necessary to model the schema and preserve semantics. Instead make use of
51+
// FileDescriptorSet which preserves the necessary information.
4752
message Type {
4853
// The fully qualified message name.
4954
string name = 1;
@@ -62,6 +67,11 @@ message Type {
6267
}
6368

6469
// A single field of a message type.
70+
//
71+
// New usages of this message as an alternative to FieldDescriptorProto are
72+
// strongly discouraged. This message does not reliability preserve all
73+
// information necessary to model the schema and preserve semantics. Instead
74+
// make use of FileDescriptorSet which preserves the necessary information.
6575
message Field {
6676
// Basic field types.
6777
enum Kind {
@@ -142,6 +152,11 @@ message Field {
142152
}
143153

144154
// Enum type definition.
155+
//
156+
// New usages of this message as an alternative to EnumDescriptorProto are
157+
// strongly discouraged. This message does not reliability preserve all
158+
// information necessary to model the schema and preserve semantics. Instead
159+
// make use of FileDescriptorSet which preserves the necessary information.
145160
message Enum {
146161
// Enum type name.
147162
string name = 1;
@@ -158,6 +173,11 @@ message Enum {
158173
}
159174

160175
// Enum value definition.
176+
//
177+
// New usages of this message as an alternative to EnumValueDescriptorProto are
178+
// strongly discouraged. This message does not reliability preserve all
179+
// information necessary to model the schema and preserve semantics. Instead
180+
// make use of FileDescriptorSet which preserves the necessary information.
161181
message EnumValue {
162182
// Enum value name.
163183
string name = 1;
@@ -169,6 +189,10 @@ message EnumValue {
169189

170190
// A protocol buffer option, which can be attached to a message, field,
171191
// enumeration, etc.
192+
//
193+
// New usages of this message as an alternative to FileOptions, MessageOptions,
194+
// FieldOptions, EnumOptions, EnumValueOptions, ServiceOptions, or MethodOptions
195+
// are strongly discouraged.
172196
message Option {
173197
// The option's name. For protobuf built-in options (options defined in
174198
// descriptor.proto), this is the short name. For example, `"map_entry"`.

Protos/upstream/google/protobuf/api.proto

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ option go_package = "google.golang.org/protobuf/types/known/apipb";
5151
// sometimes simply referred to as "APIs" in other contexts, such as the name of
5252
// this message itself. See https://cloud.google.com/apis/design/glossary for
5353
// detailed terminology.
54+
//
55+
// New usages of this message as an alternative to ServiceDescriptorProto are
56+
// strongly discouraged. This message does not reliability preserve all
57+
// information necessary to model the schema and preserve semantics. Instead
58+
// make use of FileDescriptorSet which preserves the necessary information.
5459
message Api {
5560
// The fully qualified name of this interface, including package name
5661
// followed by the interface's simple name.
@@ -99,6 +104,11 @@ message Api {
99104
}
100105

101106
// Method represents a method of an API interface.
107+
//
108+
// New usages of this message as an alternative to MethodDescriptorProto are
109+
// strongly discouraged. This message does not reliability preserve all
110+
// information necessary to model the schema and preserve semantics. Instead
111+
// make use of FileDescriptorSet which preserves the necessary information.
102112
message Method {
103113
// The simple name of this method.
104114
string name = 1;
@@ -119,10 +129,16 @@ message Method {
119129
repeated Option options = 6;
120130

121131
// The source syntax of this method.
122-
Syntax syntax = 7;
132+
//
133+
// This field should be ignored, instead the syntax should be inherited from
134+
// Api. This is similar to Field and EnumValue.
135+
Syntax syntax = 7 [deprecated = true];
123136

124137
// The source edition string, only valid when syntax is SYNTAX_EDITIONS.
125-
string edition = 8;
138+
//
139+
// This field should be ignored, instead the edition should be inherited from
140+
// Api. This is similar to Field and EnumValue.
141+
string edition = 8 [deprecated = true];
126142
}
127143

128144
// Declares an API Interface to be included in this interface. The including

Protos/upstream/google/protobuf/descriptor.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,9 @@ message ServiceDescriptorProto {
398398
repeated MethodDescriptorProto method = 2;
399399

400400
optional ServiceOptions options = 3;
401+
402+
reserved 4;
403+
reserved "stream";
401404
}
402405

403406
// Describes a method of a service.

0 commit comments

Comments
 (0)