[Git][java-team/scala3][upstream/3.9.0+ds2] Keep the CRLF line endings of the Windows scripts, as in the 3.9.0+ds2 orig

Juan Manuel Méndez Rey (@mendezr) gitlab at salsa.debian.org
Tue Nov 3 02:59:43 GMT 2026



Juan Manuel Méndez Rey pushed to tag upstream/3.9.0+ds2 at Debian Java Maintainers / scala3


Commits:
606ed124 by Juan Manuel Méndez Rey at 2026-10-29T02:03:10+01:00
Keep the CRLF line endings of the Windows scripts, as in the 3.9.0+ds2 orig

- - - - -


8 changed files:

- dist/bin/scala.bat
- dist/bin/scalac.bat
- dist/bin/scaladoc.bat
- dist/libexec-native-overrides/cli-common-platform.bat
- dist/libexec/cli-common-platform.bat
- dist/libexec/common.bat
- project/scripts/native-integration/winTests.bat
- project/scripts/winCmdTests.bat


Changes:

=====================================
dist/bin/scala.bat
=====================================
@@ -1,76 +1,76 @@
- at echo off
-setlocal enabledelayedexpansion
-
- at rem #########################################################################
- at rem ## Environment setup
-
-set _EXITCODE=0
-
-for %%f in ("%~dp0.") do (
-    set "_PROG_HOME=%%~dpf"
-    @rem get rid of the trailing slash
-    set "_PROG_HOME=!_PROG_HOME:~0,-1!"
-)
-call "%_PROG_HOME%\libexec\common.bat"
- at rem Reset exit code: common.bat may fail if Java is not installed, but the native
- at rem Scala CLI launcher (scala-cli.exe) does not require Java. A missing Java error
- at rem will surface later only if the JVM-based launcher is used instead.
-set _EXITCODE=0
-
- at rem #########################################################################
- at rem ## Main
-
-call :setScalaOpts
-
-if not defined _SCALA_VERSION (
-    echo Error: Failed to extract Scala version from "%_PROG_HOME%\VERSION" 1>&2
-    set _EXITCODE=1
-    goto end
-)
-
-call "%_PROG_HOME%\libexec\cli-common-platform.bat"
-
- at rem SCALA_CLI_CMD_WIN is set by cli-common-platform.bat.
- at rem We use delayed expansion (!var!) and avoid 'call' to prevent double-expansion
- at rem of percent signs, which would corrupt %20 in the Maven repository URI.
-!SCALA_CLI_CMD_WIN! "--prog-name" "scala" "--skip-cli-updates" "--cli-default-scala-version" "!_SCALA_VERSION!" "-r" "!MVN_REPOSITORY!" %*
-
-if not %ERRORLEVEL%==0 ( set _EXITCODE=1& goto end )
-
-goto end
-
- at rem #########################################################################
- at rem ## Subroutines
-
-:setScalaOpts
-
-set "_SCALA_VERSION="
-
- at rem Read the VERSION file to extract the Scala version.
- at rem We use FOR /F with a 'type' command and delayed expansion (!_PROG_HOME!) so
- at rem that parentheses in the path (e.g. "C:\Program Files (x86)\scala") are not
- at rem present at parse time when cmd.exe matches the IN (...) / DO (...) blocks.
- at rem Unlike 'set /p', FOR /F correctly splits lines on both LF and CRLF.
-if not exist "%_PROG_HOME%\VERSION" goto :setMvnRepo
-for /f "delims=" %%G in ('type "!_PROG_HOME!\VERSION"') do (
-    set "_LINE=%%G"
-    if "!_LINE:~0,9!"=="version:=" (
-        set "_SCALA_VERSION=!_LINE:~9!"
-        goto :setMvnRepo
-    )
-)
-
-:setMvnRepo
- at rem Construct the local Maven repository URI.
- at rem Backslashes are converted to forward slashes; spaces are percent-encoded.
-set "_PROG_HOME_FWD=!_PROG_HOME:\=/!"
-set "MVN_REPOSITORY=file:///!_PROG_HOME_FWD: =%%20!/maven2"
-
-goto :eof
-
- at rem #########################################################################
- at rem ## Cleanups
-
-:end
-exit /b %_EXITCODE%
-endlocal
+ at echo off
+setlocal enabledelayedexpansion
+
+ at rem #########################################################################
+ at rem ## Environment setup
+
+set _EXITCODE=0
+
+for %%f in ("%~dp0.") do (
+    set "_PROG_HOME=%%~dpf"
+    @rem get rid of the trailing slash
+    set "_PROG_HOME=!_PROG_HOME:~0,-1!"
+)
+call "%_PROG_HOME%\libexec\common.bat"
+ at rem Reset exit code: common.bat may fail if Java is not installed, but the native
+ at rem Scala CLI launcher (scala-cli.exe) does not require Java. A missing Java error
+ at rem will surface later only if the JVM-based launcher is used instead.
+set _EXITCODE=0
+
+ at rem #########################################################################
+ at rem ## Main
+
+call :setScalaOpts
+
+if not defined _SCALA_VERSION (
+    echo Error: Failed to extract Scala version from "%_PROG_HOME%\VERSION" 1>&2
+    set _EXITCODE=1
+    goto end
+)
+
+call "%_PROG_HOME%\libexec\cli-common-platform.bat"
+
+ at rem SCALA_CLI_CMD_WIN is set by cli-common-platform.bat.
+ at rem We use delayed expansion (!var!) and avoid 'call' to prevent double-expansion
+ at rem of percent signs, which would corrupt %20 in the Maven repository URI.
+!SCALA_CLI_CMD_WIN! "--prog-name" "scala" "--skip-cli-updates" "--cli-default-scala-version" "!_SCALA_VERSION!" "-r" "!MVN_REPOSITORY!" %*
+
+if not %ERRORLEVEL%==0 ( set _EXITCODE=1& goto end )
+
+goto end
+
+ at rem #########################################################################
+ at rem ## Subroutines
+
+:setScalaOpts
+
+set "_SCALA_VERSION="
+
+ at rem Read the VERSION file to extract the Scala version.
+ at rem We use FOR /F with a 'type' command and delayed expansion (!_PROG_HOME!) so
+ at rem that parentheses in the path (e.g. "C:\Program Files (x86)\scala") are not
+ at rem present at parse time when cmd.exe matches the IN (...) / DO (...) blocks.
+ at rem Unlike 'set /p', FOR /F correctly splits lines on both LF and CRLF.
+if not exist "%_PROG_HOME%\VERSION" goto :setMvnRepo
+for /f "delims=" %%G in ('type "!_PROG_HOME!\VERSION"') do (
+    set "_LINE=%%G"
+    if "!_LINE:~0,9!"=="version:=" (
+        set "_SCALA_VERSION=!_LINE:~9!"
+        goto :setMvnRepo
+    )
+)
+
+:setMvnRepo
+ at rem Construct the local Maven repository URI.
+ at rem Backslashes are converted to forward slashes; spaces are percent-encoded.
+set "_PROG_HOME_FWD=!_PROG_HOME:\=/!"
+set "MVN_REPOSITORY=file:///!_PROG_HOME_FWD: =%%20!/maven2"
+
+goto :eof
+
+ at rem #########################################################################
+ at rem ## Cleanups
+
+:end
+exit /b %_EXITCODE%
+endlocal


