protoc-runner 35.1__py3-none-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- protoc/__init__.py +28 -0
- protoc/_bin/protoc.exe +0 -0
- protoc/_main.py +27 -0
- protoc/_paths.py +36 -0
- protoc/include/conformance/conformance.proto +173 -0
- protoc/include/conformance/messages/test_messages_edition2023.proto +222 -0
- protoc/include/conformance/messages/test_messages_edition_unstable.proto +66 -0
- protoc/include/conformance/messages/test_messages_proto2.proto +422 -0
- protoc/include/conformance/messages/test_messages_proto2_editions.proto +690 -0
- protoc/include/conformance/messages/test_messages_proto3.proto +272 -0
- protoc/include/conformance/messages/test_messages_proto3_editions.proto +316 -0
- protoc/include/google/protobuf/any.proto +106 -0
- protoc/include/google/protobuf/api.proto +229 -0
- protoc/include/google/protobuf/c_sharp_features.proto +23 -0
- protoc/include/google/protobuf/compiler/plugin.proto +180 -0
- protoc/include/google/protobuf/cpp_features.proto +87 -0
- protoc/include/google/protobuf/descriptor.proto +1472 -0
- protoc/include/google/protobuf/duration.proto +115 -0
- protoc/include/google/protobuf/empty.proto +51 -0
- protoc/include/google/protobuf/field_mask.proto +243 -0
- protoc/include/google/protobuf/go_features.proto +112 -0
- protoc/include/google/protobuf/java_features.proto +132 -0
- protoc/include/google/protobuf/source_context.proto +48 -0
- protoc/include/google/protobuf/struct.proto +111 -0
- protoc/include/google/protobuf/timestamp.proto +145 -0
- protoc/include/google/protobuf/type.proto +217 -0
- protoc/include/google/protobuf/wrappers.proto +157 -0
- protoc_runner-35.1.dist-info/METADATA +48 -0
- protoc_runner-35.1.dist-info/RECORD +34 -0
- protoc_runner-35.1.dist-info/WHEEL +5 -0
- protoc_runner-35.1.dist-info/entry_points.txt +4 -0
- protoc_runner-35.1.dist-info/licenses/LICENSE +201 -0
- protoc_runner-35.1.dist-info/licenses/vendor-licenses/.gitkeep +1 -0
- protoc_runner-35.1.dist-info/licenses/vendor-licenses/protobuf.txt +32 -0
protoc/__init__.py
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Copyright (c) 2025-2026 Buf Technologies, Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
"""Package providing convenience access to protoc and conformance test runner."""
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
|
|
18
|
+
__all__ = [
|
|
19
|
+
"get_conformance_test_runner_path",
|
|
20
|
+
"get_include_protos_path",
|
|
21
|
+
"get_protoc_path",
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
from ._paths import (
|
|
25
|
+
get_conformance_test_runner_path,
|
|
26
|
+
get_include_protos_path,
|
|
27
|
+
get_protoc_path,
|
|
28
|
+
)
|
protoc/_bin/protoc.exe
ADDED
|
Binary file
|
protoc/_main.py
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Copyright (c) 2025-2026 Buf Technologies, Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import os
|
|
17
|
+
import sys
|
|
18
|
+
|
|
19
|
+
from ._paths import get_conformance_test_runner_path, get_protoc_path
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def conformance_test_runner() -> None:
|
|
23
|
+
os.execv(get_conformance_test_runner_path(), sys.argv) # noqa: S606
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def protoc() -> None:
|
|
27
|
+
os.execv(get_protoc_path(), sys.argv) # noqa: S606
|
protoc/_paths.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Copyright (c) 2025-2026 Buf Technologies, Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import sys
|
|
17
|
+
from pathlib import Path
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def get_conformance_test_runner_path() -> Path:
|
|
21
|
+
"""Returns the path to the conformance test runner."""
|
|
22
|
+
if sys.platform == "win32":
|
|
23
|
+
msg = "conformance test runner is not supported on Windows"
|
|
24
|
+
raise RuntimeError(msg)
|
|
25
|
+
return Path(__file__).parent / "_bin" / "conformance_test_runner"
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def get_protoc_path() -> Path:
|
|
29
|
+
"""Returns the path to the protoc binary."""
|
|
30
|
+
protoc_exe = "protoc.exe" if sys.platform == "win32" else "protoc"
|
|
31
|
+
return Path(__file__).parent / "_bin" / protoc_exe
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def get_include_protos_path() -> Path:
|
|
35
|
+
"""Returns the path to the included protos."""
|
|
36
|
+
return Path(__file__).parent / "include"
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
// Protocol Buffers - Google's data interchange format
|
|
2
|
+
// Copyright 2008 Google Inc. All rights reserved.
|
|
3
|
+
//
|
|
4
|
+
// Use of this source code is governed by a BSD-style
|
|
5
|
+
// license that can be found in the LICENSE file or at
|
|
6
|
+
// https://developers.google.com/open-source/licenses/bsd
|
|
7
|
+
|
|
8
|
+
syntax = "proto3";
|
|
9
|
+
|
|
10
|
+
package conformance;
|
|
11
|
+
|
|
12
|
+
option java_package = "com.google.protobuf.conformance";
|
|
13
|
+
option objc_class_prefix = "Conformance";
|
|
14
|
+
|
|
15
|
+
// This defines the conformance testing protocol. This protocol exists between
|
|
16
|
+
// the conformance test suite itself and the code being tested. For each test,
|
|
17
|
+
// the suite will send a ConformanceRequest message and expect a
|
|
18
|
+
// ConformanceResponse message.
|
|
19
|
+
//
|
|
20
|
+
// You can either run the tests in two different ways:
|
|
21
|
+
//
|
|
22
|
+
// 1. in-process (using the interface in conformance_test.h).
|
|
23
|
+
//
|
|
24
|
+
// 2. as a sub-process communicating over a pipe. Information about how to
|
|
25
|
+
// do this is in conformance_test_runner.cc.
|
|
26
|
+
//
|
|
27
|
+
// Pros/cons of the two approaches:
|
|
28
|
+
//
|
|
29
|
+
// - running as a sub-process is much simpler for languages other than C/C++.
|
|
30
|
+
//
|
|
31
|
+
// - running as a sub-process may be more tricky in unusual environments like
|
|
32
|
+
// iOS apps, where fork/stdin/stdout are not available.
|
|
33
|
+
|
|
34
|
+
enum WireFormat {
|
|
35
|
+
UNSPECIFIED = 0;
|
|
36
|
+
PROTOBUF = 1;
|
|
37
|
+
JSON = 2;
|
|
38
|
+
JSPB = 3; // Only used inside Google. Opensource testees just skip it.
|
|
39
|
+
TEXT_FORMAT = 4;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
enum TestCategory {
|
|
43
|
+
UNSPECIFIED_TEST = 0;
|
|
44
|
+
BINARY_TEST = 1; // Test binary wire format.
|
|
45
|
+
JSON_TEST = 2; // Test json wire format.
|
|
46
|
+
// Similar to JSON_TEST. However, during parsing json, testee should ignore
|
|
47
|
+
// unknown fields. This feature is optional. Each implementation can decide
|
|
48
|
+
// whether to support it. See
|
|
49
|
+
// https://developers.google.com/protocol-buffers/docs/proto3#json_options
|
|
50
|
+
// for more detail.
|
|
51
|
+
JSON_IGNORE_UNKNOWN_PARSING_TEST = 3;
|
|
52
|
+
// Test jspb wire format. Only used inside Google. Opensource testees just
|
|
53
|
+
// skip it.
|
|
54
|
+
JSPB_TEST = 4;
|
|
55
|
+
// Test text format. For cpp, java and python, testees can already deal with
|
|
56
|
+
// this type. Testees of other languages can simply skip it.
|
|
57
|
+
TEXT_FORMAT_TEST = 5;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Meant to encapsulate all types of tests: successes, skips, failures, etc.
|
|
61
|
+
// Therefore, this may or may not have a failure message. Failure messages
|
|
62
|
+
// may be truncated for our failure lists.
|
|
63
|
+
message TestStatus {
|
|
64
|
+
string name = 1;
|
|
65
|
+
string failure_message = 2;
|
|
66
|
+
// What an actual test name matched to in a failure list. Can be wildcarded or
|
|
67
|
+
// an exact match without wildcards.
|
|
68
|
+
string matched_name = 3;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// The conformance runner will request a list of failures as the first request.
|
|
72
|
+
// This will be known by message_type == "conformance.FailureSet", a conformance
|
|
73
|
+
// test should return a serialized FailureSet in protobuf_payload.
|
|
74
|
+
message FailureSet {
|
|
75
|
+
repeated TestStatus test = 2;
|
|
76
|
+
reserved 1;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Represents a single test case's input. The testee should:
|
|
80
|
+
//
|
|
81
|
+
// 1. parse this proto (which should always succeed)
|
|
82
|
+
// 2. parse the protobuf or JSON payload in "payload" (which may fail)
|
|
83
|
+
// 3. if the parse succeeded, serialize the message in the requested format.
|
|
84
|
+
message ConformanceRequest {
|
|
85
|
+
// The payload (whether protobuf of JSON) is always for a
|
|
86
|
+
// protobuf_test_messages.proto3.TestAllTypes proto (as defined in
|
|
87
|
+
// src/google/protobuf/proto3_test_messages.proto).
|
|
88
|
+
oneof payload {
|
|
89
|
+
bytes protobuf_payload = 1;
|
|
90
|
+
string json_payload = 2;
|
|
91
|
+
// Only used inside Google. Opensource testees just skip it.
|
|
92
|
+
string jspb_payload = 7;
|
|
93
|
+
string text_payload = 8;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// Which format should the testee serialize its message to?
|
|
97
|
+
WireFormat requested_output_format = 3;
|
|
98
|
+
|
|
99
|
+
// The full name for the test message to use; for the moment, either:
|
|
100
|
+
// protobuf_test_messages.proto3.TestAllTypesProto3 or
|
|
101
|
+
// protobuf_test_messages.proto2.TestAllTypesProto2 or
|
|
102
|
+
// protobuf_test_messages.editions.proto2.TestAllTypesProto2 or
|
|
103
|
+
// protobuf_test_messages.editions.proto3.TestAllTypesProto3 or
|
|
104
|
+
// protobuf_test_messages.editions.TestAllTypesEdition2023 or
|
|
105
|
+
// protobuf_test_messages.edition_unstable.TestAllTypesEditionUnstable.
|
|
106
|
+
string message_type = 4;
|
|
107
|
+
|
|
108
|
+
// Each test is given a specific test category. Some category may need
|
|
109
|
+
// specific support in testee programs. Refer to the definition of
|
|
110
|
+
// TestCategory for more information.
|
|
111
|
+
TestCategory test_category = 5;
|
|
112
|
+
|
|
113
|
+
// Specify details for how to encode jspb.
|
|
114
|
+
JspbEncodingConfig jspb_encoding_options = 6;
|
|
115
|
+
|
|
116
|
+
// This can be used in json and text format. If true, testee should print
|
|
117
|
+
// unknown fields instead of ignore. This feature is optional.
|
|
118
|
+
bool print_unknown_fields = 9;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Represents a single test case's output.
|
|
122
|
+
message ConformanceResponse {
|
|
123
|
+
oneof result {
|
|
124
|
+
// This string should be set to indicate parsing failed. The string can
|
|
125
|
+
// provide more information about the parse error if it is available.
|
|
126
|
+
//
|
|
127
|
+
// Setting this string does not necessarily mean the testee failed the
|
|
128
|
+
// test. Some of the test cases are intentionally invalid input.
|
|
129
|
+
string parse_error = 1;
|
|
130
|
+
|
|
131
|
+
// If the input was successfully parsed but errors occurred when
|
|
132
|
+
// serializing it to the requested output format, set the error message in
|
|
133
|
+
// this field.
|
|
134
|
+
string serialize_error = 6;
|
|
135
|
+
|
|
136
|
+
// This should be set if the test program timed out. The string should
|
|
137
|
+
// provide more information about what the child process was doing when it
|
|
138
|
+
// was killed.
|
|
139
|
+
string timeout_error = 9;
|
|
140
|
+
|
|
141
|
+
// This should be set if some other error occurred. This will always
|
|
142
|
+
// indicate that the test failed. The string can provide more information
|
|
143
|
+
// about the failure.
|
|
144
|
+
string runtime_error = 2;
|
|
145
|
+
|
|
146
|
+
// If the input was successfully parsed and the requested output was
|
|
147
|
+
// protobuf, serialize it to protobuf and set it in this field.
|
|
148
|
+
bytes protobuf_payload = 3;
|
|
149
|
+
|
|
150
|
+
// If the input was successfully parsed and the requested output was JSON,
|
|
151
|
+
// serialize to JSON and set it in this field.
|
|
152
|
+
string json_payload = 4;
|
|
153
|
+
|
|
154
|
+
// For when the testee skipped the test, likely because a certain feature
|
|
155
|
+
// wasn't supported, like JSON input/output.
|
|
156
|
+
string skipped = 5;
|
|
157
|
+
|
|
158
|
+
// If the input was successfully parsed and the requested output was JSPB,
|
|
159
|
+
// serialize to JSPB and set it in this field. JSPB is only used inside
|
|
160
|
+
// Google. Opensource testees can just skip it.
|
|
161
|
+
string jspb_payload = 7;
|
|
162
|
+
|
|
163
|
+
// If the input was successfully parsed and the requested output was
|
|
164
|
+
// TEXT_FORMAT, serialize to TEXT_FORMAT and set it in this field.
|
|
165
|
+
string text_payload = 8;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// Encoding options for jspb format.
|
|
170
|
+
message JspbEncodingConfig {
|
|
171
|
+
// Encode the value field of Any as jspb array if true, otherwise binary.
|
|
172
|
+
bool use_jspb_array_any_format = 1;
|
|
173
|
+
}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
// Protocol Buffers - Google's data interchange format
|
|
2
|
+
// Copyright 2024 Google Inc. All rights reserved.
|
|
3
|
+
//
|
|
4
|
+
// Use of this source code is governed by a BSD-style
|
|
5
|
+
// license that can be found in the LICENSE file or at
|
|
6
|
+
// https://developers.google.com/open-source/licenses/bsd
|
|
7
|
+
|
|
8
|
+
edition = "2023";
|
|
9
|
+
|
|
10
|
+
package protobuf_test_messages.editions;
|
|
11
|
+
|
|
12
|
+
option features.message_encoding = DELIMITED;
|
|
13
|
+
option java_package = "com.google.protobuf_test_messages.edition2023";
|
|
14
|
+
option java_multiple_files = true;
|
|
15
|
+
option objc_class_prefix = "Editions";
|
|
16
|
+
|
|
17
|
+
message ComplexMessage {
|
|
18
|
+
int32 d = 1;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
message TestAllTypesEdition2023 {
|
|
22
|
+
message NestedMessage {
|
|
23
|
+
int32 a = 1;
|
|
24
|
+
TestAllTypesEdition2023 corecursive = 2
|
|
25
|
+
[features.message_encoding = LENGTH_PREFIXED];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
enum NestedEnum {
|
|
29
|
+
FOO = 0;
|
|
30
|
+
BAR = 1;
|
|
31
|
+
BAZ = 2;
|
|
32
|
+
NEG = -1; // Intentionally negative.
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Singular
|
|
36
|
+
int32 optional_int32 = 1;
|
|
37
|
+
int64 optional_int64 = 2;
|
|
38
|
+
uint32 optional_uint32 = 3;
|
|
39
|
+
uint64 optional_uint64 = 4;
|
|
40
|
+
sint32 optional_sint32 = 5;
|
|
41
|
+
sint64 optional_sint64 = 6;
|
|
42
|
+
fixed32 optional_fixed32 = 7;
|
|
43
|
+
fixed64 optional_fixed64 = 8;
|
|
44
|
+
sfixed32 optional_sfixed32 = 9;
|
|
45
|
+
sfixed64 optional_sfixed64 = 10;
|
|
46
|
+
float optional_float = 11;
|
|
47
|
+
double optional_double = 12;
|
|
48
|
+
bool optional_bool = 13;
|
|
49
|
+
string optional_string = 14;
|
|
50
|
+
bytes optional_bytes = 15;
|
|
51
|
+
|
|
52
|
+
NestedMessage optional_nested_message = 18
|
|
53
|
+
[features.message_encoding = LENGTH_PREFIXED];
|
|
54
|
+
ForeignMessageEdition2023 optional_foreign_message = 19
|
|
55
|
+
[features.message_encoding = LENGTH_PREFIXED];
|
|
56
|
+
|
|
57
|
+
NestedEnum optional_nested_enum = 21;
|
|
58
|
+
ForeignEnumEdition2023 optional_foreign_enum = 22;
|
|
59
|
+
|
|
60
|
+
string optional_string_piece = 24 [ctype = STRING_PIECE];
|
|
61
|
+
string optional_cord = 25 [ctype = CORD];
|
|
62
|
+
|
|
63
|
+
TestAllTypesEdition2023 recursive_message = 27
|
|
64
|
+
[features.message_encoding = LENGTH_PREFIXED];
|
|
65
|
+
|
|
66
|
+
// Repeated
|
|
67
|
+
repeated int32 repeated_int32 = 31;
|
|
68
|
+
repeated int64 repeated_int64 = 32;
|
|
69
|
+
repeated uint32 repeated_uint32 = 33;
|
|
70
|
+
repeated uint64 repeated_uint64 = 34;
|
|
71
|
+
repeated sint32 repeated_sint32 = 35;
|
|
72
|
+
repeated sint64 repeated_sint64 = 36;
|
|
73
|
+
repeated fixed32 repeated_fixed32 = 37;
|
|
74
|
+
repeated fixed64 repeated_fixed64 = 38;
|
|
75
|
+
repeated sfixed32 repeated_sfixed32 = 39;
|
|
76
|
+
repeated sfixed64 repeated_sfixed64 = 40;
|
|
77
|
+
repeated float repeated_float = 41;
|
|
78
|
+
repeated double repeated_double = 42;
|
|
79
|
+
repeated bool repeated_bool = 43;
|
|
80
|
+
repeated string repeated_string = 44;
|
|
81
|
+
repeated bytes repeated_bytes = 45;
|
|
82
|
+
|
|
83
|
+
repeated NestedMessage repeated_nested_message = 48
|
|
84
|
+
[features.message_encoding = LENGTH_PREFIXED];
|
|
85
|
+
repeated ForeignMessageEdition2023 repeated_foreign_message = 49
|
|
86
|
+
[features.message_encoding = LENGTH_PREFIXED];
|
|
87
|
+
|
|
88
|
+
repeated NestedEnum repeated_nested_enum = 51;
|
|
89
|
+
repeated ForeignEnumEdition2023 repeated_foreign_enum = 52;
|
|
90
|
+
|
|
91
|
+
repeated string repeated_string_piece = 54 [ctype = STRING_PIECE];
|
|
92
|
+
repeated string repeated_cord = 55 [ctype = CORD];
|
|
93
|
+
|
|
94
|
+
// Packed
|
|
95
|
+
repeated int32 packed_int32 = 75 [features.repeated_field_encoding = PACKED];
|
|
96
|
+
repeated int64 packed_int64 = 76 [features.repeated_field_encoding = PACKED];
|
|
97
|
+
repeated uint32 packed_uint32 = 77
|
|
98
|
+
[features.repeated_field_encoding = PACKED];
|
|
99
|
+
repeated uint64 packed_uint64 = 78
|
|
100
|
+
[features.repeated_field_encoding = PACKED];
|
|
101
|
+
repeated sint32 packed_sint32 = 79
|
|
102
|
+
[features.repeated_field_encoding = PACKED];
|
|
103
|
+
repeated sint64 packed_sint64 = 80
|
|
104
|
+
[features.repeated_field_encoding = PACKED];
|
|
105
|
+
repeated fixed32 packed_fixed32 = 81
|
|
106
|
+
[features.repeated_field_encoding = PACKED];
|
|
107
|
+
repeated fixed64 packed_fixed64 = 82
|
|
108
|
+
[features.repeated_field_encoding = PACKED];
|
|
109
|
+
repeated sfixed32 packed_sfixed32 = 83
|
|
110
|
+
[features.repeated_field_encoding = PACKED];
|
|
111
|
+
repeated sfixed64 packed_sfixed64 = 84
|
|
112
|
+
[features.repeated_field_encoding = PACKED];
|
|
113
|
+
repeated float packed_float = 85 [features.repeated_field_encoding = PACKED];
|
|
114
|
+
repeated double packed_double = 86
|
|
115
|
+
[features.repeated_field_encoding = PACKED];
|
|
116
|
+
repeated bool packed_bool = 87 [features.repeated_field_encoding = PACKED];
|
|
117
|
+
repeated NestedEnum packed_nested_enum = 88
|
|
118
|
+
[features.repeated_field_encoding = PACKED];
|
|
119
|
+
|
|
120
|
+
// Unpacked
|
|
121
|
+
repeated int32 unpacked_int32 = 89
|
|
122
|
+
[features.repeated_field_encoding = EXPANDED];
|
|
123
|
+
repeated int64 unpacked_int64 = 90
|
|
124
|
+
[features.repeated_field_encoding = EXPANDED];
|
|
125
|
+
repeated uint32 unpacked_uint32 = 91
|
|
126
|
+
[features.repeated_field_encoding = EXPANDED];
|
|
127
|
+
repeated uint64 unpacked_uint64 = 92
|
|
128
|
+
[features.repeated_field_encoding = EXPANDED];
|
|
129
|
+
repeated sint32 unpacked_sint32 = 93
|
|
130
|
+
[features.repeated_field_encoding = EXPANDED];
|
|
131
|
+
repeated sint64 unpacked_sint64 = 94
|
|
132
|
+
[features.repeated_field_encoding = EXPANDED];
|
|
133
|
+
repeated fixed32 unpacked_fixed32 = 95
|
|
134
|
+
[features.repeated_field_encoding = EXPANDED];
|
|
135
|
+
repeated fixed64 unpacked_fixed64 = 96
|
|
136
|
+
[features.repeated_field_encoding = EXPANDED];
|
|
137
|
+
repeated sfixed32 unpacked_sfixed32 = 97
|
|
138
|
+
[features.repeated_field_encoding = EXPANDED];
|
|
139
|
+
repeated sfixed64 unpacked_sfixed64 = 98
|
|
140
|
+
[features.repeated_field_encoding = EXPANDED];
|
|
141
|
+
repeated float unpacked_float = 99
|
|
142
|
+
[features.repeated_field_encoding = EXPANDED];
|
|
143
|
+
repeated double unpacked_double = 100
|
|
144
|
+
[features.repeated_field_encoding = EXPANDED];
|
|
145
|
+
repeated bool unpacked_bool = 101
|
|
146
|
+
[features.repeated_field_encoding = EXPANDED];
|
|
147
|
+
repeated NestedEnum unpacked_nested_enum = 102
|
|
148
|
+
[features.repeated_field_encoding = EXPANDED];
|
|
149
|
+
|
|
150
|
+
// Map
|
|
151
|
+
map<int32, int32> map_int32_int32 = 56;
|
|
152
|
+
map<int64, int64> map_int64_int64 = 57;
|
|
153
|
+
map<uint32, uint32> map_uint32_uint32 = 58;
|
|
154
|
+
map<uint64, uint64> map_uint64_uint64 = 59;
|
|
155
|
+
map<sint32, sint32> map_sint32_sint32 = 60;
|
|
156
|
+
map<sint64, sint64> map_sint64_sint64 = 61;
|
|
157
|
+
map<fixed32, fixed32> map_fixed32_fixed32 = 62;
|
|
158
|
+
map<fixed64, fixed64> map_fixed64_fixed64 = 63;
|
|
159
|
+
map<sfixed32, sfixed32> map_sfixed32_sfixed32 = 64;
|
|
160
|
+
map<sfixed64, sfixed64> map_sfixed64_sfixed64 = 65;
|
|
161
|
+
map<int32, float> map_int32_float = 66;
|
|
162
|
+
map<int32, double> map_int32_double = 67;
|
|
163
|
+
map<bool, bool> map_bool_bool = 68;
|
|
164
|
+
map<string, string> map_string_string = 69;
|
|
165
|
+
map<string, bytes> map_string_bytes = 70;
|
|
166
|
+
map<string, NestedMessage> map_string_nested_message = 71;
|
|
167
|
+
map<string, ForeignMessageEdition2023> map_string_foreign_message = 72;
|
|
168
|
+
map<string, NestedEnum> map_string_nested_enum = 73;
|
|
169
|
+
map<string, ForeignEnumEdition2023> map_string_foreign_enum = 74;
|
|
170
|
+
|
|
171
|
+
oneof oneof_field {
|
|
172
|
+
uint32 oneof_uint32 = 111;
|
|
173
|
+
NestedMessage oneof_nested_message = 112
|
|
174
|
+
[features.message_encoding = LENGTH_PREFIXED];
|
|
175
|
+
string oneof_string = 113;
|
|
176
|
+
bytes oneof_bytes = 114;
|
|
177
|
+
bool oneof_bool = 115;
|
|
178
|
+
uint64 oneof_uint64 = 116;
|
|
179
|
+
float oneof_float = 117;
|
|
180
|
+
double oneof_double = 118;
|
|
181
|
+
NestedEnum oneof_enum = 119;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// extensions
|
|
185
|
+
extensions 120 to 200;
|
|
186
|
+
|
|
187
|
+
// groups
|
|
188
|
+
message GroupLikeType {
|
|
189
|
+
int32 group_int32 = 202;
|
|
190
|
+
uint32 group_uint32 = 203;
|
|
191
|
+
}
|
|
192
|
+
GroupLikeType groupliketype = 201;
|
|
193
|
+
GroupLikeType delimited_field = 202;
|
|
194
|
+
|
|
195
|
+
// recursive
|
|
196
|
+
map<int32, TestAllTypesEdition2023> map_recursive = 301;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
message ForeignMessageEdition2023 {
|
|
200
|
+
int32 c = 1;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
enum ForeignEnumEdition2023 {
|
|
204
|
+
FOREIGN_FOO = 0;
|
|
205
|
+
FOREIGN_BAR = 1;
|
|
206
|
+
FOREIGN_BAZ = 2;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
extend TestAllTypesEdition2023 {
|
|
210
|
+
int32 extension_int32 = 120;
|
|
211
|
+
string extension_string = 133;
|
|
212
|
+
bytes extension_bytes = 134;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
message GroupLikeType {
|
|
216
|
+
int32 c = 1;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
extend TestAllTypesEdition2023 {
|
|
220
|
+
GroupLikeType groupliketype = 121;
|
|
221
|
+
GroupLikeType delimited_ext = 122;
|
|
222
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// Protocol Buffers - Google's data interchange format
|
|
2
|
+
// Copyright 2024 Google Inc. All rights reserved.
|
|
3
|
+
//
|
|
4
|
+
// Use of this source code is governed by a BSD-style
|
|
5
|
+
// license that can be found in the LICENSE file or at
|
|
6
|
+
// https://developers.google.com/open-source/licenses/bsd
|
|
7
|
+
|
|
8
|
+
edition = "UNSTABLE";
|
|
9
|
+
|
|
10
|
+
package protobuf_test_messages.edition_unstable;
|
|
11
|
+
|
|
12
|
+
option features.message_encoding = DELIMITED;
|
|
13
|
+
option java_package = "com.google.protobuf_test_messages.edition_unstable";
|
|
14
|
+
option objc_class_prefix = "EditionUnstable";
|
|
15
|
+
|
|
16
|
+
message ComplexMessage {
|
|
17
|
+
int32 d = 1;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
message TestAllTypesEditionUnstable {
|
|
21
|
+
// Singular
|
|
22
|
+
int32 optional_int32 = 1;
|
|
23
|
+
|
|
24
|
+
ForeignMessageEditionUnstable optional_foreign_message = 2
|
|
25
|
+
[features.message_encoding = LENGTH_PREFIXED];
|
|
26
|
+
|
|
27
|
+
ForeignEnumEditionUnstable optional_foreign_enum = 3;
|
|
28
|
+
|
|
29
|
+
TestAllTypesEditionUnstable recursive_message = 4
|
|
30
|
+
[features.message_encoding = LENGTH_PREFIXED];
|
|
31
|
+
|
|
32
|
+
// Repeated
|
|
33
|
+
repeated int32 repeated_int32 = 5;
|
|
34
|
+
repeated ForeignMessageEditionUnstable repeated_foreign_message = 6
|
|
35
|
+
[features.message_encoding = LENGTH_PREFIXED];
|
|
36
|
+
repeated ForeignEnumEditionUnstable repeated_foreign_enum = 7;
|
|
37
|
+
|
|
38
|
+
// Map
|
|
39
|
+
map<int32, int32> map_int32_int32 = 8;
|
|
40
|
+
map<bool, bool> map_bool_bool = 9;
|
|
41
|
+
map<string, string> map_string_string = 10;
|
|
42
|
+
map<string, ForeignMessageEditionUnstable> map_string_foreign_message = 11;
|
|
43
|
+
map<string, ForeignEnumEditionUnstable> map_string_foreign_enum = 12;
|
|
44
|
+
|
|
45
|
+
// bytes
|
|
46
|
+
bytes optional_bytes = 13;
|
|
47
|
+
repeated bytes repeated_bytes = 14;
|
|
48
|
+
map<string, bytes> map_string_bytes = 15;
|
|
49
|
+
|
|
50
|
+
// extensions
|
|
51
|
+
extensions 120 to 200;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
message ForeignMessageEditionUnstable {
|
|
55
|
+
int32 c = 1;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
enum ForeignEnumEditionUnstable {
|
|
59
|
+
FOREIGN_FOO = 0;
|
|
60
|
+
FOREIGN_BAR = 1;
|
|
61
|
+
FOREIGN_BAZ = 2;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
extend TestAllTypesEditionUnstable {
|
|
65
|
+
int32 extension_int32 = 120;
|
|
66
|
+
}
|