12 Sep 2011 22:54
Re: [sbt] Using scala.tools.nsc.interpreter.ILoop.break to drop into the interpreter
Mark Harrah <dmharrah <at> gmail.com>
2011-09-12 20:54:43 GMT
2011-09-12 20:54:43 GMT
On 9/12/11, Vetle Roeim <vetler <at> gmail.com> wrote: > On Mon, Sep 12, 2011 at 03:43, Mark Harrah <dmharrah <at> gmail.com> wrote: >> On Sat, 10 Sep 2011 11:55:59 +0200 >> Vetle Roeim <vetler <at> gmail.com> wrote: > [...] >>> I've tried to add -usejavacp to scalacOptions, but that makes the >>> compilation fail, since the options are *prepended* >>> (http://stackoverflow.com/questions/6521357/how-can-i-append-a-compiler-option-to-sbt). >>> Next, the SBT FAQ (https://github.com/harrah/xsbt/wiki/FAQ) has an >>> entry on using the interpreter, but since I'm not manually creating >>> the interpreter in my code, I'm not sure how this helps me. >> >> I expanded the FAQ to include this case. Like with embeddedDefaults, >> provide a representative class that will determine the class loader used >> by the REPL. >> >> break[YourType](List(NamedParam("f", f))) > > Thanks! > > The error doesn't appear anymore, however, there seems to be another > problem ... The debug REPL is started, but I can't get back out of it. > Actually, whatever I enter in the REPL, it refuses to continue or give > me any output. > > Given the following code: > https://bitbucket.org/vetler/sbt-test/src/7f0370ac56b8/src/main/scala/foo.scala > When I run it, the following happens: > > $ sbt > [info] Set current project to default-be309c (in build > file:/home/vetler/dev/sbt-test/) > > run > [info] Running App > Here > Debug repl starting. Binding 1 value. > i: Int = 1 > > debug> i > > Nothing more happens at this point. > Any ideas? I tried this outside sbt, just using the scala command and it still hangs. So, this is a bug in the REPL as far as I can tell. -Mark -- -- You received this message because you are subscribed to the Google Groups "simple-build-tool" group. To post to this group, send email to simple-build-tool <at> googlegroups.com. To unsubscribe from this group, send email to simple-build-tool+unsubscribe <at> googlegroups.com. For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.
RSS Feed