-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Protobuf 22 #2546
Support Protobuf 22 #2546
Conversation
dac0b3e
to
5fa8037
Compare
还有几个问题需要讨论一下:
|
# required by absl | ||
set(CMAKE_CXX_STANDARD 17) | ||
|
||
find_package(absl REQUIRED CONFIG) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
基于 CONFIG 方式查找 protobuf 可以推导依赖, 但不是所有 protobuf 都提供, 同时 protoc 相关的任务也需要改
config_brpc.sh还是保留吧,挺方便的,不用依赖cmake/bazel |
bd059d8
to
df8380b
Compare
未进行生产环境验证,需谨慎使用。 |
LGTM |
请 merge一下 我这里可以验证是不是ok 谢谢 |
请问这个PR使用的protobuf的版本是多少呢? 用prototbuf 3.22.5版本验证,cmake编译会报错: 这个地方是不是代码里判断的值不对啊? |
在Rocky 8.9的环境实际验证了一下,3.22-3.24版本这个地方都应该维持旧的处理方式,3.25版本开始才改为了start_number()。 所以pb_to_json.cpp:78 和 json_to_pb.cpp:537 的判断都应该改成 GOOGLE_PROTOBUF_VERSION < 4025000 。 |
确实是 24 版本开始的 |
What problem does this PR solve?
Issue Number: close #2537
Problem Summary: compatible with protobuf >= 22
What is changed and the side effects?
Changed:
Side effects:
Performance effects(性能影响):
Breaking backward compatibility(向后兼容性):
Check List: