Skip to content

Commit 4ef1685

Browse files
author
Jules Ivanic
committed
Remove components: native-image for GraalVM Distribution (JDK 17+)
Since GraalVM for JDK 17, native-image is bundled by default and the components parameter is deprecated, causing a warning in GitHub Actions. See: oracle/graal#5995
1 parent c3eba43 commit 4ef1685

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

.bsp/sbt.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"name":"sbt","version":"1.11.4","bspVersion":"2.1.0-M1","languages":["scala"],"argv":["/Users/jules/.sdkman/candidates/java/21.0.9-amzn/bin/java","-Xms100m","-Xmx100m","-classpath","/Users/jules/Library/Caches/Coursier/arc/https/github.com/sbt/sbt/releases/download/v1.10.7/sbt-1.10.7.zip/sbt/bin/sbt-launch.jar","-Dsbt.script=/Users/jules/Library/Caches/Coursier/arc/https/github.com/sbt/sbt/releases/download/v1.10.7/sbt-1.10.7.zip/sbt/bin/sbt","xsbt.boot.Boot","-bsp"]}

src/main/scala/sbtghactions/WorkflowStep.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,15 @@ object WorkflowStep {
6464
"github-token" -> s"$${{ secrets.GITHUB_TOKEN }}",
6565
"cache" -> "sbt"))
6666
case jv @ JavaSpec(JavaSpec.Distribution.GraalVM(Graalvm.Distribution(distribution)), version) =>
67+
// Note: native-image is included by default in GraalVM for JDK 17+
68+
// See: https://github.com/oracle/graal/pull/5995
6769
WorkflowStep.Use(
6870
Action.setupGraalvm,
6971
name = Some(s"Setup GraalVM (${jv.render})"),
7072
cond = Some(s"matrix.java == '${jv.render}'"),
7173
params = ListMap(
7274
"java-version" -> s"$version",
7375
"distribution" -> distribution,
74-
"components" -> "native-image",
7576
"github-token" -> s"$${{ secrets.GITHUB_TOKEN }}",
7677
"cache" -> "sbt"))
7778
case jv @ JavaSpec(dist, version) =>

src/test/scala/sbtghactions/GenerativePluginSpec.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,9 @@ class GenerativePluginSpec extends Specification {
594594
javas = javas),
595595
"")
596596

597-
results mustEqual s"""abc:
597+
// Note: components: native-image is not included for Graalvm.Distribution
598+
// because native-image is bundled by default in GraalVM for JDK 17+
599+
results mustEqual s"""abc:
598600
name: How to get to...
599601
strategy:
600602
matrix:
@@ -609,7 +611,6 @@ class GenerativePluginSpec extends Specification {
609611
with:
610612
java-version: 17
611613
distribution: graalvm
612-
components: native-image
613614
github-token: $${{ secrets.GITHUB_TOKEN }}
614615
cache: sbt"""
615616
}

0 commit comments

Comments
 (0)