mirror of https://github.com/sbt/sbt.git
[1.x] --jvm-client
This adds --jvm-client to the runner script.
This commit is contained in:
parent
a48b448a18
commit
2de01a8a05
|
|
@ -55,7 +55,7 @@ jobs:
|
|||
JVM_OPTS: -Xms800M -Xmx2G -Xss6M -XX:ReservedCodeCacheSize=128M -server -Dsbt.io.virtual=false -Dfile.encoding=UTF-8
|
||||
SCALA_212: 2.12.20
|
||||
UTIL_TESTS: "utilCache/test utilControl/test utilInterface/test utilLogging/test utilPosition/test utilRelation/test utilScripted/test utilTracking/test"
|
||||
TEST_SBT_VER: 1.10.7
|
||||
TEST_SBT_VER: 1.11.4
|
||||
SBT_ETC_FILE: $HOME/etc/sbt/sbtopts
|
||||
JDK11: adopt@1.11.0-9
|
||||
SPARK_LOCAL_IP: "127.0.0.1"
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ lazy val check2 = taskKey[Unit]("")
|
|||
|
||||
lazy val root = (project in file("."))
|
||||
.settings(
|
||||
scalaVersion := "2.12.4",
|
||||
scalaVersion := "3.7.2",
|
||||
name := "Hello",
|
||||
libraryDependencies += "com.eed3si9n.verify" %% "verify" % "0.2.0" % Test,
|
||||
libraryDependencies += "com.eed3si9n.verify" %% "verify" % "1.0.0" % Test,
|
||||
testFrameworks += new TestFramework("verify.runner.Framework"),
|
||||
check := {
|
||||
val xs = IO.readLines(file("output.txt")).toVector
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
sbt.version=1.3.13
|
||||
sbt.version=1.11.4
|
||||
|
|
|
|||
|
|
@ -107,21 +107,19 @@ object SbtRunnerTest extends SimpleTestSuite with PowerAssertions {
|
|||
()
|
||||
}
|
||||
|
||||
/*
|
||||
test("sbt --client") {
|
||||
val out = sbtProcess("--client", "--no-colors", "compile").!!.linesIterator.toList
|
||||
test("sbt --jvm-client") {
|
||||
val out = sbtProcess("--jvm-client", "--no-colors", "compile").!!.linesIterator.toList
|
||||
if (isWindows) {
|
||||
println(out)
|
||||
} else {
|
||||
assert(out exists { _.contains("server was not detected") })
|
||||
assert(out.exists { _.contains("server was not detected") })
|
||||
}
|
||||
val out2 = sbtProcess("--client", "--no-colors", "shutdown").!!.linesIterator.toList
|
||||
val out2 = sbtProcess("--jvm-client", "--no-colors", "shutdown").!!.linesIterator.toList
|
||||
if (isWindows) {
|
||||
println(out)
|
||||
println(out2)
|
||||
} else {
|
||||
assert(out2 exists { _.contains("disconnected") })
|
||||
assert(out2.exists { _.contains("disconnected") })
|
||||
}
|
||||
()
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ set default_java_opts=-Dfile.encoding=UTF-8
|
|||
set sbt_jar=
|
||||
set build_props_sbt_version=
|
||||
set run_native_client=
|
||||
set run_jvm_client=
|
||||
set shutdownall=
|
||||
|
||||
set sbt_args_print_version=
|
||||
|
|
@ -50,6 +51,7 @@ set sbt_args_sbt_dir=
|
|||
set sbt_args_sbt_version=
|
||||
set sbt_args_mem=
|
||||
set sbt_args_client=
|
||||
set sbt_args_jvm_client=
|
||||
set sbt_args_no_server=
|
||||
set is_this_dir_sbt=0
|
||||
|
||||
|
|
@ -193,6 +195,15 @@ if defined _client_arg (
|
|||
goto args_loop
|
||||
)
|
||||
|
||||
if "%~0" == "--jvm-client" set _jvm_client_arg=true
|
||||
|
||||
if defined _jvm_client_arg (
|
||||
set _jvm_client_arg=
|
||||
set sbt_args_jvm_client=1
|
||||
set SBT_ARGS=--client !SBT_ARGS!
|
||||
goto args_loop
|
||||
)
|
||||
|
||||
if "%~0" == "-batch" set _batch_arg=true
|
||||
if "%~0" == "--batch" set _batch_arg=true
|
||||
|
||||
|
|
@ -899,18 +910,28 @@ for /F "delims=.-_ tokens=1-2" %%v in ("!sbtV!") do (
|
|||
set sbtBinaryV_1=%%v
|
||||
set sbtBinaryV_2=%%w
|
||||
)
|
||||
rem default to run_native_client=1 for sbt 2.x
|
||||
rem default to run_native_client=1 for sbt 2.x
|
||||
if !sbtBinaryV_1! geq 2 (
|
||||
if !sbt_args_client! equ 0 (
|
||||
if !sbt_args_jvm_client! equ 1 (
|
||||
set run_native_client=
|
||||
set run_jvm_client=1
|
||||
) else (
|
||||
set run_native_client=1
|
||||
if !sbt_args_client! equ 0 (
|
||||
set run_native_client=
|
||||
) else (
|
||||
set run_native_client=1
|
||||
)
|
||||
)
|
||||
) else (
|
||||
if !sbtBinaryV_1! geq 1 (
|
||||
if !sbtBinaryV_2! geq 4 (
|
||||
if !sbt_args_client! equ 1 (
|
||||
set run_native_client=1
|
||||
if !sbt_args_jvm_client! equ 1 (
|
||||
set run_native_client=
|
||||
set run_jvm_client=1
|
||||
) else (
|
||||
if !sbt_args_client! equ 1 (
|
||||
set run_native_client=1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
|
|||
4
sbt
4
sbt
|
|
@ -22,6 +22,7 @@ declare sbt_verbose=
|
|||
declare sbt_debug=
|
||||
declare build_props_sbt_version=
|
||||
declare use_sbtn=
|
||||
declare use_jvm_client=
|
||||
declare no_server=
|
||||
declare sbtn_command="$SBTN_CMD"
|
||||
declare sbtn_version="1.10.8"
|
||||
|
|
@ -609,6 +610,8 @@ Usage: `basename "$0"` [options]
|
|||
--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> path to global settings/plugins directory (default: ~/.sbt)
|
||||
|
|
@ -701,6 +704,7 @@ process_args () {
|
|||
-d|-debug|--debug) sbt_debug=1 && addSbt "-debug" && shift ;;
|
||||
-client|--client) use_sbtn=1 && shift ;;
|
||||
--server) use_sbtn=0 && shift ;;
|
||||
--jvm-client) use_sbtn=0 && use_jvm_client=1 && addSbt "--client" && shift ;;
|
||||
|
||||
-mem|--mem) require_arg integer "$1" "$2" && addMemory "$2" && shift 2 ;;
|
||||
-jvm-debug|--jvm-debug) require_arg port "$1" "$2" && addDebugger $2 && shift 2 ;;
|
||||
|
|
|
|||
Loading…
Reference in New Issue