Ichoran / thyme

Thyme is a microbenchmark utility for Scala. It includes Parsley, a (simple) local profiling tool.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't work in scala 2.10.2

fernandezpablo85 opened this issue · comments

Using the jar provided with the source:

➜  jsonbmark  scala -cp ./lib/thyme.jar
Welcome to Scala version 2.10.2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0).
Type in expressions to have them evaluated.
Type :help for more information.

scala> [init] error: error while loading <root>, error in opening zip file

Failed to initialize compiler: object scala.runtime in compiler mirror not found.
** Note that as of 2.8 scala does not assume use of the java classpath.
** For the old behavior pass -usejavacp to scala, or if using a Settings
** object programatically, settings.usejavacp.value = true.


Failed to initialize the REPL due to an unexpected error.
This is a bug, please, report it along with the error diagnostics printed below.
java.lang.NullPointerException
    at scala.tools.nsc.interpreter.ExprTyper$codeParser$.applyRule(ExprTyper.scala:24)
    at scala.tools.nsc.interpreter.ExprTyper$codeParser$.stmts(ExprTyper.scala:35)
    at scala.tools.nsc.interpreter.ExprTyper$$anonfun$parse$2.apply(ExprTyper.scala:43)
    at scala.tools.nsc.interpreter.ExprTyper$$anonfun$parse$2.apply(ExprTyper.scala:42)
    at scala.tools.nsc.reporters.Reporter.withIncompleteHandler(Reporter.scala:51)
    at scala.tools.nsc.interpreter.ExprTyper$class.parse(ExprTyper.scala:42)
    at scala.tools.nsc.interpreter.IMain$exprTyper$.parse(IMain.scala:1074)
    at scala.tools.nsc.interpreter.IMain.parse(IMain.scala:1078)
    at scala.tools.nsc.interpreter.IMain$$anonfun$showCodeIfDebugging$1.apply(IMain.scala:1168)
    at scala.tools.nsc.interpreter.IMain$$anonfun$showCodeIfDebugging$1.apply(IMain.scala:1168)
    at scala.tools.nsc.interpreter.IMain.beSilentDuring(IMain.scala:238)
    at scala.tools.nsc.interpreter.IMain.showCodeIfDebugging(IMain.scala:1168)
    at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.compileAndSaveRun(IMain.scala:800)
    at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.compile(IMain.scala:761)
    at scala.tools.nsc.interpreter.IMain.bind(IMain.scala:618)
    at scala.tools.nsc.interpreter.IMain.bind(IMain.scala:661)
    at scala.tools.nsc.interpreter.IMain$$anonfun$quietBind$1.apply(IMain.scala:660)
    at scala.tools.nsc.interpreter.IMain$$anonfun$quietBind$1.apply(IMain.scala:660)
    at scala.tools.nsc.interpreter.IMain.beQuietDuring(IMain.scala:232)
    at scala.tools.nsc.interpreter.IMain.quietBind(IMain.scala:660)
    at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1$$anonfun$apply$mcZ$sp$2.apply$mcV$sp(ILoop.scala:838)
    at scala.tools.nsc.interpreter.ILoopInit$class.runThunks(ILoopInit.scala:122)
    at scala.tools.nsc.interpreter.ILoop.runThunks(ILoop.scala:42)
    at scala.tools.nsc.interpreter.ILoopInit$class.postInitialization(ILoopInit.scala:95)
    at scala.tools.nsc.interpreter.ILoop.postInitialization(ILoop.scala:42)
    at scala.tools.nsc.interpreter.ILoopInit$$anonfun$createAsyncListener$1.apply$mcV$sp(ILoopInit.scala:63)
    at scala.tools.nsc.interpreter.ILoopInit$$anonfun$createAsyncListener$1.apply(ILoopInit.scala:60)
    at scala.tools.nsc.interpreter.ILoopInit$$anonfun$createAsyncListener$1.apply(ILoopInit.scala:60)
    at scala.tools.nsc.io.package$$anon$3.call(package.scala:40)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)

I don't see how this could be Thyme's fault given that the error message says scala.runtime is missing, and given that I've run it successfully on 2.10.2. Can you run scala at all? Can you add a different jar to the classpath and have it work?

Yes.

➜  ~  scala -version
Scala code runner version 2.10.2 -- Copyright 2002-2013, LAMP/EPFL
➜  ~  java -version
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)
➜  ~  scala -cp /home/pablo/.ivy2/cache/org.zeromq/zeromq-scala-binding_2.10/jars/zeromq-scala-binding_2.10-0.0.7.jar 
Welcome to Scala version 2.10.2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0).
Type in expressions to have them evaluated.
Type :help for more information.

scala> import org.zeromq.ZMQ
import org.zeromq.ZMQ

Weird. All I can say is that it works for me (on Linux). I'm not sure how to debug a problem I can't reproduce. Maybe it's something to do with the Java version? 1.7.0-b147 is pretty old. I haven't tested with anything older than 1.7.0_07-b10.

Will update my java and try again. :)

On Fri, Aug 9, 2013 at 6:52 PM, Ichoran notifications@github.com wrote:

Weird. All I can say is that it works for me (on Linux). I'm not sure how
to debug a problem I can't reproduce. Maybe it's something to do with the
Java version? 1.7.0-b147 is pretty old. I haven't tested with anything
older than 1.7.0_07-b10.


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-22425316
.