Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pekko-http compilation issue - overloaded method value methodName with alternatives #381

Open
mozhiyini opened this issue Nov 30, 2023 · 2 comments

Comments

@mozhiyini
Copy link

No description provided.

@mozhiyini
Copy link
Author

[info] compiling 2 Scala sources to D:\Scala\Turnstile-Service\grpc-service\target\scala-2.12\classes ...
[error] D:\Scala\Turnstile-Service\http-to-grpc\src\main\scala\com\example\helloworld\TurnstileClientToGrpc.scala:31:59: overloaded method value verifyQRCode with alternatives:
[error] ()org.apache.pekko.grpc.scaladsl.StreamResponseRequestBuilder[org.apache.pekko.stream.scaladsl.Source[ai.exaleap.hrdp.services.permissioncontrol.grpc.VerifyQRCodeRequest,org.apache.pekko.NotUsed],ai.exaleap.hrdp.services.permissioncontrol.grpc.VerifyQRCodeResponse]
[error] (in: org.apache.pekko.stream.scaladsl.Source[ai.exaleap.hrdp.services.permissioncontrol.grpc.VerifyQRCodeRequest,org.apache.pekko.NotUsed])org.apache.pekko.stream.scaladsl.Source[ai.exaleap.hrdp.services.permissioncontrol.grpc.VerifyQRCodeResponse,org.apache.pekko.NotUsed]
[error] cannot be applied to (ai.exaleap.hrdp.services.permissioncontrol.grpc.VerifyQRCodeRequest)
[error] val response: Future[VerifyQRCodeResponse] = client.verifyQRCode(VerifyQRCodeRequest(qrcode = Option{"fdsfd dfsdf"}))
[error] ^
[error] D:\Scala\Turnstile-Service\grpc-service\src\main\scala\com\example\helloworld\CodeServiceImpl.scala:28:7: class CodeServiceImpl needs to be abstract, since:
[error] it has 6 unimplemented members.
[error] /** As seen from class CodeServiceImpl, the missing signatures are as follows.
[error] * For convenience, these are usable as stub implementations.
[error] */
[error] def createCode(in: org.apache.pekko.stream.scaladsl.Source[ai.exaleap.hrdp.services.permissioncontrol.grpc.CreateCodeRequest,org.apache.pekko.NotUsed]): org.apache.pekko.stream.scaladsl.Source[ai.exaleap.hrdp.services.permissioncontrol.grpc.CreateCodeResponse,org.apache.pekko.NotUsed] =
???
[error] def createScrambledCode(in: org.apache.pekko.stream.scaladsl.Source[ai.exaleap.hrdp.services.permissioncontrol.grpc.CreateScrambledCodeRequest,org.apache.pekko.NotUsed]): org.apache.pekko.stream.scaladsl.Source[ai.exaleap.hrdp.services.permissioncontrol.grpc.CreateScrambledCodeResponse,org.apache.pekko.NotUsed] = ???
[error] def deleteCode(in: org.apache.pekko.stream.scaladsl.Source[ai.exaleap.hrdp.services.permissioncontrol.grpc.DeleteCodeRequest,org.apache.pekko.NotUsed]): org.apache.pekko.stream.scaladsl.Source[ai.exaleap.hrdp.services.permissioncontrol.grpc.DeleteCodeResponse,org.apache.pekko.NotUsed] =
???
[error] def getCode(in: org.apache.pekko.stream.scaladsl.Source[ai.exaleap.hrdp.services.permissioncontrol.grpc.GetCodeRequest,org.apache.pekko.NotUsed]): org.apache.pekko.stream.scaladsl.Source[ai.exaleap.hrdp.services.permissioncontrol.grpc.GetCodeResponse,org.apache.pekko.NotUsed] = ???
[error] def verifyCode(in: org.apache.pekko.stream.scaladsl.Source[ai.exaleap.hrdp.services.permissioncontrol.grpc.VerifyCodeRequest,org.apache.pekko.NotUsed]): org.apache.pekko.stream.scaladsl.Source[ai.exaleap.hrdp.services.permissioncontrol.grpc.VerifyCodeResponse,org.apache.pekko.NotUsed] =
???
[error] def verifyQRCode(in: org.apache.pekko.stream.scaladsl.Source[ai.exaleap.hrdp.services.permissioncontrol.grpc.VerifyQRCodeRequest,org.apache.pekko.NotUsed]): org.apache.pekko.stream.scaladsl.Source[ai.exaleap.hrdp.services.permissioncontrol.grpc.VerifyQRCodeResponse,org.apache.pekko.NotUsed] = ???
[error] class CodeServiceImpl(materializer: Materializer, log: LoggingAdapter) extends CodeService {
[error] ^
[error] D:\Scala\Turnstile-Service\grpc-service\src\main\scala\com\example\helloworld\CodeServiceImpl.scala:45:16: method createCode overrides nothing.
[error] Note: the super classes of class CodeServiceImpl contain the following, non final members named createCode:
[error] def createCode(in: org.apache.pekko.stream.scaladsl.Source[ai.exaleap.hrdp.services.permissioncontrol.grpc.CreateCodeRequest,org.apache.pekko.NotUsed]): org.apache.pekko.stream.scaladsl.Source[ai.exaleap.hrdp.services.permissioncontrol.grpc.CreateCodeResponse,org.apache.pekko.NotUsed]
[error] override def createCode(request: CreateCodeRequest): Future[CreateCodeResponse] = {
[error] ^
[error] D:\Scala\Turnstile-Service\grpc-service\src\main\scala\com\example\helloworld\CodeServiceImpl.scala:50:16: method getCode overrides nothing.
[error] Note: the super classes of class CodeServiceImpl contain the following, non final members named getCode:
[error] def getCode(in: org.apache.pekko.stream.scaladsl.Source[ai.exaleap.hrdp.services.permissioncontrol.grpc.GetCodeRequest,org.apache.pekko.NotUsed]): org.apache.pekko.stream.scaladsl.Source[ai.exaleap.hrdp.services.permissioncontrol.grpc.GetCodeResponse,org.apache.pekko.NotUsed]
[error] override def getCode(request: GetCodeRequest): Future[GetCodeResponse] = {
[error] ^
[error] D:\Scala\Turnstile-Service\grpc-service\src\main\scala\com\example\helloworld\CodeServiceImpl.scala:54:16: method deleteCode overrides nothing.
[error] Note: the super classes of class CodeServiceImpl contain the following, non final members named deleteCode:
[error] def deleteCode(in: org.apache.pekko.stream.scaladsl.Source[ai.exaleap.hrdp.services.permissioncontrol.grpc.DeleteCodeRequest,org.apache.pekko.NotUsed]): org.apache.pekko.stream.scaladsl.Source[ai.exaleap.hrdp.services.permissioncontrol.grpc.DeleteCodeResponse,org.apache.pekko.NotUsed]
[error] override def deleteCode(request: DeleteCodeRequest): Future[DeleteCodeResponse] = {
[error] ^
[error] D:\Scala\Turnstile-Service\grpc-service\src\main\scala\com\example\helloworld\CodeServiceImpl.scala:58:16: method verifyCode overrides nothing.
[error] Note: the super classes of class CodeServiceImpl contain the following, non final members named verifyCode:
[error] def verifyCode(in: org.apache.pekko.stream.scaladsl.Source[ai.exaleap.hrdp.services.permissioncontrol.grpc.VerifyCodeRequest,org.apache.pekko.NotUsed]): org.apache.pekko.stream.scaladsl.Source[ai.exaleap.hrdp.services.permissioncontrol.grpc.VerifyCodeResponse,org.apache.pekko.NotUsed]
[error] override def verifyCode(request: VerifyCodeRequest): Future[VerifyCodeResponse] = {
[error] ^
[error] D:\Scala\Turnstile-Service\grpc-service\src\main\scala\com\example\helloworld\CodeServiceImpl.scala:62:16: method verifyQRCode overrides nothing.
[error] Note: the super classes of class CodeServiceImpl contain the following, non final members named verifyQRCode:
[error] def verifyQRCode(in: org.apache.pekko.stream.scaladsl.Source[ai.exaleap.hrdp.services.permissioncontrol.grpc.VerifyQRCodeRequest,org.apache.pekko.NotUsed]): org.apache.pekko.stream.scaladsl.Source[ai.exaleap.hrdp.services.permissioncontrol.grpc.VerifyQRCodeResponse,org.apache.pekko.NotUsed]
[error] override def verifyQRCode(request: VerifyQRCodeRequest): Future[VerifyQRCodeResponse] = {
[error] ^
[error] D:\Scala\Turnstile-Service\grpc-service\src\main\scala\com\example\helloworld\CodeServiceImpl.scala:67:16: method createScrambledCode overrides nothing.
[error] Note: the super classes of class CodeServiceImpl contain the following, non final members named createScrambledCode:
[error] def createScrambledCode(in: org.apache.pekko.stream.scaladsl.Source[ai.exaleap.hrdp.services.permissioncontrol.grpc.CreateScrambledCodeRequest,org.apache.pekko.NotUsed]): org.apache.pekko.stream.scaladsl.Source[ai.exaleap.hrdp.services.permissioncontrol.grpc.CreateScrambledCodeResponse,org.apache.pekko.NotUsed]
[error] override def createScrambledCode(request: CreateScrambledCodeRequest): Future[CreateScrambledCodeResponse] = {
[error] ^
[error] 7 errors found
[error] D:\Scala\Turnstile-Service\http-to-grpc\src\main\scala\com\example\helloworld\TurnstileClientToGrpc.scala:41:62: type mismatch;
[error] found : String
[error] required: Option[String]
[error] onComplete(client.verifyQRCode(VerifyQRCodeRequest(qrcode))) {
[error] ^
[error] D:\Scala\Turnstile-Service\http-to-grpc\src\main\scala\com\example\helloworld\TurnstileClientToGrpc.scala:42:51: value Status is not a member of Any
[error] case Success(reply) => complete(reply.Status.status)
[error] ^
[error] three errors found
[error] (httpToGrpc / Compile / compileIncremental) Compilation failed
[error] (grpcService / Compile / compileIncremental) Compilation failed
[error] Total time: 8 s, completed Nov 30, 2023, 3:19:09 PM

@laglangyue
Copy link
Contributor

could you please provide env,such as version of jdk and compile command?

@He-Pin He-Pin transferred this issue from apache/pekko Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants