Giter VIP home page Giter VIP logo

Comments (23)

tbee avatar tbee commented on September 28, 2024 1

Well, it should have been once.

And that is exactly the topic of this issue; I would like to be able to list ALL versions but Marco argues that that will make the list unmanageable. And I understand, but if an --invisible flag would be added and the JDK name would because of that be present on every line (unlike your example) you can use grep.

from sdkman-candidates.

tbee avatar tbee commented on September 28, 2024 1

Ah, that makes sense; I found the possible platforms in the install script. But it does not really matter, because the current SDKMAN implementation in the backend will never return all available versions, as the original request of this issue describes. Maybe I should work around that by using disco's API.

from sdkman-candidates.

tbee avatar tbee commented on September 28, 2024

Let me be explicit in my question: maybe someone with a working local environment can make these relatively small modifications?

from sdkman-candidates.

johnshajiang avatar johnshajiang commented on September 28, 2024

With this issue, does that mean I CANNOT install a specific version of a specific JDK distribution with SDKMAN?

from sdkman-candidates.

tbee avatar tbee commented on September 28, 2024

Not if it is no longer visible. I feel that is one of the biggest issues with sdkman; I would like the possibility list ALL versions, including the invisible ones and then install any.

from sdkman-candidates.

marc0der avatar marc0der commented on September 28, 2024

That would give you an ever-expanding list of Java versions for all vendors. Simply not doable because it doesn't scale due to the combinatorial explosion.

However, if you want to reference an older version in your project through sdk env you can do so, as the historic versions are still there, just hidden from sight.

The list view exposes all latest targets for each major version, for each vendor. This is all you should ever need if you are at least considerate of security patched releases.

from sdkman-candidates.

tbee avatar tbee commented on September 28, 2024

I know. But there are projects that are certified to specific (major/minor) versions, it still would be nice to be able to list all available and then maybe grep over them if the list becomes unmanageable.

from sdkman-candidates.

johnshajiang avatar johnshajiang commented on September 28, 2024

Thanks for the above discussions.
However I still didn't get the point.

Let me clarify my case clearly.

The JDK distributions, exactly Tencent Kona JDKs, just were integrated to SDKMAN.
I can see the latest releases of Tencent Kona JDKs, like the below,

% sdk list java | grep kona 
 Tencent       |     | 17.0.7       | kona    | installed  | 17.0.7-kona
               |     | 11.0.19      | kona    |            | 11.0.19-kona
               | >>> | 8.0.372      | kona    | installed  | 8.0.372-kona

And I can install one of the above releases, for example 11.0.19,

% sdk install java 11.0.19-kona

Now, I want to install an old Tencent Kona release, say 11.0.18.
How can I do that?

from sdkman-candidates.

tbee avatar tbee commented on September 28, 2024

If you know or can derive the identifier, you can just type it. But you do not know if it is available by looking at the list, because all the out dated versions may be present, or not, because they are no longer visible. So just give 11.0.18-kona a try, maybe you are lucky. Or not.

from sdkman-candidates.

johnshajiang avatar johnshajiang commented on September 28, 2024

I just tried the below command,

% sdk install java 11.0.18-kona

but it did not work as the followings,

Stop! java 11.0.18-kona is not available. Possible causes:
 * 11.0.18-kona is an invalid version
 * java binaries are incompatible with your platform
 * java has not been released yet

Tip: see all available versions for your platform:

  $ sdk list java

I suppose, before install a specific release, it should be in the output of sdk list java at first.

from sdkman-candidates.

johnshajiang avatar johnshajiang commented on September 28, 2024

I just listed Temurin JDKs and found some older 8 releases.

% sdk list java | grep tem       
 Temurin       |     | 20.0.1       | tem     |            | 20.0.1-tem          
               |     | 19.0.2       | tem     |            | 19.0.2-tem          
               |     | 17.0.7       | tem     |            | 17.0.7-tem          
               |     | 11.0.19      | tem     |            | 11.0.19-tem         
               |     | 8.0.372      | tem     |            | 8.0.372-tem         
               |     | 8.0.362      | tem     |            | 8.0.362-tem         
               |     | 8.0.352      | tem     |            | 8.0.352-tem         
               |     | 8.0.345      | tem     |            | 8.0.345-tem 

How can I do that for Tencent Kona JDKs?
Have I to submit a PR for that?

from sdkman-candidates.

tbee avatar tbee commented on September 28, 2024

Was 11.0.18-kona ever released using sdkman?

from sdkman-candidates.

marc0der avatar marc0der commented on September 28, 2024

@johnshajiang that is by mistake. I'll be hiding those soon when I get the time.. We should only display all latest major versions per vendor in this view.

from sdkman-candidates.

johnshajiang avatar johnshajiang commented on September 28, 2024

@tbee

Was 11.0.18-kona ever released using sdkman?

No.
SDKMAN just integrated Tencent Kona JDKs, exactly the latest releases.
Then, I have another question:
When new Tencent Kona JDKs are released, do I have to submit PRs for taking SDKMAN to integrate the new releases?

from sdkman-candidates.

tbee avatar tbee commented on September 28, 2024

No, the releaser of Tencent Kona needs to perform REST calls.

https://sdkman.io/vendors

from sdkman-candidates.

marc0der avatar marc0der commented on September 28, 2024

@tbee actually no, all Java versions are fetched regularly from the Disco API that feeds us all the latest major versions per vendor.

from sdkman-candidates.

johnshajiang avatar johnshajiang commented on September 28, 2024

all Java versions are fetched regularly from the Disco API that feeds us all the latest major versions per vendor.

Hmm, only the latest releases are accessible?
Why not register some specific releases to SDKMAN db via some REST APIs?

from sdkman-candidates.

tbee avatar tbee commented on September 28, 2024

actually no, all Java versions are fetched regularly from the Disco API that feeds us all the latest major versions per vendor.

I do not understand the "no". The question was about a new release. AFAIK, and as the documentation in the link shows, the releaser of a specific JDK needs to add the release to the database using REST calls. This has nothing to do with the SDKMAN client downloading available releases?

from sdkman-candidates.

johnshajiang avatar johnshajiang commented on September 28, 2024

Just tried Disco API and found the below link can list all of Tencent Kona 11 releases on Linux x86_64.
https://api.foojay.io/disco/v3.0/packages?package_type=jdk&distribution=kona&latest=all_of_version&version=11&operating_system=linux&architecture=x64

I suppose SDKMAN uses latest=available instead.

from sdkman-candidates.

tbee avatar tbee commented on September 28, 2024

Ah, and https://api.foojay.io/disco/v3.0/packages?package_type=jdk simply lists all.
I can do something with that.

from sdkman-candidates.

tbee avatar tbee commented on September 28, 2024

This kinda gives what I am looking for;
curl https://api.foojay.io/disco/v3.0/packages?package_type=jdk | jq '.result[] | [.distribution_version, .distribution, .filename] | @TSV' | grep -i tencent | grep 17

from sdkman-candidates.

tbee avatar tbee commented on September 28, 2024

I am wondering why some SDKMan URLs do not return data, for example:
https://api.sdkman.io/2/candidates/maven/win/versions/all returns a lot of versions
vs
https://api.sdkman.io/2/candidates/java/win/versions/all returns nothing

from sdkman-candidates.

marc0der avatar marc0der commented on September 28, 2024

Maven is not platform-specific, so the win in your URL is ignored. However, Java is platform-specific and win is an invalid platform. To see what your platform is, simply examine the ~/.sdkman/var/platform file.

from sdkman-candidates.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.