-
Notifications
You must be signed in to change notification settings - Fork 79
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
Use the smaller split netty #508
Conversation
Sorry I couldn't review this before getting merged. I would say that this PR could cause actually conflicts: If a plugin tries to use netty dependencies that are not in Styx, we might end up with different netty modules (with different versions, so compiled against different versions of Netty) coexisting in our classpath. At least if we include netty-all, we would only have a version ... |
@taer , what's your use case here? |
Hi @dvlato We could declare a "supported" Netty version in styx BOM, and instruct the plugins to take it from there? Also, as we discussed, plugins could shade their Netty out of sight. Finally, we could move towards using styx as a library/framework instead of using it as a stand-alone styx with external plugins? |
My usecase was effectively the same. I used asynchttpclient which depends on the netty pieces
So I had to take care to force his version of io.netty:* to be the same as styx's io.netty:netty-all since to maven, they were both independent artifacts. I caught this when I had a |
So if I understood it correctly, the change does not really help with having to force the version the plugin uses, but just reduces the footprint of netty. *With netty-all, instead of declaring the version of the dependencies we could have just excluded the transitive netty dependencies (coming from async-http-client) and the plugin would have used netty-all for all the netty related stuff. That's why I thought it was slightly better fit for dependency conflicts. But it doesn't make much of a difference. Anyway, it's merged now! We could discuss at other point why we need async-http-client instead of using styx http client, and how we can improve the situation. |
@dvlato in my experience, most dependencies use the small Netty. And the use of asyc http client actually isn't the issue. The correct but possible painful one is to.... Embrace the Maven shade relocation. Netty is a pretty common dependency with high performance java projects. So it makes sense that the Styx dependent version gets relocated and made internal. I know a recent styx update hid all the Netty specifics from the API, so it should be transparent. O |
Reduce both size and conflicts with other netty projects