-
Notifications
You must be signed in to change notification settings - Fork 4k
Description
Introduced in #10406.
ForwardingChannelBuilder2 is a ManagedChannelBuilder that delegates all its builder methods to another builder by default.
It replaces ForwardingChannelBuilder, which isn't ABI-safe. ForwardingChannelBuilder class was mistakenly declared as ForwardingChannelBuilder<T extends ForwardingChannelBuilder<T>>. It causes return types of inherited methods in its child classes to be ForwardingChannelBuilder instead of ManagedChannelBuilder. This pollutes the ABI with undesired method signatures, and introduces hard dependency on ForwardingChannelBuilder
ForwardingChannelBuilder2 generates correct return types. It should always be chosen over ForwardingChannelBuilder
We plan to stabilize ForwardingChannelBuilder2 in one of the following releases, and deprecate ForwardingChannelBuilder.