Joe Tsai | ea11813 | 2018-11-11 17:56:21 -0800 | [diff] [blame] | 1 | // Copyright 2018 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | syntax = "proto3"; |
| 6 | |
| 7 | package google.golang.org; |
Damien Neil | e89e624 | 2019-05-13 23:55:40 -0700 | [diff] [blame] | 8 | option go_package = "google.golang.org/protobuf/internal/testprotos/legacy"; |
Joe Tsai | ea11813 | 2018-11-11 17:56:21 -0800 | [diff] [blame] | 9 | |
| 10 | // This file imports other files generated from a build of protoc-gen-go |
| 11 | // locked to a specific version. For all imports, they were built using |
Joe Tsai | 55f1825 | 2020-01-11 00:25:01 -0800 | [diff] [blame] | 12 | // Go v1.13 and protoc v3.11.12. This package is used to test compatibility with |
Joe Tsai | ea11813 | 2018-11-11 17:56:21 -0800 | [diff] [blame] | 13 | // checked in generated code that cannot easily change. |
| 14 | // As such, there should never be a need to update these generated files. |
| 15 | // |
| 16 | // The specific version of protoc-gen-go used is encoded in the file path: |
Joe Tsai | 55f1825 | 2020-01-11 00:25:01 -0800 | [diff] [blame] | 17 | // ${NAME}_${COMMIT_DATE}_${COMMIT_HASH}/test.proto |
Joe Tsai | 8e9d5f6 | 2019-10-04 18:57:48 -0700 | [diff] [blame] | 18 | // |
| 19 | // To avoid a dependency on the v1 module, we perform the following |
| 20 | // import path replacement to all generated .pb.go files: |
| 21 | // "github.com/golang/protobuf/proto" => "google.golang.org/protobuf/internal/protolegacy" |
Joe Tsai | ea11813 | 2018-11-11 17:56:21 -0800 | [diff] [blame] | 22 | |
| 23 | // The oldest supported version of protoc-gen-go is 2fc053c5, |
| 24 | // which finished adding descriptor methods to all protobuf types. |
Damien Neil | 3c5fb5f | 2020-02-04 15:03:30 -0800 | [diff] [blame^] | 25 | import "internal/testprotos/legacy/proto2_20160225_2fc053c5/test.proto"; // v0.0.0 |
| 26 | import "internal/testprotos/legacy/proto3_20160225_2fc053c5/test.proto"; // v0.0.0 |
Joe Tsai | ea11813 | 2018-11-11 17:56:21 -0800 | [diff] [blame] | 27 | // Changes from 20160225 to 20160519: |
| 28 | // * Nothing noteworthy to generated code |
Damien Neil | 3c5fb5f | 2020-02-04 15:03:30 -0800 | [diff] [blame^] | 29 | import "internal/testprotos/legacy/proto2_20160519_a4ab9ec5/test.proto"; // v0.0.0 |
| 30 | import "internal/testprotos/legacy/proto3_20160519_a4ab9ec5/test.proto"; // v0.0.0 |
Joe Tsai | ea11813 | 2018-11-11 17:56:21 -0800 | [diff] [blame] | 31 | // Changes from 20160519 to 20180125: |
| 32 | // * Removed ExtensionMap method and XXX_extensions field from messages |
| 33 | // * Added embedded proto.XXX_InternalExtensions field to messages |
| 34 | // * Added proto.ExtensionDesc.Filename field |
| 35 | // * Added registration for file descriptor |
| 36 | // * Added Get accessor methods for all fields in proto3 messages |
| 37 | // * Proto3 repeated primitives are packed by default |
Damien Neil | 3c5fb5f | 2020-02-04 15:03:30 -0800 | [diff] [blame^] | 38 | import "internal/testprotos/legacy/proto2_20180125_92554152/test.proto"; // v1.0.0 |
| 39 | import "internal/testprotos/legacy/proto3_20180125_92554152/test.proto"; // v1.0.0 |
Joe Tsai | ea11813 | 2018-11-11 17:56:21 -0800 | [diff] [blame] | 40 | // Changes from 20180125 to 20180430: |
| 41 | // * Added XXX_unrecognized field to proto3 messages |
| 42 | // * Added XXX_NoUnkeyedLiteral field to messages |
| 43 | // * Added XXX_sizecache field to messages |
| 44 | // * Added XXX_Unmarshal method to messages |
| 45 | // * Added XXX_Marshal method to messages |
| 46 | // * Added XXX_Merge method to messages |
| 47 | // * Added XXX_Size method to messages |
| 48 | // * Added XXX_DiscardUnknown method to messages |
| 49 | // * Added dependency on proto.InternalMessageInfo for table-driven logic |
| 50 | // * Added registration for map types |
Damien Neil | 3c5fb5f | 2020-02-04 15:03:30 -0800 | [diff] [blame^] | 51 | import "internal/testprotos/legacy/proto2_20180430_b4deda09/test.proto"; // v1.1.0 |
| 52 | import "internal/testprotos/legacy/proto3_20180430_b4deda09/test.proto"; // v1.1.0 |
Joe Tsai | ea11813 | 2018-11-11 17:56:21 -0800 | [diff] [blame] | 53 | // Changes from 20180430 to 20180814: |
| 54 | // * Added "proto3" struct tag to all fields in proto3 messages |
Damien Neil | 3c5fb5f | 2020-02-04 15:03:30 -0800 | [diff] [blame^] | 55 | import "internal/testprotos/legacy/proto2_20180814_aa810b61/test.proto"; // v1.2.0 |
| 56 | import "internal/testprotos/legacy/proto3_20180814_aa810b61/test.proto"; // v1.2.0 |
Joe Tsai | 55f1825 | 2020-01-11 00:25:01 -0800 | [diff] [blame] | 57 | // Changes from 20180814 to 20190205: |
Joe Tsai | 25cc69d | 2018-11-28 23:43:49 -0800 | [diff] [blame] | 58 | // * Changed the XXX_OneofFuncs method to XXX_OneofWrappers |
| 59 | // * Various syntactical changes to make the output more consistent |
Damien Neil | 3c5fb5f | 2020-02-04 15:03:30 -0800 | [diff] [blame^] | 60 | import "internal/testprotos/legacy/proto2_20190205_c823c79e/test.proto"; // v1.3.0 |
| 61 | import "internal/testprotos/legacy/proto3_20190205_c823c79e/test.proto"; // v1.3.0 |
Joe Tsai | ea11813 | 2018-11-11 17:56:21 -0800 | [diff] [blame] | 62 | |
| 63 | message Legacy { |
| 64 | google.golang.org.proto2_20160225.Message f1 = 1; |
| 65 | google.golang.org.proto3_20160225.Message f2 = 2; |
| 66 | google.golang.org.proto2_20160519.Message f3 = 3; |
| 67 | google.golang.org.proto3_20160519.Message f4 = 4; |
| 68 | google.golang.org.proto2_20180125.Message f5 = 5; |
| 69 | google.golang.org.proto3_20180125.Message f6 = 6; |
| 70 | google.golang.org.proto2_20180430.Message f7 = 7; |
| 71 | google.golang.org.proto3_20180430.Message f8 = 8; |
| 72 | google.golang.org.proto2_20180814.Message f9 = 9; |
| 73 | google.golang.org.proto3_20180814.Message f10 = 10; |
Joe Tsai | 55f1825 | 2020-01-11 00:25:01 -0800 | [diff] [blame] | 74 | google.golang.org.proto2_20190205.Message f11 = 11; |
| 75 | google.golang.org.proto3_20190205.Message f12 = 12; |
Joe Tsai | ea11813 | 2018-11-11 17:56:21 -0800 | [diff] [blame] | 76 | } |