-
Notifications
You must be signed in to change notification settings - Fork 54
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
Generate native image reflect-config.json for java-common-protos #2048
Comments
Thanks @mpeddada1! This is an interesting problem to solve, and it is more like a mini-project in my opinion. There are a few problems I can see:
|
I think the java-common-protos are copied from other directories (deep-copy-regex.sources in .Owlbot.yaml). Am I missing something? |
Thanks Joe! Yes you are right it is mostly generated from google/api folder, I'll update it to the right link. The problem is still the same that there is no |
Thank you @blakeli0 and @JoeWang1127! That is good to know. I wasn't aware of these blockers to implement the static jsons for java-common-protos classes.
@burkedavison and I just discussed this offline. Ideally, we want to try to keep these configurations as close as possible to where the classes reside. For |
Documenting another case where confgis for google.rpc classes needed to be manually added: googleapis/java-bigquerystorage#2305 |
Since some handwritten libraries are performing a direct-key error lookup which requires reflection (see googleapis/java-bigquerystorage#2305) rather than gax's iteration method... We might consider including all sdk-platform-java/gax-java/gax/src/main/java/com/google/api/gax/rpc/ErrorDetails.java Line 68 in 80f23ec
Alternatively, we could decide that patching these uses at the handwritten library continues to be the appropriate solution. |
We currently only generate
com.google.rpc
classes that are used by GAPICs. In cases where handwritten libraries explicitly call othercom.google.rpc
classes via reflection, we've had to add configurations manually: googleapis/java-spanner#2617.As pointed out in googleapis/java-spanner#2617 (comment), great care needs to be taken in order to ensure that such classes are covered through configurations if a library chooses to call them reflectively in the future. Generating configs for java-common-protos can mitigate the need for this but comes at a cost of extra configs being generate for the libraries.
The text was updated successfully, but these errors were encountered: