Codebase for REPL


#1

Which git repo has REPL codebase?


#2

I guess it is:

scala\src\repl


#3

Yep! The UI (jline interface etc) is at https://github.com/scala/scala/tree/2.13.x/src/repl-frontend/scala/tools/nsc.
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: https://github.com/lihaoyi/Ammonite/pull/775. Please target 2.13.x. See also https://github.com/scala/scala/pull/5903 for the PR that did an initial cut between UI and internal logic (which we can hopefully simplify along the lines of https://github.com/scala/scala/pull/5220 (not yet finished).

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


#4

Would definitely look into it.


#5

@adriaanm, any specific test to debug ILoop?


#6

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/…