mirror of https://github.com/sbt/sbt.git
Now that we have the fileTreeView task, we can generalized the process of collecting files from the view (which may or may not actually cache the underlying file tree). I moved the implementation of collectFiles and addBaseSources into the new FileManagement object because Defaults is already too large of a file. When we query the view, we also need to register the directory we're listing because if the underlying view is a cache, we must call register before any entries will be available. Because FileTreeDataView doesn't have a register method, I implement registration with a simple implicit class that pattern matches on the underlying type and only calls register if it is actually a FileRepository. A side effect of this change is that the underlying files returned by collectFiles and appendBaseSources are StampedFile instances. This is so that in a subsequent commit, I can add a Zinc external hook that will read these stamps from the files in the source input array rather than compute the stamp on the fly. This leads to a substantial reduction in Zinc startup time for projects with many source files. The file filters also may be applied more quickly because the isDirectory property (which we check for all source files) is read from a cached value rather than requiring a stat. I had to update a few of the scripted tests to use the `1.2.0` FileTreeViewConfig because those tests would copy a file and then immediately re-compile. The latency of cache invalidation is O(1-10ms), but not instantaneous so it's necessary to either use a non-caching FileTreeView or add a sleep between updates and compilation. I chose the former. |
||
|---|---|---|
| .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.