Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the (un)wrap(In|Out)bound(In|Out) customisation points #2792

Open
weissi opened this issue Jul 17, 2024 · 0 comments
Open

Remove the (un)wrap(In|Out)bound(In|Out) customisation points #2792

weissi opened this issue Jul 17, 2024 · 0 comments
Labels
⚠️ semver/major Breaks existing public API.
Milestone

Comments

@weissi
Copy link
Member

weissi commented Jul 17, 2024

_EmittingChannelHandler, ChannelInboundHandler and ChannelOutboundHandler define bogus customisation points

  • func wrapOutboundOut(_ value: OutboundOut) -> NIOAny
  • func unwrapInboundIn(_ value: NIOAny) -> InboundIn
  • func wrapInboundOut(_ value: InboundOut) -> NIOAny
  • func unwrapOutboundIn(_ value: NIOAny) -> OutboundIn

they only have one correct implementation so they shouldn't be customisation points. This will also come with a (small) perf overhead.

Anyway, once possible we should remove them.


Given that they only have one correct implementation, we could actually just remove them without a SemVer major too. But as @Lukasa points out, some people seem to be using NIO in -enable-library-evolution mode where this would be an issue. So let's just leave it, the overhead is small and folks should use Self.(un)wrap(In|Out)bound(In|Out) anyway which doesn't have this issue.

@weissi weissi added the ⚠️ semver/major Breaks existing public API. label Jul 17, 2024
@weissi weissi changed the title Remove the (un)wrap(In|Out)bound(In|Out) customation points Remove the (un)wrap(In|Out)bound(In|Out) customisation points Jul 17, 2024
@weissi weissi added this to the 3.0.0 milestone Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚠️ semver/major Breaks existing public API.
Projects
None yet
Development

No branches or pull requests

1 participant