Repository navigation
fix(gun): compile the Gun helper modules only when :gun is present - #663
Conversation
`GRPC.Client.Adapters.Gun` is wrapped in `if Code.ensure_loaded?(:gun)` since gun became optional, but its helper modules `ConnectionProcess` and `StreamResponseProcess` are not. A project that uses the Mint adapter without gun compiles them anyway, and every build prints nine `:gun.* is undefined` warnings (`:gun.open/3`, `:gun.post/4`, ...). Gate both modules the same way as the adapter that starts them. Nothing else references them when gun is absent. The diff is the gate plus `mix format` re-indentation (`git diff -w` shows four lines).
|
The one failure here, |
|
Could you resolve branch conflicts? |
…-modules # Conflicts: # grpc/lib/grpc/client/adapters/gun/connection_process.ex
|
Conflicts resolved in 1a63fe9 by merging master. The conflict was master's newer |
GRPC.Client.Adapters.Gunis wrapped inif Code.ensure_loaded?(:gun)(like the Mint adapter withMint.HTTP), but its helper modulesGRPC.Client.Adapters.Gun.ConnectionProcessandGRPC.Client.Adapters.Gun.StreamResponseProcessaren't. Since gun became optional (#524), a project that uses the Mint adapter without gun still compiles both, and grpc 1.1.0 prints these on every build:This gates both modules the same way as the adapter that starts them. Nothing else references them when gun is absent; the one mention in
client/adapter.exis a comment. The diff is theifplus the re-indentationmix formatproduces inside it:git diff -wshows four added lines, and the formatter reflowed a few lines that crossed 98 columns.