dep-protobuf/compatibility/BUILD.bazel
Joshua Haberman 734819d9dc Delete com_google_protobuf_previous_release and associated breaking tests
When trying to land https://github.com/protocolbuffers/protobuf/pull/28957, I ran into problems with the `@com_google_protobuf_previous_release` repo.  The root cause of these problems was that this repo combines a previous version of all of our `.bzl` files (like `proto_library.bzl`) with the *current* version of our `MODULE.bazel` file.

This is a combination that no user will actually encounter, and when skew between the two causes issues, it is very difficult to debug and fix.

If we want to re-introduce these breaking change tests in the future, an alternative approach that would cause fewer problems is to use the examples module at https://github.com/protocolbuffers/protobuf/tree/main/examples.  That module could include previous versions of the `.proto` files, as well as the breaking change tests to compare against the protos in `@com_google_protobuf`.

Since the examples module does not contain a copy of all our `.bzl` files, this design would avoid the `.bzl` skew that causes problems in the current setup.

PiperOrigin-RevId: 970790688
2026-08-25 14:21:28 -07:00

24 lines
586 B
Text

load("@rules_java//java:java_library.bzl", "java_library")
# Simple build tests for compatibility of gencode from previous major versions
# with the current runtime.
java_library(
name = "v25_test_protos_srcjar",
testonly = True,
srcs = glob([
"v3.25.0/*.srcjar",
]),
visibility = ["//java/core:__pkg__"],
deps = ["//java/core"],
)
java_library(
name = "v25_test_protos_jar",
testonly = True,
srcs = glob([
"v3.25.0/*.srcjar",
]),
visibility = ["//java/core:__pkg__"],
deps = ["@com_google_protobuf_v25//java/core"],
)