[weld-dev] Helidon and Weld in native

Matej Novotny manovotn at redhat.com
Tue Jul 14 06:06:25 EDT 2020


Hi Laird,

I have recently noticed some Tweets about Helidon running Weld in native. And if memory serves, you are from Helidon team, am I correct?
So first of all, congratulations, CDI in native is no small feat :-)

Seeing that, I went and checked some of the code Helidon is using to work around certain Weld issues you seemed to have encountered.
Things like proxy names but also others such as CL warning in JDK 11, custom weld features and so on...

I know there is bunch of specific things you need to do (such as your WeldFeature[1] class does), but many others are fairly general problems that we would love to have solved in Weld itself.
Which brings me to the question - why not contribute it back to Weld?

You would help an open source project that you are consuming while avoiding the need to substitute our code with bytecode manipulation[2] and hoping we don't change internals to break that.
For instance the aforementioned proxy names problem seems like something we wouldn't mind changing in Weld so that it fits your scenario as it wouldn't break current usage anyway.
Same for class defining in SE for JDK 11+, we even have a tracking issue[3] for that and need a solution much like what you have, only wrapped into a multi release JAR so that it runs on both, 8 and 11+.
And there is probably more, I have only quick-scanned your code and don't know the ins and outs of it.

Best regards
Matej
__________________________________________________________________________________________________________
[1] https://github.com/oracle/helidon/blob/master/integrations/graal/mp-native-image-extension/src/main/java/io/helidon/integrations/graal/mp/nativeimage/extension/WeldFeature.java
[2] https://github.com/oracle/helidon/blob/master/integrations/graal/mp-native-image-extension/src/main/java/io/helidon/integrations/graal/mp/nativeimage/extension/WeldSubstitutions.java
[3] https://issues.redhat.com/browse/WELD-2619


More information about the weld-dev mailing list