ClassLoaderLayeringStrategy.ScalaLibrary breaks scalatest
See original GitHub issueHi,
Seems like ClassLoaderLayeringStrategy.ScalaLibrary
in 1.3.0-RC1 breaks scalatest with the a cryptic message. Surprisingly default setting works, as well as .Flat
. I guess it’s not a bug but could anyone explain this behaviour? From my understanding of the new scheme it should work fine.
[error] java.lang.NoClassDefFoundError: scala/reflect/runtime/package$
[error] at org.scalatest.tools.Framework.runner(Framework.scala:985)
[error] at sbt.Defaults$.$anonfun$createTestRunners$1(Defaults.scala:1003)
[error] at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:237)
[error] at scala.collection.immutable.Map$Map1.foreach(Map.scala:128)
[error] at scala.collection.TraversableLike.map(TraversableLike.scala:237)
[error] at scala.collection.TraversableLike.map$(TraversableLike.scala:230)
[error] at scala.collection.AbstractTraversable.map(Traversable.scala:108)
[error] at sbt.Defaults$.createTestRunners(Defaults.scala:997)
[error] at sbt.Defaults$.allTestGroupsTask(Defaults.scala:1065)
[error] at sbt.Defaults$.$anonfun$testTasks$10(Defaults.scala:804)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:67)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:270)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19)
[error] at sbt.Execute.work(Execute.scala:279)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:270)
[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.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error] at java.base/java.lang.Thread.run(Thread.java:834)
sbt 1.3.0-RC1 scala 2.12.8 scalatest 3.0.7
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
sbt/sbt - Gitter
I've tried to add ThisBuild / classLoaderLayeringStrategy := ClassLoaderLayeringStrategy.ScalaLibrary in build.sbt but still I hit the same problem.
Read more >Kafka Streams 2.3 to 2.5 upgrade breaks Scala compilation
I just had to upgrade my Scala version to the one published in the "Compiled Dependencies" section here, which is: scalaVersion := "2.12.10"....
Read more >In process class loading
It is specified via the classLoaderLayeringStrategy . There are three possible values: ScalaLibrary - The parent of the outermost layer is able to...
Read more >Scala: build.sbt
As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers.
Read more >Scala is a Maintenance Nightmare
This post explains why it's so hard to maintain Scala projects (binary incombatilbilities, frequent breaking changes, SBT plugins, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Should be fixed in https://github.com/sbt/sbt/pull/4703.
It’s me. I think broke it in https://github.com/sbt/sbt/pull/4671.
I missed the si.allJars here.