[foreign-jextract] No code generated for structs inside union
Filip Krakowski
krakowski at hhu.de
Fri Aug 7 14:22:17 UTC 2020
Hi Maurizio,
wow, that was really fast. Thank you!
I will manually trigger our OpenJDK build pipeline in a moment and test
out your fix. While I'm at it: Is it ok if we host nightly builds of the
foreign-jextract branch publicly on one of our servers?
https://coconucos.cs.hhu.de/forschung/jdk
This way we can always update to the latest nightly build in a matter of
seconds. We use SDKMAN! (https://sdkman.io/) for managing local JDK
installations. I also wrote a script that downloads and unpacks the
nightly build into the candidates folder of SDKMAN!, so that it can be
selected from the command line. If public hosting of the compiled
OpenJDK is not allowed, I will of course restrict it to our private network.
Best regards,
Filip
On 07.08.20 16:10, Maurizio Cimadamore wrote:
> Hi Filip,
> I've just integrated a fix for the issue you reported. The fix should
> now let jextract to "recurse" on nested anon structs/union.
>
> It is possible that we'll need more work in order to fully rectify the
> situation, but the current fix should at least allow you to make more
> progress.
>
> Let us know how it goes :-)
>
> Cheers
> Maurizio
>
>
> On 06/08/2020 14:25, Filip Krakowski wrote:
>> Hi,
>>
>> it seems that jextract does not generate code for structs declared
>> within unions. Tested with "ibv_send_wr" shown on the following man
>> page.
>>
>> https://linux.die.net/man/3/ibv_post_send
>>
>> Although it is possible to get a MemorySegment for "wr", it's rather
>> difficult to work with it without having its corresponding
>> MemoryLayout. In this case it is relatively important to access the
>> fields of the structs in the union, as these describe how an
>> operation is to be executed.
>>
>> Best regards,
>> Filip
More information about the panama-dev
mailing list