Bladeren bron

all: fix interactions with latest v2 API

Change test.bash to pass -tags=protolegacy instead of proto1_legacy.

Regenerate .pb.go files.

Change-Id: Ifd0633c20c5860de765fcef5d0eb6c5bf3e3f183
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/190979
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
Damien Neil 6 jaren geleden
bovenliggende
commit
b0a8cbb9ec

+ 13 - 9
protoc-gen-go/descriptor/descriptor.pb.go

@@ -1,4 +1,8 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.19.0-devel
+// 	protoc        (unknown)
+// 	go            v1.12.5
 // source: github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.proto
 
 package descriptor
@@ -12,13 +16,13 @@ import (
 )
 
 const (
-	// Verify that runtime/protoimpl is sufficiently up-to-date.
-	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 0)
 	// Verify that this generated code is sufficiently up-to-date.
-	_ = protoimpl.EnforceVersion(0 - protoimpl.MinVersion)
+	_ = protoimpl.EnforceVersion(19 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 19)
 )
 
-// Symbols defined in public import of google/protobuf/descriptor.proto
+// Symbols defined in public import of google/protobuf/descriptor.proto.
 
 type FieldDescriptorProto_Type = descriptorpb.FieldDescriptorProto_Type
 
@@ -188,11 +192,11 @@ func file_github_com_golang_protobuf_protoc_gen_go_descriptor_descriptor_proto_r
 
 var file_github_com_golang_protobuf_protoc_gen_go_descriptor_descriptor_proto_goTypes = []interface{}{}
 var file_github_com_golang_protobuf_protoc_gen_go_descriptor_descriptor_proto_depIdxs = []int32{
-	0, // starting offset of method output_type sub-list
-	0, // starting offset of method input_type sub-list
-	0, // starting offset of extension type_name sub-list
-	0, // starting offset of extension extendee sub-list
-	0, // starting offset of field type_name sub-list
+	0, // [0:0] is the sub-list for method output_type
+	0, // [0:0] is the sub-list for method input_type
+	0, // [0:0] is the sub-list for extension type_name
+	0, // [0:0] is the sub-list for extension extendee
+	0, // [0:0] is the sub-list for field type_name
 }
 
 func init() { file_github_com_golang_protobuf_protoc_gen_go_descriptor_descriptor_proto_init() }

+ 13 - 9
protoc-gen-go/plugin/plugin.pb.go

@@ -1,4 +1,8 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.19.0-devel
+// 	protoc        (unknown)
+// 	go            v1.12.5
 // source: github.com/golang/protobuf/protoc-gen-go/plugin/plugin.proto
 
 package plugin_go
@@ -12,13 +16,13 @@ import (
 )
 
 const (
-	// Verify that runtime/protoimpl is sufficiently up-to-date.
-	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 0)
 	// Verify that this generated code is sufficiently up-to-date.
-	_ = protoimpl.EnforceVersion(0 - protoimpl.MinVersion)
+	_ = protoimpl.EnforceVersion(19 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 19)
 )
 
-// Symbols defined in public import of google/protobuf/compiler/plugin.proto
+// Symbols defined in public import of google/protobuf/compiler/plugin.proto.
 
 type Version = pluginpb.Version
 type CodeGeneratorRequest = pluginpb.CodeGeneratorRequest
@@ -55,11 +59,11 @@ func file_github_com_golang_protobuf_protoc_gen_go_plugin_plugin_proto_rawDescGZ
 
 var file_github_com_golang_protobuf_protoc_gen_go_plugin_plugin_proto_goTypes = []interface{}{}
 var file_github_com_golang_protobuf_protoc_gen_go_plugin_plugin_proto_depIdxs = []int32{
-	0, // starting offset of method output_type sub-list
-	0, // starting offset of method input_type sub-list
-	0, // starting offset of extension type_name sub-list
-	0, // starting offset of extension extendee sub-list
-	0, // starting offset of field type_name sub-list
+	0, // [0:0] is the sub-list for method output_type
+	0, // [0:0] is the sub-list for method input_type
+	0, // [0:0] is the sub-list for extension type_name
+	0, // [0:0] is the sub-list for extension extendee
+	0, // [0:0] is the sub-list for field type_name
 }
 
 func init() { file_github_com_golang_protobuf_protoc_gen_go_plugin_plugin_proto_init() }

