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

+java #89

Open
vemonet opened this issue Dec 22, 2022 · 20 comments
Open

+java #89

vemonet opened this issue Dec 22, 2022 · 20 comments
Labels
top-300 Top 300 packages

Comments

@vemonet
Copy link

vemonet commented Dec 22, 2022

At least OpenJDK ☕️

@mxcl
Copy link
Member

mxcl commented Jan 1, 2023

refs

notes

We don't support casks (people will be welcome to create a pantry to do that, but the base tea will not). But potentially we can extract the files from the .pkg and create a bottle from that. Depends if java makes system changes or not.

@jonchang
Copy link
Contributor

jonchang commented Jan 3, 2023

Note that java on macOS aarch64 has historically required a ton of patches to properly build (with tons of fun migrating patches for each new version), so it may not be possible to build "all the versions" without a lot of work. Extracting the files from the .pkg should work as long as we are careful about relocation and rpaths (java does some special stuff here which Homebrew didn't figure out until very recently)

@mxcl
Copy link
Member

mxcl commented Jan 17, 2023

There's a reason other PMs don't “build all the versions”, certainly going into this I knew it would be a challenge. This may be one of the first to make that painful.

Yet! We'll try all the same!

@tnxz
Copy link
Contributor

tnxz commented Jan 18, 2023

can't we have something like sdkman to do all the heavy lifting and tea magic script to wrap around it.

@mxcl
Copy link
Member

mxcl commented Jan 18, 2023

@tnxz nice. As long as sdkman can give us something we can “bottle” then it's good for our current system.

Failing that we can package sdkman and recommend that (for now, a goal is ofc to pkg everything).

mxcl added a commit that referenced this issue Mar 15, 2023
@mxcl mxcl added the top-300 Top 300 packages label Mar 15, 2023
@tnxz
Copy link
Contributor

tnxz commented Apr 23, 2023

so there is this github-actions https://github.com/sdkman/sdkman-action for sdkman can't we use it to directly package java somehow.

@mxcl
Copy link
Member

mxcl commented Apr 23, 2023

I started openJDK #1337

@felipecrs
Copy link
Contributor

I noticed this is already done by #2684

@mxcl
Copy link
Member

mxcl commented Aug 1, 2023

it depends, is it possible to pkg java properly? We would need a license that allows redistribution and it would need to be pkg'd in a way that can be relocatable.

@felipecrs
Copy link
Contributor

felipecrs commented Sep 26, 2023

You can consider Eclipse Temurin (tea +adoptium.net/temurin) if you have trouble with the Oracle licenses. It's the most widely vendor-neutral free JDK and JRE distribution AFAIK.

Also, having a single version of Java available doesn't fit any dev env workflow. Would be nice to have automatic new versions for Java and past versions as well, preferably down to Java 8. :P

PS: I'm just saying it would be nice to have, and I know it's easy to say. Maybe someday I'll get my hands dirty on it.

@felipecrs
Copy link
Contributor

felipecrs commented Feb 21, 2024

What I am most missing from this right now is that only a few versions are available. It would be great to see more versions available, ideally automatic discovery/building like there is for golang, python and node.

@jhheider
Copy link
Contributor

it's slightly trickier, since they're all different repos. that said, we can add any versions needed, assuming they're not insanely different to build (or if they are, but that takes more work).

@felipecrs
Copy link
Contributor

felipecrs commented Feb 21, 2024

Some versions I'd say are important, ordered by importance:

  • 21 LTS (current latest LTS)
  • 17 LTS (already pkged)
  • 11 LTS
  • 8 LTS (still used by tons of legacy software)

And also, I'd say it's ok if adding support for newer major versions has to be done manually (because of the new repo), but automatically building the patch releases for a given minor (autodiscovery of git tags) would be even greater.

@jhheider
Copy link
Contributor

versions:
  # TODO: more majors
  - github: openjdk/jdk20u/tags
    # each repo contains all the prior repo tags at the time of the fork,
    # as well as tags like 20+10, which should be 20.0.0.10, but parses to
    # 20.10.0.
    transform: 'v => v.match(/jdk-20\.0\./) ? v.replace(/\+/, ".").replace(/^jdk-/, "") : undefined'
  - github: openjdk/jdk17u/tags
    transform: 'v => v.match(/jdk-17\.0\./) ? v.replace(/\+/, ".").replace(/^jdk-/, "") : undefined'

i believe we do currently build minors as they're tagged.

@felipecrs
Copy link
Contributor

felipecrs commented Feb 21, 2024

Oh. That's great! But there are a bunch of newer JDK 17 available already like 17.0.11.4 (https://github.com/openjdk/jdk17u/tags). I wonder what's going on then, because currently pkgx has only 17.0.10.6.

@jhheider
Copy link
Contributor

probably a problem with our monitoring infrastructure. it uses some of brewkit's logic. i'll take a look. I can trigger the newest build now.

@felipecrs
Copy link
Contributor

felipecrs commented Feb 21, 2024

No, don't worry. I don't need it now.

EDIT: I see you did it already. Alright. Thank you!

@felipecrs
Copy link
Contributor

I created a separate issue for Temurin btw: #5467

@felipecrs
Copy link
Contributor

Now there is openjdk@21, openjdk@17, and openjdk@11.

openjdk@8 is indeed used by a lot of legacy software, but the main deal is that it cannot be compiled for Apple Silicon, and currently pkgx does not support limiting architectures depending on the version of a package (otherwise we would need to build a new separate package name).

So I think this issue can be closed now. We have an issue targeting temurin already and if someone (other than me 😅) requests openjdk@8 then we may consider supporting it.

@jhheider
Copy link
Contributor

openjdk@8 is indeed used by a lot of legacy software, but the main deal is that it cannot be compiled for Apple Silicon, and currently pkgx does not support limiting architectures depending on the version of a package (otherwise we would need to build a new separate package name).

i'm perfectly happy if you want an openjdk.org/v8 project that only has x86-64 platforms. if you need it, others likely do as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
top-300 Top 300 packages
Projects
None yet
Development

No branches or pull requests

6 participants