Help in debugging Scala compiler (NoSuchMethodError )

1,261 views
Skip to first unread message

Edmondo Porcu

unread,
Dec 26, 2014, 5:47:09 AM12/26/14
to scala...@googlegroups.com
Hello,

I have been trying to follow the instructions to debug the Scala compiler as found here:


I am on branch 2.11x at commit d9f623db0ff1d20040939fbb9e15d4d4e5887c75.  The project builds in SCALA IDE but when I try to run nsc.Main I get the following error:

Exception in thread "main" java.lang.NoSuchMethodError: scala.reflect.internal.settings.MutableSettings$SettingValue.valueSetByUser()Lscala/Option;

at scala.tools.nsc.Global.<init>(Global.scala:335)

at scala.tools.nsc.Global$.apply(Global.scala:1698)

at scala.tools.nsc.MainClass.newCompiler(Main.scala:20)

at scala.tools.nsc.Driver.process(Driver.scala:44)

at scala.tools.nsc.Driver.main(Driver.scala:64)

at scala.tools.nsc.Main.main(Main.scala)

When I try inside Intellij Idea instead, I can get the compiler to work fine and hit some breakpoint, but others are not correctly handled by the IDE.

Could you please help me?

Thanks & Merry XMAS

Edmondo 

Eugene Burmako

unread,
Dec 26, 2014, 5:52:15 AM12/26/14
to Edmondo Porcu, scala-user
Looks like a version mismatch between scala-compiler.jar and scala-reflect.jar.

It could mean one of the following:
1) You need to clean your project and rebuild everything from scratch. Maybe there are some leftovers from previous builds that didn't get recompiled correctly (ant, which we use to build scalac, sometimes does that).
2) You're using an incompatible scala-reflect.jar (e.g. taken not from the results of compiling your checkout of scala/scala, but from Scala IDE itself) to run the compiler.

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages