lizhimins opened a new pull request, #1257:
URL: https://github.com/apache/rocketmq-clients/pull/1257

   ## Motivation
   
   The C++ client currently has several build system issues:
   1. Proto files are maintained as a local copy, falling behind the shared 
`protos/` submodule by ~76 lines (missing Lite topic, Priority, DLQ support, 
etc.)
   2. CMake build has no unit test support — tests can only run via Bazel
   3. All 16 build warnings (`-Wdeprecated-declarations`) from enum types 
passed to fmt/spdlog are left unresolved
   4. CMakeLists.txt hardcodes `$HOME/grpc` and `$HOME/gflags` paths instead of 
following CMake conventions
   5. CI only runs on ubuntu-22.04 — macOS and Windows are disabled due to 
Bazel compatibility issues 
([bazelbuild/bazel#18592](https://github.com/bazelbuild/bazel/issues/18592))
   
   ## Changes
   
   ### Proto submodule integration
   - Replace local proto copies (`cpp/proto/apache/rocketmq/v2/*.proto`) with 
symlinks to the shared `protos/` submodule
   - Add submodule existence check in CMakeLists.txt with a clear error message
   
   ### CMake improvements
   - Add `BUILD_TESTS` option with googletest support via FetchContent (24 
tests, all passing)
   - Remove hardcoded `$HOME/grpc` and `$HOME/gflags` paths — follow standard 
`CMAKE_PREFIX_PATH` convention
   - Add test CMakeLists.txt for all 7 test directories under `source/`
   
   ### Fix build warnings
   - Add `fmt::formatter` specializations for `rocketmq::State`, 
`grpc::StatusCode`, and `apache::rocketmq::v2::Code` enums
   - Eliminates all 16 `-Wdeprecated-declarations` warnings from fmt 9.x
   - Bonus: log output now shows human-readable strings (e.g., `STARTED`, 
`UNAVAILABLE`) instead of raw numbers
   
   ### CI: restore cross-platform builds
   - Switch CI from Bazel to CMake to unblock macOS and Windows
   - Build matrix: `ubuntu-22.04`, `macos-latest`, `windows-2022` (aligned with 
Java/C#/Rust)
   - Cache gRPC build artifacts per platform to speed up subsequent runs
   
   ### Documentation
   - Rewrite README with complete build instructions (from dependency 
installation to test execution)
   - Remove outdated architecture diagrams
   
   ## Test plan
   
   - [x] CMake build passes with 0 warnings
   - [x] All 24 unit tests pass via `ctest --output-on-failure`
   - [ ] CI passes on ubuntu-22.04, macos-latest, windows-2022


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to