lib/Tools/scala
author wenzelm
Tue, 18 Jul 2023 19:41:56 +0200
changeset 78397 c8df7abb8707
parent 76343 6a6f650cc5a2
child 79556 0631dfc0db07
permissions -rwxr-xr-x
clarified modules;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
27914
9a7f17370ffb refined scala/java wrappers via isatool;
wenzelm
parents:
diff changeset
     1
#!/usr/bin/env bash
9a7f17370ffb refined scala/java wrappers via isatool;
wenzelm
parents:
diff changeset
     2
#
9a7f17370ffb refined scala/java wrappers via isatool;
wenzelm
parents:
diff changeset
     3
# Author: Makarius
9a7f17370ffb refined scala/java wrappers via isatool;
wenzelm
parents:
diff changeset
     4
#
27916
09b3010ffaf2 removed unused usage;
wenzelm
parents: 27914
diff changeset
     5
# DESCRIPTION: invoke Scala within the Isabelle environment
27914
9a7f17370ffb refined scala/java wrappers via isatool;
wenzelm
parents:
diff changeset
     6
74038
b4f57bfe82e7 more robust "isabelle build_scala" as separate tool;
wenzelm
parents: 74017
diff changeset
     7
isabelle scala_build || exit $?
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents: 29143
diff changeset
     8
73989
842fc354c031 more robust classpath: skip empty entries;
wenzelm
parents: 73988
diff changeset
     9
classpath "$ISABELLE_SETUP_CLASSPATH"; unset ISABELLE_SETUP_CLASSPATH
76343
6a6f650cc5a2 more robust reset of CLASSPATH: unset variable means "." in certain situations, e.g. scalac;
wenzelm
parents: 76175
diff changeset
    10
classpath "$CLASSPATH"; export CLASSPATH=""
71882
f92c7e2ba8da more accurate classpath for "isabelle scala";
wenzelm
parents: 69126
diff changeset
    11
75654
21164fd15e3d switch to Scala 3;
wenzelm
parents: 74038
diff changeset
    12
export jvm_cp_args="$(platform_path "$ISABELLE_CLASSPATH")"
21164fd15e3d switch to Scala 3;
wenzelm
parents: 74038
diff changeset
    13
export JAVA_OPTS="$ISABELLE_JAVA_SYSTEM_OPTIONS -J-Dscala.usejavacp=true"
21164fd15e3d switch to Scala 3;
wenzelm
parents: 74038
diff changeset
    14
76175
4ff3cea76201 avoid crash of JLine on Windows;
wenzelm
parents: 75654
diff changeset
    15
if [ "$ISABELLE_PLATFORM_FAMILY" = "windows" ]; then
4ff3cea76201 avoid crash of JLine on Windows;
wenzelm
parents: 75654
diff changeset
    16
  export TERM=dumb
4ff3cea76201 avoid crash of JLine on Windows;
wenzelm
parents: 75654
diff changeset
    17
fi
4ff3cea76201 avoid crash of JLine on Windows;
wenzelm
parents: 75654
diff changeset
    18
75654
21164fd15e3d switch to Scala 3;
wenzelm
parents: 74038
diff changeset
    19
isabelle_scala scala $ISABELLE_SCALAC_OPTIONS "$@"