You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After #5595, when I run the test set of ScalaTest based on Dotty, I got a weird runtime exception:
[error] java.lang.NoSuchMethodError: scala.reflect.internal.util.package$.SomeOfNil()Lscala/Option;
[error] at scala.reflect.internal.Definitions$DefinitionsClass.$anonfun$newT1NoParamsMethod$1(Definitions.scala:1360)
[error] at scala.reflect.internal.Definitions$DefinitionsClass.newPolyMethod(Definitions.scala:1346)
[error] at scala.reflect.internal.Definitions$DefinitionsClass.newT1NoParamsMethod(Definitions.scala:1360)
[error] at scala.reflect.internal.Definitions$DefinitionsClass.Object_isInstanceOf$lzycompute(Definitions.scala:1118)
[error] at scala.reflect.internal.Definitions$DefinitionsClass.Object_isInstanceOf(Definitions.scala:1118)
[error] at scala.reflect.internal.Definitions$DefinitionsClass.syntheticCoreMethods$lzycompute(Definitions.scala:1395)
[error] at scala.reflect.internal.Definitions$DefinitionsClass.syntheticCoreMethods(Definitions.scala:1379)
[error] at scala.reflect.internal.Definitions$DefinitionsClass.symbolsNotPresentInBytecode$lzycompute(Definitions.scala:1409)
[error] at scala.reflect.internal.Definitions$DefinitionsClass.symbolsNotPresentInBytecode(Definitions.scala:1409)
[error] at scala.reflect.internal.Definitions$DefinitionsClass.init(Definitions.scala:1465)
[error] at scala.reflect.runtime.JavaUniverse.init(JavaUniverse.scala:154)
[error] at scala.reflect.runtime.JavaUniverse.<init>(JavaUniverse.scala:93)
[error] at scala.reflect.runtime.package$.universe$lzycompute(package.scala:29)
[error] at scala.reflect.runtime.package$.universe(package.scala:29)
[error] at org.scalatest.tools.Framework.runner(Framework.scala:1005)
[error] at sbt.Defaults$.$anonfun$createTestRunners$1(Defaults.scala:944)
[error] at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:233)
[error] at scala.collection.immutable.Map$Map2.foreach(Map.scala:156)
[error] at scala.collection.TraversableLike.map(TraversableLike.scala:233)
[error] at scala.collection.TraversableLike.map$(TraversableLike.scala:226)
[error] at scala.collection.AbstractTraversable.map(Traversable.scala:104)
[error] at sbt.Defaults$.createTestRunners(Defaults.scala:938)
[error] at sbt.Defaults$.allTestGroupsTask(Defaults.scala:1000)
[error] at sbt.Defaults$.$anonfun$testTasks$10(Defaults.scala:756)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:40)
[error] at sbt.std.Transform$$anon$4.work(System.scala:67)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:269)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] at sbt.Execute.work(Execute.scala:278)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:269)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
The error does not make any sense. From source code, we can see SomeOfNil is defined in scala-reflect-2.12.8. I checked the binary file, the method indeed exists. On the other hand, if earlier versions of scala-reflect is used, it can not use SomeOfNil, otherwise scala-reflect will not compile.
It seems the only explanation is that there are more than one JAR of scala-reflect on java class path, some classes are loaded from scala-reflect-2.12.8, but others are from the other version.
The change in #5595 makes the situation above possible:
The latest SBT 1.2.7 depends on scala-reflect-2.12.7.jar
After the changes in #5595, all tests based on (ScalaTest, Dotty, SBT) will break. Reverting #5595 only temporarily addresses the issue, as this seems to be a deep problem with the sbt.
Note: fork in Test := true does not help.
The text was updated successfully, but these errors were encountered:
After #5595, when I run the test set of ScalaTest based on Dotty, I got a weird runtime exception:
The error does not make any sense. From source code, we can see
SomeOfNil
is defined inscala-reflect-2.12.8
. I checked the binary file, the method indeed exists. On the other hand, if earlier versions ofscala-reflect
is used, it can not useSomeOfNil
, otherwisescala-reflect
will not compile.It seems the only explanation is that there are more than one JAR of
scala-reflect
on java class path, some classes are loaded fromscala-reflect-2.12.8
, but others are from the other version.The change in #5595 makes the situation above possible:
1.2.7
depends onscala-reflect-2.12.7.jar
scala-reflect
, which is rewritten toch.epfl.lamp:scala-reflect
, which eventually depends onscala-reflect-2.12.8
due to Override scala organization and version transitively at the Ivy level sbt/sbt#2634 .After the changes in #5595, all tests based on
(ScalaTest, Dotty, SBT)
will break. Reverting #5595 only temporarily addresses the issue, as this seems to be a deep problem with thesbt
.Note:
fork in Test := true
does not help.The text was updated successfully, but these errors were encountered: