grpc-spring icon indicating copy to clipboard operation
grpc-spring copied to clipboard

compileOnly for grpc-inprocess/implementation for grpc-netty-shaded

Open panchenko opened this issue 1 year ago • 2 comments

  • The grpc-inprocess module exists mostly for testing purposes, we don't need it at runtime.
  • The classes inside grpc-netty-shaded are repackaged, users are not supposed to access those internal packages, so implementation is enough

panchenko avatar Mar 18 '24 11:03 panchenko

thought this is right. But may be user have to always add grpc-inprocess in dependencies.

Because GrpcClientAutoConfiguration have use class InProcessChannelFactory for each GrpcChannelFactory case in runtime. If the class is missing, java.lang.NoClassDefFoundError will throw

https://github.com/grpc-ecosystem/grpc-spring/blob/master/grpc-client-spring-boot-starter/src/main/java/net/devh/boot/grpc/client/autoconfigure/GrpcClientAutoConfiguration.java#L152

https://github.com/grpc-ecosystem/grpc-spring/blob/master/grpc-client-spring-boot-starter/src/main/java/net/devh/boot/grpc/client/autoconfigure/GrpcClientAutoConfiguration.java#L170

https://github.com/grpc-ecosystem/grpc-spring/blob/master/grpc-client-spring-boot-starter/src/main/java/net/devh/boot/grpc/client/autoconfigure/GrpcClientAutoConfiguration.java#L170

shalk avatar Apr 25 '24 09:04 shalk

@shalk Thanks for the feedback, I will check the client more and might be split the change into multiple PRs to simplify the discussion. Actually my main interest is the server, it works with grpc-inprocess excluded via gradle.

panchenko avatar Apr 26 '24 08:04 panchenko