sbt, the interactive build tool
Go to file
Ethan Atkins b6b2c3096d Only read stdin bytes on demand to fix reboot
When running reboot at the console, the first character that the user
enters after the reboot has completed is lost. This is because it isn't
possible to interrupt System.in and we have a thread that is blocking on
reads to System.in in WriteableInputStream. That thread cannot be
shutdown during normal sbt shutdown while it is reading. When sbt next
starts up (in the same jvm), the previous thread gets the byte but has
nowhere to write it so the byte is lost. This commit fixes that behavior
by ensuring that we only poll from System.in when there is actually a
downstream consumer.

The behavior of reboot is still a little wonky if the user issues a
reboot from a network client and then tries to input commands at the
console. In that case, sbt will have been polling System.in in the ask
user thread prior to the reboot and the ask user thread will be
uninterruptible for the reason described above so the first byte will
again by swallowed by the previous sbt instance. This use case is
sufficiently pathological that it doesn't feel worth the effort to fix.
As annoying as it is, it doesn't break the sbt session. The user will
either submit an invalid command with the missing leading character or
notice the character is missing, possibly think they missed the key,
type backspace a few times and re-type the command.
2020-06-29 16:41:33 -07:00
.github/ISSUE_TEMPLATE Update issue template 2020-02-03 14:28:20 -05:00
client Add tab completion support to thin client 2020-06-24 20:08:14 -07:00
core-macros/src/main/scala/sbt/internal/util/appmacro Document parts of AList & components of TupleSyntax 2020-02-17 07:15:37 +00:00
internal Only read stdin bytes on demand to fix reboot 2020-06-29 16:41:33 -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 Add shutdown command 2020-06-29 16:41:33 -07:00
main-actions/src Make Terminal a trait to support multiple clients 2020-06-24 19:22:57 -07:00
main-command/src Only read stdin bytes on demand to fix reboot 2020-06-29 16:41:33 -07:00
main-settings/src Add multi-client ui to server 2020-06-24 19:40:17 -07:00
notes Merge pull request #5041 from jsoref/https 2020-06-14 17:34:58 -04:00
project Add multi-client ui to server 2020-06-24 19:40:17 -07:00
protocol/src/main Prevent simultaneous server booting 2020-06-29 16:41:33 -07:00
run Improve SelectMainClass output 2020-06-24 19:19:06 -07:00
sbt/src Refactor watch 2020-06-25 10:05:59 -07: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 Prevent simultaneous server booting 2020-06-29 16:41:33 -07:00
server-test/src Fix TestServer for windows 2020-06-29 09:44:24 -07:00
src/main/conscript sbt 1.3.0 2019-09-04 01:24:08 -04:00
tasks Name threads in completion service 2020-06-22 13:14:55 -07:00
tasks-standard Selective functor 2020-05-17 23:36:04 -04:00
testing Contraband 0.4.6 2020-04-24 17:44:15 -04: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 Fix TestServer for windows 2020-06-29 09:44:24 -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 Merge pull request #5041 from jsoref/https 2020-06-14 17:34:58 -04:00
.travis.yml Update scala to 2.12.11 2020-03-18 00:49:14 -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 Refactor watch 2020-06-25 10:05:59 -07: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.