=====================================
dist/bin/scalac.bat
=====================================
@@ -1,106 +1,106 @@
- at echo off
-setlocal enabledelayedexpansion
-
- at rem #########################################################################
- at rem ## Environment setup
-
-set _EXITCODE=0
-
-for %%f in ("%~dp0.") do (
-    set "_PROG_HOME=%%~dpf"
-    @rem get rid of the trailing slash
-    set "_PROG_HOME=!_PROG_HOME:~0,-1!"
-)
-call "%_PROG_HOME%\libexec\common.bat"
-if not %_EXITCODE%==0 goto end
-
-call :args %*
-
- at rem #########################################################################
- at rem ## Main
-
-call :compilerJavaClasspathArgs
-
- at rem we need to escape % in the java command path, for some reason this doesnt work in common.bat
-set "_JAVACMD=!_JAVACMD:%%=%%%%!"
-
-call "%_JAVACMD%" %_JAVA_ARGS% -classpath "%_JVM_CP_ARGS%" "-Dscala.usejavacp=true" "-Dscala.expandjavacp=true" "-Dscala.home=%_PROG_HOME%" dotty.tools.MainGenericCompiler %_SCALA_ARGS%
-if not %ERRORLEVEL%==0 (
-    set _EXITCODE=1
-    goto end
-)
-goto end
-
- at rem #########################################################################
- at rem ## Subroutines
-
-:args
-set _JAVA_ARGS=
-set _SCALA_ARGS=
-set _SCALA_CPATH=
- at rem replace inner while loop used in bash script
-set _CONSUME_REMAINING=
-
-:args_loop
-if "%~1"=="" goto args_done
-set "__ARG=%~1"
-if defined _CONSUME_REMAINING (
-    set _SCALA_ARGS=!_SCALA_ARGS! "%__ARG%"
-    shift
-) else if "%__ARG%"=="--" (
-    @rem pass all remaining arguments to scala, e.g. to avoid interpreting them here as -D or -J
-    set _CONSUME_REMAINING=1
-    set _SCALA_ARGS=!_SCALA_ARGS! "%__ARG%"
-    shift
-) else if "%__ARG%"=="-script" (
-    @rem pass all remaining arguments to scala, e.g. to avoid interpreting them here as -D or -J
-    set _CONSUME_REMAINING=1
-    set _SCALA_ARGS=!_SCALA_ARGS! "%__ARG%"
-    shift
-) else if "%__ARG%"=="-Oshort" (
-    @rem optimize for short-running applications, see https://github.com/scala/scala3/issues/222
-    set _JAVA_ARGS=!_JAVA_ARGS! "-XX:+TieredCompilation" "-XX:TieredStopAtLevel=1"
-    set _SCALA_ARGS=!_SCALA_ARGS! -Oshort
-    shift
-) else if "%__ARG:~0,2%"=="-D" (
-    @rem pass to scala as well: otherwise we lose it sometimes when we
-    @rem need it, e.g. communicating with a server compiler.
-    set _JAVA_ARGS=!_JAVA_ARGS! "%__ARG%"
-    set _SCALA_ARGS=!_SCALA_ARGS! "%__ARG%"
-) else if "%__ARG:~0,2%"=="-J" (
-    @rem as with -D, pass to scala even though it will almost
-    @rem never be used.
-    set _JAVA_ARGS=!_JAVA_ARGS! %__ARG:~2%
-    set _SCALA_ARGS=!_SCALA_ARGS! "%__ARG%"
-) else if "%__ARG%"=="-classpath" (
-    set "_SCALA_CPATH=%~2"
-    shift
-) else if "%__ARG%"=="-cp" (
-    set "_SCALA_CPATH=%~2"
-    shift
-) else (
-    set _SCALA_ARGS=!_SCALA_ARGS! "%__ARG%"
-)
-shift
-goto args_loop
-:args_done
-goto :eof
-
- at rem output parameter: _JVM_CP_ARGS
-:compilerJavaClasspathArgs
-set "__TOOLCHAIN=%_LIB_DIR%\scala.jar"
-set "__TOOLCHAIN=%__TOOLCHAIN%%_PSEP%%_LIB_DIR%\with_compiler.jar%"
-
-if defined _SCALA_CPATH (
-    set "_JVM_CP_ARGS=%__TOOLCHAIN%%_SCALA_CPATH%"
-) else (
-    set "_JVM_CP_ARGS=%__TOOLCHAIN%"
-)
-goto :eof
-
- at rem #########################################################################
- at rem ## Cleanups
-
-:end
-exit /b %_EXITCODE%
-endlocal
+ at echo off
+setlocal enabledelayedexpansion
+
+ at rem #########################################################################
+ at rem ## Environment setup
+
+set _EXITCODE=0
+
+for %%f in ("%~dp0.") do (
+    set "_PROG_HOME=%%~dpf"
+    @rem get rid of the trailing slash
+    set "_PROG_HOME=!_PROG_HOME:~0,-1!"
+)
+call "%_PROG_HOME%\libexec\common.bat"
+if not %_EXITCODE%==0 goto end
+
+call :args %*
+
+ at rem #########################################################################
+ at rem ## Main
+
+call :compilerJavaClasspathArgs
+
+ at rem we need to escape % in the java command path, for some reason this doesnt work in common.bat
+set "_JAVACMD=!_JAVACMD:%%=%%%%!"
+
+call "%_JAVACMD%" %_JAVA_ARGS% -classpath "%_JVM_CP_ARGS%" "-Dscala.usejavacp=true" "-Dscala.expandjavacp=true" "-Dscala.home=%_PROG_HOME%" dotty.tools.MainGenericCompiler %_SCALA_ARGS%
+if not %ERRORLEVEL%==0 (
+    set _EXITCODE=1
+    goto end
+)
+goto end
+
+ at rem #########################################################################
+ at rem ## Subroutines
+
+:args
+set _JAVA_ARGS=
+set _SCALA_ARGS=
+set _SCALA_CPATH=
+ at rem replace inner while loop used in bash script
+set _CONSUME_REMAINING=
+
+:args_loop
+if "%~1"=="" goto args_done
+set "__ARG=%~1"
+if defined _CONSUME_REMAINING (
+    set _SCALA_ARGS=!_SCALA_ARGS! "%__ARG%"
+    shift
+) else if "%__ARG%"=="--" (
+    @rem pass all remaining arguments to scala, e.g. to avoid interpreting them here as -D or -J
+    set _CONSUME_REMAINING=1
+    set _SCALA_ARGS=!_SCALA_ARGS! "%__ARG%"
+    shift
+) else if "%__ARG%"=="-script" (
+    @rem pass all remaining arguments to scala, e.g. to avoid interpreting them here as -D or -J
+    set _CONSUME_REMAINING=1
+    set _SCALA_ARGS=!_SCALA_ARGS! "%__ARG%"
+    shift
+) else if "%__ARG%"=="-Oshort" (
+    @rem optimize for short-running applications, see https://github.com/scala/scala3/issues/222
+    set _JAVA_ARGS=!_JAVA_ARGS! "-XX:+TieredCompilation" "-XX:TieredStopAtLevel=1"
+    set _SCALA_ARGS=!_SCALA_ARGS! -Oshort
+    shift
+) else if "%__ARG:~0,2%"=="-D" (
+    @rem pass to scala as well: otherwise we lose it sometimes when we
+    @rem need it, e.g. communicating with a server compiler.
+    set _JAVA_ARGS=!_JAVA_ARGS! "%__ARG%"
+    set _SCALA_ARGS=!_SCALA_ARGS! "%__ARG%"
+) else if "%__ARG:~0,2%"=="-J" (
+    @rem as with -D, pass to scala even though it will almost
+    @rem never be used.
+    set _JAVA_ARGS=!_JAVA_ARGS! %__ARG:~2%
+    set _SCALA_ARGS=!_SCALA_ARGS! "%__ARG%"
+) else if "%__ARG%"=="-classpath" (
+    set "_SCALA_CPATH=%~2"
+    shift
+) else if "%__ARG%"=="-cp" (
+    set "_SCALA_CPATH=%~2"
+    shift
+) else (
+    set _SCALA_ARGS=!_SCALA_ARGS! "%__ARG%"
+)
+shift
+goto args_loop
+:args_done
+goto :eof
+
+ at rem output parameter: _JVM_CP_ARGS
+:compilerJavaClasspathArgs
+set "__TOOLCHAIN=%_LIB_DIR%\scala.jar"
+set "__TOOLCHAIN=%__TOOLCHAIN%%_PSEP%%_LIB_DIR%\with_compiler.jar%"
+
+if defined _SCALA_CPATH (
+    set "_JVM_CP_ARGS=%__TOOLCHAIN%%_SCALA_CPATH%"
+) else (
+    set "_JVM_CP_ARGS=%__TOOLCHAIN%"
+)
+goto :eof
+
+ at rem #########################################################################
+ at rem ## Cleanups
+
+:end
+exit /b %_EXITCODE%
+endlocal


