mirror of https://github.com/sbt/sbt.git
Since #8678 (sbt 1.12.2), Fork.apply has routed the connectInput && outputStrategy == StdoutOutput case through a new JProcess path that calls jpb.inheritIO(). inheritIO ties the child JVM's stdio to the sbt server JVM's OS-level fd 1/2, bypassing the Terminal indirection. In server mode (which sbt --client uses), that indirection is how task output reaches the client terminal — so the child's stdout/stderr went nowhere observable to the client. Keep redirectInput(Redirect.INHERIT) so REPL/raw-mode keystrokes still reach the child (preserving the use case #8678 added), but leave stdout/stderr as PIPE and pump them to the active terminal's output/error streams in two daemon threads. The pump threads are joined after p.waitFor() so all buffered output drains before the task completes. The active terminal is captured once on the task thread rather than re-resolved per-write via the `System.out`/`err` proxies, otherwise a concurrent terminal swap can route mid-pump bytes to the wrong client (observed on the CI JDK 8 matrix; the proxy's `activeTerminal.get()` is evaluated at every write). Forced scala/scala3 CI to downgrade from sbt 1.12.10 to 1.12.1 (see scala/scala3#25995). Diagnosis credit: @mbovel in #9185. Fixes sbt/sbt#9185. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .github | ||
| client | ||
| core-macros/src/main/scala/sbt/internal/util/appmacro | ||
| dependency-tree/src/main/scala/sbt/plugins | ||
| internal | ||
| launch | ||
| launcher-package | ||
| licenses | ||
| main | ||
| main-actions/src | ||
| main-command/src | ||
| main-settings/src | ||
| notes | ||
| project | ||
| protocol/src/main | ||
| run | ||
| sbt-app/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 | ||
| zinc-lm-integration/src | ||
| .gitattributes | ||
| .gitignore | ||
| .mailmap | ||
| .sbtopts | ||
| .scalafmt.conf | ||
| CONTRIBUTING.md | ||
| DEVELOPING.md | ||
| LICENSE | ||
| NOTICE | ||
| PROFILING.md | ||
| README.md | ||
| SUPPORT.md | ||
| build.sbt | ||
| reset.sh | ||
| 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 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.