grpc-ecosystem / grpc-spring

Spring Boot starter module for gRPC framework.
https://grpc-ecosystem.github.io/grpc-spring/
Apache License 2.0
3.49k stars 819 forks source link

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

Open panchenko opened 6 months ago

panchenko commented 6 months ago
shalk commented 5 months ago

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

panchenko commented 5 months ago

@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.