=====================================
dist/bin/scaladoc.bat
=====================================
@@ -1,110 +1,110 @@
- at echo off
-setlocal enabledelayedexpansion
-
- at rem #########################################################################
- at rem ## Environment setup
-
-set _EXITCODE=0
-
-for %%f in ("%~dp0.") do (
-    set "_PROG_HOME=%%~dpf"
-    @rem get rid of the trailing slash
-    set "_PROG_HOME=!_PROG_HOME:~0,-1!"
-)
-call "%_PROG_HOME%\libexec\common.bat"
-if not %_EXITCODE%==0 goto end
-
-set _DEFAULT_JAVA_OPTS=-Xmx768m -Xms768m
-
-call :args %*
-
- at rem #########################################################################
- at rem ## Main
-
-if defined JAVA_OPTS ( set _JAVA_OPTS=%JAVA_OPTS%
-) else ( set _JAVA_OPTS=%_DEFAULT_JAVA_OPTS%
-)
-
- at rem we need to escape % in the java command path, for some reason this doesnt work in common.bat
-set "_JAVACMD=!_JAVACMD:%%=%%%%!"
-
-call "%_JAVACMD%" %_JAVA_OPTS% %_JAVA_DEBUG% %_JAVA_ARGS% ^
--classpath "%_LIB_DIR%\scaladoc.jar" ^
--Dscala.expandjavacp=true ^
--Dscala.usejavacp=true ^
-dotty.tools.scaladoc.Main %_SCALA_ARGS% %_RESIDUAL_ARGS%
-if not %ERRORLEVEL%==0 (
-    @rem echo Error: Scaladoc execution failed 1>&2
-    set _EXITCODE=1
-    goto end
-)
-goto end
-
- at rem #########################################################################
- at rem ## Subroutines
-
-:args
-set _JAVA_DEBUG=
-set _HELP=
-set _VERBOSE=
-set _QUIET=
-set _COLORS=
-set _SCALA_ARGS=
-set _JAVA_ARGS=
-set _RESIDUAL_ARGS=
-
-:args_loop
-if "%~1"=="" goto args_done
-set "__ARG=%~1"
-if "%__ARG%"=="--" (
-    @rem for arg; do addResidual "$arg"; done; set -- ;;
-) else if "%__ARG%"=="-h" (
-    set _HELP=true
-    call :addScala "-help"
-) else if "%__ARG%"=="-help" (
-    set _HELP=true
-    call :addScala "-help"
-) else if "%__ARG%"=="-v" (
-    set _VERBOSE=true
-    call :addScala "-verbose"
-) else if "%__ARG%"=="-verbose" (
-    set _VERBOSE=true
-    call :addScala "-verbose"
-) else if "%__ARG%"=="-debug" ( set "_JAVA_DEBUG=%_DEBUG_STR%"
-) else if "%__ARG%"=="-q" ( set _QUIET=true
-) else if "%__ARG%"=="-quiet" ( set _QUIET=true
-) else if "%__ARG%"=="-colors" ( set _COLORS=true
-) else if "%__ARG%"=="-no-colors" ( set _COLORS=
-) else if "%__ARG:~0,2%"=="-D" ( call :addJava "%__ARG%"
-) else if "%__ARG:~0,2%"=="-J" ( call :addJava "%__ARG:~2%"
-) else (
-    if defined _IN_SCRIPTING_ARGS ( call :addScripting "%__ARG%"
-    ) else ( call :addResidual "%__ARG%"
-    )
-)
-shift
-goto args_loop
-:args_done
-goto :eof
-
- at rem output parameter: _SCALA_ARGS
-:addScala
-set _SCALA_ARGS=%_SCALA_ARGS% %~1
-goto :eof
-
- at rem output parameter: _JAVA_ARGS
-:addJava
-set _JAVA_ARGS=%_JAVA_ARGS% %~1
-goto :eof
-
- at rem output parameter: _RESIDUAL_ARGS
-:addResidual
-set _RESIDUAL_ARGS=%_RESIDUAL_ARGS% %~1
-goto :eof
-
- at rem #########################################################################
- at rem ## Cleanups
-
-:end
-exit /b %_EXITCODE%
-endlocal
+ at echo off
+setlocal enabledelayedexpansion
+
+ at rem #########################################################################
+ at rem ## Environment setup
+
+set _EXITCODE=0
+
+for %%f in ("%~dp0.") do (
+    set "_PROG_HOME=%%~dpf"
+    @rem get rid of the trailing slash
+    set "_PROG_HOME=!_PROG_HOME:~0,-1!"
+)
+call "%_PROG_HOME%\libexec\common.bat"
+if not %_EXITCODE%==0 goto end
+
+set _DEFAULT_JAVA_OPTS=-Xmx768m -Xms768m
+
+call :args %*
+
+ at rem #########################################################################
+ at rem ## Main
+
+if defined JAVA_OPTS ( set _JAVA_OPTS=%JAVA_OPTS%
+) else ( set _JAVA_OPTS=%_DEFAULT_JAVA_OPTS%
+)
+
+ at rem we need to escape % in the java command path, for some reason this doesnt work in common.bat
+set "_JAVACMD=!_JAVACMD:%%=%%%%!"
+
+call "%_JAVACMD%" %_JAVA_OPTS% %_JAVA_DEBUG% %_JAVA_ARGS% ^
+-classpath "%_LIB_DIR%\scaladoc.jar" ^
+-Dscala.expandjavacp=true ^
+-Dscala.usejavacp=true ^
+dotty.tools.scaladoc.Main %_SCALA_ARGS% %_RESIDUAL_ARGS%
+if not %ERRORLEVEL%==0 (
+    @rem echo Error: Scaladoc execution failed 1>&2
+    set _EXITCODE=1
+    goto end
+)
+goto end
+
+ at rem #########################################################################
+ at rem ## Subroutines
+
+:args
+set _JAVA_DEBUG=
+set _HELP=
+set _VERBOSE=
+set _QUIET=
+set _COLORS=
+set _SCALA_ARGS=
+set _JAVA_ARGS=
+set _RESIDUAL_ARGS=
+
+:args_loop
+if "%~1"=="" goto args_done
+set "__ARG=%~1"
+if "%__ARG%"=="--" (
+    @rem for arg; do addResidual "$arg"; done; set -- ;;
+) else if "%__ARG%"=="-h" (
+    set _HELP=true
+    call :addScala "-help"
+) else if "%__ARG%"=="-help" (
+    set _HELP=true
+    call :addScala "-help"
+) else if "%__ARG%"=="-v" (
+    set _VERBOSE=true
+    call :addScala "-verbose"
+) else if "%__ARG%"=="-verbose" (
+    set _VERBOSE=true
+    call :addScala "-verbose"
+) else if "%__ARG%"=="-debug" ( set "_JAVA_DEBUG=%_DEBUG_STR%"
+) else if "%__ARG%"=="-q" ( set _QUIET=true
+) else if "%__ARG%"=="-quiet" ( set _QUIET=true
+) else if "%__ARG%"=="-colors" ( set _COLORS=true
+) else if "%__ARG%"=="-no-colors" ( set _COLORS=
+) else if "%__ARG:~0,2%"=="-D" ( call :addJava "%__ARG%"
+) else if "%__ARG:~0,2%"=="-J" ( call :addJava "%__ARG:~2%"
+) else (
+    if defined _IN_SCRIPTING_ARGS ( call :addScripting "%__ARG%"
+    ) else ( call :addResidual "%__ARG%"
+    )
+)
+shift
+goto args_loop
+:args_done
+goto :eof
+
+ at rem output parameter: _SCALA_ARGS
+:addScala
+set _SCALA_ARGS=%_SCALA_ARGS% %~1
+goto :eof
+
+ at rem output parameter: _JAVA_ARGS
+:addJava
+set _JAVA_ARGS=%_JAVA_ARGS% %~1
+goto :eof
+
+ at rem output parameter: _RESIDUAL_ARGS
+:addResidual
+set _RESIDUAL_ARGS=%_RESIDUAL_ARGS% %~1
+goto :eof
+
+ at rem #########################################################################
+ at rem ## Cleanups
+
+:end
+exit /b %_EXITCODE%
+endlocal


