-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix for #11536 and other terminal and shell environment issues #11539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
NOTE: hopefully this comment isn't confusing, it's an idea for a proposed change, but is not part of this PR. Currently, calling scripts results in
Here's what the change looks like in # only need to source common if variables not already initialized
[[ -z "$PSEP" && -z "$DOTTY_COMP" ]] && source "$PROG_HOME/bin/common" In my environment, it eliminates between 250 and 350 milliseconds from script startups, when a compile is required. |
@philwalk Usage of $ git diff dist\bin\scalac dist\bin\scaladoc
diff --git a/dist/bin/scalac b/dist/bin/scalac
index f81c20853b..74bfc4a603 100755
--- a/dist/bin/scalac
+++ b/dist/bin/scalac
@@ -120,7 +120,7 @@ if [ "$PROG_NAME" == "$ScriptingMain" ]; then
scripting_string="-script $target_script ${scripting_args[@]}"
fi
-eval exec "\"$JAVACMD\"" \
+eval "\"$JAVACMD\"" \
${JAVA_OPTS:-$default_java_opts} \
"${DEBUG-}" \
"${java_args[@]}" \
@@ -130,4 +130,5 @@ eval exec "\"$JAVACMD\"" \
"${scala_args[@]}" \
"${residual_args[@]}" \
"${scripting_string-}"
-exit $?
+scala_exit_status=$?
+onExit
diff --git a/dist/bin/scaladoc b/dist/bin/scaladoc
index b536dbf99e..304da8f504 100755
--- a/dist/bin/scaladoc
+++ b/dist/bin/scaladoc
@@ -125,7 +125,7 @@ done
classpathArgs
-eval exec "\"$JAVACMD\"" \
+eval "\"$JAVACMD\"" \
${JAVA_OPTS:-$default_java_opts} \
"$DEBUG" \
"${java_args[@]}" \
@@ -134,4 +134,5 @@ eval exec "\"$JAVACMD\"" \
"${scala_args[@]}" \
"${residual_args[@]}" \
"$scripting_string"
-exit $?
+scala_exit_status=$?
+onExit Do we agree with the following general rules ?!
|
@michelou |
@michelou - I'm not able to exhaustively test the change to |
I'd like to keep |
fix for #11536
Also verified working REPL for various combinations of Terminal and Windows shell.
See https://github.com/lampepfl/dotty/issues/11536#issuecomment-786156696