Help with GraalVM auto-detection wrt Afterburner/Blackbird

17 views
Skip to first unread message

Tatu Saloranta

unread,
Jul 26, 2023, 11:50:39 PM7/26/23
to jacks...@googlegroups.com
Quick "Bat signal" style request for help with GraalVM: I think we
have some devs here who are somewhat familiar with GraalVM runtime,
and I was hoping to get some help with this issue:

https://github.com/FasterXML/jackson-modules-base/issues/191

where basically it'd be good to auto-detect, if possible, whether the
current runtime environment is GraalVM.

Knowing this would let modules like Afterburner and Blackbird
gracefully degrade: instead of failing, just avoiding attempts to do
dynamic bytecode generation when that will not succeed.
This would be useful for users who might not want to customize setup
across Graal/non-Graal cases, or frameworks, so that they can register
AB/BB without causing failures.

-+ Tatu +-

Paulo Lopes

unread,
Jul 27, 2023, 11:14:14 AM7/27/23
to jackson-dev
Hi,

In es4x I had to do a similar check without relying on GraalVM classes, this works for me:

You probably don't need all that the functionality, just the boolean GRAALVM

Cheers,
Paulo

Joo Hyuk Kim

unread,
Jul 28, 2023, 11:48:29 PM7/28/23
to jacks...@googlegroups.com
Thank you for sharing your use case @PauloLopes 👍🏻 
Quite straightforward.

If it's possible we might want to avoid hard-coding the "graalvm", though I can't think of other option yet 🤔

--
You received this message because you are subscribed to the Google Groups "jackson-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jackson-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jackson-dev/fcf76ea3-8ffa-4415-b198-97d6cb3c0c70n%40googlegroups.com.

Tatu Saloranta

unread,
Jul 28, 2023, 11:49:31 PM7/28/23
to jacks...@googlegroups.com
Thanks!

And fwtw, jackson-databind already had some support that I had forgotten about:

https://github.com/FasterXML/jackson-databind/blob/2.16/src/main/java/com/fasterxml/jackson/databind/util/NativeImageUtil.java

-+ Tatu +-
Reply all
Reply to author
Forward
0 new messages