mirror of https://github.com/sbt/sbt.git
`clearCaches` only reset the in-memory session caches (compiler cache, classloader cache, and file-cache stores) carried over from sbt 1, so none of the action caches introduced in sbt 2 were actually cleared despite the help text saying otherwise. The only way to remove the action cache was `cleanFull`, which also wipes `target/out` entirely, including build outputs and the command history. `clearCaches` now additionally deletes, while respecting `cleanKeepFiles` and `cleanKeepGlobs`: - the contents of every local `DiskActionCacheStore` (the `cas/` and `ac/` directories under `localCacheDirectory`) - the materialized task-value files under `target/out/value` - symbolic links under `target/out` that point into a cleared store, which would otherwise be left dangling Build outputs, the command history, and the boot directory are preserved. Ordering and robustness details: - The in-memory caches are reset before the on-disk stores are deleted, so files those caches may still hold open (e.g. jars referenced by cached classloaders) are released before their deletion is attempted. On Windows an open handle otherwise makes the underlying file undeletable. - `target/out` references (symlinks) are deleted before the cas blobs they point at. - Deletions retry on transient `IOException` (as `DiskActionCacheStore#syncFile` already does for writes) and, instead of being silently swallowed, any file that still cannot be deleted is reported: per-path at warn level, with the summary downgraded from "cleared" to "partially cleared". The `clearCaches` help text is updated to describe the new behavior, and a scripted test (`cache/clear-caches`) covers it. The test records a baseline of existing store entries and asserts only that the entries it creates are cleared, so unrelated blobs left behind by other tests sharing the batch sandbox are out of scope. |
||
|---|---|---|
| .agents/skills/sbt-issue-fixing | ||
| .devcontainer | ||
| .github | ||
| buildfile/src | ||
| client | ||
| contributing-docs | ||
| core-macros/src | ||
| internal | ||
| launch | ||
| launcher-package | ||
| licenses | ||
| lm-core | ||
| lm-coursier | ||
| lm-ivy/src | ||
| main | ||
| main-actions/src | ||
| main-command/src | ||
| main-settings/src | ||
| notes | ||
| project | ||
| protocol/src | ||
| run | ||
| sbt-app/src | ||
| sbt-ivy/src/main/scala/sbt | ||
| sbt-remote-cache/src | ||
| sbtw | ||
| scripted-sbt | ||
| scripts | ||
| server-test/src | ||
| src | ||
| tasks | ||
| tasks-standard | ||
| testing | ||
| util-cache | ||
| util-collection | ||
| util-tracking | ||
| worker/src | ||
| zinc-lm-integration/src | ||
| .git-blame-ignore-revs | ||
| .gitattributes | ||
| .gitignore | ||
| .gitmodules | ||
| .java-version | ||
| .jvmopts | ||
| .mailmap | ||
| .sbtopts | ||
| .scala-steward.conf | ||
| .scalafix.conf | ||
| .scalafmt.conf | ||
| AGENTS.md | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| NOTICE | ||
| PROFILING.md | ||
| README.md | ||
| SUPPORT.md | ||
| build.sbt | ||
| sbt | ||
| sbt-allsources.sh | ||
| sbt.sh | ||
| server.md | ||
README.md
sbt
sbt is a build tool for Scala, Java, and more.
For general documentation, see https://www.scala-sbt.org/.
sbt 2.x
This is the 2.x series of sbt. The source code of sbt is split across several GitHub repositories, including this one.
- sbt/io hosts
sbt.iomodule. - sbt/zinc hosts Zinc, an incremental compiler for Scala.
- sbt/sbt, this repository hosts modules that implement 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 or a pull request.
If you're looking for an idea for a contribution, issues labeled with good first issue or help wanted might be good starting points.
If you would like to ask questions about sbt, there's sbt channel on Scala Discord, but it would be good to gather questions on Stackoverflow.
license
See LICENSE.