scala-cli icon indicating copy to clipboard operation
scala-cli copied to clipboard

REPL exposes compiler internals

Open hamzaremmal opened this issue 2 months ago • 1 comments

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

hamzaremmal avatar Oct 30 '25 10:10 hamzaremmal

note we already have --with-compiler in scala cli to preserve this if needed

bishabosha avatar Oct 30 '25 14:10 bishabosha