=====================================
dist/libexec-native-overrides/cli-common-platform.bat
=====================================
@@ -1,3 +1,3 @@
- at echo off
-
-set SCALA_CLI_CMD_WIN="%_PROG_HOME%\libexec\scala-cli.exe"
+ at echo off
+
+set SCALA_CLI_CMD_WIN="%_PROG_HOME%\libexec\scala-cli.exe"


=====================================
dist/libexec/cli-common-platform.bat
=====================================
@@ -1,5 +1,5 @@
- at echo off
-
- at rem we need to escape % in the java command path, for some reason this doesnt work in common.bat
-set "_JAVACMD=!_JAVACMD:%%=%%%%!"
-set SCALA_CLI_CMD_WIN="%_JAVACMD%" "-jar" "%_PROG_HOME%\libexec\scala-cli.jar"
+ at echo off
+
+ at rem we need to escape % in the java command path, for some reason this doesnt work in common.bat
+set "_JAVACMD=!_JAVACMD:%%=%%%%!"
+set SCALA_CLI_CMD_WIN="%_JAVACMD%" "-jar" "%_PROG_HOME%\libexec\scala-cli.jar"


=====================================
dist/libexec/common.bat
=====================================
@@ -1,43 +1,43 @@
- at rem #########################################################################
- at rem ## Code common to scalac.bat, scaladoc.bat and scala.bat
-
-if defined JAVACMD (
-    set "_JAVACMD=%JAVACMD%"
-) else if defined JAVA_HOME (
-    set "_JAVACMD=%JAVA_HOME%\bin\java.exe"
-) else if defined JDK_HOME (
-    set "_JAVACMD=%JDK_HOME%\bin\java.exe"
-) else (
-    where /q java.exe
-    if !ERRORLEVEL!==0 (
-        set __JAVA_BIN_DIR=
-        for /f "delims=" %%i in ('where /f java.exe') do (
-            set "__PATH=%%~dpi"
-            @rem we take first occurrence and ignore Oracle path for java executable
-            if not defined __JAVA_BIN_DIR if "!__PATH!"=="!__PATH:javapath=!" set "__JAVA_BIN_DIR=!__PATH!"
-        )
-        if defined __JAVA_BIN_DIR set "_JAVACMD=!__JAVA_BIN_DIR!\java.exe"
-    )
-    if not defined _JAVACMD (
-        set "__PATH=%ProgramFiles%\Java"
-        for /f %%f in ('dir /ad /b "!__PATH!\jre*" 2^>NUL') do set "_JAVA_HOME=!__PATH!\%%f"
-        if not defined _JAVA_HOME (
-           set __PATH=C:\opt
-           for /f %%f in ('dir /ad /b "!__PATH!\jdk*" 2^>NUL') do set "_JAVA_HOME=!__PATH!\%%f\jre"
-        )
-        if defined _JAVA_HOME set "_JAVACMD=!_JAVA_HOME!\bin\java.exe"
-    )
-)
-if not exist "%_JAVACMD%" (
-   echo Error: Java executable not found ^(!_JAVACMD!^) 1>&2
-   set _EXITCODE=1
-   goto :eof
-)
-if not defined _PROG_HOME (
-   echo Error: Variable _PROG_HOME undefined 1>&2
-   set _EXITCODE=1
-   goto :eof
-)
-set "_LIB_DIR=%_PROG_HOME%\lib"
-
-set _PSEP=;
+ at rem #########################################################################
+ at rem ## Code common to scalac.bat, scaladoc.bat and scala.bat
+
+if defined JAVACMD (
+    set "_JAVACMD=%JAVACMD%"
+) else if defined JAVA_HOME (
+    set "_JAVACMD=%JAVA_HOME%\bin\java.exe"
+) else if defined JDK_HOME (
+    set "_JAVACMD=%JDK_HOME%\bin\java.exe"
+) else (
+    where /q java.exe
+    if !ERRORLEVEL!==0 (
+        set __JAVA_BIN_DIR=
+        for /f "delims=" %%i in ('where /f java.exe') do (
+            set "__PATH=%%~dpi"
+            @rem we take first occurrence and ignore Oracle path for java executable
+            if not defined __JAVA_BIN_DIR if "!__PATH!"=="!__PATH:javapath=!" set "__JAVA_BIN_DIR=!__PATH!"
+        )
+        if defined __JAVA_BIN_DIR set "_JAVACMD=!__JAVA_BIN_DIR!\java.exe"
+    )
+    if not defined _JAVACMD (
+        set "__PATH=%ProgramFiles%\Java"
+        for /f %%f in ('dir /ad /b "!__PATH!\jre*" 2^>NUL') do set "_JAVA_HOME=!__PATH!\%%f"
+        if not defined _JAVA_HOME (
+           set __PATH=C:\opt
+           for /f %%f in ('dir /ad /b "!__PATH!\jdk*" 2^>NUL') do set "_JAVA_HOME=!__PATH!\%%f\jre"
+        )
+        if defined _JAVA_HOME set "_JAVACMD=!_JAVA_HOME!\bin\java.exe"
+    )
+)
+if not exist "%_JAVACMD%" (
+   echo Error: Java executable not found ^(!_JAVACMD!^) 1>&2
+   set _EXITCODE=1
+   goto :eof
+)
+if not defined _PROG_HOME (
+   echo Error: Variable _PROG_HOME undefined 1>&2
+   set _EXITCODE=1
+   goto :eof
+)
+set "_LIB_DIR=%_PROG_HOME%\lib"
+
+set _PSEP=;


