mirror of https://github.com/sbt/sbt.git
Presently if a server command comes in while in the shell, the client output can appear on the same line as the command prompt and the command prompt will not appear again until the user hits enter. This is a confusing ux. For example, if I start an sbt server and type the partial command "comp" and then start up a client and run the clean command followed by a compile, the output looks like: [info] sbt server started at local:///Users/ethanatkins/.sbt/1.0/server/51cfad3281b3a8a1820a/sock sbt:scala-compile> comp[info] new client connected: network-1 [success] Total time: 0 s, completed Dec 12, 2019, 7:23:24 PM [success] Total time: 0 s, completed Dec 12, 2019, 7:23:27 PM [success] Total time: 2 s, completed Dec 12, 2019, 7:23:31 PM Now, if I type "ile\n", I get: [info] sbt server started at local:///Users/ethanatkins/.sbt/1.0/server/51cfad3281b3a8a1820a/sock ile [success] Total time: 0 s, completed Dec 12, 2019, 7:23:34 PM sbt:scala-compile> Following the same set of inputs after this change, I get: [info] sbt server started at local:///Users/ethanatkins/.sbt/1.0/server/51cfad3281b3a8a1820a/sock sbt:scala-compile> comp [info] new client connected: network-1 [success] Total time: 0 s, completed Dec 12, 2019, 7:25:58 PM sbt:scala-compile> comp [success] Total time: 0 s, completed Dec 12, 2019, 7:26:14 PM sbt:scala-compile> comp [success] Total time: 1 s, completed Dec 12, 2019, 7:26:17 PM sbt:scala-compile> compile [success] Total time: 0 s, completed Dec 12, 2019, 7:26:19 PM sbt:scala-compile> To implement this change, I added the redraw() method to LineReader which is a wrapper around ConsoleReader.drawLine; ConsoleReader.flush(). We invoke LineReader.redraw whenever the ConsoleChannel receives a ConsolePromptEvent and there is a running thread. To prevent log lines from being appended to the prompt line, in the CommandExchange we print a newline character whenever a new command is received from the network or a network client connects and we believe that there is an active prompt. |
||
|---|---|---|
| .github/ISSUE_TEMPLATE | ||
| 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 | ||
| .sbtopts | ||
| .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 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.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.