From 9f727084fe854b7adcb90ffecf8952a5c88a1b2e Mon Sep 17 00:00:00 2001 From: counter2015 Date: Wed, 22 Jun 2022 18:26:43 +0800 Subject: [PATCH 1/3] Update dependencies to latest version. --- benchmark-java/build.sbt | 10 +++++----- .../akka/grpc/gradle/AkkaGrpcPluginExtension.groovy | 4 ++-- .../java/akka/grpc/interop/AkkaGrpcServerJava.java | 2 +- maven-plugin/src/main/maven/plugin.xml | 4 ++-- plugin-tester-java/pom.xml | 2 +- plugin-tester-scala/pom.xml | 2 +- project/Dependencies.scala | 8 ++++---- project/plugins.sbt | 2 +- .../scala/akka/grpc/internal/GrpcEntityHelpers.scala | 2 +- .../src/sbt-test/gen-scala-server/00-interop/build.sbt | 2 +- .../gen-scala-server/01-gen-basic-server/build.sbt | 2 +- 11 files changed, 20 insertions(+), 20 deletions(-) diff --git a/benchmark-java/build.sbt b/benchmark-java/build.sbt index f3a4af102..23e15b7ce 100644 --- a/benchmark-java/build.sbt +++ b/benchmark-java/build.sbt @@ -5,7 +5,7 @@ run / javaOptions ++= List("-Xms1g", "-Xmx1g", "-XX:+PrintGCDetails", "-XX:+Prin // generate both client and server (default) in Java akkaGrpcGeneratedLanguages := Seq(AkkaGrpc.Java) -val grpcVersion = "1.46.0" // checked synced by VersionSyncCheckPlugin +val grpcVersion = "1.47.0" // checked synced by VersionSyncCheckPlugin val runtimeProject = ProjectRef(file("../"), "akka-grpc-runtime") @@ -23,10 +23,10 @@ val root = project .settings( libraryDependencies ++= Seq( "io.grpc" % "grpc-testing" % grpcVersion, - "org.hdrhistogram" % "HdrHistogram" % "2.1.10", - "org.apache.commons" % "commons-math3" % "3.6", - "org.scalatest" %% "scalatest" % "3.1.2" % "test", - "org.scalatestplus" %% "junit-4-12" % "3.1.2.0" % "test"), + "org.hdrhistogram" % "HdrHistogram" % "2.1.12", + "org.apache.commons" % "commons-math3" % "3.6.1", + "org.scalatest" %% "scalatest" % "3.2.12" % "test", + "org.scalatestplus" %% "junit-4-12" % "3.2.2.0" % "test"), PB.artifactResolver := PB.artifactResolver.dependsOn(codeGenProject / Compile / publishLocal).value) compile / javacOptions += "-Xlint:deprecation" diff --git a/gradle-plugin/src/main/groovy/akka/grpc/gradle/AkkaGrpcPluginExtension.groovy b/gradle-plugin/src/main/groovy/akka/grpc/gradle/AkkaGrpcPluginExtension.groovy index 0d499ce50..43577d704 100644 --- a/gradle-plugin/src/main/groovy/akka/grpc/gradle/AkkaGrpcPluginExtension.groovy +++ b/gradle-plugin/src/main/groovy/akka/grpc/gradle/AkkaGrpcPluginExtension.groovy @@ -5,11 +5,11 @@ import org.gradle.api.Project class AkkaGrpcPluginExtension { - static final String PROTOC_VERSION = "3.20.1" // checked synced by VersionSyncCheckPlugin + static final String PROTOC_VERSION = "3.21.1" // checked synced by VersionSyncCheckPlugin static final String PROTOC_PLUGIN_SCALA_VERSION = "2.12" - static final String GRPC_VERSION = "1.46.0" // checked synced by VersionSyncCheckPlugin + static final String GRPC_VERSION = "1.47.0" // checked synced by VersionSyncCheckPlugin static final String PLUGIN_CODE = 'com.lightbend.akka.grpc.gradle' diff --git a/interop-tests/src/main/java/akka/grpc/interop/AkkaGrpcServerJava.java b/interop-tests/src/main/java/akka/grpc/interop/AkkaGrpcServerJava.java index c711382e2..05abe1332 100644 --- a/interop-tests/src/main/java/akka/grpc/interop/AkkaGrpcServerJava.java +++ b/interop-tests/src/main/java/akka/grpc/interop/AkkaGrpcServerJava.java @@ -128,7 +128,7 @@ private HttpsConnectionContext serverHttpContext() throws Exception { SSLContext context = SSLContext.getInstance("TLS"); context.init(keyManagerFactory.getKeyManagers(), null, new SecureRandom()); - return HttpsConnectionContext.https(context); + return HttpsConnectionContext.httpsServer(context); } } diff --git a/maven-plugin/src/main/maven/plugin.xml b/maven-plugin/src/main/maven/plugin.xml index 50ede1c14..6866b1e9c 100644 --- a/maven-plugin/src/main/maven/plugin.xml +++ b/maven-plugin/src/main/maven/plugin.xml @@ -94,7 +94,7 @@ ${akka-grpc.protoPaths} ${akka-grpc.outputDirectory} - ${akka-grpc.protoc-version} + ${akka-grpc.protoc-version} @@ -185,7 +185,7 @@ ${akka-grpc.protoPaths} ${akka-grpc.outputDirectory} - ${akka-grpc.protoc-version} + ${akka-grpc.protoc-version} diff --git a/plugin-tester-java/pom.xml b/plugin-tester-java/pom.xml index 365c55869..91276c309 100644 --- a/plugin-tester-java/pom.xml +++ b/plugin-tester-java/pom.xml @@ -16,7 +16,7 @@ 3.1.2 3.0.0 1.1.0 - 1.46.0 + 1.47.0 UTF-8 diff --git a/plugin-tester-scala/pom.xml b/plugin-tester-scala/pom.xml index 7bc0a5b34..d6e90f0e5 100644 --- a/plugin-tester-scala/pom.xml +++ b/plugin-tester-scala/pom.xml @@ -15,7 +15,7 @@ 1.8 2.5.13 0.4.2 - 1.46.0 + 1.47.0 UTF-8 diff --git a/project/Dependencies.scala b/project/Dependencies.scala index ae3eb796d..4d489ddf2 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -16,16 +16,16 @@ object Dependencies { // We don't force Akka updates because downstream projects can upgrade // themselves. For more information see // https://doc.akka.io//docs/akka/current/project/downstream-upgrade-strategy.html - val akka = "2.6.9" + val akka = "2.6.19" val akkaBinary = "2.6" - val akkaHttp = "10.2.8" + val akkaHttp = "10.2.9" val akkaHttpBinary = "10.2" - val grpc = "1.46.0" // checked synced by VersionSyncCheckPlugin + val grpc = "1.47.0" // checked synced by VersionSyncCheckPlugin // Even referenced explicitly in the sbt-plugin's sbt-tests // If changing this, remember to update protoc plugin version to align in // maven-plugin/src/main/maven/plugin.xml and akka.grpc.sbt.AkkaGrpcPlugin - val googleProtobuf = "3.20.1" // checked synced by VersionSyncCheckPlugin + val googleProtobuf = "3.21.1" // checked synced by VersionSyncCheckPlugin val scalaTest = "3.1.4" diff --git a/project/plugins.sbt b/project/plugins.sbt index eb7cce8ea..5cbabe43a 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -30,4 +30,4 @@ libraryDependencies += "org.eclipse.jgit" % "org.eclipse.jgit" % "5.13.0.2021090 // scripted testing libraryDependencies += "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value -libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "0.11.10" +libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "0.11.11" diff --git a/runtime/src/main/scala/akka/grpc/internal/GrpcEntityHelpers.scala b/runtime/src/main/scala/akka/grpc/internal/GrpcEntityHelpers.scala index 714b45449..4b2509929 100644 --- a/runtime/src/main/scala/akka/grpc/internal/GrpcEntityHelpers.scala +++ b/runtime/src/main/scala/akka/grpc/internal/GrpcEntityHelpers.scala @@ -48,7 +48,7 @@ object GrpcEntityHelpers { import scala.annotation.unchecked.uncheckedVariance //A faster implementation of concat that does not allocate so much private def concatCheap[U, Mat2](that: Graph[SourceShape[U], Mat2]): Graph[FlowShape[U @uncheckedVariance, U], Mat2] = - GraphDSL.create(that) { implicit b => r => + GraphDSL.createGraph(that) { implicit b => r => import GraphDSL.Implicits._ val merge = b.add(new Concat[U](2)) r ~> merge.in(1) diff --git a/sbt-plugin/src/sbt-test/gen-scala-server/00-interop/build.sbt b/sbt-plugin/src/sbt-test/gen-scala-server/00-interop/build.sbt index 50122e80a..c4a1f4ee9 100644 --- a/sbt-plugin/src/sbt-test/gen-scala-server/00-interop/build.sbt +++ b/sbt-plugin/src/sbt-test/gen-scala-server/00-interop/build.sbt @@ -6,7 +6,7 @@ resolvers += Resolver.sonatypeRepo("staging") organization := "com.lightbend.akka.grpc" -val grpcVersion = "1.46.0" // checked synced by VersionSyncCheckPlugin +val grpcVersion = "1.47.0" // checked synced by VersionSyncCheckPlugin libraryDependencies ++= Seq( "io.grpc" % "grpc-interop-testing" % grpcVersion % "protobuf-src", diff --git a/sbt-plugin/src/sbt-test/gen-scala-server/01-gen-basic-server/build.sbt b/sbt-plugin/src/sbt-test/gen-scala-server/01-gen-basic-server/build.sbt index ffe2a8b00..018d246ab 100644 --- a/sbt-plugin/src/sbt-test/gen-scala-server/01-gen-basic-server/build.sbt +++ b/sbt-plugin/src/sbt-test/gen-scala-server/01-gen-basic-server/build.sbt @@ -8,7 +8,7 @@ scalacOptions += "-Xfatal-warnings" enablePlugins(AkkaGrpcPlugin) -assemblyMergeStrategy in assembly := { +assembly / assemblyMergeStrategy := { // https://github.com/akka/akka/issues/29456 case PathList("google", "protobuf", _) => MergeStrategy.discard case PathList("google", "protobuf", _, _) => MergeStrategy.discard From c3d22f0a6e106c61a37aed3fc0ba3c18c32a6aa7 Mon Sep 17 00:00:00 2001 From: counter2015 Date: Thu, 23 Jun 2022 10:43:30 +0800 Subject: [PATCH 2/3] Fix gradle CI check. --- plugin-tester-java/build.gradle | 8 ++++---- plugin-tester-scala/build.gradle | 8 ++++---- .../07-gen-basic-server-with-akka-26/build.sbt | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/plugin-tester-java/build.gradle b/plugin-tester-java/build.gradle index 433a98456..56e7ec937 100644 --- a/plugin-tester-java/build.gradle +++ b/plugin-tester-java/build.gradle @@ -19,8 +19,8 @@ def scalaVersion = org.gradle.util.VersionNumber.parse(System.getenv("TRAVIS_SCA def scalaBinaryVersion = "${scalaVersion.major}.${scalaVersion.minor}" dependencies { - implementation group: 'ch.megard', name: "akka-http-cors_${scalaBinaryVersion}", version: '1.1.0' - testImplementation "com.typesafe.akka:akka-stream-testkit_${scalaBinaryVersion}:2.6.9" - testImplementation "org.scalatest:scalatest_${scalaBinaryVersion}:3.1.2" - testImplementation "org.scalatestplus:junit-4-12_${scalaBinaryVersion}:3.1.2.0" + implementation group: 'ch.megard', name: "akka-http-cors_${scalaBinaryVersion}", version: '1.1.3' + testImplementation "com.typesafe.akka:akka-stream-testkit_${scalaBinaryVersion}:2.6.19" + testImplementation "org.scalatest:scalatest_${scalaBinaryVersion}:3.2.12" + testImplementation "org.scalatestplus:junit-4-12_${scalaBinaryVersion}:3.2.2.0" } diff --git a/plugin-tester-scala/build.gradle b/plugin-tester-scala/build.gradle index 8232d6f90..dd539656c 100644 --- a/plugin-tester-scala/build.gradle +++ b/plugin-tester-scala/build.gradle @@ -14,9 +14,9 @@ def scalaVersion = org.gradle.util.VersionNumber.parse(System.getenv("TRAVIS_SCA def scalaBinaryVersion = "${scalaVersion.major}.${scalaVersion.minor}" dependencies { - implementation group: 'ch.megard', name: "akka-http-cors_${scalaBinaryVersion}", version: '1.1.0' - testImplementation "com.typesafe.akka:akka-stream-testkit_${scalaBinaryVersion}:2.6.9" - testImplementation "org.scalatest:scalatest_${scalaBinaryVersion}:3.1.2" - testImplementation "org.scalatestplus:junit-4-12_${scalaBinaryVersion}:3.1.2.0" + implementation group: 'ch.megard', name: "akka-http-cors_${scalaBinaryVersion}", version: '1.1.3' + testImplementation "com.typesafe.akka:akka-stream-testkit_${scalaBinaryVersion}:2.6.19" + testImplementation "org.scalatest:scalatest_${scalaBinaryVersion}:3.2.12" + testImplementation "org.scalatestplus:junit-4-12_${scalaBinaryVersion}:3.2.2.0" } diff --git a/sbt-plugin/src/sbt-test/gen-scala-server/07-gen-basic-server-with-akka-26/build.sbt b/sbt-plugin/src/sbt-test/gen-scala-server/07-gen-basic-server-with-akka-26/build.sbt index 14eecb4a6..7ab61b018 100644 --- a/sbt-plugin/src/sbt-test/gen-scala-server/07-gen-basic-server-with-akka-26/build.sbt +++ b/sbt-plugin/src/sbt-test/gen-scala-server/07-gen-basic-server-with-akka-26/build.sbt @@ -8,7 +8,7 @@ enablePlugins(AkkaGrpcPlugin) dependencyOverrides += "com.typesafe.akka" %% "akka-stream" % "2.6.5" -assemblyMergeStrategy in assembly := { +assembly / assemblyMergeStrategy := { // https://github.com/akka/akka/issues/29456 case PathList("google", "protobuf", _) => MergeStrategy.discard case PathList("google", "protobuf", _, _) => MergeStrategy.discard From 1b8097e2bf8f839f5b07b52779b203d923328446 Mon Sep 17 00:00:00 2001 From: counter2015 Date: Mon, 27 Jun 2022 10:52:05 +0800 Subject: [PATCH 3/3] Downgrade protoc version to 3.20.1 --- .../groovy/akka/grpc/gradle/AkkaGrpcPluginExtension.groovy | 2 +- maven-plugin/src/main/maven/plugin.xml | 4 ++-- project/Dependencies.scala | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gradle-plugin/src/main/groovy/akka/grpc/gradle/AkkaGrpcPluginExtension.groovy b/gradle-plugin/src/main/groovy/akka/grpc/gradle/AkkaGrpcPluginExtension.groovy index 43577d704..22228fcb8 100644 --- a/gradle-plugin/src/main/groovy/akka/grpc/gradle/AkkaGrpcPluginExtension.groovy +++ b/gradle-plugin/src/main/groovy/akka/grpc/gradle/AkkaGrpcPluginExtension.groovy @@ -5,7 +5,7 @@ import org.gradle.api.Project class AkkaGrpcPluginExtension { - static final String PROTOC_VERSION = "3.21.1" // checked synced by VersionSyncCheckPlugin + static final String PROTOC_VERSION = "3.20.1" // checked synced by VersionSyncCheckPlugin static final String PROTOC_PLUGIN_SCALA_VERSION = "2.12" diff --git a/maven-plugin/src/main/maven/plugin.xml b/maven-plugin/src/main/maven/plugin.xml index 6866b1e9c..50ede1c14 100644 --- a/maven-plugin/src/main/maven/plugin.xml +++ b/maven-plugin/src/main/maven/plugin.xml @@ -94,7 +94,7 @@ ${akka-grpc.protoPaths} ${akka-grpc.outputDirectory} - ${akka-grpc.protoc-version} + ${akka-grpc.protoc-version} @@ -185,7 +185,7 @@ ${akka-grpc.protoPaths} ${akka-grpc.outputDirectory} - ${akka-grpc.protoc-version} + ${akka-grpc.protoc-version} diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 4d489ddf2..a9861036d 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -25,7 +25,7 @@ object Dependencies { // Even referenced explicitly in the sbt-plugin's sbt-tests // If changing this, remember to update protoc plugin version to align in // maven-plugin/src/main/maven/plugin.xml and akka.grpc.sbt.AkkaGrpcPlugin - val googleProtobuf = "3.21.1" // checked synced by VersionSyncCheckPlugin + val googleProtobuf = "3.20.1" // checked synced by VersionSyncCheckPlugin val scalaTest = "3.1.4"