Skip to content

feat(cpp): Add bazel building and testing infrastructure#2785

Open
slbotbm wants to merge 2 commits intoapache:masterfrom
slbotbm:cpp-infra
Open

feat(cpp): Add bazel building and testing infrastructure#2785
slbotbm wants to merge 2 commits intoapache:masterfrom
slbotbm:cpp-infra

Conversation

@slbotbm
Copy link
Contributor

@slbotbm slbotbm commented Feb 19, 2026

Which issue does this PR close?

Closes #2762

Rationale

What changed?

Adds bazel build system + stub classes and their tests + ci scripts

Local Execution

  • Passed
  • Pre-commit hooks ran

AI Usage

If AI tools were used, please answer:

  1. Which tools? codex
  2. Scope of usage? build system implementation
  3. How did you verify the generated code works correctly? checking on local environment
  4. Can you explain every line of the code if asked? Yes

@codecov
Copy link

codecov bot commented Feb 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.98%. Comparing base (28e7c04) to head (0515a85).
⚠️ Report is 11 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2785      +/-   ##
============================================
- Coverage     68.44%   67.98%   -0.47%     
- Complexity      656      708      +52     
============================================
  Files           852      873      +21     
  Lines         68196    69744    +1548     
  Branches      59657    60433     +776     
============================================
+ Hits          46679    47416     +737     
- Misses        19187    19975     +788     
- Partials       2330     2353      +23     
Flag Coverage Δ
csharp 67.06% <ø> (-0.21%) ⬇️
java 54.02% <ø> (+1.82%) ⬆️
python 0.00% <ø> (?)
rust 69.69% <ø> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 65 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@atharvalade
Copy link
Contributor

Nice work on the infra setup. the CI integration and Bazel config are clean.

Two things to fix before merge though: the Expiry class in iggy.hpp has all its getters (expiry_type(), expiry_value(), value()) under private: unlike the other three classes, so it's completely opaque after construction (and the test can only SUCCEED() without asserting anything). Also, the genrule srcs hard-codes just src/lib.rs as soon as a second .rs file is added, Bazel won't detect changes to it and will serve stale cached builds. Swapping to glob(["src/**/*.rs"]) should fix that.

@slbotbm
Copy link
Contributor Author

slbotbm commented Feb 24, 2026

@atharvalade thanks for the review! those were some things that had been left over from when I was experimenting with the public interface. I've standardized all of the getter functions and corrected the bazel build file as well.

Comment on lines 56 to 57
find "target/$$PROFILE/build" -name lib.rs.h | head -n 1 | xargs -I{} cp {} "$$OUT_RS"
find "target/$$PROFILE/build" -name cxx.h | head -n 1 | xargs -I{} cp {} "$$OUT_CXX"
Copy link
Contributor

Choose a reason for hiding this comment

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

not a fan of this. what if find returns 0 results?
also, find | xargs without -print0/-0 breaks on filenames with spaces

@slbotbm
Copy link
Contributor Author

slbotbm commented Feb 27, 2026

@hubcio Thanks for the review. I'll address the other two comments after thinking about the best approach

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[C++ SDK] Create build system + CI infrastructure

3 participants