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

[BUG] azure-core/native-image.properties has too many entries with wide implications #43146

Open
credmond opened this issue Dec 2, 2024 · 3 comments
Assignees
Labels
Azure.Core azure-core Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@credmond
Copy link

credmond commented Dec 2, 2024

https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core/src/main/resources/META-INF/native-image/com.azure/azure-core/native-image.properties

I feel this file has too many build-time initialisations, SLF4J, etc.

This forces client projects of this library, who want to build a native image, to make every class that a logging provider ultimately reaches during initialisation (which can be a lot of classes), to be build-time too. There are some reasons why this can be a) impossible with GraalVM or b) cause other unacceptable problems.

Not everyone uses logback, and the other logging frameworks might cause problems.

@github-actions github-actions bot added Azure.Core azure-core Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Dec 2, 2024
Copy link

github-actions bot commented Dec 2, 2024

Thank you for your feedback. Tagging and routing to the team member best able to assist.

@alzimmermsft
Copy link
Member

alzimmermsft commented Dec 2, 2024

Thank you for filing this issue @credmond

@srnagar could you look into why the logback classes were added there even though we don't formally use logback as a dependency ourselves.

@alzimmermsft alzimmermsft assigned srnagar and unassigned alzimmermsft Dec 2, 2024
@credmond
Copy link
Author

credmond commented Dec 2, 2024

I described the problem in more detail here on GraalVM: oracle/graal#10201

I feel like you might have added so many build-time configs to this project because of issues with netty. Basically, GraalVM choosing safe classes as build-time safe causes errors about your classes not being build-time, etc, etc.

In my view, the fix is to actually force such classes to be run-time as much as possible, instead of making your classes build-time. The former is an approach you see some people using.

As it stands, for me to use your library, I need to fork it, and change the settings to be run-time, not build-time, build the JAR and use that.

credmond added a commit to certak-com/azure-sdk-for-java that referenced this issue Dec 2, 2024
…n of a bunch of classes, as opposed to build-time. This over-zealous amount of build-time configurations, masks other problems but causes headaches for upstream users of the client library.

Bug logged here: Azure#43146
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Core azure-core Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
Status: No status
Development

No branches or pull requests

3 participants