-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Change default behavior of RegisterForReflection ignoreNested attribute to false #38534
Conversation
Thanks for your pull request! The title of your pull request does not follow our editorial rules. Could you have a look?
This message is automatically generated by a bot. |
637210f
to
3a29c75
Compare
core/runtime/src/main/java/io/quarkus/runtime/annotations/RegisterForReflection.java
Outdated
Show resolved
Hide resolved
integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/DogDto2.java
Show resolved
Hide resolved
Thank you @humcqc , please see my two comments. |
Done, do you know why the CI Sanity Check Expected — Waiting for status to be reported is always pending ? |
core/runtime/src/main/java/io/quarkus/runtime/annotations/RegisterForReflection.java
Outdated
Show resolved
Hide resolved
Yes, that's a safety guard to prevent first time contributors from running workflows. I approved the run :) |
CI fails with:
@humcqc please run |
This comment has been minimized.
This comment has been minimized.
Hi @zakkak , any idea for this : Error: Failed to execute goal net.revelc.code.formatter:formatter-maven-plugin:2.23.0:validate (default) on project quarkus-core: File '/home/runner/work/quarkus/quarkus/core/runtime/src/main/java/io/quarkus/runtime/annotations/RegisterForReflection.java' has not been previously formatted. Please format file (for example by invoking Seems link to the javadoc changes ? |
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.
Thanks @humcqc . Let's see if the CI is OK with it and merge it :)
I can squash the commits before merge if you want ? |
Yes, please do so. |
Seems the last change on class with targets make some test failing: @zakkak, what do you think ? |
This comment has been minimized.
This comment has been minimized.
Main ITFails with:
and
Which indicates that the nested Data3 IT tests - Hibernate ORM with PanacheFails with:
Which indicates that the nested Data 7 IT - Hibernate Reactive with PanacheFails with:
Which is not clear why is happening but I suspect is related to the In all cases I see that the classes were originally annotated with |
ok certainly the current condition test does not handle the reverse one, I will check. |
b22f9f5
to
d2022c2
Compare
@@ -50,7 +50,7 @@ public void build(CombinedIndexBuildItem combinedIndexBuildItem, Capabilities ca | |||
|
|||
boolean methods = getBooleanValue(i, "methods"); | |||
boolean fields = getBooleanValue(i, "fields"); | |||
boolean ignoreNested = getBooleanValue(i, "ignoreNested"); | |||
boolean ignoreNested = i.value("ignoreNested") != null && i.value("ignoreNested").asBoolean(); |
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.
The original definition of getBooleanValue
is:
private static boolean getBooleanValue(AnnotationInstance i, String name) {
return i.value(name) == null || i.value(name).asBoolean();
}
which means that it returns true
if the value is not explicitly set, no matter what the default value is set to in the corresponding annotation, which seems wrong to me.
With the change you propose you revert this and set the default value to false, but it again doesn't seem right to me because:
- If we change the
ignoreNested
default sometime in the future it will fail again. - If we change any other default from true to false it will fail again.
I will prepare a PR to fix this independently.
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.
yes, I was looking to a more robust change, to handle properly the default value of the annotation. This commit was to trigger the CI , I have some limitation to test the native version locally. We can do this in a second PR if you prefer ?
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.
Yes, let's keep them separate.
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.
One thing if we want to do this properly we need to change the getBooleanValue method and it will impact a lot of more test as it will impact the other annotation attributes. Not sure I have sufficient knowledge on the impact of those attributes.
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.
@humcqc no worries, I will try to fix this (I already have a WIP branch but hit some issue I am not sure how to resolve yet).
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.
Status for workflow
|
The CI failures look unrelated to me. |
I think so. Do you think it could be merged ? |
Yes, the failures show up in other PRs as well: |
Thanks for your help, do you know when the 3.9 release is planed ? |
It has not been planned yet. |
|
We are trying to be super conservative for 3.7/3.8, so I would prefer not |
:-( ok, i still have few issues to contribute. Any estimate for 3.9 ? |
Not yet |
As discussed in #38496 (comment).
@zakkak, @geoand , @loicmathieu