From 63d5a1103bb77a6f4bed6d26c72e548afe25fb6e Mon Sep 17 00:00:00 2001 From: eugene yokota Date: Sun, 3 May 2026 21:24:16 -0400 Subject: [PATCH] [2.x] Improve --help (#9180) **Problem** Some runner options are not documented in --help. **Solution** Fix it. --- launcher-package/src/universal/bin/sbt.bat | 15 ++++++++++----- sbt | 20 +++++++++++--------- sbtw/src/main/scala/sbtw/Main.scala | 6 +++--- 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/launcher-package/src/universal/bin/sbt.bat b/launcher-package/src/universal/bin/sbt.bat index 89c1d00e7..a34068eca 100755 --- a/launcher-package/src/universal/bin/sbt.bat +++ b/launcher-package/src/universal/bin/sbt.bat @@ -1094,11 +1094,11 @@ echo. echo -h ^| --help print this message echo -v ^| --verbose this runner is chattier echo -V ^| --version print sbt version information -echo --numeric-version print the numeric sbt version (sbt sbtVersion) -echo --script-version print the version of sbt script -echo -d ^| --debug set sbt log level to debug -echo -debug-inc ^| --debug-inc -echo enable extra debugging for the incremental compiler +echo --server run sbt server in the foreground, instead of using sbtn +echo --client run sbtn (native client), and start sbt server in the background +echo --no-server run sbtn, and fail if it cannot connect to a server +echo --jvm-client run JVM client, and start sbt server in the background +echo --allow-empty start sbt even if current directory contains no sbt project echo --no-colors disable ANSI color codes echo --color=auto^|always^|true^|false^|never echo enable or disable ANSI color codes ^(sbt 1.3 and above^) @@ -1136,6 +1136,11 @@ echo if this file exists, it is prepended to the runner ar echo -Dkey=val pass -Dkey=val directly to the java runtime echo -X^ pass -X^ directly to the java runtime echo ^(e.g., -Xmx1G, -Xms512M, -Xss4M^) +echo --numeric-version print the numeric sbt version (sbt sbtVersion) +echo --script-version print the version of sbt script +echo -d ^| --debug set sbt log level to debug +echo -debug-inc ^| --debug-inc +echo enable extra debugging for the incremental compiler rem echo -J-X pass option -X directly to the java runtime rem echo ^(-J is stripped^) rem echo -S-X add -X to sbt's scalacOptions ^(-S is stripped^) diff --git a/sbt b/sbt index 7f10695c0..15a1cbed6 100755 --- a/sbt +++ b/sbt @@ -645,22 +645,18 @@ Usage: `basename "$0"` [options] -h | --help print this message -v | --verbose this runner is chattier -V | --version print sbt version information - --numeric-version print the numeric sbt version (sbt sbtVersion) - --script-version print the version of sbt script - shutdownall shutdown all running sbt-launch processes - -d | --debug set sbt log level to debug - -debug-inc | --debug-inc - enable extra debugging for the incremental compiler + --server run sbt server in the foreground, instead of using sbtn + --client run sbtn (native client), and start sbt server in the background + --no-server run sbtn, and fail if it cannot connect to a server + --jvm-client run JVM client, and start sbt server in the background + --allow-empty start sbt even if current directory contains no sbt project --no-colors disable ANSI color codes --color=auto|always|true|false|never enable or disable ANSI color codes (sbt 1.3 and above) --supershell=auto|always|true|false|never enable or disable supershell (sbt 1.3 and above) --traces generate Trace Event report on shutdown (sbt 1.3 and above) - --client run native client - --jvm-client run JVM client --timings display task timings report on shutdown - --allow-empty start sbt even if current directory contains no sbt project --sbt-dir path to global settings/plugins directory (default: \$XDG_CONFIG_HOME/sbt or ~/.config/sbt) --sbt-boot path to shared boot directory (default: ~/.sbt/boot in 0.11 series) --sbt-cache path to global cache directory (default: operating system specific) @@ -670,6 +666,12 @@ Usage: `basename "$0"` [options] --no-global uses global caches, but does not use global ~/.sbt directory. --jvm-debug Turn on JVM debugging, open at the given port. --batch disable interactive mode + --numeric-version print the numeric sbt version (sbt sbtVersion) + --script-version print the version of sbt script + shutdownall shutdown all running sbt-launch processes + -d | --debug set sbt log level to debug + -debug-inc | --debug-inc + enable extra debugging for the incremental compiler # sbt version (default: from project/build.properties if present, else latest release) --sbt-version use the specified version of sbt diff --git a/sbtw/src/main/scala/sbtw/Main.scala b/sbtw/src/main/scala/sbtw/Main.scala index 59d13a3e8..def755aa0 100644 --- a/sbtw/src/main/scala/sbtw/Main.scala +++ b/sbtw/src/main/scala/sbtw/Main.scala @@ -164,9 +164,9 @@ object Main: | shutdownall shutdown all running sbt processes | -d | --debug set sbt log level to debug | --allow-empty start sbt even if current directory contains no sbt project - | --client run native client (sbt 1.4+) - | --server run JVM launcher (disable native client, sbt 2.x) - | --jvm-client run JVM client + | --client run sbtn (native client), and start sbt server in the background + | --server run sbt server in the foreground, instead of using sbtn + | --jvm-client run JVM client, and start sbt server in the background | --mem set memory options (default: 1024) | --sbt-version use the specified version of sbt | --sbt-jar use the specified jar as the sbt launcher