don't include si.allJars into the test classpath

allJars contains unwanted Scala modules.
Having this in prevents the flat classloader from working correctly.

Ref #4609
This commit is contained in:
Eugene Yokota 2019-05-12 23:51:17 -04:00
parent b00c675a19
commit 5c85c04e0d
1 changed files with 2 additions and 2 deletions

View File

@ -31,8 +31,8 @@ private[sbt] object ClassLoaders {
private[sbt] def testTask: Def.Initialize[Task[ClassLoader]] = Def.task {
val si = scalaInstance.value
val rawCP = data(fullClasspath.value)
val fullCP = if (si.isManagedVersion) rawCP else si.allJars.toSeq ++ rawCP
val exclude = dependencyJars(exportedProducts).value.toSet ++ si.allJars
val fullCP = if (si.isManagedVersion) rawCP else List(si.libraryJar) ++ rawCP
val exclude = dependencyJars(exportedProducts).value.toSet ++ Set(si.libraryJar)
buildLayers(
strategy = classLoaderLayeringStrategy.value,
si = si,