scala-cli
scala-cli copied to clipboard
REPL exposes compiler internals
Version(s)
Scala code runner version: 1.9.0
Scala version (default): 3.7.3
Describe the bug
The REPL loads the internal symbol of the underlying runtime environment. Similar to https://github.com/scala/scala3/issues/24247.
To Reproduce
Welcome to Scala 3.7.3 (25, Java Java HotSpot(TM) 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
scala> import org.jline.terminal.TerminalBuilder
| val builder = TerminalBuilder.builder()
val builder: org.jline.terminal.TerminalBuilder = org.jline.terminal.TerminalBuilder@1e4d8770
scala>
Expected behaviour
The runtime environment of the REPL is a distinct environment than the runtime environment of the code inside the REPL. Kudos to my friend @Maeeen for trying https://github.com/scala/scala3/issues/24247 in scala-cli
note we already have --with-compiler in scala cli to preserve this if needed