xuwei-k / grpc-scala-sample

translated from grpc java examples with ScalaPB
BSD 3-Clause "New" or "Revised" License
65 stars 25 forks source link

Instructions how to run client and server #12

Open chibby0ne opened 3 years ago

chibby0ne commented 3 years ago

First of all, thank you for creating this repo. It has really helped me understand the usage of scala in grpc applications.

Nevertheless I've been struggling to get the HelloWorldServer and the HelloWorldClient to run. Although admittedly I'm a scala newbie, I think this repository would benefit with a description on how to do that, just like it is done in the case of the grpc-java examples: https://github.com/grpc/grpc-java/tree/master/examples#-to-build-the-examples.

I also tried running them in the interceptor branch but couldn't.

I tried running:

Even though show compiledMainClasses finds these: io.grpc.examples.helloworld.HelloWorldServer and io.grpc.examples.helloworld.HelloWorldClient

Could you shed some light? Thanks in advance!

SethTisue commented 2 years ago

there are two subprojects, grpcJavaSample and grpcScalaSample

so I would expect grpcScalaSample/run to work

but when I try it I get a ton of compilation errors, starting with:

[error] /Users/tisue/grpc-scala-sample/grpc-scala/src/main/scala/io/grpc/examples/helloworld/HelloWorldClient.scala:37:36: object helloworld is not a member of package io.grpc.examples.helloworld
[error] import io.grpc.examples.helloworld.helloworld.{HelloRequest, GreeterGrpc}
[error]                                    ^
SethTisue commented 2 years ago

in build.sbt I see:

in the build.sbt I see some stuff like

  val os = if (scala.util.Properties.isMac){
    "osx-x86_64"

I'm on an M1 Mac (not x86), so perhaps that's the problem.

SethTisue commented 2 years ago

@xuwei-k I see you committed to this repo 5 days ago, after a long hiatus. Are you working on bringing it up to date?