+ 13 - 9
ptypes/any/any.pb.go

@@ -1,4 +1,8 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.19.0-devel
+// 	protoc        (unknown)
+// 	go            v1.12.5
 // source: github.com/golang/protobuf/ptypes/any/any.proto
 
 package any
@@ -12,13 +16,13 @@ import (
 )
 
 const (
-	// Verify that runtime/protoimpl is sufficiently up-to-date.
-	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 0)
 	// Verify that this generated code is sufficiently up-to-date.
-	_ = protoimpl.EnforceVersion(0 - protoimpl.MinVersion)
+	_ = protoimpl.EnforceVersion(19 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 19)
 )
 
-// Symbols defined in public import of google/protobuf/any.proto
+// Symbols defined in public import of google/protobuf/any.proto.
 
 type Any = anypb.Any
 
@@ -50,11 +54,11 @@ func file_github_com_golang_protobuf_ptypes_any_any_proto_rawDescGZIP() []byte {
 
 var file_github_com_golang_protobuf_ptypes_any_any_proto_goTypes = []interface{}{}
 var file_github_com_golang_protobuf_ptypes_any_any_proto_depIdxs = []int32{
-	0, // starting offset of method output_type sub-list
-	0, // starting offset of method input_type sub-list
-	0, // starting offset of extension type_name sub-list
-	0, // starting offset of extension extendee sub-list
-	0, // starting offset of field type_name sub-list
+	0, // [0:0] is the sub-list for method output_type
+	0, // [0:0] is the sub-list for method input_type
+	0, // [0:0] is the sub-list for extension type_name
+	0, // [0:0] is the sub-list for extension extendee
+	0, // [0:0] is the sub-list for field type_name
 }
 
 func init() { file_github_com_golang_protobuf_ptypes_any_any_proto_init() }

+ 13 - 9
ptypes/duration/duration.pb.go

@@ -1,4 +1,8 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.19.0-devel
+// 	protoc        (unknown)
+// 	go            v1.12.5
 // source: github.com/golang/protobuf/ptypes/duration/duration.proto
 
 package duration
@@ -12,13 +16,13 @@ import (
 )
 
 const (
-	// Verify that runtime/protoimpl is sufficiently up-to-date.
-	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 0)
 	// Verify that this generated code is sufficiently up-to-date.
-	_ = protoimpl.EnforceVersion(0 - protoimpl.MinVersion)
+	_ = protoimpl.EnforceVersion(19 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 19)
 )
 
-// Symbols defined in public import of google/protobuf/duration.proto
+// Symbols defined in public import of google/protobuf/duration.proto.
 
 type Duration = durationpb.Duration
 
@@ -51,11 +55,11 @@ func file_github_com_golang_protobuf_ptypes_duration_duration_proto_rawDescGZIP(
 
 var file_github_com_golang_protobuf_ptypes_duration_duration_proto_goTypes = []interface{}{}
 var file_github_com_golang_protobuf_ptypes_duration_duration_proto_depIdxs = []int32{
-	0, // starting offset of method output_type sub-list
-	0, // starting offset of method input_type sub-list
-	0, // starting offset of extension type_name sub-list
-	0, // starting offset of extension extendee sub-list
-	0, // starting offset of field type_name sub-list
+	0, // [0:0] is the sub-list for method output_type
+	0, // [0:0] is the sub-list for method input_type
+	0, // [0:0] is the sub-list for extension type_name
+	0, // [0:0] is the sub-list for extension extendee
+	0, // [0:0] is the sub-list for field type_name
 }
 
 func init() { file_github_com_golang_protobuf_ptypes_duration_duration_proto_init() }

+ 13 - 9
ptypes/empty/empty.pb.go

@@ -1,4 +1,8 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.19.0-devel
+// 	protoc        (unknown)
+// 	go            v1.12.5
 // source: github.com/golang/protobuf/ptypes/empty/empty.proto
 
 package empty
@@ -12,13 +16,13 @@ import (
 )
 
 const (
-	// Verify that runtime/protoimpl is sufficiently up-to-date.
-	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 0)
 	// Verify that this generated code is sufficiently up-to-date.
-	_ = protoimpl.EnforceVersion(0 - protoimpl.MinVersion)
+	_ = protoimpl.EnforceVersion(19 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 19)
 )
 
