Open cmdjulian opened 1 year ago
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @cmdjulian on file. In order for us to review and merge your code, please sign our Contributor License Agreement to get yourself added. You'll find the CLA and more information here: https://github.com/hivemq/hivemq-community/blob/master/CONTRIBUTING.adoc#contributor-license-agreement
@cla-bot check
The cla-bot has been summoned, and re-checked this pull request!
Thank you for your contribution @cmdjulian!
In general, it would be best if JCTools would ship with the right native image configuration. As JCTools is only a dependency, the user of the hivemq-mqtt-client can update the JCTools version transitively which might need a change in the native image configuration as well.
But I agree that we can at least make the user experience better.
I am unsure if reflective access is the right thing here. We have the hivemq-mqtt-client running in a native image as part of the mqtt-cli, where we --initialize-at-build-time
the JCTools classes, see https://github.com/hivemq/mqtt-cli/blob/master/build.gradle.kts#L416.
Maybe we can just include these settings instead of the reflection config?
Yeah you right. Thanks for pointing this out.
I had a look at JCTools, and is seems like they use a lot of reflection and Unsafe. I was thinking about contributing a PR over there as well, maybe I find some time in the future to do so.
Description
This changes adds the required graalvm reflection config for the two missing fields. This config is picked up by graalvm during native compilation and registers the two fields for reflective access on the compiled native image java app. See here for more details.
Related Issue
https://github.com/hivemq/hivemq-mqtt-client/issues/448
Type of Change
Checklist