-
Notifications
You must be signed in to change notification settings - Fork 15
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
Support missing attributes for @TemplateData / @RegisterForReflection #631
Support missing attributes for @TemplateData / @RegisterForReflection #631
Conversation
15b242b
to
b6af6ba
Compare
@rgrunber @AlexXuChen you can play now with my PR which supports:
See the following demo: |
a78c566
to
00c44af
Compare
I noticed that in native mode we have thos error with size of List: Although size is avalable as value resolvers (with Map https://quarkus.io/guides/qute-reference#maps but with List too, see https://github.com/quarkusio/quarkus/blob/e24fec4e2c4bd10edbfefd96e59b3a6f3608aaa9/independent-projects/qute/core/src/main/java/io/quarkus/qute/ValueResolvers.java#L389) We need to declare size as default value resolvers. We can do that in an another PR. |
f8a7b51
to
8d19ebc
Compare
27db75f
to
2314db7
Compare
In the process of understanding According to https://quarkus.io/guides/qute-reference#native_executables, type-safe expressions are safe to use in a native image. So I defined a template through |
34d6afb
to
1480772
Compare
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.
Something I noticed in relation to the qute.native.enabled
setting is that when enabled, although the resolver list isn't populated with the field/method, the definition and hover still works. For example, if we use java.lang.String.class
in target
:
This also applies to ignore
, where the ignored field still has definition/hover support:
Indeed but I think it is nice to have that because navigation can be helpfull to go the Java class easily and it follows the same behavior of JDT Java when you try to open a private method: |
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.
Type-safe expressions don't cause warnings to be emitted on the type when the native image setting is enabled, and target attribute for @TemplateData
seems to be working for me.
f63fc82
to
7daa603
Compare
Signed-off-by: azerr <azerr@redhat.com>
Support missing attributes for @templatedata / @RegisterForReflection
Signed-off-by: azerr azerr@redhat.com