-// Symbols defined in public import of google/protobuf/empty.proto
+// Symbols defined in public import of google/protobuf/empty.proto.
 
 type Empty = emptypb.Empty
 
@@ -50,11 +54,11 @@ func file_github_com_golang_protobuf_ptypes_empty_empty_proto_rawDescGZIP() []by
 
 var file_github_com_golang_protobuf_ptypes_empty_empty_proto_goTypes = []interface{}{}
 var file_github_com_golang_protobuf_ptypes_empty_empty_proto_depIdxs = []int32{
-	0, // starting offset of method output_type sub-list
-	0, // starting offset of method input_type sub-list
-	0, // starting offset of extension type_name sub-list
-	0, // starting offset of extension extendee sub-list
-	0, // starting offset of field type_name sub-list
+	0, // [0:0] is the sub-list for method output_type
+	0, // [0:0] is the sub-list for method input_type
+	0, // [0:0] is the sub-list for extension type_name
+	0, // [0:0] is the sub-list for extension extendee
+	0, // [0:0] is the sub-list for field type_name
 }
 
 func init() { file_github_com_golang_protobuf_ptypes_empty_empty_proto_init() }

+ 13 - 9
ptypes/struct/struct.pb.go

@@ -1,4 +1,8 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.19.0-devel
+// 	protoc        (unknown)
+// 	go            v1.12.5
 // source: github.com/golang/protobuf/ptypes/struct/struct.proto
 
 package structpb
@@ -12,13 +16,13 @@ import (
 )
 
 const (
-	// Verify that runtime/protoimpl is sufficiently up-to-date.
-	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 0)
 	// Verify that this generated code is sufficiently up-to-date.
-	_ = protoimpl.EnforceVersion(0 - protoimpl.MinVersion)
+	_ = protoimpl.EnforceVersion(19 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 19)
 )
 
-// Symbols defined in public import of google/protobuf/struct.proto
+// Symbols defined in public import of google/protobuf/struct.proto.
 
 type NullValue = structpb.NullValue
 
@@ -66,11 +70,11 @@ func file_github_com_golang_protobuf_ptypes_struct_struct_proto_rawDescGZIP() []
 
 var file_github_com_golang_protobuf_ptypes_struct_struct_proto_goTypes = []interface{}{}
 var file_github_com_golang_protobuf_ptypes_struct_struct_proto_depIdxs = []int32{
-	0, // starting offset of method output_type sub-list
-	0, // starting offset of method input_type sub-list
-	0, // starting offset of extension type_name sub-list
-	0, // starting offset of extension extendee sub-list
-	0, // starting offset of field type_name sub-list
+	0, // [0:0] is the sub-list for method output_type
+	0, // [0:0] is the sub-list for method input_type
+	0, // [0:0] is the sub-list for extension type_name
+	0, // [0:0] is the sub-list for extension extendee
+	0, // [0:0] is the sub-list for field type_name
 }
 
 func init() { file_github_com_golang_protobuf_ptypes_struct_struct_proto_init() }

+ 13 - 9
ptypes/timestamp/timestamp.pb.go

@@ -1,4 +1,8 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.19.0-devel
+// 	protoc        (unknown)
+// 	go            v1.12.5
 // source: github.com/golang/protobuf/ptypes/timestamp/timestamp.proto
 
 package timestamp
