sbt, the interactive build tool
Go to file
Ethan Atkins d9acfed220 Fix EvaluateTask memory leak
EvaluateTask was holding references to SafeState that could be quite
large. This was reported as #5992. In that project, I ran the `ci` task
and observed the OOM as reported. I took a heap dump prior to OOM and
got the retained size graph from visualvm (which took hours to compute).
The lastEvaluatedState was holding a reference to SafeState that was
1.7GB. The project max heap size was set to 2GB. Instead of using the
lastEvaluatedState, we can just use StandardMain.exchange.withState.
The cached instances of state were used for task cancellation and
completions. While it is possible that early on in booting
StandardMain.exchange.withState could return a null state, in practice
this won't happen because it is set early on during the sbt boot
commands.

After this change, I successfully ran the `ci` task in the #5992 issue
project with the same memory parameters as their ci config.
2020-10-21 08:01:40 -07:00
.github/ISSUE_TEMPLATE Update issue template 2020-02-03 14:28:20 -05:00
client Change remaining sbtc to sbtn 2020-08-15 09:35:59 -07:00
core-macros/src/main/scala/sbt/internal/util/appmacro setType to Block(...) 2020-10-18 13:56:01 -04:00
dependency-tree/src/main/scala/sbt/plugins Split to MiniDependencyTreePlugin 2020-09-22 21:21:01 -04:00
internal Handle ctrl+d in canonical mode 2020-10-20 16:57:17 -07:00
launch Adds sbt.boot.lock sysprop to opt-out 2018-02-08 13:02:39 +00:00
licenses move remaining pieces of sbt subproject to sbt_pending and fix notices 2010-09-21 21:55:50 -04:00
main Fix EvaluateTask memory leak 2020-10-21 08:01:40 -07:00
main-actions/src Kill external processes on sigint 2020-08-23 10:15:07 -07:00
main-command/src Fix EvaluateTask memory leak 2020-10-21 08:01:40 -07:00
main-settings/src Upgrade scala version to 2.12.12 2020-08-11 23:33:12 -04:00
notes Merge pull request #5041 from jsoref/https 2020-06-14 17:34:58 -04:00
project sjson-new 0.9.1 2020-10-19 12:35:58 -04:00
protocol/src/main Fix switching between raw and canonical input 2020-09-21 13:42:03 -07:00
run Add loop to SelectMainClass 2020-07-10 13:37:54 -07:00
sbt/src Merge pull request #5981 from eed3si9n/wip/pure-expression 2020-10-19 12:26:41 -04:00
scripted-plugin/src/main/scala/sbt -Xfatal-warnings in most subprojects 2018-09-18 11:47:55 -04:00
scripted-sbt-old/src/main/scala/sbt/test Update header 2018-09-14 04:53:36 -04:00
scripted-sbt-redux Kill external processes on sigint 2020-08-23 10:15:07 -07:00
server-test/src Restore string cancellation test 2020-09-28 07:28:24 -07:00
src/main/conscript sbt 1.3.0 2019-09-04 01:24:08 -04:00
tasks Don't throw on closed completion service 2020-09-28 07:03:27 -07:00
tasks-standard Selective functor 2020-05-17 23:36:04 -04:00
testing Fix #5801: Remove duplicate TaskDefs in test agent 2020-08-26 17:19:35 +02:00
util-cache Don't use last modified time of directories in doc 2020-01-13 13:11:09 -08:00
util-tracking update scaladoc to reflect argument type of the overload 2020-04-24 16:54:48 +02:00
vscode-sbt-scala https://www.apple.com 2019-09-05 14:11:07 -04:00
zinc-lm-integration/src integrate with VirtualFile changes 2020-04-24 17:44:14 -04:00
.appveyor.yml Disable virtual io in CI 2020-08-19 11:26:38 -07:00
.gitattributes Contraband 0.4.6 2020-04-24 17:44:15 -04:00
.gitignore Update .gitignore for metals support 2020-05-16 09:52:20 +02:00
.java-version Configure JVM 1.8 in .java-version 2016-10-07 08:48:23 -05:00
.mailmap Add mailmap 2019-06-11 09:30:14 +02:00
.scalafmt.conf Set `lineEndings = preserve` in .scalafmt.conf 2020-06-29 08:15:24 -07:00
.travis.yml Bump sbt snapshot version 2020-10-06 11:34:12 -07:00
CONTRIBUTING.md https://www.scala-sbt.org 2019-09-05 14:11:13 -04:00
DEVELOPING.md Merge pull request #5041 from jsoref/https 2020-06-14 17:34:58 -04:00
LICENSE Apache License 2.0 2018-09-14 03:38:58 -04:00
NOTICE Apache License 2.0 2018-09-14 03:38:58 -04:00
PROFILING.md fix typo 2018-07-08 22:18:57 +09:00
README.md Merge pull request #5041 from jsoref/https 2020-06-14 17:34:58 -04:00
SUPPORT.md Split support into SUPPORT.md 2018-04-25 14:55:09 +01:00
build.sbt load .inputrc file 2020-10-14 17:13:53 +09:00
reset.sh 1.0.3-SNAPSHOT 2017-09-16 15:52:58 -04:00
sbt-allsources.sh Bump underlying modules to latest 2017-03-23 12:41:24 -04:00
server.md setting query is "sbt/setting" 2017-10-03 01:45:06 -04:00

README.md

Build Status Latest version Gitter Chat

sbt

sbt is a build tool for Scala, Java, and more.

For general documentation, see https://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.io module.
  • sbt/librarymanagement hosts sbt.librarymanagement module that wraps Ivy.
  • sbt/zinc hosts Zinc, an incremental compiler for Scala.
  • sbt/sbt, this repository hosts modules that implements the build tool.
  • 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.