From 92de014466236119765f9eda835414df822833b4 Mon Sep 17 00:00:00 2001 From: Guillaume Galy Date: Tue, 26 Mar 2024 08:15:28 +0100 Subject: [PATCH] fix: Downgrade Protobuf from 4.x to 3.x Motivation: - grpc-java is not fully compatible with Protobuf 4; see: https://github.com/grpc/grpc-java/issues/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. --- .github/dependabot.yml | 15 +++++++++++++++ java/gradle/build.gradle | 2 +- java/maven/pom.xml | 2 +- kotlin/maven/pom.xml | 2 +- server/build.gradle | 2 +- 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 4e8165f..a96d073 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,6 +7,9 @@ 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: @@ -14,6 +17,9 @@ 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: "gradle" directory: "/kotlin/gradle" commit-message: @@ -25,6 +31,9 @@ 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: @@ -32,6 +41,9 @@ 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: "gradle" directory: "/server" commit-message: @@ -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 diff --git a/java/gradle/build.gradle b/java/gradle/build.gradle index 3dc56f9..928749c 100644 --- a/java/gradle/build.gradle +++ b/java/gradle/build.gradle @@ -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 { diff --git a/java/maven/pom.xml b/java/maven/pom.xml index f2844b0..5580ba9 100644 --- a/java/maven/pom.xml +++ b/java/maven/pom.xml @@ -19,7 +19,7 @@ 4.8.2 3.13.0 3.3.0 - 3.24.2 + 3.25.3 0.6.1 1.57.2 2.43.0 diff --git a/kotlin/maven/pom.xml b/kotlin/maven/pom.xml index e10b314..d8bebc2 100644 --- a/kotlin/maven/pom.xml +++ b/kotlin/maven/pom.xml @@ -21,7 +21,7 @@ 3.13.0 3.3.0 3.3.1 - 4.26.0 + 3.25.3 0.6.1 1.57.2 2.43.0 diff --git a/server/build.gradle b/server/build.gradle index 1285347..9b11794 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -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 {