Skip to content

Commit c58106c

Browse files
committed
expand wildcards in MacroClassLoader
1 parent 15f9965 commit c58106c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/src/dotty/tools/dotc/core/MacroClassLoader.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package dotty.tools.dotc.core
33
import dotty.tools.dotc.core.Contexts._
44
import dotty.tools.dotc.util.Property
55
import dotty.tools.dotc.reporting.trace
6+
import dotty.tools.io.ClassPath
67

78
import scala.collection.mutable
89

@@ -20,7 +21,8 @@ object MacroClassLoader {
2021
ctx.setProperty(MacroClassLoaderKey, makeMacroClassLoader(using ctx))
2122

2223
private def makeMacroClassLoader(using Context): ClassLoader = trace("new macro class loader") {
23-
val urls = ctx.settings.classpath.value.split(java.io.File.pathSeparatorChar).map(cp => java.nio.file.Paths.get(cp).toUri.toURL)
24+
val entries = ClassPath.expandPath(ctx.settings.classpath.value, expandStar=true)
25+
val urls = entries.map(cp => java.nio.file.Paths.get(cp).toUri.toURL).toArray
2426
val out = ctx.settings.outputDir.value.jpath.toUri.toURL // to find classes in case of suspended compilation
2527
new java.net.URLClassLoader(urls :+ out, getClass.getClassLoader)
2628
}

0 commit comments

Comments
 (0)