Skip to content

[CELEBORN-2266] Modernize Protobuf CMake usage and add install rules#3602

Open
jaystarshot wants to merge 2 commits intoapache:mainfrom
jaystarshot:u-c
Open

[CELEBORN-2266] Modernize Protobuf CMake usage and add install rules#3602
jaystarshot wants to merge 2 commits intoapache:mainfrom
jaystarshot:u-c

Conversation

@jaystarshot
Copy link

What changes were proposed in this pull request?

  • Switched Protobuf CMake integration from the legacy FindProtobuf module to modern CONFIG mode with imported targets (protobuf::protoc, protobuf::libprotobuf).

  • Added install() rules for public headers, generated proto headers, and static libraries so the C++ client can be consumed as an installed package.

  • Added missing #include in CelebornUtils.h.

Why are the changes needed?

The legacy FindProtobuf module-variable style (${PROTOBUF_LIBRARY}, bare protoc command) is fragile and does not work reliably with package managers like vcpkg or Conan that provide Protobuf via CMake config files. Switching to CONFIG mode and imported targets is the modern CMake best practice and ensures the correct protoc binary and library are used regardless of the build environment.

The install rules are needed so that downstream projects can consume the Celeborn C++ client from a clean install prefix rather than pointing directly at the source and build trees.

The missing include was causing compilation failures in certain toolchain configurations where the header was not transitively included.

Does this PR resolve a correctness bug?

Does this PR introduce any user-facing change?

How was this patch tested?

@afterincomparableyum
Copy link

Thanks for the PR, I will take a look soon @jaystarshot

Copy link

@afterincomparableyum afterincomparableyum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR lgtm, thanks for the improvements. Repo maintainers will trigger CI for this and give comments accordingly

#include <google/protobuf/io/coded_stream.h>
#include <charconv>
#include <chrono>
#include <set>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch on the transitive dependency 👍

@jaystarshot
Copy link
Author

jaystarshot commented Feb 15, 2026

@afterincomparableyum Thanks for the quick review! Just curious are you using the C++ client in production, or is it still primarily a WIP? The README mentions it's WIP. I'm starting to explore it for a POC use case.

@afterincomparableyum
Copy link

@jaystarshot , @HolyLow and I are still working on C++ client. I have a few more PRs to open/wrap up once my current ones get merged.

Copy link

@afterincomparableyum afterincomparableyum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please failing C++ CI @jaystarshot

@SteNicholas
Copy link
Member

SteNicholas commented Feb 16, 2026

@jaystarshot, thanks for great contribution. Could you create new Jira ticket for this which refers to #1053? I have run the CI for you.

@jaystarshot
Copy link
Author

Will do are is the CI flaky? The cpp changes shouldn't affect those i think

@SteNicholas
Copy link
Member

@jaystarshot, the failure of CI is not related with the changes of this pull request. You just create jira ticket for this pull request.

@jaystarshot jaystarshot changed the title [CPP] Modernize Protobuf CMake usage and add install rules [CELEBORN-2266] Modernize Protobuf CMake usage and add install rules Feb 17, 2026
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.

3 participants