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

Feature: Add support for jextract #663

Open
1 of 2 tasks
overheadhunter opened this issue Sep 28, 2023 · 17 comments · Fixed by #664
Open
1 of 2 tasks

Feature: Add support for jextract #663

overheadhunter opened this issue Sep 28, 2023 · 17 comments · Fixed by #664

Comments

@overheadhunter
Copy link

Feature request

The jextract tool used to be part of the JDK in older builds of Project Panama but has been externalized to decouple the release cycle. It helps generating Java bindings from C header files using the FFM API (currently still in preview).

You might want to have multiple versions of jextract installed at the same time, each of which compatible with a different JDK. SDKMAN! would simplify managing those installations.

@helpermethod
Copy link
Member

Hi @overheadhunter,

just gave it a quick look, and it's possible to distribute jextract via SDKMAN!.

But note that only ea builds currently exist, so at some point the URLs pointing to the binaries may stop working.

@marc0der Wdyt? I guess it would be a great addition to SDKMAN!.

@helpermethod helpermethod transferred this issue from sdkman/sdkman-cli Sep 28, 2023
@marc0der
Copy link
Member

Yep, I see no problem in supporting jextract, although we would need to do some additional work as it is only distributed as .tgz.

@helpermethod
Copy link
Member

helpermethod commented Sep 28, 2023

@marc0der Prebuilt binaries are distributed as .tar.gz. Do we need to make changes to the sdkman-candidates service?

@marc0der
Copy link
Member

We will need to make some changes to hooks to handle this. After that we can merge. I'll see what I can do over the weekend.

@marc0der
Copy link
Member

marc0der commented Sep 30, 2023

Okay, I've deployed the changes to sdkman-hooks. I'll unblock the PR @helpermethod

@marc0der
Copy link
Member

marc0der commented Oct 1, 2023

Hi @overheadhunter, we released Jextract but realised it includes java and javac too. This is a big problem because it clobbers the java binaries provided by our java candidate. I will need to pull Jextract for now until this issue is resolved.

@helpermethod
Copy link
Member

I've asked on the jextract-dev mailing list if they could remove java and javac from the binaries but it doesn't seem that easy

Hi,
While removing javac should be doable, I think dropping the java
launcher is more problematic, as that launcher is called by the jextract
launcher.

So, doing something like that would require a deeper restructuring of
the build layout I'm afraid.

Maurizio

So I fear we can't support jextract any time soon.

@overheadhunter
Copy link
Author

I have seen Maurizio's answer as well.

I guess adding a different dir to PATH, which solely contains a symlink to the jextract binary is not an option?

@marc0der
Copy link
Member

marc0der commented Oct 3, 2023

It's a big pity, and we can always revisit this if they find a different way of repackaging their tools.

@helpermethod
Copy link
Member

helpermethod commented May 30, 2024

@overheadhunter The jextract guys made some changes to the distribution so that we should finally be able to publish EA builds.

PR incoming
#695

@overheadhunter
Copy link
Author

Great news, looking forward to it!

@marc0der
Copy link
Member

marc0der commented Jun 1, 2024

It would be great to test these binaries with a local install before we add jextract @helpermethod

@helpermethod
Copy link
Member

helpermethod commented Jun 1, 2024

It would be great to test these binaries with a local install before we add jextract @helpermethod

Tested the latest version on Ubuntu and it seems to work fine.

Directory structure fits, jextract binary is executable.

IMG_20240601_122342.jpg

Looking at the extracted TAR, I wonder if the version shouldn't just include the OpenJDK version 🤔.

@marc0der
Copy link
Member

marc0der commented Jun 1, 2024

Okay, so is it a tar archive? Do they have a zip variant? If it's only tar, we'll need to override it in the hooks service.

Looking at the extracted TAR, I wonder if the version shouldn't just include the OpenJDK version

We're you referring to the version in the containing folder?

@helpermethod
Copy link
Member

Okay, so is it a tar archive? Do they have a zip variant? If it's only tar, we'll need to override it in the hooks service.

Looking at the extracted TAR, I wonder if the version shouldn't just include the OpenJDK version

We're you referring to the version in the containing folder?

Yes, it's only distributed as a TAR, so we also need to extend the hooks service.

@helpermethod
Copy link
Member

helpermethod commented Jun 2, 2024

@marc0der It seems you already made the necessary changes to the sdkman-hooks service a while ago

sdkman/sdkman-hooks@7781dcb

@marc0der
Copy link
Member

marc0der commented Jun 2, 2024

Yeah, I was just rereading the thread above and saw it ☺️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants