graalvm / setup-graalvm

GitHub Action for setting up GraalVM distributions.
https://www.graalvm.org
Universal Permissive License v1.0
192 stars 27 forks source link

Error message when a component is requested on GraalVM 21 can be improved #62

Closed michael-simons closed 1 year ago

michael-simons commented 1 year ago

When you request a component such as native-image on GraalVM for JDK 21 or higher a misleading error is produced

Run graalvm/setup-graalvm@v1
  with:
    distribution: graalvm-community
    java-version: 21
    components: native-image
    github-token: ***
    set-java-home: true
    check-for-updates: true
    native-image-musl: false
    native-image-job-reports: false
    native-image-pr-reports: false
/usr/bin/tar xz --warning=no-unknown-keyword --overwrite -C /home/runner/work/_temp/1d60d5ac-45a7-4113-847b-7fe3662415df -f /home/runner/work/_temp/fe77861f-8945-4f3d-a1e9-79b878b6c46c
Adding graalvm-community-jdk-21.0.0_linux-x64_bin 21.0.0 to tool-cache ...
Error: Unable to locate executable file: gu. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.

It complains (rightfully) that gu is not available (Background "Gu is dead", https://medium.com/graalvm/truffle-unchained-13887b77b62c and others), which is an implementation detail here it should be better something along the lines "no need to install this as a component on version x of GraalVM" or similar.

My personal upgrade path was this

image

And I maybe missed warnings on interim distributions and versions.

fniephaus commented 1 year ago

Thanks for raising this! Already working on a fix for this. I just checked and it seems the corresponding test never ran due to a misconfiguration (see https://github.com/graalvm/setup-graalvm/commit/6c7d417a1ef253f4d667a69e6a5716927746e251).

michael-simons commented 1 year ago

My pleasure, always happy to give back a bit into that great ecosystem.