Replace DISCO API with GitHub API for Mandrel latest version resolution.#213
Replace DISCO API with GitHub API for Mandrel latest version resolution.#213fniephaus merged 2 commits intograalvm:mainfrom
Conversation
70f3542 to
ea406fb
Compare
The Foojay DISCO API is no longer needed for resolving the latest Mandrel release. Instead, use the GitHub Releases API to search for matching assets directly in the graalvm/mandrel repository. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ea406fb to
043be01
Compare
src/mandrel.ts
Outdated
| throw new Error(`Failed to fetch latest Mandrel release for Java ${javaVersion} from DISCO API: ${response.result}`) | ||
| } | ||
| const result = response.result?.result[0] | ||
| const expectedPrefix = `mandrel-java${javaVersion}-${c.GRAALVM_PLATFORM}-${c.GRAALVM_ARCH}-` |
There was a problem hiding this comment.
Blocking: this uses c.GRAALVM_PLATFORM, which is darwin on macOS, but Mandrel release assets use macos in their filenames. That means version: latest will stop resolving on macOS after this change, even though it works on Linux.
The previous DISCO lookup used c.JDK_PLATFORM, which maps macOS correctly to macos. I think this match should use the Mandrel/JDK platform token instead of the raw GraalVM platform token. 🤖
|
Could we add a test for the platform-specific asset prefix used by |
Use `JDK_PLATFORM` instead of `GRAALVM_PLATFORM` so macOS resolves to `macos` (not `darwin`) when matching Mandrel release assets. Extract `matchesMandrelAsset()` helper and add a unit test covering all platforms. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Foojay DISCO API is not needed for resolving the latest Mandrel
release. Instead, use the GitHub Releases API to search for matching assets
directly in the graalvm/mandrel repository.
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
Closes #211