feat: support Protobuf Editions (2023/2024) and modernize build toolchain#157
Merged
feat: support Protobuf Editions (2023/2024) and modernize build toolchain#157
Conversation
40a3727 to
a5e0388
Compare
wenchy
requested changes
Apr 2, 2026
| // versions: | ||
| // - protoc-gen-cpp-tableau-loader v0.11.0 | ||
| // - protoc v3.19.3 | ||
| // - protoc v6.32.0 |
Member
There was a problem hiding this comment.
For better compatibilty, keep v3.19.3 for commited source code. the new protoc generated code has more dependencies (e.g.: C++ absl).
We can test the new features with a feature gate option to enable/disable in the plugin params.
Collaborator
Author
There was a problem hiding this comment.
okay, our workflow guarantees the generated code works well with protobuf v32.0.
9eced98 to
d57868a
Compare
chore: Update tableau submodule to fe374083 build: Update Go version to 1.24.x across CI/workflows feat: Add CMake install step for protobuf-config.cmake refactor: Replace string reference with std::string construction chore: Update protoc path to use .build directory chore: Upgrade Protoc and simplify CI workflows ci: Optimize CI protobuf setup and caching feat: Add custom Protobuf log handler when ABSL is absent refactor: Switch to version-based Protobuf log handler guards ci: Support legacy protoc versions in CI matrix chore: Remove protobuf skip-build checks across scripts chore: Unify protobuf setup and CI across platforms build: Set minimum CMake policy version to 3.5 chore: unify and simplify CI matrix configs chore: downgrade protobuf to v3.19.3 and go to 1.23.x Update CI configs and generated files to use protobuf v3.19.3 and Go 1.23.x chore: Downgrade Go to 1.23.x in release workflows
d57868a to
b56f85b
Compare
wenchy
approved these changes
Apr 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to tableauio/tableau#370
Summary
This PR enables Protobuf Editions support across all three code generators
(Go / C++ / C#), upgrades the build toolchain, and makes the protobuf submodule
build pipeline version-aware so that both legacy protobuf
v3.xand modernv4+ / v21+ / v32+releases can be used interchangeably.Motivation
proto2and
proto3. Downstream users moving to Editions-based.protofiles needtheir
protocplugins to advertiseFEATURE_SUPPORTS_EDITIONS, otherwisecode generation fails.
(
cmake/subdirectory, nocmake --installstep). Modern protobuf releasesmoved
CMakeLists.txtto the repo root and rely onprotobuf-config.cmakegenerated via
cmake --install, so our init scripts and downstreamCMakeLists.txtneeded to be updated.google.golang.org/protobufruntime had to be bumped sothat the Editions descriptor APIs (
Edition_EDITION_PROTO2,Edition_EDITION_2024,SupportedEditionsMinimum/Maximum) are available.Changes
Code generators: advertise Editions support
cmd/protoc-gen-go-tableau-loader/main.gocmd/protoc-gen-cpp-tableau-loader/main.gocmd/protoc-gen-csharp-tableau-loader/main.goEach plugin now sets:
Toolchain upgrade
go.mod:go 1.21→go 1.24.0;google.golang.org/protobufv1.34.2→v1.36.11.1.21.x→1.24.x.test/csharp-tableau-loader/Loader.csproj:Google.Protobuf3.19.3→3.32.0.Version-aware protobuf submodule build (
init.sh/init.bat)PROTOBUF_REFenv var to check out any protobuf tag beforebuilding (used by CI to matrix-test multiple protobuf versions).
git describe:cmake/subdirectory with the originalminimal options.
-Dutf8_range_ENABLE_INSTALL=ON.build/to.build/(already in protobuf's.gitignore) to avoid dirtying the submodule working tree.cmake --install .build --prefix .build/_installstep so thatprotobuf-config.cmake,absl-*.cmake, andutf8_range-config.cmakeareemitted for downstream
find_package(Protobuf CONFIG)consumers.Downstream CMake / docs alignment
test/cpp-tableau-loader/CMakeLists.txt: look up protobuf underthird_party/_submodules/protobuf/.build/_install(install tree) instead ofthe old in-source
cmake/buildtree.README.md: update dev instructions on Linux / Windows / C# to reflect thenew
.build/_install/binlayout forprotoc/buf generate.CI: multi-version protobuf matrix
.github/workflows/testing-{go,cpp,csharp}.yml:protobuf-versionmatrix dimension:["32.0", "3.19.3"], so eachPR is validated against both the latest Editions-capable protobuf and the
legacy v3.x line.
PROTOBUF_REF=v${{ matrix.protobuf-version }}into the init scriptso the submodule is checked out at the matching tag before building.
Install Protocinto two steps:arduino/setup-protoc@v3formodern versions, and the legacy
@v1action for the3.xline.protobuf build on Windows.
Compatibility
proto2/proto3users.v3.19.xcan keep doing so —the init scripts detect the version and fall back to the legacy layout.
v32+/ Editions 2023/2024 can now generate loader codewithout hitting
feature not supported: EDITIONSerrors.Testing
{ubuntu-latest, windows-latest} × {protobuf 32.0, protobuf 3.19.3}across Go / C++ / C# suites.
v32.0submodule + Editions-based.protoinputs.