subs


License

License

Categories

Categories

Scala Languages
GroupId

GroupId

org.scalameta
ArtifactId

ArtifactId

svm-subs
Last Version

Last Version

101.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

subs
subs
Project URL

Project URL

https://github.com/scalameta/svm-subs
Project Organization

Project Organization

org.scalameta
Source Code Management

Source Code Management

https://github.com/scalameta/svm-subs

Download svm-subs

How to add to project

<!-- https://jarcasting.com/artifacts/org.scalameta/svm-subs/ -->
<dependency>
    <groupId>org.scalameta</groupId>
    <artifactId>svm-subs</artifactId>
    <version>101.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.scalameta/svm-subs/
implementation 'org.scalameta:svm-subs:101.0.0'
// https://jarcasting.com/artifacts/org.scalameta/svm-subs/
implementation ("org.scalameta:svm-subs:101.0.0")
'org.scalameta:svm-subs:jar:101.0.0'
<dependency org="org.scalameta" name="svm-subs" rev="101.0.0">
  <artifact name="svm-subs" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.scalameta', module='svm-subs', version='101.0.0')
)
libraryDependencies += "org.scalameta" % "svm-subs" % "101.0.0"
[org.scalameta/svm-subs "101.0.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.12

Project Modules

There are no modules declared in this project.

GraalVM native-image substitutions for Scala

This project exists to fix the following errors when running Scala applications with native-image

Error: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Invoke with MethodHandle argument could not be reduced to at most a single call or single field access. The method handle must be a compile time constant, e.g., be loaded from a `static final` field. Method that contains the method handle invocation: java.lang.invoke.MethodHandle.invokeBasic()
To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The error is then reported at run time when the invoke is executed.
Trace: 
	at parsing java.lang.invoke.LambdaForm$MH/1971838936.invoke_MT(LambdaForm$MH)
Call path from entry point to java.lang.invoke.LambdaForm$MH/1971838936.invoke_MT(Object, Object): 
	at java.lang.invoke.LambdaForm$MH/1971838936.invoke_MT(LambdaForm$MH)
	at scala.collection.immutable.VM.releaseFence(VM.java:25)

To use this project, add to build.sbt

  // build.sbt
  lazy val myNativeImageProject = project
    .settings(
+     libraryDependencies += "org.scalameta" %% "svm-subs" % "GRAALVM_VERSION" % "compile-internal"
    )

Replace GRAALVM_VERSION with a GraalVM version like "20.2.0". See releases for what GraalVM versions are supported.

That's it. The next time you generate a native image you should not get this error anymore.

Related issues:

org.scalameta
Developer tooling for Scala

Versions

Version
101.0.0