Skip to content

Conversation

@retronym
Copy link
Member

@retronym retronym commented Mar 2, 2020

To support: #8726 and mkeskells@8ffaf9c6a

@scala-jenkins scala-jenkins added this to the 2.12.12 milestone Mar 2, 2020
@retronym retronym changed the title Backport releaseFence for internal use in collections Backport releaseFence for internal use in immutable collection builders Mar 2, 2020
@retronym
Copy link
Member Author

retronym commented Mar 2, 2020

(Not needed until after 2.12.11 is released)

@retronym retronym requested a review from lrytz March 2, 2020 05:41
@retronym retronym force-pushed the backport/release-fence branch from d0994d0 to 7490621 Compare March 2, 2020 07:30
@johnynek
Copy link
Contributor

This PR seems to be breaking the ability to use graalvm native image for me:

here is an error output:

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.LambdaForm$MH/634445912.invoke_MT(Object, Object)
[bosatsu:3147]     analysis:  57,890.61 ms,  2.52 GB
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.
Detailed message:
Trace: 
	at parsing scala.collection.immutable.VM.releaseFence(VM.java:25)
Call path from entry point to scala.collection.immutable.VM.releaseFence(): 
	at scala.collection.immutable.VM.releaseFence(VM.java:25)
	at scala.collection.immutable.HashSet$HashSetBuilder.result(HashSet.scala:1283)
	at scala.collection.immutable.Set$SetBuilderImpl.result(Set.scala:344)
	at scala.collection.immutable.Set$SetBuilderImpl.result(Set.scala:329)
	at scala.collection.generic.GenericCompanion.apply(GenericCompanion.scala:57)
	at fastparse.parsers.Combinators$Repeat.toString(Combinators.scala:496)
	at java.lang.String.valueOf(String.java:2994)
	at java.nio.charset.IllegalCharsetNameException.<init>(IllegalCharsetNameException.java:55)
	at java.nio.charset.Charset.checkName(Charset.java:315)
	at com.oracle.svm.core.jdk.Target_java_nio_charset_Charset.lookup(CharsetSubstitutions.java:78)
	at java.nio.charset.Charset.isSupported(Charset.java:505)
	at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_ARRAY:Ljava_nio_charset_Charset_2_0002eisSupported_00028Ljava_lang_String_2_00029Z(generated:0)

Error: Use -H:+ReportExceptionStackTraces to print stacktrace of underlying exception
Error: Image build request failed with exit status 1

It seems related to this graal issue: oracle/graal#955

It's a real shame to lose the ability to get native-image in scala.

hamzaremmal pushed a commit to hamzaremmal/scala3 that referenced this pull request May 2, 2025
Backport releaseFence for internal use in immutable collection builders
hamzaremmal pushed a commit to scala/scala3 that referenced this pull request May 7, 2025
Backport releaseFence for internal use in immutable collection builders
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants