This page is no longer maintained — Please continue to the home page at www.scala-lang.org

ProGuard incompatible with current Scala trunk build

No replies
Seth Tisue
Joined: 2008-12-16,
User offline. Last seen 34 weeks 3 days ago.

I filed this bug report with on the ProGuard tracker:

https://sourceforge.net/tracker/?func=detail&aid=2725052&group_id=54750&...

I don't know whether it's a ProGuard 4.3 bug or a scalac (2.8.0.r17416)
bug or both. I'll see what the ProGuard guy thinks.

In the meantime, if anyone wants to use ProGuard with the Scala trunk,
here's how. In the ProGuard 4.3 source, at line 114 of
src/proguard/classfile/ClassPool.java, in the classesAccept method,
replace this line with:

clazz.accept(classVisitor);

with:

if( ! clazz.getName().equals( "scala/util/parsing/combinatorold/syntactical/BindingParsers" ) &&
! clazz.getName().equals( "scala/util/parsing/ast/Binders" ) )
clazz.accept(classVisitor);

and rebuild ProGuard. There must be something odd about those two
classes. (Fortunately they happen to be two classes I don't need.)
Another option would be to remove those classes from scala-library.jar
before running it through ProGuard. (Though that might cause a bunch of
missing-class warnings unless you ripped out a bunch of associated
classes, too.)

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland