Hi everyone.
I'm trying to figure out what update or local change recently broke the worksheet feature of Scala Ide.
I have a project with several worksheets; recently, I reopened one of them and it doesn't run anymore. I find the following errors in the Eclipse log:
org.scalaide.worksheet.runtime.ProgramInstrumentationFailed: Error during askInstrumented of unit RulesTests.sc
at org.scalaide.worksheet.runtime.SourceInstrumenter.instrumentProgram(SourceInstrumenter.scala:41)
at org.scalaide.worksheet.runtime.SourceInstrumenter.instrument(SourceInstrumenter.scala:24)
at org.scalaide.worksheet.runtime.WorksheetRunner$$anonfun$receive$1.applyOrElse(WorksheetRunner.scala:85)
at akka.actor.Actor.aroundReceive(Actor.scala:497)
at akka.actor.Actor.aroundReceive$(Actor.scala:495)
at org.scalaide.worksheet.runtime.WorksheetRunner.aroundReceive(WorksheetRunner.scala:48)
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:526)
at akka.actor.ActorCell.invoke(ActorCell.scala:495)
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)
at akka.dispatch.Mailbox.run(Mailbox.scala:224)
at akka.dispatch.Mailbox.exec(Mailbox.scala:234)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: java.lang.ClassCastException: com.softwaremill.clippy.InjectReporter$$anon$1 cannot be cast to scala.tools.nsc.Global$GlobalPhase
at scala.tools.nsc.Global$Run.$anonfun$compileLate$3(Global.scala:1542)
at scala.tools.nsc.Global$Run.$anonfun$compileLate$2(Global.scala:1542)
at scala.tools.nsc.Global$Run.$anonfun$compileLate$2$adapted(Global.scala:1541)
at scala.collection.Iterator.foreach(Iterator.scala:929)
at scala.collection.Iterator.foreach$(Iterator.scala:929)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1417)
at scala.tools.nsc.Global$Run.compileLate(Global.scala:1541)
at scala.tools.nsc.interactive.Global.parseAndEnter(Global.scala:645)
at scala.tools.nsc.interactive.Global.typedTree(Global.scala:822)
at scala.tools.nsc.interactive.ProgramInstrumenter$Instrumenter$.instrumentation(ProgramInstrumenter.scala:31)
at scala.tools.nsc.interactive.ProgramInstrumenter$Instrumenter$.$anonfun$askInstrumentation$1(ProgramInstrumenter.scala:15)
at scala.tools.nsc.interactive.Global.$anonfun$respond$1(Global.scala:688)
at scala.tools.nsc.interactive.Global.respondGradually(Global.scala:695)
at scala.tools.nsc.interactive.Global.respond(Global.scala:688)
at scala.tools.nsc.interactive.ProgramInstrumenter$Instrumenter$.askInstrumentation(ProgramInstrumenter.scala:15)
at scala.tools.nsc.interactive.ProgramInstrumenter.$anonfun$askInstrumented$2(ProgramInstrumenter.scala:52)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
at scala.tools.nsc.util.InterruptReq.execute(InterruptReq.scala:26)
at scala.tools.nsc.interactive.Global.$anonfun$pollForWork$1(Global.scala:444)
at scala.tools.nsc.interactive.Global.pollForWork(Global.scala:418)
at scala.tools.nsc.interactive.PresentationCompilerThread.run(PresentationCompilerThread.scala:22)
My environment is:
eclipse.buildId=4.7.3.M20180330-0640
java.version=1.8.0_102
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=it_IT
Framework arguments: -product org.eclipse.epp.package.java.product -product org.eclipse.epp.package.java.product -keyring /Users/mim/.eclipse_keyring
Command-line arguments: -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.java.product -data file:/Users/mim/oxygen/ -product org.eclipse.epp.package.java.product -keyring /Users/mim/.eclipse_keyring
and I'm using Scala IDE for Eclipse 4.7.1.v-2_12-201801021323-2dfe808.
The same classcast seem to happen quite frequently, and is labeled "Throwable during asyncExec".
The most interesting change that I made lately is the Eclipse Platform update ( to the latest Oxygen, Eclipse Platform 4.7.3.v20180330-0640).
I don't know if this is related, but I usually generate the eclipse project files from sbt, using the sbt-eclipse plugin 5.2.4 (latest).
Anyone has seen this problem or has an idea in what direction we should be investigating?
Thanks in advance,
Michele