Skip to content

Commit

Permalink
upgrade to graalvm 22.3.0 (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindberg authored Nov 6, 2022
1 parent c7fbcca commit 6f493d0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
uses: graalvm/setup-graalvm@v1
if: runner.os == 'Windows'
with:
version: '22.2.0'
version: '22.3.0'
java-version: '17'
components: 'native-image'

Expand Down
11 changes: 10 additions & 1 deletion bleep-cli/src/scala/bleep/Main.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,18 @@ import java.io.{BufferedWriter, PrintStream}
import java.nio.file.{Path, Paths}
import java.time.Instant
import scala.concurrent.ExecutionContext
import scala.util.{Failure, Success, Try}
import scala.util.{Failure, Properties, Success, Try}

object Main {
private def isGraalvmNativeImage: Boolean =
sys.props.contains("org.graalvm.nativeimage.imagecode")

if (Properties.isWin && isGraalvmNativeImage)
// have to be initialized before running (new Argv0).get because Argv0SubstWindows uses csjniutils library
// The DLL loaded by LoadWindowsLibrary is statically linke/d in
// the Scala CLI native image, no need to manually load it.
coursier.jniutils.LoadWindowsLibrary.assumeInitialized()

val stringArgs: Opts[List[String]] =
Opts.arguments[String]().orNone.map(args => args.fold(List.empty[String])(_.toList))

Expand Down
4 changes: 2 additions & 2 deletions bleep.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
$schema: https://raw.githubusercontent.com/oyvindberg/bleep/master/schema.json
$version: 0.0.1-M18
jvm:
name: graalvm-java17:22.2.0
name: graalvm-java17:22.3.0
projects:
bleep-cli:
dependencies:
- com.lihaoyi::pprint:0.8.0
- com.monovore::decline:2.3.1
- org.graalvm.nativeimage:svm:22.2.0
- org.graalvm.nativeimage:svm:22.3.0
- org.scalameta:svm-subs:101.0.0
dependsOn: bleep-core
extends:
Expand Down

0 comments on commit 6f493d0

Please sign in to comment.