Skip to content

Commit

Permalink
fix: Downgrade Protobuf from 4.x to 3.x
Browse files Browse the repository at this point in the history
Motivation:

- grpc-java is not fully compatible with Protobuf 4; see: grpc/grpc-java#11015
- Protobuf 4 breaks our demo server due to an incompatibility between the generated code and what the grpc-java library expects.

Modifications:

- Downgrade to Protobuf 3 on all projects.
- Prevent upgrade to Protobuf 4 in dependabot.yml (note: scala-steward doesn't seem to pick up Protobuf updates anyway, probably because it's not configured as a library dependency per se).

Result:

Stick to Protobuf 3 for now.
  • Loading branch information
guilgaly committed Mar 26, 2024
1 parent 1e5e4ff commit 92de014
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@ updates:
schedule:
interval: "weekly"
day: "sunday"
ignore:
- dependency-name: "com.google.protobuf:protoc"
versions: ['>= 4'] # https://github.com/grpc/grpc-java/issues/11015
- package-ecosystem: "maven"
directory: "/java/maven"
commit-message:
prefix: "chore"
schedule:
interval: "weekly"
day: "sunday"
ignore:
- dependency-name: "com.google.protobuf:protoc"
versions: ['>= 4'] # https://github.com/grpc/grpc-java/issues/11015
- package-ecosystem: "gradle"
directory: "/kotlin/gradle"
commit-message:
Expand All @@ -25,13 +31,19 @@ updates:
schedule:
interval: "weekly"
day: "sunday"
ignore:
- dependency-name: "com.google.protobuf:protoc"
versions: ['>= 4'] # https://github.com/grpc/grpc-java/issues/11015
- package-ecosystem: "maven"
directory: "/kotlin/maven"
commit-message:
prefix: "chore"
schedule:
interval: "weekly"
day: "sunday"
ignore:
- dependency-name: "com.google.protobuf:protoc"
versions: ['>= 4'] # https://github.com/grpc/grpc-java/issues/11015
- package-ecosystem: "gradle"
directory: "/server"
commit-message:
Expand All @@ -43,3 +55,6 @@ updates:
schedule:
interval: "weekly"
day: "sunday"
ignore:
- dependency-name: "com.google.protobuf:protoc"
versions: ['>= 4'] # https://github.com/grpc/grpc-java/issues/11015
2 changes: 1 addition & 1 deletion java/gradle/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ sourceSets {

protobuf {
protoc {
artifact = "com.google.protobuf:protoc:4.26.0"
artifact = "com.google.protobuf:protoc:3.25.3"
}
plugins {
grpc {
Expand Down
2 changes: 1 addition & 1 deletion java/maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<gatling-maven-plugin.version>4.8.2</gatling-maven-plugin.version>
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
<maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
<protobuf.version>3.24.2</protobuf.version>
<protobuf.version>3.25.3</protobuf.version>
<protobuf-maven-plugin.version>0.6.1</protobuf-maven-plugin.version>
<protoc-gen-grpc-java.version>1.57.2</protoc-gen-grpc-java.version>
<spotless.version>2.43.0</spotless.version>
Expand Down
2 changes: 1 addition & 1 deletion kotlin/maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
<maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
<maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
<protobuf.version>4.26.0</protobuf.version>
<protobuf.version>3.25.3</protobuf.version>
<protobuf-maven-plugin.version>0.6.1</protobuf-maven-plugin.version>
<protoc-gen-grpc-java.version>1.57.2</protoc-gen-grpc-java.version>
<spotless.version>2.43.0</spotless.version>
Expand Down
2 changes: 1 addition & 1 deletion server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ idea {

protobuf {
protoc {
artifact = "com.google.protobuf:protoc:4.26.0"
artifact = "com.google.protobuf:protoc:3.25.3"
}
plugins {
grpc {
Expand Down

0 comments on commit 92de014

Please sign in to comment.