Closed
Description
A program should not be able to see the classes of the compiler that's compiling it unless the compiler's classes are explicitly added to the compilation (user) classpath. Currently, they all leak through by default (you have one chance to opt-out by not setting usejavacp): https://github.com/lampepfl/dotty/blob/master/src/dotty/tools/dotc/config/PathResolver.scala#L227
This is not a problem in sbt (it manages the classpath itself), and you might consider it a feature in the REPL, but it's pretty complicated for build tools to navigate the maze of settings. Would be good to clean this up early on.