Repository navigation
Restore Protobuf 3 runtime for cel-generated-pb3 - #1047
Merged
Merged
Conversation
A previous dependency update (projectnessie#847) moved the `protobuf3` version to a Protobuf 4.x release, so `cel-generated-pb3` has been generated and published against Protobuf 4 instead of Protobuf 3. Constrain `protobuf3` to `[3.25, 4[` (preferring 3.25.9) and use it for both the `protobuf-java` dependency and `protoc` of `cel-generated-pb3`. The Quarkus BOM manages Protobuf 4, which conflicts with that constraint, so `quarkus-smoke-core-pb3-jackson3` excludes `protobuf-java` from it.
With a Protobuf 3 runtime, the generated message field accessors look up methods such as `Int32Value.Builder.getValue()` reflectively. Native images failed with `Generated message class "com.google.protobuf.Int32Value$Builder" missing method "getValue"`, because only the well-known type messages, not their builders, were registered for reflection. This was not noticed before because `cel-generated-pb3` was built against Protobuf 4 when the native smoke tests were added.
snazy
force-pushed
the
fix-pb3-protobuf3
branch
from
November 28, 2026 10:14
a2d450c to
aac6fe7
Compare
XN137
reviewed
Dec 1, 2026
XN137
approved these changes
Dec 1, 2026
| import org.projectnessie.cel.types.jackson.JacksonRegistry; | ||
|
|
||
| public class MyClass {} No newline at end of file | ||
| public class MyClass { |
Contributor
There was a problem hiding this comment.
nit: if we want the shared round-trip to catch another upgrade that moves both protoc and protobuf-java to 4, we could pass in the expected variant and check for com.google.protobuf.RuntimeVersion. Protobuf 4.36.2 exposes MAJOR, MINOR, and PATCH through that class, and 3.25.9 lacks it. A presence check would distinguish the two runtimes used here.
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.
A previous dependency update (#847) moved the
protobuf3version to a Protobuf 4.x release, socel-generated-pb3has been generated and published against Protobuf 4 instead of Protobuf 3.Constrain
protobuf3to[3.25, 4[(preferring 3.25.9) and use it for both theprotobuf-javadependency andprotocofcel-generated-pb3.The Quarkus BOM manages Protobuf 4, which conflicts with that constraint, so
quarkus-smoke-core-pb3-jackson3excludesprotobuf-javafrom it.Also register well-known type builders for native-image reflection:
With a Protobuf 3 runtime, the generated message field accessors look up methods such as
Int32Value.Builder.getValue()reflectively.Native images failed with
Generated message class "com.google.protobuf.Int32Value$Builder" missing method "getValue", because only the well-known type messages, not their builders, were registered for reflection.This was not noticed before because
cel-generated-pb3was built against Protobuf 4 when the native smoke tests were added.