From c217a3708b79cbc8fdf96d8f3f35e9d5770c9a57 Mon Sep 17 00:00:00 2001 From: Mike Kruskal Date: Tue, 29 Oct 2024 11:18:35 -0700 Subject: [PATCH 1/3] Add a deprecation warning to py_proto_library --- protobuf.bzl | 1 + 1 file changed, 1 insertion(+) diff --git a/protobuf.bzl b/protobuf.bzl index 9a058978945fe..fe58a23a11b6f 100644 --- a/protobuf.bzl +++ b/protobuf.bzl @@ -647,6 +647,7 @@ def py_proto_library( This is provided for backwards compatibility only. Bazel 5.3 will introduce support for py_proto_library, which should be used instead. """ + print("The py_proto_library macro is deprecated, switch to the rule defined by rules_python and protobuf (after 29.0).") internal_py_proto_library(*args, **kwargs) def _source_proto_library( From 4ff368266cd1517931d73e6fb7a939ec0d1dff1b Mon Sep 17 00:00:00 2001 From: Mike Kruskal Date: Wed, 30 Oct 2024 09:05:07 -0700 Subject: [PATCH 2/3] Remove redundant 29.0 mention --- protobuf.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protobuf.bzl b/protobuf.bzl index fe58a23a11b6f..79a749b7dae98 100644 --- a/protobuf.bzl +++ b/protobuf.bzl @@ -647,7 +647,7 @@ def py_proto_library( This is provided for backwards compatibility only. Bazel 5.3 will introduce support for py_proto_library, which should be used instead. """ - print("The py_proto_library macro is deprecated, switch to the rule defined by rules_python and protobuf (after 29.0).") + print("The py_proto_library macro is deprecated, switch to the rule defined by rules_python or protobuf.") internal_py_proto_library(*args, **kwargs) def _source_proto_library( From 08fc27aaa52e6452984e443bb03a4485aea781f4 Mon Sep 17 00:00:00 2001 From: Mike Kruskal Date: Wed, 30 Oct 2024 11:03:34 -0700 Subject: [PATCH 3/3] Clarify warning message --- protobuf.bzl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/protobuf.bzl b/protobuf.bzl index 79a749b7dae98..c8d32a604f2f3 100644 --- a/protobuf.bzl +++ b/protobuf.bzl @@ -647,7 +647,9 @@ def py_proto_library( This is provided for backwards compatibility only. Bazel 5.3 will introduce support for py_proto_library, which should be used instead. """ - print("The py_proto_library macro is deprecated, switch to the rule defined by rules_python or protobuf.") + print("The py_proto_library macro is deprecated and will be removed in the " + + "30.x release. switch to the rule defined by rules_python or the one " + + "in bazel/py_proto_library.bzl.") internal_py_proto_library(*args, **kwargs) def _source_proto_library(