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