Open
Description
reproduction steps
Using the dependency: "io.grpc" % "grpc-core" % "1.18.0"
, the following code fails to compile in 2.12.10
and 2.13.1
but compiles just fine in 2.11.12
import io.grpc.ManagedChannelBuilder
trait Test {
val grpcChannel = ManagedChannelBuilder
.forAddress(
"host",
1234
)
.maxInboundMessageSize(20)
.usePlaintext()
.build()
}
problem
Fails with:
value usePlaintext is not a member of ?0
[error] possible cause: maybe a semicolon is missing before `value usePlaintext'?
[error] .usePlaintext()
[error] ^
[error] one error found
expectation
This compiles fine in 2.11.12
. It also compiles if Test
is an object
instead of a trait
. From what I can tell, this was also an issue in 2.10
that got fixed in 2.11
but has now come back in 2.12
and 2.13
.
See also grpc/grpc-java#2813 (comment) and https://stackoverflow.com/questions/44899041/unable-to-build-grpc-managedchannel-with-scala for historical context.