mirror of https://github.com/sbt/sbt.git
Running multi commands (input commands delimited by semi-colons) did not work with the thin client. The commands would actually run on the server, but the thin client would exit immediately without displaying the output. The reason was that MainLoop would report the exec complete when all it had done was split the original command into its constituent parts and prepended them to the state command list. To work around this, when we detect a network source command, we can remap its exec id to a different id and only report the original exec id after the commands complete. We also have to keep track of whether or not the command succeeded or failed so that the reporting command reports the correct result. The way its implemented is with the the following steps: 1. set the terminal to the network terminal 2. stash the current onFailure so that we can properly report failures 3. add the new exec id to a map of the original exec id to the generated id 4. actually run the command 5. if the command succeeds, add the original exec id to a result map 6. pop the onFailure 7. restore the terminal to console 8. report the result -- if the original exec id is in the result map we report success. Otherwise we report failure. There is also logic in NetworkChannel for finding the original exec id if reporting one of the artificially generated exec ids because the client will not be aware of that id. |
||
|---|---|---|
| .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 | ||
| .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.