Skip to content

feat: Add Protobuf log handler, improve CI toolchain, and enhance code generation#155

Open
Kybxd wants to merge 4 commits intomasterfrom
csharp-custom-conf
Open

feat: Add Protobuf log handler, improve CI toolchain, and enhance code generation#155
Kybxd wants to merge 4 commits intomasterfrom
csharp-custom-conf

Conversation

@Kybxd
Copy link
Copy Markdown
Collaborator

@Kybxd Kybxd commented Mar 17, 2026

Summary

This MR introduces Protobuf log handler support with cross-version compatibility, improves CI build toolchain, and enhances C++ code generation quality.

Changes

Protobuf Log Handler (61b3b7f)

  • Add custom Protobuf log handler (ProtobufLogHandler) and ABSL log sink (ProtobufAbslLogSink) with version-based guards (TABLEAU_PB_LOG_LEGACY)
  • Unify log level/filename/line/message access via TABLEAU_PB_LOG_* macros for cross-version compatibility
  • Convert multiple const std::string& parameters to const std::string for better string handling
  • Remove unused Protobuf log handler related code

CI & Build Toolchain (57049b3)

  • Fix Clang-GCC toolchain libstdc++ linking issue in CMakeLists.txt
  • Unify matrix-driven Go setup and init script handling across CI workflows
  • Enforce C++17 standard and simplify build setup
  • Downgrade and align protobuf/protoc setup across platforms

Code Generation Style (2f9e33e)

  • Add // clang-format off comment to all generated .pc.cc and .pc.h files
  • Update code generator (helper.go) to emit the directive automatically

C# Testing (7823b62)

  • Add CustomItemConf class for C# testing

@Kybxd Kybxd force-pushed the csharp-custom-conf branch 2 times, most recently from 0cd8232 to 142ffcb Compare March 25, 2026 08:54
@Kybxd Kybxd requested a review from wenchy March 25, 2026 09:05
@Kybxd Kybxd changed the title feat: add CustomItemConf class for C# feat: add C# custom conf example, improve cpp protobuf compatibility, and update test workflows Mar 25, 2026
@Kybxd Kybxd force-pushed the csharp-custom-conf branch 7 times, most recently from 81ee4bb to 8bb4bde Compare March 26, 2026 02:44
@Kybxd Kybxd changed the title feat: add C# custom conf example, improve cpp protobuf compatibility, and update test workflows feat: Add Protobuf log handler, improve CI toolchain, and enhance code generation Mar 26, 2026
std::shared_ptr<const MessagerOptions> options /* = nullptr*/) {
options = options ? options : std::make_shared<MessagerOptions>();
const std::string& name = msg.GetDescriptor()->name();
const std::string name(msg.GetDescriptor()->name());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should add comment:

For compatibility, the new protobuf API returned std::string_view type, so here must casting it to std::string.


- name: Install Protoc
uses: arduino/setup-protoc@v3
uses: arduino/setup-protoc@v1
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please use v3 instead (AI is missing this case).

static void Main(string[] _)
{
Tableau.Registry.Init();
Tableau.Registry.Register<Custom.CustomItemConf>();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Call the GetSpecialItemName and check it for expected.

Kybxd added 4 commits March 30, 2026 21:42
- Update C# testing workflow to use arduino/setup-protoc for Protoc installation
- Convert multiple const std::string& to const std::string for better string handling
- Remove unused Protobuf log handler related code

feat: Add custom Protobuf log handler when ABSL is absent

refactor: Switch to version-based Protobuf log handler guards
refactor: Unify matrix-driven Go setup across CI workflows

ci: Unify init script handling across platforms

chore: Enforce C++17 and simplify build setup

chore: Downgrade Protoc and add CMake policy in CI workflows

chore: Downgrade setup-protoc & simplify init scripts

chore: Update Protoc version format to include 'v' prefix

chore: Align protobuf paths and downgrade setup-protoc

chore: Unify protobuf setup across OSes in CI
@Kybxd Kybxd force-pushed the csharp-custom-conf branch from 3b45253 to 60c4dd1 Compare March 30, 2026 13:42
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.

2 participants