Skip to content

Revisit our annotation support now that annotations are available in a native image without a dedicated hint #28967

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

Closed
snicoll opened this issue Aug 16, 2022 · 0 comments
Assignees
Labels
theme: aot An issue related to Ahead-of-time processing type: enhancement A general enhancement
Milestone

Comments

@snicoll
Copy link
Member

snicoll commented Aug 16, 2022

GraalVM 22.x has improved so that annotations placed on a method that has an introspecting hint are visible. This makes RuntimeHintsUtils#registerAnnotation largely irrelevant. Remains registerComposableAnnotation that creates a JDK proxy for an annotation we know is going to be synthesized.

This bit is still needed so we need to rework that bit and make it probably a bit more explicit. Current annotations metadata should be removed from the codebase as well.

@snicoll snicoll added type: enhancement A general enhancement theme: aot An issue related to Ahead-of-time processing labels Aug 16, 2022
@snicoll snicoll added this to the 6.0.0-M6 milestone Aug 16, 2022
@snicoll snicoll self-assigned this Aug 16, 2022
snicoll added a commit that referenced this issue Aug 16, 2022
This commit adds the ability to check if a the annotation managed by
a MergedAnnotation is synthesizable. This makes it easier to register
a JDK proxy hint if necessary

See gh-28967
snicoll added a commit that referenced this issue Aug 16, 2022
This commit updates RuntimeHintsUtils to focus on registering a JDK
proxy only as annotations of annotated elements that have at least
an introspection hints are visible out-of-the-box.

This commit also removes unnecessary hints and adapt `@Reflective` to
detect if a hint is required using the introduced
MergedAnnotation#isSynthesizable.

See gh-28967
snicoll added a commit that referenced this issue Aug 16, 2022
Tests with the agent are broken now that hints for an annotation is
no longer required if the annotated element has an introspection hint.

See gh-28967
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: aot An issue related to Ahead-of-time processing type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant