Skip to content
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

[Clean-up] Fix deprecated protobuf function usages #36640

Closed
wants to merge 1 commit into from

Conversation

veblush
Copy link
Contributor

@veblush veblush commented May 16, 2024

Resolved the use of deprecated protobuf functions that would have caused clang-tidy issues with the upcoming protobuf release. The error encountered was:

2024-05-15 16:47:15,874 9074 warnings generated.
test/cpp/end2end/message_allocator_end2end_test.cc:330:38: error: 'CreateMessage' is deprecated: Use Create [clang-diagnostic-deprecated-declarations,-warnings-as-errors]
  330 |             google::protobuf::Arena::CreateMessage(&arena_));
      |                                      ^
bazel-out/k8-fastbuild/bin/external/com_google_protobuf/src/google/protobuf/_virtual_includes/protobuf_lite/google/protobuf/arena.h:179:3: note: 'CreateMessage' has been explicitly marked deprecated here
  179 |   ABSL_DEPRECATED("Use Create")
      |   ^
external/com_google_absl/absl/base/attributes.h:683:49: note: expanded from macro 'ABSL_DEPRECATED'
  683 | #define ABSL_DEPRECATED(message) __attribute__((deprecated(message)))
      |                                                 ^
test/cpp/end2end/message_allocator_end2end_test.cc:332:38: error: 'CreateMessage' is deprecated: Use Create [clang-diagnostic-deprecated-declarations,-warnings-as-errors]
  332 |             google::protobuf::Arena::CreateMessage(&arena_));
      |                                      ^
bazel-out/k8-fastbuild/bin/external/com_google_protobuf/src/google/protobuf/_virtual_includes/protobuf_lite/google/protobuf/arena.h:179:3: note: 'CreateMessage' has been explicitly marked deprecated here
  179 |   ABSL_DEPRECATED("Use Create")
      |   ^
external/com_google_absl/absl/base/attributes.h:683:49: note: expanded from macro 'ABSL_DEPRECATED'
  683 | #define ABSL_DEPRECATED(message) __attribute__((deprecated(message)))
      |                         

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants