Skip to content

Conversation

gounthar
Copy link

Following issue sdkman/sdkman-cli#1321, I propose to add the RISCV64 architecture to discoapi.

  • Add riscv64 architecture to ARCHITECTURE_MAP in src/main/java/io/foojay/api/distribution/Temurin.java.
  • Update getUrlForAvailablePkgs method to include riscv64 in src/main/java/io/foojay/api/distribution/Temurin.java.

Summary

  • New Features
    • Added support for the RISCV64 architecture in the architecture mapping, enhancing the capability to handle a broader range of architectures for package requests.

Walkthrough

The changes introduced in this pull request involve the addition of a new architecture, RISCV64, to the ARCHITECTURE_MAP within the Temurin class. This update includes mapping the RISCV64 architecture to the string representation "riscv64", allowing the Temurin class to support RISC-V 64-bit architecture in URL parameters. No other modifications to logic or error handling were made, ensuring that the existing functionality of the class remains unchanged.

Changes

File Path Change Summary
src/main/java/io/foojay/api/distribution/Temurin.java Added RISCV64 to ARCHITECTURE_MAP, mapping to "riscv64".

Fixes #1

Add support for RISC-V 64-bit architecture in discoapi.

* Add `riscv64` architecture to `ARCHITECTURE_MAP` in `src/main/java/io/foojay/api/distribution/Temurin.java`.
* Update `getUrlForAvailablePkgs` method to include `riscv64` in `src/main/java/io/foojay/api/distribution/Temurin.java`.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/gounthar/discoapi/issues/1?shareId=XXXX-XXXX-XXXX-XXXX).
@HanSolo
Copy link
Collaborator

HanSolo commented Oct 28, 2024

The RiscV64 pkgs from Temurin are already available...please check for example this: https://api.foojay.io/disco/v3.0/packages?distribution=temurin&latest=available&release_status=ga&architecture=riscv64&jdk_version=23

@gounthar
Copy link
Author

Thank you for the feedback.

I initially thought my proposed changes would resolve this SDKMan! issue. I now understand that adding riscv64 to the Temurin class was not necessary.

I apologize for the confusion. I'm still learning how the system handles architectures without explicit definitions. Could you help me understand this better?

@HanSolo
Copy link
Collaborator

HanSolo commented Oct 28, 2024

SDKMan gets all OpenJDK and GraalVM distributions from discoapi. But that doesn’t mean they provide all architectures etc. that disco offers.

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

Successfully merging this pull request may close these issues.

2 participants