mirror of https://github.com/sbt/sbt.git
Prior to this commit, it was difficult to prevent the sbt metabuild classpath from leaking into the runtime and test classpaths. The biggest issue is that the test-inferface jar was located in the metabuild classpath. We tried to prevent leakage using the DualClassLoader, but this was an ugly solution that did not seem to work reliably. The fix is to modify the actual sbt metabuild classloader provided by the sbt launcher. To do this, I add a new classloader SbtMetaClassLoader that isolates the test-interface jar from the rest of the classpath. I modify xMain to create a new AppConfiguration that uses this new classloader and use reflection to invoke the sbt main method using the new classloader. Not only do I think that this is a much saner solution than DualLoaders, I accidentally fixed #4575 with this change. |
||
|---|---|---|
| .. | ||
| src | ||
| NOTICE | ||