Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update protoc to 21.7; also adds go 1.19 to CI #534

Merged
merged 2 commits into from Oct 3, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 10 additions & 3 deletions .circleci/config.yml
Expand Up @@ -56,6 +56,12 @@ jobs:
working_directory: ~/repo
docker:
- image: cimg/go:1.18
steps: *simple_job_steps

build-1-19:
working_directory: ~/repo
docker:
- image: cimg/go:1.19
steps:
- checkout
- restore_cache:
Expand All @@ -77,10 +83,10 @@ jobs:
#- store_test_results:
# path: /tmp/test-reports

build-1-18-u:
build-1-19-u:
working_directory: ~/repo
docker:
- image: cimg/go:1.18
- image: cimg/go:1.19
steps:
- checkout
- run:
Expand All @@ -102,4 +108,5 @@ workflows:
- build-1-17
- build-windows
- build-1-18
- build-1-18-u
- build-1-19
- build-1-19-u
27 changes: 18 additions & 9 deletions desc/protoprint/testfiles/descriptor-compact.proto
Expand Up @@ -166,7 +166,6 @@ message FieldDescriptorProto {
// For booleans, "true" or "false".
// For strings, contains the default text contents (not escaped in any way).
// For bytes, contains the C escaped value. All bytes >= 128 are escaped.
// TODO(kenton): Base-64 encode?
optional string default_value = 7;
// If set, gives the index of a oneof in the containing type's oneof_decl
// list. This field is a member of that oneof.
Expand Down Expand Up @@ -501,7 +500,17 @@ message FieldOptions {
// implementation must either *always* check its required fields, or *never*
// check its required fields, regardless of whether or not the message has
// been parsed.
//
// As of 2021, lazy does no correctness checks on the byte stream during
// parsing. This may lead to crashes if and when an invalid byte stream is
// finally parsed upon access.
//
// TODO(b/211906113): Enable validation on lazy fields.
optional bool lazy = 5 [default = false];
// unverified_lazy does no correctness checks on the byte stream. This should
// only be used where lazy with verification is prohibitive for performance
// reasons.
optional bool unverified_lazy = 15 [default = false];
// Is this field deprecated?
// Depending on the target platform, this can emit Deprecated annotations
// for accessors, or it will be completely ignored; in the very least, this
Expand Down Expand Up @@ -590,8 +599,8 @@ message UninterpretedOption {
// The name of the uninterpreted option. Each string represents a segment in
// a dot-separated name. is_extension is true iff a segment represents an
// extension (denoted with parentheses in options specs in .proto files).
// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
// "foo.(bar.baz).qux".
// E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents
// "foo.(bar.baz).moo".
message NamePart {
required string name_part = 1;
required bool is_extension = 2;
Expand Down Expand Up @@ -660,8 +669,8 @@ message SourceCodeInfo {
// location.
//
// Each element is a field number or an index. They form a path from
// the root FileDescriptorProto to the place where the definition. For
// example, this path:
// the root FileDescriptorProto to the place where the definition occurs.
// For example, this path:
// [ 4, 3, 2, 7, 1 ]
// refers to:
// file.message_type(3) // 4, 3
Expand Down Expand Up @@ -713,13 +722,13 @@ message SourceCodeInfo {
// // Comment attached to baz.
// // Another line attached to baz.
//
// // Comment attached to qux.
// // Comment attached to moo.
// //
// // Another line attached to qux.
// optional double qux = 4;
// // Another line attached to moo.
// optional double moo = 4;
//
// // Detached comment for corge. This is not leading or trailing comments
// // to qux or corge because there are blank lines separating it from
// // to moo or corge because there are blank lines separating it from
// // both.
//
// // Detached comment for corge paragraph 2.
Expand Down
28 changes: 19 additions & 9 deletions desc/protoprint/testfiles/descriptor-custom-sort.proto
Expand Up @@ -48,8 +48,8 @@ message UninterpretedOption {
// The name of the uninterpreted option. Each string represents a segment in
// a dot-separated name. is_extension is true iff a segment represents an
// extension (denoted with parentheses in options specs in .proto files).
// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
// "foo.(bar.baz).qux".
// E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents
// "foo.(bar.baz).moo".
message NamePart {
required string name_part = 1;

Expand Down Expand Up @@ -93,8 +93,8 @@ message SourceCodeInfo {
// location.
//
// Each element is a field number or an index. They form a path from
// the root FileDescriptorProto to the place where the definition. For
// example, this path:
// the root FileDescriptorProto to the place where the definition occurs.
// For example, this path:
// [ 4, 3, 2, 7, 1 ]
// refers to:
// file.message_type(3) // 4, 3
Expand Down Expand Up @@ -143,13 +143,13 @@ message SourceCodeInfo {
// // Comment attached to baz.
// // Another line attached to baz.
//
// // Comment attached to qux.
// // Comment attached to moo.
// //
// // Another line attached to qux.
// optional double qux = 4;
// // Another line attached to moo.
// optional double moo = 4;
//
// // Detached comment for corge. This is not leading or trailing comments
// // to qux or corge because there are blank lines separating it from
// // to moo or corge because there are blank lines separating it from
// // both.
//
// // Detached comment for corge paragraph 2.
Expand Down Expand Up @@ -618,6 +618,11 @@ message FieldOptions {
// For Google-internal migration only. Do not use.
optional bool weak = 10 [default = false];

// unverified_lazy does no correctness checks on the byte stream. This should
// only be used where lazy with verification is prohibitive for performance
// reasons.
optional bool unverified_lazy = 15 [default = false];

// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;

Expand Down Expand Up @@ -656,6 +661,12 @@ message FieldOptions {
// implementation must either *always* check its required fields, or *never*
// check its required fields, regardless of whether or not the message has
// been parsed.
//
// As of 2021, lazy does no correctness checks on the byte stream during
// parsing. This may lead to crashes if and when an invalid byte stream is
// finally parsed upon access.
//
// TODO(b/211906113): Enable validation on lazy fields.
optional bool lazy = 5 [default = false];

// The jstype option determines the JavaScript type used for values of the
Expand Down Expand Up @@ -804,7 +815,6 @@ message FieldDescriptorProto {
// For booleans, "true" or "false".
// For strings, contains the default text contents (not escaped in any way).
// For bytes, contains the C escaped value. All bytes >= 128 are escaped.
// TODO(kenton): Base-64 encode?
optional string default_value = 7;
}

Expand Down
28 changes: 19 additions & 9 deletions desc/protoprint/testfiles/descriptor-default.proto
Expand Up @@ -234,7 +234,6 @@ message FieldDescriptorProto {
// For booleans, "true" or "false".
// For strings, contains the default text contents (not escaped in any way).
// For bytes, contains the C escaped value. All bytes >= 128 are escaped.
// TODO(kenton): Base-64 encode?
optional string default_value = 7;

// If set, gives the index of a oneof in the containing type's oneof_decl
Expand Down Expand Up @@ -640,8 +639,19 @@ message FieldOptions {
// implementation must either *always* check its required fields, or *never*
// check its required fields, regardless of whether or not the message has
// been parsed.
//
// As of 2021, lazy does no correctness checks on the byte stream during
// parsing. This may lead to crashes if and when an invalid byte stream is
// finally parsed upon access.
//
// TODO(b/211906113): Enable validation on lazy fields.
optional bool lazy = 5 [default = false];

// unverified_lazy does no correctness checks on the byte stream. This should
// only be used where lazy with verification is prohibitive for performance
// reasons.
optional bool unverified_lazy = 15 [default = false];

// Is this field deprecated?
// Depending on the target platform, this can emit Deprecated annotations
// for accessors, or it will be completely ignored; in the very least, this
Expand Down Expand Up @@ -757,8 +767,8 @@ message UninterpretedOption {
// The name of the uninterpreted option. Each string represents a segment in
// a dot-separated name. is_extension is true iff a segment represents an
// extension (denoted with parentheses in options specs in .proto files).
// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
// "foo.(bar.baz).qux".
// E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents
// "foo.(bar.baz).moo".
message NamePart {
required string name_part = 1;

Expand Down Expand Up @@ -838,8 +848,8 @@ message SourceCodeInfo {
// location.
//
// Each element is a field number or an index. They form a path from
// the root FileDescriptorProto to the place where the definition. For
// example, this path:
// the root FileDescriptorProto to the place where the definition occurs.
// For example, this path:
// [ 4, 3, 2, 7, 1 ]
// refers to:
// file.message_type(3) // 4, 3
Expand Down Expand Up @@ -893,13 +903,13 @@ message SourceCodeInfo {
// // Comment attached to baz.
// // Another line attached to baz.
//
// // Comment attached to qux.
// // Comment attached to moo.
// //
// // Another line attached to qux.
// optional double qux = 4;
// // Another line attached to moo.
// optional double moo = 4;
//
// // Detached comment for corge. This is not leading or trailing comments
// // to qux or corge because there are blank lines separating it from
// // to moo or corge because there are blank lines separating it from
// // both.
//
// // Detached comment for corge paragraph 2.
Expand Down
Expand Up @@ -267,7 +267,6 @@ message FieldDescriptorProto {
* For booleans, "true" or "false".
* For strings, contains the default text contents (not escaped in any way).
* For bytes, contains the C escaped value. All bytes >= 128 are escaped.
* TODO(kenton): Base-64 encode?
*/
optional string default_value = 7;

Expand Down Expand Up @@ -737,9 +736,22 @@ message FieldOptions {
* implementation must either *always* check its required fields, or *never*
* check its required fields, regardless of whether or not the message has
* been parsed.
*
* As of 2021, lazy does no correctness checks on the byte stream during
* parsing. This may lead to crashes if and when an invalid byte stream is
* finally parsed upon access.
*
* TODO(b/211906113): Enable validation on lazy fields.
*/
optional bool lazy = 5 [default = false];

/*
* unverified_lazy does no correctness checks on the byte stream. This should
* only be used where lazy with verification is prohibitive for performance
* reasons.
*/
optional bool unverified_lazy = 15 [default = false];

/*
* Is this field deprecated?
* Depending on the target platform, this can emit Deprecated annotations
Expand Down Expand Up @@ -876,8 +888,8 @@ message UninterpretedOption {
* The name of the uninterpreted option. Each string represents a segment in
* a dot-separated name. is_extension is true iff a segment represents an
* extension (denoted with parentheses in options specs in .proto files).
* E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
* "foo.(bar.baz).qux".
* E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents
* "foo.(bar.baz).moo".
*/
message NamePart {
required string name_part = 1;
Expand Down Expand Up @@ -967,8 +979,8 @@ message SourceCodeInfo {
* location.
*
* Each element is a field number or an index. They form a path from
* the root FileDescriptorProto to the place where the definition. For
* example, this path:
* the root FileDescriptorProto to the place where the definition occurs.
* For example, this path:
* [ 4, 3, 2, 7, 1 ]
* refers to:
* file.message_type(3) // 4, 3
Expand Down Expand Up @@ -1025,13 +1037,13 @@ message SourceCodeInfo {
// // Comment attached to baz.
// // Another line attached to baz.
//
// // Comment attached to qux.
// // Comment attached to moo.
// //
// // Another line attached to qux.
// optional double qux = 4;
// // Another line attached to moo.
// optional double moo = 4;
//
// // Detached comment for corge. This is not leading or trailing comments
// // to qux or corge because there are blank lines separating it from
// // to moo or corge because there are blank lines separating it from
// // both.
//
// // Detached comment for corge paragraph 2.
Expand Down
28 changes: 19 additions & 9 deletions desc/protoprint/testfiles/descriptor-no-trailing-comments.proto
Expand Up @@ -234,7 +234,6 @@ message FieldDescriptorProto {
// For booleans, "true" or "false".
// For strings, contains the default text contents (not escaped in any way).
// For bytes, contains the C escaped value. All bytes >= 128 are escaped.
// TODO(kenton): Base-64 encode?
optional string default_value = 7;

// If set, gives the index of a oneof in the containing type's oneof_decl
Expand Down Expand Up @@ -640,8 +639,19 @@ message FieldOptions {
// implementation must either *always* check its required fields, or *never*
// check its required fields, regardless of whether or not the message has
// been parsed.
//
// As of 2021, lazy does no correctness checks on the byte stream during
// parsing. This may lead to crashes if and when an invalid byte stream is
// finally parsed upon access.
//
// TODO(b/211906113): Enable validation on lazy fields.
optional bool lazy = 5 [default = false];

// unverified_lazy does no correctness checks on the byte stream. This should
// only be used where lazy with verification is prohibitive for performance
// reasons.
optional bool unverified_lazy = 15 [default = false];

// Is this field deprecated?
// Depending on the target platform, this can emit Deprecated annotations
// for accessors, or it will be completely ignored; in the very least, this
Expand Down Expand Up @@ -757,8 +767,8 @@ message UninterpretedOption {
// The name of the uninterpreted option. Each string represents a segment in
// a dot-separated name. is_extension is true iff a segment represents an
// extension (denoted with parentheses in options specs in .proto files).
// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
// "foo.(bar.baz).qux".
// E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents
// "foo.(bar.baz).moo".
message NamePart {
required string name_part = 1;

Expand Down Expand Up @@ -838,8 +848,8 @@ message SourceCodeInfo {
// location.
//
// Each element is a field number or an index. They form a path from
// the root FileDescriptorProto to the place where the definition. For
// example, this path:
// the root FileDescriptorProto to the place where the definition occurs.
// For example, this path:
// [ 4, 3, 2, 7, 1 ]
// refers to:
// file.message_type(3) // 4, 3
Expand Down Expand Up @@ -893,13 +903,13 @@ message SourceCodeInfo {
// // Comment attached to baz.
// // Another line attached to baz.
//
// // Comment attached to qux.
// // Comment attached to moo.
// //
// // Another line attached to qux.
// optional double qux = 4;
// // Another line attached to moo.
// optional double moo = 4;
//
// // Detached comment for corge. This is not leading or trailing comments
// // to qux or corge because there are blank lines separating it from
// // to moo or corge because there are blank lines separating it from
// // both.
//
// // Detached comment for corge paragraph 2.
Expand Down