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

Make transport.Bootstrap usable with no netty-resolver on classpath #13488

Merged
merged 2 commits into from Jul 18, 2023

Conversation

mostroverkhov
Copy link
Contributor

@mostroverkhov mostroverkhov commented Jul 13, 2023

Motivation:
Since some address families (e.g. unix sockets) do not need name resolver, It should be possible to exclude netty-resolver from classpath.

Currently excluding name resolver leads to NoClassDefFoundError: AddressResolverGroup during Bootstrap instantiation.

Modification:

Add disableResolver() method to Bootstrap.

Change BootstrapConfig.resolver() return null if Bootstrap.disableResolver() is called.

Introduce ExternalAddressResolver class to hold AddressResolver related references to avoid NoClassDefFoundError if Bootstrap.disableResolver() called and no netty-resolver is on classpath.

Result:

Bootstrap is usable with no netty-resolver on classpath.

Motivation:
Since some address families (e.g. unix sockets) do not need name resolver,
It should be possible to exclude netty-resolver from classpath.

Currently excluding name resolver leads to NoClassDefFoundError: AddressResolverGroup during Bootstrap instantiation.

Modification:

Add disableResolver() method to Bootstrap.

Change BootstrapConfig.resolver() return null if Bootstrap.disableResolver() is called.

Introduce ExternalAddressResolver class to hold AddressResolver related references to avoid NoClassDefFoundError if Bootstrap.disableResolver() called and no netty-resolver is on classpath.

Result:

Bootstrap is usable with no netty-resolver on classpath.
@normanmaurer
Copy link
Member

@mostroverkhov so is the only motivation for this to be able to remove one dependency ?

@mostroverkhov
Copy link
Contributor Author

@normanmaurer to remove dependency which cant have any use for unix or vm sockets - just dead weight.

@normanmaurer
Copy link
Member

@chrisvest @franz1981 WDYT ?

@normanmaurer normanmaurer added this to the 4.1.95.Final milestone Jul 17, 2023
@mostroverkhov mostroverkhov force-pushed the disable_resolver branch 2 times, most recently from 5838edc to ccd0ee6 Compare July 17, 2023 19:50
Co-authored-by: Chris Vest <mr.chrisvest@gmail.com>
@normanmaurer normanmaurer merged commit fa2c81f into netty:4.1 Jul 18, 2023
14 checks passed
normanmaurer pushed a commit that referenced this pull request Jul 18, 2023
…13488)

Motivation:
Since some address families (e.g. unix sockets) do not need name
resolver, It should be possible to exclude netty-resolver from
classpath.

Currently excluding name resolver leads to NoClassDefFoundError:
AddressResolverGroup during Bootstrap instantiation.

Modification:

Add disableResolver() method to Bootstrap.

Change BootstrapConfig.resolver() return null if
Bootstrap.disableResolver() is called.

Introduce ExternalAddressResolver class to hold AddressResolver related
references to avoid NoClassDefFoundError if Bootstrap.disableResolver()
called and no netty-resolver is on classpath.

Result:

Bootstrap is usable with no netty-resolver on classpath.

---------

Co-authored-by: Chris Vest <mr.chrisvest@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants