Skip to content

Commit

Permalink
akka to pekko naming (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjfanning authored Dec 26, 2023
1 parent 513a1c3 commit 42efa01
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
8 changes: 4 additions & 4 deletions plugin-tester-scala/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 42efa01

Please sign in to comment.