Scala-tuplicity comes to 2.10

A while back I tried (and succeeded) compiling Scala 2.9.2 with increased limit on tuples.

Some time has passed, Scala 2.10 came out, and due to the recent advent of macros there could be some possibility in lifting the limit entirely - there is a thorough discussion on mailing list, but it doesn't seem to be anywhere close. So, for time being, I updated my duct-tape solution for Scala 2.10. The following script is the automated solution for generating new scala distribution with bigger tuples:
git clone git://github.com/scala/scala.git scala-tuplicity
cd scala-tuplicity
git checkout v2.10.0
 
export ANT_OPTS="-Xmx8192m -Xss25M -Xms4096M -XX:MaxPermSize=512M"
VERS="-Dbuild.release=true -Dversion.number=2.10.0-tuplicity -Dmaven.version.number=2.10.0-tuplicity"
ant build
sed -i 's/\(val MaxTupleArity, .*\) 22/\1 55/' src/reflect/scala/reflect/internal/Definitions.scala
ant build
sed -i 's/22/55/' src/library/scala/runtime/ScalaRunTime.scala
ant build
ant replacelocker
 
sed -i 's/\(MAX_ARITY .*\) 22/\1 55/' src/build/genprod.scala
sed -i 's/import scala.language.postfixOps//' src/build/genprod.scala
echo 'genprod.main(Array("src/library/scala/"))' >> src/build/genprod.scala
scala src/build/genprod.scala
 
ant build $VERS
cd lib
cp ../build/pack/lib/* ./
for x in *.jar; do sha1sum $x | sed 's/\(\w*\)  \(.*\)/\1 ?\2/' > ${x}.desired.sha1; done
cd ..
ant fastdist-opt $VERS
And here's the proof that it actually works.

Comments

Popular posts from this blog

How to create your own simple 3D render engine in pure Java

Solving quadruple dependency injection problem in Angular

Configuration objects in Scallop