scala-dev
scala-dev copied to clipboard
REPL: Improved REPL, redux
This ticket replaces https://github.com/scala/scala-dev/issues/325 from 2017. Goals: omit completed tasks, omit less-likely todos, make it easier to see the big picture & see where things stand.
Note that all the https://github.com/scala/scala-dev/labels/t%3Arepl tickets that we opened during the 2.13.3 cycle now live at https://github.com/scala/scala-dev/labels/t%3Arepl
The prioritization here is based on part on the Twitter poll I did, as well as many years of discussions within the team and among the community.
Modest goals
- [ ] Syntax highlighting (https://github.com/scala/bug/issues/12273)
- [ ] Display Scaladoc (or at least links to Scaladoc) (https://github.com/scala/bug/issues/12275)
- [ ] Don't always fully qualify type names in output (https://github.com/scala/bug/issues/8349)
More ambitious
These remain possibilities for Scala 2, but would need discussion/planning. It would make the most sense to land it in Scala 3 first, then backport.
- [ ] Pretty-printing of results (like Ammonite? adopt their solution?)
Shelved waiting for JLine fix
- Tab completion grouping and ordering (https://github.com/scala/bug/issues/12281)
- sigh, JLine is broken; see remarks on ticket
Out of scope
- Get rid of our own REPL, adopt Ammonite wholesale
- Perhaps this could happen in Scala 3; I don't know. Certainly not happening in Scala 2: too much work, too disruptive.
- I would encourage people to instead consider porting Ammonite features to the stock REPL, or to turn Ammonite into a wrapper or client of the stock REPL, to avoid code duplication.
- other possibilities originally included on https://github.com/scala/scala-dev/issues/325
- ...are probably out of scope for the core team, but contributors might be interested?
- "Magic imports" of dependencies, a la Ammonite's Ivy imports?
- Overlaps with existing
:requirefeature - Involves integrating with Coursier
- May overlap with making our launchers Coursier-based
- Moved to "out of scope" with the advent of https://scala-cli.virtuslab.org
- Overlaps with existing
Current status is that I intend to finish "syntax highlighting" but it appears increasingly unlikely I'll get to the others.
Hence, unassigning myself here but keeping myself assigned to https://github.com/scala/bug/issues/12273