-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scala 2.12.12 ArrayOps#++ no longer able to build GraalVM native image #12116
Comments
Related discussion happening in #11634. |
I hit on the same issue and was able to work around it with the steps here #11634 (comment) |
I milestoned this 2.12.13 since in that timeframe perhaps someone™️ could at least document the situation |
@olafurpg is there any reason your substitution code couldn't be the implementation in the repo? Do we want to avoid Unsafe maybe? I'd love to not to have to make a change to work around. |
We could publish a re-usable library that provides the native-image substitutions but I am not sure if it would work with any native-image version. Worst case, I suppose we could cross-build this library against multiple native image versions. |
What about a Multi-Release JAR and using |
would it be possible to re-implement |
I published the workaround from #11634 (comment) as an independent library:
The jar is 4kb and has no external dependencies besides scala-library. You can download the jar and add it manually to the classpath if you prefer https://repo1.maven.org/maven2/org/scalameta/svm-subs_2.13/19.3.2/svm-subs_2.13-19.3.2.jar This workaround is only needed for 2.12.12+ and 2.13.3+ |
In case anyone is interested, I published a new plugin called sbt-native-image (https://github.com/scalameta/sbt-native-image) that automatically adds the correct svm-subs dependency and provides other nice features like automatic GraalVM installation |
I don't think so for two reasons:
|
Good news:
(from oracle/graal#2761 (comment)) |
This was reported originally as sbt/sbt#5756
reproduction steps
using Scala 2.12.12:
(actual code looks like https://github.com/sbt/sbt/blob/8ce423b088b85bb3016cfb994791c3536f7b627e/internal/util-logging/src/main/scala/sbt/internal/util/Terminal.scala#L384-L391)
Then build GraalVM native image.
problem
See https://ci.appveyor.com/project/sbt/sbt/builds/34671063/job/qveplsfqy7wyby3m
expectation
I can continue to build GraalVM native image?
note
The last call on the stack is
scala.collection.immutable.HashSet.HashSetBuilder.result
: https://github.com/scala/scala/blob/v2.12.12/src/library/scala/collection/immutable/HashSet.scala#L1281-L1285VM.releaseFence()
was added in scala/scala#8722.The text was updated successfully, but these errors were encountered: