Aladdin - Scala Bugtracking
[#888] project: distribution priority: low category: bug
submitter assigned to status date submitted
Stephane Lex fixed 2007-01-15 12:57:32.0
subject Incomplete scripts in Debian distributions
code
For example:

root@host:/tmp# cat /usr/bin/scalac
#!/bin/sh
JAVA_DIR=/usr/share/java
SCALAC_CLASSPATH=$JAVA_DIR/scala-library.jar:$JAVA_DIR/scala-compiler.jar

exec ${JAVACMD:=java} -Xmx256M -Xms16M \
  -classpath $SCALAC_CLASSPATH -Dscala.boot.class.path=$SCALAC_CLASSPATH \
 scala.tools.nsc.Main "$@"

instead of:

root@host:/tmp# cat /usr/bin/scalac
#!/bin/sh
JAVA_DIR=/usr/share/java
SCALAC_CLASSPATH=$JAVA_DIR/scala-library.jar:$JAVA_DIR/scala-compiler.jar

exec ${JAVACMD:=java} -Xmx256M -Xms16M \
  -classpath $SCALAC_CLASSPATH -Dscala.boot.class.path=$SCALAC_CLASSPATH \
  -Dscala.tool.name="Scala compiler" -Dscala.tool.version="2.3.0" \
 scala.tools.nsc.Main "$@"
what happened
root@host:/tmp# scalac -version
scalac unknown version -- (c) 2002-2006 LAMP/EPFL
what expected
root@host:/tmp# scalac -version
Scala compiler 2.3.0 -- (c) 2002-2006 LAMP/EPFL
[back to overview]
Changes of this bug report
Stephane  edited on  2007-01-15 12:57:54.0
Lex  edited on  2007-01-15 14:35:00.0
Okay. I actually planned to generate a Version class that gets compiled into the jar, and just did not do it yet. At any rate, it's a bug and needs fixing.
Lex  edited on  2007-04-18 01:39:36.0
This is fixed now. The version number is included in scala-compiler.jar, just as in the Scala distributions directly from the web site.