Skip to content

Commit 205fab5

Browse files
committed
removed debug code from batch scripts
1 parent 6688ea6 commit 205fab5

File tree

4 files changed

+2
-28
lines changed

4 files changed

+2
-28
lines changed

dist/bin/common.bat

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,10 @@ rem ## Code common to dotc.bat, dotd.bat and dotr.bat
33

44
if defined JAVACMD (
55
set _JAVACMD=%JAVACMD%
6-
if %_DEBUG%==1 echo [%_BASENAME%] Using environment variable JAVACMD
76
) else if defined JAVA_HOME (
87
set _JAVACMD=%JAVA_HOME%\bin\java.exe
9-
if %_DEBUG%==1 echo [%_BASENAME%] Using environment variable JAVA_HOME
108
) else if defined JDK_HOME (
119
set _JAVACMD=%JDK_HOME%\bin\java.exe
12-
if %_DEBUG%==1 echo [%_BASENAME%] Using environment variable JDK_HOME
1310
) else (
1411
where /q java.exe
1512
if !ERRORLEVEL!==0 (
@@ -25,7 +22,6 @@ if defined JAVACMD (
2522
for /f %%f in ('dir /ad /b "!_PATH!\jdk*" 2^>NUL') do set _JAVA_HOME=!_PATH!\%%f\jre
2623
)
2724
if defined _JAVA_HOME (
28-
if %_DEBUG%==1 echo [%_BASENAME%] Using default Java installation directory !_JAVA_HOME!
2925
set _JAVACMD=!_JAVA_HOME!\bin\java.exe
3026
)
3127
)

dist/bin/dotc.bat

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
@echo off
22
setlocal enabledelayedexpansion
33

4-
rem only for interactive debugging !
5-
set _DEBUG=0
6-
74
rem ##########################################################################
85
rem ## Environment setup
96

@@ -32,12 +29,11 @@ call :classpathArgs
3229
if defined JAVA_OPTS ( set _JAVA_OPTS=%JAVA_OPTS%
3330
) else ( set _JAVA_OPTS=-Xmx768m -Xms768m
3431
)
35-
if %_DEBUG%==1 echo [%_BASENAME%] "%_JAVACMD%" %_JAVA_OPTS% %_JAVA_DEBUG% %_JAVA_ARGS% %_JVM_CP_ARGS% -Dscala.usejavacp=true %_PROG_NAME% %_SCALA_ARGS% %_RESIDUAL_ARGS%
3632
"%_JAVACMD%" %_JAVA_OPTS% %_JAVA_DEBUG% %_JAVA_ARGS% %_JVM_CP_ARGS% ^
3733
-Dscala.usejavacp=true ^
3834
%_PROG_NAME% %_SCALA_ARGS% %_RESIDUAL_ARGS%
3935
if not %ERRORLEVEL%==0 (
40-
if %_DEBUG%==1 echo [%_BASENAME%] Dotty compiler execution failed
36+
rem echo Error: Dotty compiler execution failed 1>&2
4137
set _EXITCODE=1
4238
goto end
4339
)
@@ -59,7 +55,6 @@ set _RESIDUAL_ARGS=
5955
:args_loop
6056
if "%~1"=="" goto args_done
6157
set __ARG=%~1
62-
if %_DEBUG%==1 echo [%_BASENAME%] __ARG=%__ARG%
6358
if "%__ARG%"=="--" (
6459
rem for arg; do addResidual "$arg"; done; set -- ;;
6560
) else if /i "%__ARG%"=="-h" (
@@ -105,26 +100,21 @@ rem will be available as system properties.
105100
shift
106101
goto args_loop
107102
:args_done
108-
if %_DEBUG%==1 echo [%_BASENAME%] _VERBOSE=%_VERBOSE%
109-
if %_DEBUG%==1 echo [%_BASENAME%] _PROG_NAME=%_PROG_NAME%
110103
goto :eof
111104

112105
rem output parameter: _SCALA_ARGS
113106
:addScala
114107
set _SCALA_ARGS=%_SCALA_ARGS% %~1
115-
if %_DEBUG%==1 echo [%_BASENAME%] _SCALA_ARGS=%_SCALA_ARGS%
116108
goto :eof
117109

118110
rem output parameter: _JAVA_ARGS
119111
:addJava
120112
set _JAVA_ARGS=%_JAVA_ARGS% %~1
121-
if %_DEBUG%==1 echo [%_BASENAME%] _JAVA_ARGS=%_JAVA_ARGS%
122113
goto :eof
123114

124115
rem output parameter: _RESIDUAL_ARGS
125116
:addResidual
126117
set _RESIDUAL_ARGS=%_RESIDUAL_ARGS% %~1
127-
if %_DEBUG%==1 echo [%_BASENAME%] _RESIDUAL_ARGS=%_RESIDUAL_ARGS%
128118
goto :eof
129119

130120
rem output parameter: _JVM_CP_ARGS
@@ -157,7 +147,6 @@ rem ##########################################################################
157147
rem ## Cleanups
158148

159149
:end
160-
if %_DEBUG%==1 echo [%_BASENAME%] _EXITCODE=%_EXITCODE%
161150
exit /b %_EXITCODE%
162151
endlocal
163152

dist/bin/dotd.bat

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
@echo off
22
setlocal enabledelayedexpansion
33

4-
rem only for interactive debugging !
5-
set _DEBUG=0
6-
74
rem ##########################################################################
85
rem ## Environment setup
96

@@ -21,10 +18,9 @@ rem ## Main
2118

2219
call :javaClassPath
2320

24-
if %_DEBUG%==1 echo [%_BASENAME%] "%_JAVACMD%" -Dscala.usejavacp=true -classpath "%_CLASS_PATH%" dotty.tools.dottydoc.Main %*
2521
"%_JAVACMD%" -Dscala.usejavacp=true -classpath "%_CLASS_PATH%" dotty.tools.dottydoc.Main %*
2622
if not %ERRORLEVEL%==0 (
27-
if %_DEBUG%==1 echo [%_BASENAME%] Dottydoc execution failed
23+
rem echo Error: Dottydoc execution failed 1>&2
2824
set _EXITCODE=1
2925
goto end
3026
)
@@ -99,6 +95,5 @@ rem ##########################################################################
9995
rem ## Cleanups
10096

10197
:end
102-
if %_DEBUG%==1 echo [%_BASENAME%] _EXITCODE=%_EXITCODE%
10398
exit /b %_EXITCODE%
10499
endlocal

dist/bin/dotr.bat

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
@echo off
22
setlocal enabledelayedexpansion
33

4-
rem only for interactive debugging !
5-
set _DEBUG=0
6-
74
rem ##########################################################################
85
rem ## Environment setup
96

@@ -35,7 +32,6 @@ if %_CASE_1%==1 (
3532
if defined _CLASS_PATH set _DOTC_ARGS=-classpath "%_CLASS_PATH%"
3633
set _DOTC_ARGS=!_DOTC_ARGS! %_JAVA_OPTIONS% -repl %_RESIDUAL_ARGS%
3734
echo Starting dotty REPL...
38-
if %_DEBUG%==1 echo [%_BASENAME%] %_PROG_HOME%\bin\dotc.bat !_DOTC_ARGS!
3935
%_PROG_HOME%\bin\dotc.bat !_DOTC_ARGS!
4036
rem elif [ $execute_repl == true ] || [ ${#residual_args[@]} -ne 0 ]; then
4137
) else if %_CASE_2%==1 (
@@ -50,7 +46,6 @@ rem elif [ $execute_repl == true ] || [ ${#residual_args[@]} -ne 0 ]; then
5046
set _CP_ARG=!_CP_ARG!%_PSEP%%_DOTTY_COMP%%_PSEP%%_DOTTY_INTF%%_PSEP%%_SCALA_ASM%
5147
)
5248
set _JAVA_ARGS=%_JAVA_DEBUG% -classpath "!_CP_ARG!" %_RESIDUAL_ARGS%
53-
if %_DEBUG%==1 echo [%_BASENAME%] %_JAVACMD% !_JAVA_ARGS!
5449
%_JAVACMD% !_JAVA_ARGS!
5550
) else (
5651
echo Warning: Command option is not correct. 1>&2
@@ -103,6 +98,5 @@ rem ##########################################################################
10398
rem ## Cleanups
10499

105100
:end
106-
if %_DEBUG%==1 echo [%_BASENAME%] _EXITCODE=%_EXITCODE%
107101
exit /b %_EXITCODE%
108102
endlocal

0 commit comments

Comments
 (0)