Skip to content

Add RISC-V platform support in discoapi#112

Closed
gounthar wants to merge 1 commit intofoojayio:mainfrom
gounthar:add-riscv64
Closed

Add RISC-V platform support in discoapi#112
gounthar wants to merge 1 commit intofoojayio:mainfrom
gounthar:add-riscv64

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.

gounthar added a commit to gounthar/sdkman-disco-integration that referenced this pull request Feb 7, 2026
Add riscv64 platform mapping across the disco-integration bridge:

- Platform enum: add LINUX_RISCV64
- Release: map (linux, riscv64) -> LINUX_RISCV64
- Broker: map (linux, riscv64) -> linuxriscv64
- application.properties: add riscv64 entries for Temurin and Liberica

Both vendors already publish riscv64 JDKs. The Disco API support
(foojayio/discoapi#112) is pending; once deployed, these entries
will activate automatically.

Closes sdkman#45

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gounthar
Copy link
Author

gounthar commented Feb 7, 2026

Closing this PR; as @HanSolo pointed out, the Disco API already serves riscv64 packages without needing an explicit mapping in the distribution classes.

The actual missing piece is in sdkman-disco-integration, which needs to recognize riscv64 as a platform. That's now tracked in sdkman/sdkman-disco-integration#45 with PR sdkman/sdkman-disco-integration#46.

Thanks for the explanation on how architecture resolution works!

@gounthar gounthar closed this Feb 7, 2026
@gounthar gounthar deleted the add-riscv64 branch February 7, 2026 13:59
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