=====================================
project/scripts/native-integration/winTests.bat
=====================================
@@ -1,39 +1,39 @@
- at echo off
-setlocal
-
- at rem paths are relative to the root project directory
-set "_PREFIX=dist\win-x86_64\target\universal\stage"
-set "_SOURCE=tests\pos\HelloWorld.scala"
-set "_SOURCE_TEST_BOOTSTRAPPED=project\scripts\native-integration\testBootstrappedLibrary.scala"
-set "_OUT_DIR=out"
-
- at rem if-tests mimic the non-existing bash instruction 'set -e'.
-call "%_PREFIX%\bin\scalac.bat" "@project\scripts\options" "%_SOURCE%"
-if not %ERRORLEVEL%==0 endlocal& exit /b 1
-
- at rem Create output directory (scalac requires it to exist)
-if exist "%_OUT_DIR%" rmdir /s /q "%_OUT_DIR%"
-mkdir "%_OUT_DIR%"
-
-call "%_PREFIX%\bin\scalac.bat" -d "%_OUT_DIR%" "%_SOURCE%"
-if not %ERRORLEVEL%==0 endlocal& exit /b 1
-
-call "%_PREFIX%\bin\scala.bat" --power -classpath "%_OUT_DIR%" -M HelloWorld --offline --server=false
-if not %ERRORLEVEL%==0 endlocal& exit /b 1
-
-echo testing REPL direct invocation with -repl-init-script
-call "%_PREFIX%\bin\scala.bat" -repl-init-script "println(\"REPL_INIT_OK\"); assert(scala.util.Properties.versionNumberString.startsWith(\"3.\"))" -repl-quit-after-init --power --offline --server=false 2>&1 | findstr /C:"REPL_INIT_OK" >nul
-if not %ERRORLEVEL%==0 (
-    echo REPL init script test failed: output did not contain REPL_INIT_OK
-    endlocal& exit /b 1
-)
-
-echo testing bootstrapped standard library (scala-library-bootstrapped)
-call "%_PREFIX%\bin\scala.bat" run "%_SOURCE_TEST_BOOTSTRAPPED%" --power --offline --server=false 2>&1 | findstr /C:"BOOTSTRAPPED_LIBRARY_TEST_PASSED" >nul
-if not %ERRORLEVEL%==0 (
-    echo Bootstrapped library test failed: output did not contain BOOTSTRAPPED_LIBRARY_TEST_PASSED
-    endlocal& exit /b 1
-)
-
-echo All tests passed!
-endlocal
+ at echo off
+setlocal
+
+ at rem paths are relative to the root project directory
+set "_PREFIX=dist\win-x86_64\target\universal\stage"
+set "_SOURCE=tests\pos\HelloWorld.scala"
+set "_SOURCE_TEST_BOOTSTRAPPED=project\scripts\native-integration\testBootstrappedLibrary.scala"
+set "_OUT_DIR=out"
+
+ at rem if-tests mimic the non-existing bash instruction 'set -e'.
+call "%_PREFIX%\bin\scalac.bat" "@project\scripts\options" "%_SOURCE%"
+if not %ERRORLEVEL%==0 endlocal& exit /b 1
+
+ at rem Create output directory (scalac requires it to exist)
+if exist "%_OUT_DIR%" rmdir /s /q "%_OUT_DIR%"
+mkdir "%_OUT_DIR%"
+
+call "%_PREFIX%\bin\scalac.bat" -d "%_OUT_DIR%" "%_SOURCE%"
+if not %ERRORLEVEL%==0 endlocal& exit /b 1
+
+call "%_PREFIX%\bin\scala.bat" --power -classpath "%_OUT_DIR%" -M HelloWorld --offline --server=false
+if not %ERRORLEVEL%==0 endlocal& exit /b 1
+
+echo testing REPL direct invocation with -repl-init-script
+call "%_PREFIX%\bin\scala.bat" -repl-init-script "println(\"REPL_INIT_OK\"); assert(scala.util.Properties.versionNumberString.startsWith(\"3.\"))" -repl-quit-after-init --power --offline --server=false 2>&1 | findstr /C:"REPL_INIT_OK" >nul
+if not %ERRORLEVEL%==0 (
+    echo REPL init script test failed: output did not contain REPL_INIT_OK
+    endlocal& exit /b 1
+)
+
+echo testing bootstrapped standard library (scala-library-bootstrapped)
+call "%_PREFIX%\bin\scala.bat" run "%_SOURCE_TEST_BOOTSTRAPPED%" --power --offline --server=false 2>&1 | findstr /C:"BOOTSTRAPPED_LIBRARY_TEST_PASSED" >nul
+if not %ERRORLEVEL%==0 (
+    echo Bootstrapped library test failed: output did not contain BOOTSTRAPPED_LIBRARY_TEST_PASSED
+    endlocal& exit /b 1
+)
+
+echo All tests passed!
+endlocal


