From 42efa0167fa4c6a3dc8a6e391a0913209f25a341 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Tue, 26 Dec 2023 16:40:50 +0100 Subject: [PATCH] akka to pekko naming (#202) --- .../pekko/grpc/gen/javadsl/JavaClientCodeGenerator.scala | 2 +- .../grpc/gen/scaladsl/ScalaClientCodeGenerator.scala | 2 +- plugin-tester-scala/README.md | 8 ++++---- .../myapp/helloworld/AuthenticatedGreeterClient.scala | 2 +- .../scala/example/myapp/helloworld/GreeterClient.scala | 2 +- .../helloworld/LoggingErrorHandlingGreeterClient.scala | 2 +- .../scala/org/apache/pekko/grpc/GrpcClientSettings.scala | 8 ++++---- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/codegen/src/main/scala/org/apache/pekko/grpc/gen/javadsl/JavaClientCodeGenerator.scala b/codegen/src/main/scala/org/apache/pekko/grpc/gen/javadsl/JavaClientCodeGenerator.scala index 2fe48f5b1..532334bcf 100644 --- a/codegen/src/main/scala/org/apache/pekko/grpc/gen/javadsl/JavaClientCodeGenerator.scala +++ b/codegen/src/main/scala/org/apache/pekko/grpc/gen/javadsl/JavaClientCodeGenerator.scala @@ -51,7 +51,7 @@ trait JavaClientCodeGenerator extends JavaCodeGenerator { BuildInfo.organization, BuildInfo.runtimeArtifactName + "_" + scalaBinaryVersion.prefix, BuildInfo.version), - // TODO: remove grpc-stub dependency once we have a akka-http based client #193 + // TODO: remove grpc-stub dependency once we have a pekko-http based client #193 Artifact("io.grpc", "grpc-stub", BuildInfo.grpcVersion)) } diff --git a/codegen/src/main/scala/org/apache/pekko/grpc/gen/scaladsl/ScalaClientCodeGenerator.scala b/codegen/src/main/scala/org/apache/pekko/grpc/gen/scaladsl/ScalaClientCodeGenerator.scala index 678bb3672..06c526348 100644 --- a/codegen/src/main/scala/org/apache/pekko/grpc/gen/scaladsl/ScalaClientCodeGenerator.scala +++ b/codegen/src/main/scala/org/apache/pekko/grpc/gen/scaladsl/ScalaClientCodeGenerator.scala @@ -33,7 +33,7 @@ trait ScalaClientCodeGenerator extends ScalaCodeGenerator { } override val suggestedDependencies = (scalaBinaryVersion: CodeGenerator.ScalaBinaryVersion) => - // TODO: remove grpc-stub dependency once we have a akka-http based client #193 + // TODO: remove grpc-stub dependency once we have a pekko-http based client #193 Artifact("io.grpc", "grpc-stub", BuildInfo.grpcVersion) +: super.suggestedDependencies(scalaBinaryVersion) } diff --git a/plugin-tester-scala/README.md b/plugin-tester-scala/README.md index 552751bc2..d339c0e2f 100644 --- a/plugin-tester-scala/README.md +++ b/plugin-tester-scala/README.md @@ -9,11 +9,11 @@ The version must either be published to Gradle plugin portal or to local maven ( $ ./gradlew clean test -Dpekko.grpc.project.version=1.0.0 ``` -## Use different versions of Gradle plugin and akka grpc libraries. +## Use different versions of Gradle plugin and pekko grpc libraries. -Sometimes, it may be required to only tests changes in plugin itself, without publishing a new version of akka grpc libraries to repository. -There's additional parameter for this that may override akka grpc libraries used by plugin. -Libraries must be published to akka grpc release or snapshot repo. +Sometimes, it may be required to only tests changes in plugin itself, without publishing a new version of pekko grpc libraries to repository. +There's additional parameter for this that may override pekko grpc libraries used by plugin. +Libraries must be published to pekko grpc release or snapshot repo. [source,sh] ```shell script diff --git a/plugin-tester-scala/src/main/scala/example/myapp/helloworld/AuthenticatedGreeterClient.scala b/plugin-tester-scala/src/main/scala/example/myapp/helloworld/AuthenticatedGreeterClient.scala index 5156238f4..86b45ea92 100644 --- a/plugin-tester-scala/src/main/scala/example/myapp/helloworld/AuthenticatedGreeterClient.scala +++ b/plugin-tester-scala/src/main/scala/example/myapp/helloworld/AuthenticatedGreeterClient.scala @@ -22,7 +22,7 @@ import scala.concurrent.duration._ object AuthenticatedGreeterClient { def main(args: Array[String]): Unit = { - // Boot akka + // Boot pekko implicit val sys: ActorSystem = ActorSystem("HelloWorldClient") // Take details how to connect to the service from the config. diff --git a/plugin-tester-scala/src/main/scala/example/myapp/helloworld/GreeterClient.scala b/plugin-tester-scala/src/main/scala/example/myapp/helloworld/GreeterClient.scala index 38f2321f8..5495dbfac 100644 --- a/plugin-tester-scala/src/main/scala/example/myapp/helloworld/GreeterClient.scala +++ b/plugin-tester-scala/src/main/scala/example/myapp/helloworld/GreeterClient.scala @@ -27,7 +27,7 @@ import scala.util.{ Failure, Success } object GreeterClient { def main(args: Array[String]): Unit = { - // Boot akka + // Boot pekko implicit val sys: ActorSystem = ActorSystem("HelloWorldClient") implicit val ec: ExecutionContext = sys.dispatcher diff --git a/plugin-tester-scala/src/main/scala/example/myapp/helloworld/LoggingErrorHandlingGreeterClient.scala b/plugin-tester-scala/src/main/scala/example/myapp/helloworld/LoggingErrorHandlingGreeterClient.scala index 18b2a6e3e..b7fbbdde6 100644 --- a/plugin-tester-scala/src/main/scala/example/myapp/helloworld/LoggingErrorHandlingGreeterClient.scala +++ b/plugin-tester-scala/src/main/scala/example/myapp/helloworld/LoggingErrorHandlingGreeterClient.scala @@ -22,7 +22,7 @@ import scala.concurrent.duration._ object LoggingErrorHandlingGreeterClient { def main(args: Array[String]): Unit = { - // Boot akka + // Boot pekko implicit val sys = ActorSystem("LoggingErrorHandlingGreeterClient") // Take details how to connect to the service from the config. diff --git a/runtime/src/main/scala/org/apache/pekko/grpc/GrpcClientSettings.scala b/runtime/src/main/scala/org/apache/pekko/grpc/GrpcClientSettings.scala index c8b30e953..11c6eef18 100644 --- a/runtime/src/main/scala/org/apache/pekko/grpc/GrpcClientSettings.scala +++ b/runtime/src/main/scala/org/apache/pekko/grpc/GrpcClientSettings.scala @@ -57,14 +57,14 @@ object GrpcClientSettings { */ def fromConfig(clientName: String)(implicit actorSystem: ClassicActorSystemProvider): GrpcClientSettings = { val system = actorSystem.classicSystem - val akkaGrpcClientConfig = system.settings.config.getConfig("pekko.grpc.client") + val pekkoGrpcClientConfig = system.settings.config.getConfig("pekko.grpc.client") val clientConfig = { // Use config named "*" by default - val defaultServiceConfig = akkaGrpcClientConfig.getConfig("\"*\"") + val defaultServiceConfig = pekkoGrpcClientConfig.getConfig("\"*\"") require( - akkaGrpcClientConfig.hasPath(s""""$clientName""""), + pekkoGrpcClientConfig.hasPath(s""""$clientName""""), s"Config path `pekko.grpc.client.$clientName` does not exist") - akkaGrpcClientConfig.getConfig(s""""$clientName"""").withFallback(defaultServiceConfig) + pekkoGrpcClientConfig.getConfig(s""""$clientName"""").withFallback(defaultServiceConfig) } GrpcClientSettings.fromConfig(clientConfig)