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
Properly sort beans in DevUI beans page #29737
Conversation
extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/devconsole/DevBeanInfo.java
Outdated
Show resolved
Hide resolved
@@ -101,6 +101,11 @@ static String createSimple(AnnotationInstance annotation) { | |||
|
|||
@Override | |||
public int compareTo(Name other) { | |||
// Quarkus classes should be last |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really needed? I don't see a benefit of this change. I mean why should e.g. the io.smallrye.config.inject.ConfigProducer
go before io.quarkus.vertx.http.runtime.CurrentVertxRequest
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is needed because you can have application beans that are generated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But generated application beans are handled in the DevBeanInfo#compare()
, or?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My point is that you can have beans that are both application beans and generated beans and some come from Quarkus (with no user action).
So by doing this the Quarkus ones are moved to the bottom
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I don't think that ordering matters here because users are probably not interested in generated beans anyway (be it a quarkus class or not).
In other words, this should be enough (and already quite confusing ;-):
- application beans, non-generated, sorted by providerType name
- application beans, generated, sorted by providerType name
- non-app beans, non-generated, sorted by providerType name
- non-app beans, generated, sorted by providerType name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
io.quarkus.resteasy.reactive.server.runtime.NotFoundExceptionMapper$GeneratedExceptionHandlerFor$NotFoundException$OfMethod$toResponse
, io.quarkus.resteasy.reactive.server.runtime.exceptionmappers.AuthenticationFailedExceptionMapper$GeneratedExceptionHandlerFor$AuthenticationFailedException$OfMethod$handle
among a few others.
These are always included with RESTEasy Reactive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyway, it's not a blocker so I'm going to approve this pr ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
io.quarkus.resteasy.reactive.server.runtime.NotFoundExceptionMapper$GeneratedExceptionHandlerFor$NotFoundException$OfMethod$toResponse
,io.quarkus.resteasy.reactive.server.runtime.exceptionmappers.AuthenticationFailedExceptionMapper$GeneratedExceptionHandlerFor$AuthenticationFailedException$OfMethod$handle
among a few others.These are always included with RESTEasy Reactive
Yes, but these are generated and should go after non-generated app beans...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's my point. Without this change, they are displayed before the generated beans that are a result of the user writing some code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering what those "non-quarkus application generated beans" are...
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Failing Jobs - Building 4667cd7
Full information is available in the Build summary check run. Failures⚙️ JVM Tests - JDK 11 Windows #- Failing: extensions/vertx/deployment
! Skipped: extensions/agroal/deployment extensions/amazon-lambda-http/deployment extensions/amazon-lambda-rest/deployment and 341 more 📦 extensions/vertx/deployment✖
✖
|
Fixes: #29723