Grpc.AspNetCore.Server.ClientFactory has a dependency on Grpc.AspNetCore.Server
jjanuszkiewicz opened this issue · 2 comments
The Grpc.AspNetCore.Server.ClientFactory
has a dependency on Grpc.AspNetCore.Server
.
This is not optimal, because the whole server DLL (147kB) is pulled in, while Grpc.AspNetCore.Server.ClientFactory
alone is just 29kB. Also this feels backwards to pull all the server code into a client (where the client factory package is installed).
I've looked at the code and the only reason why this dependency is needed is in ContextPropagationInterceptor.cs:185 - it needs the IServerCallContextFeature
interface.
That interface is defined in Grpc.AspNetCore.Server
project and is only used in Grpc.AspNetCore.Server
and Grpc.AspNetCore.Server.ClientFactory
. Would it make sense to move it to Grpc.Core.Api
instead (alongside ServerCallContext
which it is closely related to) or to Grpc.Net.Common
?
I can create a PR, but would need guidance to which of these 2 projects to move it, or a suggestion how to solve this differently.