mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2025-01-04 02:38:50 +00:00
ea11813c05
Add a corpus of generated protobuf messages generated at specific versions of protoc-gen-go to ensure that we continue to support for generated messages that have may never be updated. Change-Id: I04a1b74306f471d7c99f5daf52399a5bd9adcbbc Reviewed-on: https://go-review.googlesource.com/c/148831 Reviewed-by: Herbie Ong <herbie@google.com>
66 lines
3.2 KiB
Protocol Buffer
66 lines
3.2 KiB
Protocol Buffer
// Copyright 2018 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
syntax = "proto3";
|
|
|
|
package google.golang.org;
|
|
option go_package = "github.com/golang/protobuf/v2/internal/testprotos/legacy";
|
|
|
|
// This file imports other files generated from a build of protoc-gen-go
|
|
// locked to a specific version. For all imports, they were built using
|
|
// Go v1.11 and protoc v3.5.1. This package is used to test compatibility with
|
|
// checked in generated code that cannot easily change.
|
|
// As such, there should never be a need to update these generated files.
|
|
//
|
|
// The specific version of protoc-gen-go used is encoded in the file path:
|
|
// $NAME.$VERSION-$COMMIT_DATE-$COMMIT_HASH/test.proto
|
|
|
|
// The oldest supported version of protoc-gen-go is 2fc053c5,
|
|
// which finished adding descriptor methods to all protobuf types.
|
|
import "internal/testprotos/legacy/proto2.v0.0.0-20160225-2fc053c5/test.proto";
|
|
import "internal/testprotos/legacy/proto3.v0.0.0-20160225-2fc053c5/test.proto";
|
|
// Changes from 20160225 to 20160519:
|
|
// * Nothing noteworthy to generated code
|
|
import "internal/testprotos/legacy/proto2.v0.0.0-20160519-a4ab9ec5/test.proto";
|
|
import "internal/testprotos/legacy/proto3.v0.0.0-20160519-a4ab9ec5/test.proto";
|
|
// Changes from 20160519 to 20180125:
|
|
// * Removed ExtensionMap method and XXX_extensions field from messages
|
|
// * Added embedded proto.XXX_InternalExtensions field to messages
|
|
// * Added proto.ExtensionDesc.Filename field
|
|
// * Added registration for file descriptor
|
|
// * Added Get accessor methods for all fields in proto3 messages
|
|
// * Proto3 repeated primitives are packed by default
|
|
import "internal/testprotos/legacy/proto2.v1.0.0-20180125-92554152/test.proto";
|
|
import "internal/testprotos/legacy/proto3.v1.0.0-20180125-92554152/test.proto";
|
|
// Changes from 20180125 to 20180430:
|
|
// * Added XXX_unrecognized field to proto3 messages
|
|
// * Added XXX_NoUnkeyedLiteral field to messages
|
|
// * Added XXX_sizecache field to messages
|
|
// * Added XXX_Unmarshal method to messages
|
|
// * Added XXX_Marshal method to messages
|
|
// * Added XXX_Merge method to messages
|
|
// * Added XXX_Size method to messages
|
|
// * Added XXX_DiscardUnknown method to messages
|
|
// * Added dependency on proto.InternalMessageInfo for table-driven logic
|
|
// * Added registration for map types
|
|
import "internal/testprotos/legacy/proto2.v1.1.0-20180430-b4deda09/test.proto";
|
|
import "internal/testprotos/legacy/proto3.v1.1.0-20180430-b4deda09/test.proto";
|
|
// Changes from 20180430 to 20180814:
|
|
// * Added "proto3" struct tag to all fields in proto3 messages
|
|
import "internal/testprotos/legacy/proto2.v1.2.0-20180814-aa810b61/test.proto";
|
|
import "internal/testprotos/legacy/proto3.v1.2.0-20180814-aa810b61/test.proto";
|
|
|
|
message Legacy {
|
|
google.golang.org.proto2_20160225.Message f1 = 1;
|
|
google.golang.org.proto3_20160225.Message f2 = 2;
|
|
google.golang.org.proto2_20160519.Message f3 = 3;
|
|
google.golang.org.proto3_20160519.Message f4 = 4;
|
|
google.golang.org.proto2_20180125.Message f5 = 5;
|
|
google.golang.org.proto3_20180125.Message f6 = 6;
|
|
google.golang.org.proto2_20180430.Message f7 = 7;
|
|
google.golang.org.proto3_20180430.Message f8 = 8;
|
|
google.golang.org.proto2_20180814.Message f9 = 9;
|
|
google.golang.org.proto3_20180814.Message f10 = 10;
|
|
}
|