mirror of https://github.com/sbt/sbt.git
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. |
||
|---|---|---|
| .github/ISSUE_TEMPLATE | ||
| client | ||
| 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 | ||
| server-test/src | ||
| src/main/conscript | ||
| tasks | ||
| tasks-standard | ||
| testing | ||
| util-cache | ||
| util-tracking | ||
| vscode-sbt-scala | ||
| zinc-lm-integration/src | ||
| .appveyor.yml | ||
| .gitattributes | ||
| .gitignore | ||
| .java-version | ||
| .mailmap | ||
| .scalafmt.conf | ||
| .travis.yml | ||
| CONTRIBUTING.md | ||
| DEVELOPING.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 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.iomodule. - 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.