Closed eiennohito closed 7 years ago
https://travis-ci.org/xuwei-k/grpc-scala-sample/builds/128613018#L644
[error] /home/travis/build/xuwei-k/grpc-scala-sample/grpc-scala/src/main/scala/io/grpc/examples/header/HeaderServerInterceptor.scala:63: Unable to access method sendHeaders in class PartialForwardingServerCall with a super reference.
[error] super.sendHeaders(responseHeaders)
[error] ^
[error] one error found
[error] (grpcScalaSample/compile:compileIncremental) Compilation failed
Oh, that's https://issues.scala-lang.org/browse/SI-7936
What should we do for that?
https://gist.github.com/eiennohito/0b9f20efa976282a6b507e388ba387ca
UsingBCall
from gist instead of SimpleForwardingServerCall
fixes the compilation problem.
Upgrade to grpc 0.14.0 causes this, see branch https://github.com/eiennohito/grpc-scala-sample/tree/si7936_bug
There is a package private class https://github.com/grpc/grpc-java/commits/master/core/src/main/java/io/grpc/PartialForwardingServerCall.java which was added in 0.14.0
Before it, ForwardingServerCall
was extending ServerCall
.
But package private visibility does not play well with inheritance from Scala, as it seems.
It seems that creating a java class overriding every method with implementation containing only super call is the only workaround right now.
To support changes in https://github.com/trueaccord/ScalaPB/pull/114
Do not merge it before 0.5.27 is released.