Merge branch '1.12.x' into wip/merge-1.12.x

This commit is contained in:
Eugene Yokota 2025-11-25 02:13:03 -05:00
commit fe266cd59e
1 changed files with 6 additions and 8 deletions

View File

@ -158,13 +158,11 @@ object Compiler:
else s.log.warn(msg) else s.log.warn(msg)
else () else ()
else () else ()
def file(id: String): File = { def file(id: String): Option[File] =
val files = for { for
m <- toolReport.modules if m.module.name.startsWith(id) m <- toolReport.modules.find(_.module.name.startsWith(id))
(art, file) <- m.artifacts if art.`type` == Artifact.DefaultType (_, file) <- m.artifacts.find(_._1.`type` == Artifact.DefaultType)
} yield file yield file
files.headOption getOrElse sys.error(s"Missing $id jar file")
}
val allCompilerJars = toolReport.modules.flatMap(_.artifacts.map(_._2)) val allCompilerJars = toolReport.modules.flatMap(_.artifacts.map(_._2))
val allDocJars = val allDocJars =
@ -174,7 +172,7 @@ object Compiler:
.toSeq .toSeq
.flatMap(_.modules) .flatMap(_.modules)
.flatMap(_.artifacts.map(_._2)) .flatMap(_.artifacts.map(_._2))
val libraryJars = ScalaArtifacts.libraryIds(sv).map(file) val libraryJars = ScalaArtifacts.libraryIds(sv).flatMap(file)
makeScalaInstance( makeScalaInstance(
sv, sv,