@@ -12,13 +16,13 @@ import (
 )
 
 const (
-	// Verify that runtime/protoimpl is sufficiently up-to-date.
-	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 0)
 	// Verify that this generated code is sufficiently up-to-date.
-	_ = protoimpl.EnforceVersion(0 - protoimpl.MinVersion)
+	_ = protoimpl.EnforceVersion(19 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 19)
 )
 
-// Symbols defined in public import of google/protobuf/timestamp.proto
+// Symbols defined in public import of google/protobuf/timestamp.proto.
 
 type Timestamp = timestamppb.Timestamp
 
@@ -52,11 +56,11 @@ func file_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto_rawDescGZI
 
 var file_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto_goTypes = []interface{}{}
 var file_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto_depIdxs = []int32{
-	0, // starting offset of method output_type sub-list
-	0, // starting offset of method input_type sub-list
-	0, // starting offset of extension type_name sub-list
-	0, // starting offset of extension extendee sub-list
-	0, // starting offset of field type_name sub-list
+	0, // [0:0] is the sub-list for method output_type
+	0, // [0:0] is the sub-list for method input_type
+	0, // [0:0] is the sub-list for extension type_name
+	0, // [0:0] is the sub-list for extension extendee
+	0, // [0:0] is the sub-list for field type_name
 }
 
 func init() { file_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto_init() }

+ 13 - 9
ptypes/wrappers/wrappers.pb.go

@@ -1,4 +1,8 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.19.0-devel
+// 	protoc        (unknown)
+// 	go            v1.12.5
 // source: github.com/golang/protobuf/ptypes/wrappers/wrappers.proto
 
 package wrappers
@@ -12,13 +16,13 @@ import (
 )
 
 const (
-	// Verify that runtime/protoimpl is sufficiently up-to-date.
-	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 0)
 	// Verify that this generated code is sufficiently up-to-date.
-	_ = protoimpl.EnforceVersion(0 - protoimpl.MinVersion)
+	_ = protoimpl.EnforceVersion(19 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 19)
 )
 
-// Symbols defined in public import of google/protobuf/wrappers.proto
+// Symbols defined in public import of google/protobuf/wrappers.proto.
 
 type DoubleValue = wrapperspb.DoubleValue
 type FloatValue = wrapperspb.FloatValue
@@ -59,11 +63,11 @@ func file_github_com_golang_protobuf_ptypes_wrappers_wrappers_proto_rawDescGZIP(
 
 var file_github_com_golang_protobuf_ptypes_wrappers_wrappers_proto_goTypes = []interface{}{}
 var file_github_com_golang_protobuf_ptypes_wrappers_wrappers_proto_depIdxs = []int32{
-	0, // starting offset of method output_type sub-list
-	0, // starting offset of method input_type sub-list
-	0, // starting offset of extension type_name sub-list
-	0, // starting offset of extension extendee sub-list
-	0, // starting offset of field type_name sub-list
+	0, // [0:0] is the sub-list for method output_type
+	0, // [0:0] is the sub-list for method input_type
+	0, // [0:0] is the sub-list for extension type_name
+	0, // [0:0] is the sub-list for extension extendee
+	0, // [0:0] is the sub-list for field type_name
 }
 
 func init() { file_github_com_golang_protobuf_ptypes_wrappers_wrappers_proto_init() }

+ 2 - 2
test.bash

@@ -10,8 +10,8 @@ PASS="\x1b[32mPASS"
 FAIL="\x1b[31mFAIL"
 RESET="\x1b[0m"
 
-echo -e "${BOLD}go test -tags proto1_legacy ./...${RESET}"
-RET_TEST0=$(go test -tags proto1_legacy ./... | egrep -v "^(ok|[?])\s+")
+echo -e "${BOLD}go test -tags protolegacy ./...${RESET}"
+RET_TEST0=$(go test -tags protolegacy ./... | egrep -v "^(ok|[?])\s+")
 if [[ ! -z "$RET_TEST0" ]]; then echo "$RET_TEST0"; echo; fi
 
 echo -e "${BOLD}go test -tags use_golang_protobuf_v1 ./...${RESET}"