This is an automated email from the ASF dual-hosted git repository.

wasphin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brpc.git


The following commit(s) were added to refs/heads/master by this push:
     new ce0eaec3 Merge pull request #3429 from wasphin/feature/protobuf-35
ce0eaec3 is described below

commit ce0eaec3918c828ea8e1f46e2023f32deab4ec04
Author: Xiaofeng Wang <[email protected]>
AuthorDate: Sun Aug 9 19:42:20 2026 +0800

    Merge pull request #3429 from wasphin/feature/protobuf-35
    
    Support Protobuf v35
---
 .github/workflows/ci-linux.yml    | 2 +-
 src/brpc/nonreflectable_message.h | 9 +++++++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml
index b3462d22..1bc4a572 100644
--- a/.github/workflows/ci-linux.yml
+++ b/.github/workflows/ci-linux.yml
@@ -278,7 +278,7 @@ jobs:
   clang-unittest-bazel-with-babylon-and-new-pb:
     runs-on: ubuntu-22.04
     env:
-      TEST_PROTOBUF_VERSION: "34.1"
+      TEST_PROTOBUF_VERSION: "35.1"
       # protobuf >= 34.x uses new ProtoInfo fields (option_deps, 
extension_declarations)
       # introduced in Bazel 8.x. The repo's .bazelversion (7.2.1) is too old. 
bazelisk
       # honors USE_BAZEL_VERSION.
diff --git a/src/brpc/nonreflectable_message.h 
b/src/brpc/nonreflectable_message.h
index 089b2395..fab63012 100644
--- a/src/brpc/nonreflectable_message.h
+++ b/src/brpc/nonreflectable_message.h
@@ -288,8 +288,13 @@ private:
 #    endif
                 ) {
             // Only can be used to determine whether the Types are the same.
-            descriptor = default_instance().GetMetadata().descriptor;
-            reflection = default_instance().GetMetadata().reflection;
+#    if GOOGLE_PROTOBUF_VERSION >= 7035000
+            
set_descriptor(NonreflectableMessage<T>::default_instance().GetMetadata().descriptor);
+            
set_reflection(NonreflectableMessage<T>::default_instance().GetMetadata().reflection);
+#    else
+            descriptor = 
NonreflectableMessage<T>::default_instance().GetMetadata().descriptor;
+            reflection = 
NonreflectableMessage<T>::default_instance().GetMetadata().reflection;
+#    endif
         }
     };
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to