Codebase for REPL


Which git repo has REPL codebase?


I guess it is:



Yep! The UI (jline interface etc) is at
If you’re interested, an awesome first project would be to upgrade the repl to JLine 3. Here’s the ammonite PR that does that: Please target 2.13.x. See also for the PR that did an initial cut between UI and internal logic (which we can hopefully simplify along the lines of (not yet finished).

Very happy to help, please @mention me or email me directly (s"$") if I miss a post on this.


Would definitely look into it.


@adriaanm, any specific test to debug ILoop?


The best we have is a bunch of tests that extend ReplTest. I’m afraid none of them are that useful for debugging: they are meant as regression tests.

ILoop is probably one of the trickier parts of the repl… I’m very open to reworking it so that it’s easier to understand. This is why I’ve started carving out an API (very rough at this point), so that we can actually clean this stuff up without breaking sbt/spark/…


I changed from Jline 2 to Jline 3 in my local repo, and there are compilation errors all over.
Would try to fix them this weekend.


What is root in following import in JLineHistory.scala:
import _root_jline.{console => jconsole}

I get error:

object jline is not a member of package root


_root_ is used when something in the local namespace would cause something to be misinterpreted, and tells the compiler that something is definitely a root package, not a local identifier. so for example:

scala> def foo: java.lang.Integer = 0
foo: Integer

scala> val java = 3
java: Int = 3

scala> def foo: java.lang.Integer = 0
<console>:12: error: value lang is not a member of Int
       def foo: java.lang.Integer = 0

scala> def foo: = 0
foo: Integer

as for JLine in particular, I think I remember reading that in JLine 3, they moved all the code from jline to org.jline? Maybe that’s what you’re seeing.


That’s correct. Additionally it looks to me like what was previously in “jline.console” is now in “org.jline.reader”.