Skip to content

Conversation

@nico-semko
Copy link

Restores backward compatibility with protobuf v3/v4 generated code. This matches the upgrade done in rules_kotlin to address compatibility issues with Kotlin annotation processors like KSP that need to load protobufs generated with both v3 and v4 protoc.

Changes:

  • Updated protobuf Bazel module version from 31.1 to 33.1
  • Updated protobuf-java from 4.31.1 to 4.33.1 in MODULE.bazel (2 locations)
  • Updated protobuf-java-util from 4.31.1 to 4.33.1 in MODULE.bazel (2 locations)
  • Updated protobuf-java from 4.31.1 to 4.33.1 in defs.bzl (2 locations)
  • Updated protobuf-java-util from 4.31.1 to 4.33.1 in defs.bzl (2 locations)
  • Updated bazel worker api protobuf versions from 4.27.2 to 4.33.1 in defs.bzl
  • Added proto_version variable to keep versions synchronized
  • Regenerated Maven pin files for android_ide_common_30_1_3 and rules_android_maven

References:

Related: rules_kotlin : bazelbuild/rules_kotlin#1414 (merged)
bazel-worker-api : bazelbuild/bazel-worker-api#18 - proposal

@nico-semko nico-semko marked this pull request as draft December 15, 2025 19:20
Restores backward compatibility with protobuf v3/v4 generated code.
This matches the upgrade done in rules_kotlin to address compatibility
issues with Kotlin annotation processors like KSP that need to load
protobufs generated with both v3 and v4 protoc.

Changes:
- Updated protobuf Bazel module version from 31.1 to 33.1
- Updated protobuf-java from 4.31.1 to 4.33.1 in MODULE.bazel (2 locations)
- Updated protobuf-java-util from 4.31.1 to 4.33.1 in MODULE.bazel (2 locations)
- Updated protobuf-java from 4.31.1 to 4.33.1 in defs.bzl (2 locations)
- Updated protobuf-java-util from 4.31.1 to 4.33.1 in defs.bzl (2 locations)
- Updated bazel worker api protobuf versions from 4.27.2 to 4.33.1 in defs.bzl
- Added proto_version variable to keep versions synchronized
- Regenerated Maven pin files for android_ide_common_30_1_3 and rules_android_maven

References:
- https://github.com/protocolbuffers/protobuf/releases/tag/v33.1
- https://github.com/protocolbuffers/protobuf/releases/tag/v33.0
- https://protobuf.dev/support/cross-version-runtime-guarantee/#backwards

Related: bazelbuild/rules_kotlin#1414
@nico-semko nico-semko force-pushed the bump-protobuf-to-4.33.1 branch from 49282ba to 85a4907 Compare December 15, 2025 19:22
@nico-semko
Copy link
Author

⚠️ This PR requires bazel_worker_java to be updated to protobuf 4.33.1 first.

The current published version of bazel_worker_java (0.0.4) uses protobuf 31.1, which causes Maven dependency conflicts when both modules contribute to @maven. CI will fail until bazel_worker_java is released with protobuf 4.33.1.

The plan is

  1. Merge and release the bazel_worker_java PR with protobuf 4.33.1 first
  2. Then merge this PR

@@ -0,0 +1,1819 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to pass this lockfiles to maven.install?

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