Skip to content

Commit d4f05ef

Browse files
committed
Remove -d for debugging to be consistent and align with Scala 2 behavior
1 parent 67f1285 commit d4f05ef

File tree

5 files changed

+4
-12
lines changed

5 files changed

+4
-12
lines changed

dist/bin/common

-3
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,6 @@ JLINE_TERMINAL=$(find_lib "*jline-terminal-3*")
161161
JLINE_TERMINAL_JNA=$(find_lib "*jline-terminal-jna-3*")
162162
[[ ${conemu-} ]] || JNA=$(find_lib "*jna-5*")
163163

164-
# debug
165-
166-
DEBUG_STR=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005
167164

168165
compilerJavaClasspathArgs () {
169166
# echo "dotty-compiler: $DOTTY_COMP"

dist/bin/scala

+1-5
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,6 @@ while [[ $# -gt 0 ]]; do
9898
addScala "$1"
9999
shift
100100
;;
101-
-d|-debug)
102-
DEBUG="${DEBUG_STR-}"
103-
shift ;;
104101
-version)
105102
# defer to scalac, then exit
106103
shift
@@ -187,7 +184,6 @@ script)
187184
# $scripting_string must be last
188185
eval "\"$JAVACMD\"" \
189186
${JAVA_OPTS:-$default_java_opts} \
190-
"${DEBUG-}" \
191187
"${java_args[@]}" \
192188
"-classpath \"$jvm_cp_args\"" \
193189
-Dscala.usejavacp=true \
@@ -223,7 +219,7 @@ run)
223219
run_cparg+="$PSEP$DOTTY_COMP$PSEP$TASTY_CORE$PSEP$DOTTY_INTF$PSEP$SCALA_ASM$PSEP$DOTTY_STAGING$PSEP$DOTTY_TASTY_INSPECTOR"
224220
fi
225221
# exec here would prevent onExit from being called, leaving terminal in unusable state
226-
eval "\"$JAVACMD\"" "${DEBUG-}" "-classpath \"$run_cparg\"" "${java_args[@]}" "${residual_args[@]}"
222+
eval "\"$JAVACMD\"" "-classpath \"$run_cparg\"" "${java_args[@]}" "${residual_args[@]}"
227223
scala_exit_status=$?
228224
;;
229225

dist/bin/scalac

-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ while [[ $# -gt 0 ]]; do
3636
case "$1" in
3737
--) shift; for arg; do addResidual "$arg"; done; set -- ;;
3838
-v|-verbose) verbose=true && addScala "-verbose" && shift ;;
39-
-debug) DEBUG="$DEBUG_STR" && shift ;;
4039
-q|-quiet) quiet=true && shift ;;
4140

4241
# Optimize for short-running applications, see https://github.com/lampepfl/dotty/issues/222
@@ -72,7 +71,6 @@ fi
7271
[ -n "$script_trace" ] && set -x
7372
eval "\"$JAVACMD\"" \
7473
${JAVA_OPTS:-$default_java_opts} \
75-
"${DEBUG-}" \
7674
"${java_args[@]}" \
7775
"-classpath \"$jvm_cp_args\"" \
7876
-Dscala.usejavacp=true \

dist/bin/scaladoc

-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ while [[ $# -gt 0 ]]; do
106106
case "$1" in
107107
--) shift; for arg; do addResidual "$arg"; done; set -- ;;
108108
-v|-verbose) verbose=true && addScala "-verbose" && shift ;;
109-
-debug) DEBUG="$DEBUG_STR" && shift ;;
110109
-q|-quiet) quiet=true && shift ;;
111110

112111
-colors) colors=true && shift ;;
@@ -126,7 +125,6 @@ classpathArgs
126125

127126
eval "\"$JAVACMD\"" \
128127
${JAVA_OPTS:-$default_java_opts} \
129-
"${DEBUG-}" \
130128
"${java_args[@]}" \
131129
"${jvm_cp_args-}" \
132130
"dotty.tools.scaladoc.Main" \

project/scripts/bootstrapCmdTests

+3
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,6 @@ grep -qe "Usage: scalac <options> <source files>" "$tmp"
7474

7575
./bin/scala -help > "$tmp" 2>&1
7676
grep -qe "Usage: scala <options> <source files>" "$tmp"
77+
78+
.bin/scala -d hello.jar tests/run/hello.scala
79+
ls hello.jar

0 commit comments

Comments
 (0)