File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
compiler/src/dotty/tools/repl Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -551,18 +551,14 @@ class ReplDriver(settings: Array[String],
551551// println(s"classPath after add = ${state.context.platform.classPath(using state.context).asClassPathString}")
552552
553553 // recreate initial context
554- rootCtx = setupRootCtx(Array (), rootCtx.fresh.setSetting(rootCtx.settings.classpath, newCP))
554+ resetToInitial(List (" -classpath" , newCP))
555+ // rootCtx = setupRootCtx(Array(), rootCtx.fresh.setSetting(rootCtx.settings.classpath, newCP))
555556 val s = state.copy(context = rootCtx)
556- println(s " after setupRootCtx classPath = ${s.context.platform.classPath(using s.context).asClassPathString}" )
557-
558557
559558 // new class loader
560- // val newClassPath = state.context.platform.classPath(using state.context).asURLs :+ f.toURI.toURL
561- // val oldCL = rendering.classLoader()(using state.context)
562- // val newCL = fromURLsParallelCapable(newClassPath, oldCL)
563- // println(s"new CL class path = ${newCL.getURLs.toList}")
564- // println(s"\nclass name = ${cpCP.className}")
565- // rendering.myClassLoader = new AbstractFileClassLoader(state.context.settings.outputDir.default, newCL)
559+ val oldCL = rendering.classLoader()(using state.context)
560+ val newCL = fromURLsParallelCapable(s.context.platform.classPath(using s.context).asURLs, oldCL)
561+ rendering.myClassLoader = new AbstractFileClassLoader (state.context.settings.outputDir.default, newCL)
566562// out.println(s"Added '$path' to classpath.")
567563 s
568564
You can’t perform that action at this time.
0 commit comments