Search code examples
scalascala-3

What's the equivalent of `scala.tools.nsc.MainGenericRunner` in Scala 3?


what's the equivalent of scala.tools.nsc.MainGenericRunner in dotty?

I checked in the package dotty.tools.dotc https://github.com/lampepfl/dotty/tree/master/compiler/src/dotty/tools/dotc but couldn't find anything.

I tried to use dotty.tools.dotc.Run but I got error

wrap: java.lang.NoSuchMethodException: dotty.tools.dotc.Run.main([Ljava.lang.String;)


Solution

  • The Scala 3 console is often called the REPL. Its main entrypoint in Scala 3 is dotty.tools.repl.Main. You can find it here.