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

[native-image] Services declared in META-INF/services shouldn't require declaration in reflection.json #640

Closed
graemerocher opened this issue Aug 27, 2018 · 3 comments

Comments

@graemerocher
Copy link
Member

Currently you have to declare each class defined in a META-INF/services file and loaded via ServiceLoader in a reflection.json when using nativeimage.

This seems counter intuitive as the classes are already declared ahead of time. The nativeimage tool should scan the META-INF/services and include them automatically or there should be a flag to enable the ability to do this, otherwise every Java project has to write some build tool to extract all the META-INF/services classes and generate a reflection.json file.

Relates to #470

@vhiairrassary
Copy link
Contributor

If you use constant argument for ServiceLoader.load(Class) then hopefully #566 should fix your issue?

@graemerocher
Copy link
Member Author

Yes #566 looks like it will resolve it

@graemerocher
Copy link
Member Author

This duplicates #563 sorry for the noise

@cstancu cstancu closed this as completed Aug 27, 2018
jerboaa pushed a commit to jerboaa/graal that referenced this issue Dec 20, 2023
…kports

[23.1] Backports for January CPU release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants