scala / scala-dev

Scala 2 team issues. Not for user-facing bugs or directly actionable user-facing improvements. For build/test/infra and for longer-term planning and idea tracking. Our bug tracker is at https://github.com/scala/bug/issues
Apache License 2.0
130 stars 15 forks source link

Scripted tests fail #868

Open som-snytt opened 3 months ago

som-snytt commented 3 months ago

The ongoing failure of sbtTest/scripted is ridiculous. If it's not worth fixing, then maybe the task can be moved out of PR validation.

[info] [info] loading project definition from /tmp/sbt_f2aa868e/project
[info] [info] set current project to sbt_f2aa868e (in build file:/tmp/sbt_f2aa868e/)
[info] [success] Total time: 0 s, completed Apr 14, 2024 11:58:21 PM
[info] [info] welcome to sbt 1.9.9 (Oracle Corporation Java 1.8.0_332)
[info] [info] loading project definition from /tmp/sbt_f2aa868e/project
[info] [info] loading settings for project sbt_f2aa868e from common.sbt ...
[info] [info] set current project to sbt_f2aa868e (in build file:/tmp/sbt_f2aa868e/)
[info] [info] compiling 1 Scala source and 1 Java source to /tmp/sbt_f2aa868e/target/classes ...
[info] [error] ## Exception when compiling 2 sources to /tmp/sbt_f2aa868e/target/classes
[info] [error] java.lang.NoClassDefFoundError: scala/collection/concurrent/RDCSS_Descriptor
[info] [error] scala.collection.concurrent.TrieMap.RDCSS_ROOT(TrieMap.scala:788)
[info] [error] scala.collection.concurrent.TrieMap.clear(TrieMap.scala:883)
[info] [error] scala.reflect.internal.SymbolTable$perRunCaches$.$anonfun$clearAll$2(SymbolTable.scala:451)
[info] [error] scala.reflect.internal.SymbolTable$perRunCaches$.clearAll(SymbolTable.scala:451)
[info] [error] scala.tools.nsc.Global.close(Global.scala:1785)
[info] [error] scala.tools.xsbt.CachedCompiler0.close(CompilerBridge.scala:114)
[info] [error] scala.tools.xsbt.CompilerBridge.run(CompilerBridge.scala:45)
[info] [error] sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:91)
[info] [error] sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$7(MixedAnalyzingCompiler.scala:193)
[info] [error] scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
[info] [error] sbt.internal.inc.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:248)
[info] [error] sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$4(MixedAnalyzingCompiler.scala:183)
[info] [error] sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$4$adapted(MixedAnalyzingCompiler.scala:163)
[info] [error] sbt.internal.inc.JarUtils$.withPreviousJar(JarUtils.scala:239)
[info] [error] sbt.internal.inc.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:163)
[info] [error] sbt.internal.inc.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:211)
som-snytt commented 3 months ago

I have not reproduced locally on outdated JDK 8.

lrytz commented 3 months ago

It's not always the same test that fails, I assume?

som-snytt commented 3 months ago

It seems to be quite various, but I have seen this stack a few times (global.close).

a recent one was in Cleanup; that's when I realized it was not always early/in typer, i.e., not obviously an init problem

som-snytt commented 1 month ago

It's not funny any more, but relentless.

https://github.com/scala/scala/pull/10776#issuecomment-2174242547