mirror of
https://github.com/sbt/sbt.git
synced 2026-08-28 17:13:56 +02:00
Don't leak the sbt boot scala library into tests
It was reported in https://github.com/sbt/sbt/issues/4608 that there was a regression that tests run against scala 2.11 would fail. This was because the interface loader incorrectly contained the scala library. To fix this, I needed to find the xsbt.boot.BootFilteredLoader in the classloading hierarchy and put the sbt testing interface library in between that loader and the scala library loader.
This commit is contained in:
@@ -255,7 +255,9 @@ final class ScriptedTests(
|
||||
case "source-dependencies/linearization" => LauncherBased // sbt/Package$
|
||||
case "source-dependencies/named" => LauncherBased // sbt/Package$
|
||||
case "source-dependencies/specialized" => LauncherBased // sbt/Package$
|
||||
case _ => RunFromSourceBased
|
||||
case "tests/test-cross" =>
|
||||
LauncherBased // the sbt metabuild classpath leaks into the test interface classloader in older versions of sbt
|
||||
case _ => RunFromSourceBased
|
||||
}
|
||||
// sbt/Package$ means:
|
||||
// java.lang.NoClassDefFoundError: sbt/Package$ (wrong name: sbt/package$)
|
||||
|
||||
Reference in New Issue
Block a user