Skip to content

Commit 7b07ed2

Browse files
Add selected copies of old java gencode for smoke test
Also remove the 'optional' keyword from the proto3 test file for this purpose, since most of these versions predate proto3-optional. In the future if we expand this to cover more including Editions we will need to add some mechanism for when the given .proto file started being supported which would also generalize to proto3-optional if we want coverage of that specific case. PiperOrigin-RevId: 814687967
1 parent 71e600c commit 7b07ed2

File tree

16 files changed

+10568
-1
lines changed

16 files changed

+10568
-1
lines changed

compatibility/smoke/BUILD.bazel

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
load("@rules_java//java:defs.bzl", "java_test")
22
load("//compatibility/smoke:stale_gencode_smoke_test.bzl", "stale_gencode_smoke_test")
33

4+
stale_gencode_smoke_test("3.8.0")
5+
6+
stale_gencode_smoke_test("3.11.0")
7+
48
stale_gencode_smoke_test("3.19.0")
9+
10+
stale_gencode_smoke_test("3.20.0")
11+
12+
stale_gencode_smoke_test("21.12")
13+
14+
stale_gencode_smoke_test("25.8")
15+
16+
stale_gencode_smoke_test("26.0")
17+
18+
stale_gencode_smoke_test("32.1")

compatibility/smoke/proto3_gencode_test.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ package legacy_gencode_test.proto3;
55
option java_outer_classname = "Proto3GencodeTestProto";
66

77
message TestMessage {
8-
optional string x = 2;
8+
string x = 2;
99
NestedTestMessage y = 3;
1010
}
1111

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
load("@rules_java//java:java_library.bzl", "java_library")
2+
3+
java_library(
4+
name = "checked_in_gencode",
5+
srcs = glob(["**/*.java"]),
6+
visibility = ["//compatibility:__subpackages__"],
7+
deps = ["//:protobuf_java"],
8+
)

0 commit comments

Comments
 (0)