sbt, the interactive build tool
Go to file
Ethan Atkins a83c280db1 Improve StateTransform
The StateTransform class introduced in
9cdeb7120e did not cleanly integrate with
logic for transforming the state using the `transformState` task
attribute. For one thing, the state transform was only applied if the
root node returned StateTransform but no transformation would occur if a
task had a dependency that returned StateTransform. Moreover, the
transformation would override all other transformations that may have
occurred during task evaluation.

This commit updates StateTransform to act very similarly to the
transformState attribute. Instead of wrapping a `State` instance, it now
wraps a transformation function from `State => State`. This function
can be applied on top of or prior to the other transformations via the
`transformState`.

For binary compatibility with 1.3.0, I had to add the stateProxy
function as a constructor parameter in order to implement the `state`
method. The proxy function will generally throw an exception unless the
legacy api is used. To avoid that, I private[sbt]'d the legacy api so
that binary compatibility is preserved but any builds targeting > 1.4.x
will be required to use the new api.

Unfortunately I couldn't private[sbt] StateTransform.apply(state: State)
because mima interpreted it as a method type change becuase I added
StateTransform.apply(transform: State => State). This may be a mima bug
given that StateTransform.apply(state: State) would be jvm public even
when private[sbt], but I figured it was quite unlikely that any users
were using this method anyway since it was incorrectly implemented in
1.3.0 to return `state` instead of `new StateTransform(state)`.
2019-11-30 15:06:34 -08:00
.github/ISSUE_TEMPLATE Auto-label bug reports & delete old issue template 2019-06-04 08:01:18 +01:00
core-macros/src/main/scala/sbt/internal/util/appmacro apply -Yno-lub 2019-10-13 23:46:23 -04:00
internal apply -Yno-lub 2019-10-13 23:46:23 -04: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 Improve StateTransform 2019-11-30 15:06:34 -08:00
main-actions/src apply -Yno-lub 2019-10-13 23:46:23 -04:00
main-command/src apply -Yno-lub 2019-10-13 23:46:23 -04:00
main-settings/src apply -Yno-lub 2019-10-13 23:46:23 -04:00
notes Set swoval.tmpdir with absolute path via globalBasePath (#5048) 2019-09-09 14:13:34 -04:00
project Cleanup project/Transform.scala 2019-11-28 21:25:49 +00:00
protocol/src/main apply -Yno-lub 2019-10-13 23:46:23 -04:00
run apply -Yno-lub 2019-10-13 23:46:23 -04:00
sbt/src Improve StateTransform 2019-11-30 15:06:34 -08: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 Add timeout to scripted statements 2019-10-03 15:34:53 -07:00
src/main/conscript sbt 1.3.0 2019-09-04 01:24:08 -04:00
tasks apply -Yno-lub 2019-10-13 23:46:23 -04:00
tasks-standard apply -Yno-lub 2019-10-13 23:46:23 -04:00
testing apply -Yno-lub 2019-10-13 23:46:23 -04:00
vscode-sbt-scala fix typo 2019-06-06 08:05:16 +03:00
zinc-lm-integration/src apply -Yno-lub 2019-10-13 23:46:23 -04:00
.appveyor.yml Drop Visual Studio 2015 testing 2019-09-19 13:37:11 -04:00
.gitattributes remove gittatributes, assume core.autocrlf=false 2018-06-26 17:38:05 +03:00
.gitignore add .idea to .gitignore 2019-08-16 00:57:05 +03: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
.sbtopts Use .sbtopts to increase the RAM 2018-06-25 19:40:15 -04:00
.scalafmt.conf Bump scalafmt 2019-07-18 12:40:21 -07:00
.travis.yml Switch to xenial image 2019-10-03 17:18:14 -04:00
CONTRIBUTING.md Split some of the developing related docs to DEVELOPING.md 2019-07-15 12:39:41 -04:00
DEVELOPING.md Update DEVELOPING about nightlies (#5133) 2019-09-25 23:19: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 fix typo 2019-06-06 08:05:16 +03:00
SUPPORT.md Split support into SUPPORT.md 2018-04-25 14:55:09 +01:00
build.sbt Cleanup project/Transform.scala 2019-11-28 21:25:49 +00: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 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.io module.
  • sbt/util hosts a collection of internally used modules.
  • 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.