mirror of https://github.com/sbt/sbt.git
Using the data structures that I added in the previous commits, it is now possible to rework the run and test task to use (configurable) layered class loaders. The layering strategy is globally set to LayeringStrategy.Default. The default strategy leads to what is effectively a three layered ClassLoader for the both the test and run tasks. The first layer contains the scala instance (and test framework loader in the test task). The second layer contains all of the dependencies for the configuration while the third layer contains the project artifacts. The layering strategy is very easily changed both at the Global or Configuration level, e.g. adding Test / layeringStrategy := LayeringStrategy.Flat to the project build.sbt will make the test task not even use the scala instance and instead a create a single layer containing the full classpath of the test task. I also tried to ensure that all of the ClassLoaders have good toString overrides so that it's easy to see how the ClassLoader is constructed with, e.g. `show testLoader`, in the sbt console. In this commit, the ClassLoaderCache instances are settings. In the next commit, I make them tasks so that we can easily clear out the caches with a command. |
||
|---|---|---|
| .github | ||
| core-macros/src/main/scala/sbt/internal/util/appmacro | ||
| internal | ||
| launch | ||
| licenses | ||
| main | ||
| main-actions/src | ||
| main-command/src | ||
| main-settings/src | ||
| notes | ||
| project | ||
| protocol/src/main | ||
| run | ||
| sbt/src | ||
| scripted-plugin/src/main/scala/sbt | ||
| scripted-sbt-old/src/main/scala/sbt/test | ||
| scripted-sbt-redux | ||
| src/main/conscript | ||
| tasks | ||
| tasks-standard | ||
| testing | ||
| vscode-sbt-scala | ||
| .appveyor.yml | ||
| .gitattributes | ||
| .gitignore | ||
| .java-version | ||
| .sbtopts | ||
| .scalafmt.conf | ||
| .travis.yml | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| NOTICE | ||
| PROFILING.md | ||
| README.md | ||
| SUPPORT.md | ||
| build.sbt | ||
| reset.sh | ||
| sbt-allsources.sh | ||
| server.md | ||
README.md
sbt
sbt is a build tool for Scala, Java, and more.
For general documentation, see http://www.scala-sbt.org/.
sbt 1.x
This is the 1.x series of sbt. The source code of sbt is split across several Github repositories, including this one.
- sbt/io hosts
sbt.iomodule. - sbt/util hosts a collection of internally used modules.
- sbt/librarymanagement hosts
sbt.librarymanagementmodule that wraps Ivy. - sbt/zinc hosts Zinc, an incremental compiler for Scala.
- sbt/sbt, this repository hosts modules that implements the build tool.
Other links
- Setup: Describes getting started with the latest binary release.
- FAQ: Explains how to get help and more.
- sbt/sbt-zero-seven: hosts sbt 0.7.7 and earlier versions
Issues and Pull Requests
Please read CONTRIBUTING carefully before opening a GitHub Issue.
The short version: try searching or asking on StackOverflow.
license
See LICENSE.