=====================================
project/scripts/winCmdTests.bat
=====================================
@@ -1,25 +1,25 @@
- at echo off
-setlocal
-
- at rem paths are relative to the root project directory
-set "_PREFIX=dist\win-x86_64\target\universal\stage"
-set "_SOURCE=tests\pos\HelloWorld.scala"
-set "_OUT_DIR=out"
-set "_SITE_DIR=_site"
-
- at rem if-tests mimic the non-existing bash instruction 'set -e'.
-call "%_PREFIX%\bin\scalac.bat" "@project\scripts\options" "%_SOURCE%"
-if not %ERRORLEVEL%==0 endlocal& exit /b 1
-
-call "%_PREFIX%\bin\scalac.bat" -d "%_OUT_DIR%" "%_SOURCE%"
-if not %ERRORLEVEL%==0 endlocal& exit /b 1
-
-call "%_PREFIX%\bin\scala.bat" --power -classpath "%_OUT_DIR%" -M HelloWorld --offline --server=false
-if not %ERRORLEVEL%==0 endlocal& exit /b 1
-
-call "%_PREFIX%\bin\scala.bat" --power -classpath "%_OUT_DIR%" -J -Xmx512m -M HelloWorld --offline --server=false
-if not %ERRORLEVEL%==0 endlocal& exit /b 1
-
-if not exist "%_SITE_DIR%" mkdir "%_SITE_DIR%"
-call "%_PREFIX%\bin\scaladoc.bat" -d "%_SITE_DIR%" -project Hello "%_SOURCE%"
-endlocal
+ at echo off
+setlocal
+
+ at rem paths are relative to the root project directory
+set "_PREFIX=dist\win-x86_64\target\universal\stage"
+set "_SOURCE=tests\pos\HelloWorld.scala"
+set "_OUT_DIR=out"
+set "_SITE_DIR=_site"
+
+ at rem if-tests mimic the non-existing bash instruction 'set -e'.
+call "%_PREFIX%\bin\scalac.bat" "@project\scripts\options" "%_SOURCE%"
+if not %ERRORLEVEL%==0 endlocal& exit /b 1
+
+call "%_PREFIX%\bin\scalac.bat" -d "%_OUT_DIR%" "%_SOURCE%"
+if not %ERRORLEVEL%==0 endlocal& exit /b 1
+
+call "%_PREFIX%\bin\scala.bat" --power -classpath "%_OUT_DIR%" -M HelloWorld --offline --server=false
+if not %ERRORLEVEL%==0 endlocal& exit /b 1
+
+call "%_PREFIX%\bin\scala.bat" --power -classpath "%_OUT_DIR%" -J -Xmx512m -M HelloWorld --offline --server=false
+if not %ERRORLEVEL%==0 endlocal& exit /b 1
+
+if not exist "%_SITE_DIR%" mkdir "%_SITE_DIR%"
+call "%_PREFIX%\bin\scaladoc.bat" -d "%_SITE_DIR%" -project Hello "%_SOURCE%"
+endlocal



View it on GitLab: https://salsa.debian.org/java-team/scala3/-/commit/606ed124f9647ccdf808f183c6be4bd0e36595ea

-- 
View it on GitLab: https://salsa.debian.org/java-team/scala3/-/commit/606ed124f9647ccdf808f183c6be4bd0e36595ea
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20261103/3be029d6/attachment.htm>


More information about the pkg-java-commits mailing list