File tree 2 files changed +6
-1
lines changed
compiler/src/dotty/tools/dotc/core
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ object MacroClassLoader {
21
21
22
22
private def makeMacroClassLoader (implicit ctx : Context ): ClassLoader = trace(" new macro class loader" ) {
23
23
val urls = ctx.settings.classpath.value.split(java.io.File .pathSeparatorChar).map(cp => java.nio.file.Paths .get(cp).toUri.toURL)
24
- new java.net.URLClassLoader (urls, getClass.getClassLoader)
24
+ val out = ctx.settings.outputDir.value.jpath.toUri.toURL // to find classes in case of suspended compilation
25
+ new java.net.URLClassLoader (urls :+ out, getClass.getClassLoader)
25
26
}
26
27
}
Original file line number Diff line number Diff line change @@ -37,6 +37,10 @@ clear_out "$OUT"
37
37
" $SBT " " ;dotc -d $OUT /out.jar $SOURCE ; dotc -decompile -classpath $OUT /out.jar -color:never $MAIN " > " $tmp "
38
38
grep -qe " def main(args: scala.Array\[scala.Predef.String\]): scala.Unit =" " $tmp "
39
39
40
+ echo " testing sbt dotc with suspension"
41
+ clear_out " $OUT "
42
+ " $SBT " " dotc -d $OUT /out.jar tests/pos-macros/macros-in-same-project-1/Bar.scala tests/pos-macros/macros-in-same-project-1/Foo.scala" > " $tmp "
43
+
40
44
# check that missing source file does not crash message rendering
41
45
echo " testing that missing source file does not crash message rendering"
42
46
clear_out " $OUT "
You can’t perform that action at this time.
0 commit comments