Skip to content
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

Extend ReflectiveClassBuildItem to support queryAllPublicConstructors, queryAllDeclaredConstructors, queryAllPublicMethods, queryAllDeclaredMethods #41999

Closed
zakkak opened this issue Jul 19, 2024 · 1 comment · Fixed by #42035
Labels
Milestone

Comments

@zakkak
Copy link
Contributor

zakkak commented Jul 19, 2024

Description

As of Mandrel / GraalVM 22.3 (See oracle/graal#3637) we can register methods and constructors of classes for lookup purposes without having to pull in the code as well.

Implementation ideas

It would be nice to extend ReflectiveClassBuildItem to support this kind of configuration as well.

@zakkak zakkak added the kind/enhancement New feature or request label Jul 19, 2024
Copy link

quarkus-bot bot commented Jul 19, 2024

/cc @Karm (mandrel), @galderz (mandrel)

zakkak added a commit to zakkak/quarkus that referenced this issue Jul 22, 2024

Verified

This commit was signed with the committer’s verified signature. The key has expired.
zakkak Foivos Zakkak
Note that for the time being we only extend it to support
queryAllDeclaredConstructors and queryAllMethods since we don't have an
option to register only public methods.

Closes quarkusio#41999
zakkak added a commit to zakkak/quarkus that referenced this issue Jul 23, 2024

Verified

This commit was signed with the committer’s verified signature. The key has expired.
zakkak Foivos Zakkak
queryOnly registrations enables us to register only the metadata without
the actual code, essentially reducing the native executable size.  For
instance, if some code invokes getDeclaredMethods on a class to see if a
specific method is available we don't actually need all the methods
bundled in the native executable, so we could use queryAllMethods
instead of methods (which will also pull in the code of all methods).

Note that for the time being we only extend it to support
queryAllDeclaredConstructors and queryAllMethods since we don't have an
option to register only public methods.

Closes quarkusio#41999
@zakkak zakkak closed this as completed in 082269d Jul 23, 2024
@quarkus-bot quarkus-bot bot added this to the 3.14 - main milestone Jul 23, 2024
holly-cummins pushed a commit to holly-cummins/quarkus that referenced this issue Jul 31, 2024
queryOnly registrations enables us to register only the metadata without
the actual code, essentially reducing the native executable size.  For
instance, if some code invokes getDeclaredMethods on a class to see if a
specific method is available we don't actually need all the methods
bundled in the native executable, so we could use queryAllMethods
instead of methods (which will also pull in the code of all methods).

Note that for the time being we only extend it to support
queryAllDeclaredConstructors and queryAllMethods since we don't have an
option to register only public methods.

Closes quarkusio#41999
danielsoro pushed a commit to danielsoro/quarkus that referenced this issue Sep 20, 2024

Verified

This commit was signed with the committer’s verified signature.
danielsoro Daniel Cunha
queryOnly registrations enables us to register only the metadata without
the actual code, essentially reducing the native executable size.  For
instance, if some code invokes getDeclaredMethods on a class to see if a
specific method is available we don't actually need all the methods
bundled in the native executable, so we could use queryAllMethods
instead of methods (which will also pull in the code of all methods).

Note that for the time being we only extend it to support
queryAllDeclaredConstructors and queryAllMethods since we don't have an
option to register only public methods.

Closes quarkusio#41999
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant