mirror of https://github.com/sbt/sbt.git
Previously, the ClassLoaderLayeringStrategy was set globally. This didn't really make sense because the Runtime and Test configs had different strategies available (Test being a superset of Runtime). Instead, we now set the layering strategy in the Runtime and Test configurations directly. In doing this, we can eliminate the Default ClassLoaderLayeringStrategy. Previously this had existed so that we could set the layering strategy globally and have it do the right thing in both test and runtime. To implement this, I factored out the logic for generating the layered classloader in the test task and shared it with the runtime task. I did this because I realized that Test / run is a thing. Previously I had been operating under the assumption that the runner would never include the test dependencies. Once I realized this, it made sense to combine the logic in both tasks. As a bonus, I only allow the layering strategies that explicitly make sense to be set in each configuration. If the user sets an invalid strategy, an error will be thrown that specifies the valid strategies for the task. I also added ScalaInstance as an option for the runtime layer. It was an oversight that this was left out. |
||
|---|---|---|
| .. | ||
| src/main/scala/sbt/scriptedtest | ||
| NOTICE | ||