-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Brotli4J uncoditionally brought in native executables #43556
Comments
Brotli4J is necessary only when using `vertx-http` (for now), no need to bring it in for every app using `quarkus-netty` See quarkusio#43556 for more details
@zakkak It would be very valuable 🙏 , especially because when you don't configure |
FWIW The size overhead of this issue is ~30KB so it might not be worth persuading after all. The main benefit from brotli exclusion would probably be that it won't be easy to accidentally bring in more things. The classes being compiled in are:
and the methods:
|
Brotli4J is necessary only when using `vertx-http` (for now), no need to bring it in for every app using `quarkus-netty` See quarkusio#43556 for more details
Brotli4J is necessary only when using `vertx-http` (for now), no need to bring it in for every app using `quarkus-netty` See quarkusio#43556 for more details
The only way I can think about fixing this would be to implicitly add the brotli dependency only when I am closing it as not planned since as mentioned in #43556 (comment) the overhead is insignificant. |
Brotli4J is necessary only when using `vertx-http` (for now), no need to bring it in for every app using `quarkus-netty` See quarkusio#43556 for more details
Describe the bug
As unveiled in #43538
com.aayushatharva.brotli4j:brotli4j
is being unconditionally included in native executables built with thequarkus-netty
extension.This is not causing any issues, but increases bloat with no apparent reason. The aim of this issue is to explore whether we can avoid always including brotli4j.
Expected behavior
Brotli4J should only be included when necessary (i.e. depending on the configuration)
Actual behavior
com.aayushatharva.brotli4j:brotli4j
is being unconditionally included in native executables built with thequarkus-netty
extension.How to Reproduce?
./mvnw -Dnative -pl integration-tests/main -Dnative.surefire.skip -Dformat.skip -Dno-descriptor-tests clean package
Output of
uname -a
orver
Linux fedora 6.10.10-200.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Sep 12 18:26:09 UTC 2024 x86_64 GNU/Linux
Output of
java -version
21.0.4+7-LTS
Mandrel or GraalVM version (if different from Java)
Mandrel-23.1.4.0-Final
Quarkus version or git rev
main
10ff88fBuild tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
Additional information
Applying the following patch seems to resolve the issue, but as expected it breaks
integration-tests/vertx-http-compressors/all
which depends on the brotli compressor.The comment:
Seems to no longer hold.
My expectation is that since
quarkus.http.compressors
is a build time configuration Quarkus should be able to achieve the desired functionality by depending on Brotli4J only whenbr
is passed toquarkus.http.compressors
.An immediate improvement IMHO is to move the brotli4j dependency from
netty
tovertx-http
for which I will prepare a PR (Update: see #43557).The text was updated successfully, but these errors were encountered: