Skip to content

Fix vertx-mutiny-generator and vertx-codegen leaking to runtime#1316

Merged
jponge merged 1 commit intosmallrye:3.xfrom
gsmet:3.x
Mar 30, 2026
Merged

Fix vertx-mutiny-generator and vertx-codegen leaking to runtime#1316
jponge merged 1 commit intosmallrye:3.xfrom
gsmet:3.x

Conversation

@gsmet
Copy link
Copy Markdown

@gsmet gsmet commented Mar 28, 2026

This is something that has apparently been fixed in main already but given Quarkus 3.x is far from being EOL, I think we should fix it in 3.x too.

I went with the approach of making the dependency optional and having it a dependency of the processor.
We need the dependency around because of the @Fluent marker annotation.

My question about this annotation: is it actually used by anything at runtime? It doesn't seem so but I wasn't able to fully rule it out, thus why I am asking.

Note that we also have a @Fluent in Quarkus:
TransactionalContextConnection in the Hibernate Reactive extension. This will require a fix.

CI seems to be happy about it so that's a good first step.

@gsmet gsmet changed the title Fix vertx-mutiny-gener and vertx-codegen leaking to runtime Fix vertx-mutiny-generator and vertx-codegen leaking to runtime Mar 28, 2026
@gsmet
Copy link
Copy Markdown
Author

gsmet commented Mar 28, 2026

BTW, to clarify: my point is to avoid having vertx-mutiny-generator and vertx-codegen at runtime as I believe they are not needed - if we confirm the @Fluent annotation is not actually consumed at runtime.

@cescoffier cescoffier requested a review from jponge March 29, 2026 18:41
Copy link
Copy Markdown
Member

@jponge jponge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

The vertx-codegen annotations are used for code generation purpose and mark asynchronous interfaces / methods.

AFAIK they have no runtime use (@tsegismont am I missing any case?) so the dependency can indeed be made optional.

Comment thread vertx-mutiny-clients/pom.xml Outdated
Comment thread vertx-mutiny-clients/pom.xml Outdated
This is something that has apparently been fixed in main already but
given Quarkus 3.x is far from being EOL, I think we should fix it in 3.x
too.

I went with the approach of making the dependency optional and having it
a dependency of the processor.
We need the dependency around because of the @fluent marker annotation.

My question about this annotation: is it actually used by anything at
runtime? It doesn't seem so but I wasn't able to fully rule it out, thus
why I am asking.

Note that we also have a @fluent in Quarkus:
TransactionalContextConnection in the Hibernate Reactive extension. This
will require a fix.
@jponge jponge merged commit cdf62d9 into smallrye:3.x Mar 30, 2026
3 checks passed
@jponge
Copy link
Copy Markdown
Member

jponge commented Apr 29, 2026

We're rolling-back most of this because it breaks compilation in many Quarkus extensions (Redis, etc).

@gsmet
Copy link
Copy Markdown
Author

gsmet commented Apr 29, 2026

I’d like to have a look. Maybe we should just add a dependency?

do you have a pointer?

@jponge
Copy link
Copy Markdown
Member

jponge commented Apr 29, 2026

Yes you can see the first run in quarkusio/quarkus#53875 that failed on a few classes that required Vert.x annotations (@NonNull and @Fluent if I recall right) to compile.

As a quick fix we marked the dependencies as non-optional with @anavarr, which effectively reverted the transitive dependency behavior, we could have removed all declarations as well.

What we could do is:

  • cleanup again in a 3.22.2 (optional or not, that is the question)
  • see if the failing Quarkus classes really need those annotations, in which case we might remove them or add a non-optional dependency on vertx-codegen for these projects.

@jponge
Copy link
Copy Markdown
Member

jponge commented Apr 30, 2026

I'm going to make it optional again in a 3.22.2, and I'll fix the related Quarkus modules. They shouldn't use annotations in most (even all) cases.

@jponge
Copy link
Copy Markdown
Member

jponge commented Apr 30, 2026

Actually @anavarr is going to do it 😄

@gsmet
Copy link
Copy Markdown
Author

gsmet commented Apr 30, 2026

@jponge also, if they use annotations, you can just add the artifact containing the annotations as an optional dependency there.

It's much better than having everything depending on a codegen artifact.

@jponge
Copy link
Copy Markdown
Member

jponge commented Apr 30, 2026

Well most of these annotations have been put for no reason, so better drop these.

@jponge
Copy link
Copy Markdown
Member

jponge commented Apr 30, 2026

We've been delayed with 3.22.2 due to Maven Central being slow today, we'll finish next week.

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.

2 participants