subs


License

License

Categories

Categories

Scala Languages
GroupId

GroupId

org.scalameta
ArtifactId

ArtifactId

svm-subs_2.13
Last Version

Last Version

20.2.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_2.13

How to add to project

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

Dependencies

compile (1)

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

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
20.2.0
20.1.0
20.0.0
19.3.3
19.3.2
19.3.1
19.3.0