From 0e29e36dce77b07eb899abac809c2fce9d60c140 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Wed, 6 Sep 2023 10:37:50 +0200 Subject: [PATCH] Fix version check for gu and add a better warning. --- .github/workflows/test.yml | 4 ++++ dist/main/index.js | Bin 2932246 -> 2932577 bytes src/gu.ts | 18 ++++++++++++------ 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b66082c..781c476 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,6 +35,10 @@ jobs: - java-version: 'dev' distribution: '' os: windows-latest + - java-version: '17.0.7' + distribution: 'graalvm-community' + os: ubuntu-latest + components: 'native-image' # should print a warning but not fail steps: - uses: actions/checkout@v3 - name: Run setup-graalvm action diff --git a/dist/main/index.js b/dist/main/index.js index a3765d424a207ad133b487f1a4231b3a3a9da395..caefa0a30c2f2d9a869b4a7b194dc6209f1517de 100644 GIT binary patch delta 355 zcmY+;%}N4M90hQ!OsBF^$ILSO`!!}CrV9xLcR^GHu38ikgWjp3J9A|m6;~P@sBH+& zE7Vp3AEs6B5z(xQ7C$(f!#U%xiRbfs;u*q&8O&l1Ud+P>KO`(*5laYQ87o*t5Fvyi zBZ4(Vv5puvu!%Ufkia$wNu-cQ2HAJzHtZ`D3&mVM?>vSi+0jBuBvT?qp@uM8!epl1 zzAoNStyZI)soHv%9q5L7$40?vWPGJ~oxyWf8q_&c+l(w`h%TelU$^?dl}nLk34{8g zV^L374;mLe(sa%WbZV2{CbeS=!`*49ocBpL8@$tGO=`P|(TSz1{PKb{VbR&~IhBs8 zbZ^@&r>kes5c(Miy@MIsxI4^mhUm>pF zLYxp-lqgf7N(~zampUE|nzU%sp^L;PphuqpAwx!tnJ{HW#GD07R;=&pD6KfrdFsf^ eEA;f!S8sjT+wM6Flo^{FGcmVj`pAM^e)|K_oi9fK diff --git a/src/gu.ts b/src/gu.ts index b3c9039..0d9dac8 100644 --- a/src/gu.ts +++ b/src/gu.ts @@ -37,13 +37,19 @@ export async function setUpGUComponents( if ( graalVMVersion === c.VERSION_DEV || javaVersion === c.VERSION_DEV || - (semverValid(javaVersion) && semverGte(javaVersion, '21')) + (semverValid(javaVersion) && semverGte(javaVersion, '21.0.0')) ) { - core.warning( - `Unable to install component(s): '${components.join( - ',' - )}'. The latest GraalVM dev builds and the upcoming GraalVM for JDK 21 no longer include the GraalVM Updater: https://github.com/oracle/graal/issues/6855` - ) + if (components.length == 1 && components[0] === 'native-image') { + core.warning( + `Please remove "components: 'native-image'" from your workflow file. It is automatically included since GraalVM for JDK 17: https://github.com/oracle/graal/pull/5995` + ) + } else { + core.warning( + `Unable to install component(s): '${components.join( + ',' + )}'. The latest GraalVM dev builds and the upcoming GraalVM for JDK 21 no longer include the GraalVM Updater: https://github.com/oracle/graal/issues/6855` + ) + } } else if (graalVMVersion.startsWith(c.MANDREL_NAMESPACE)) { core.warning( `Mandrel does not support GraalVM component(s): '${components.join(',')}'`