mirror of https://github.com/sbt/sbt.git
do not assume scala3_library to be a jar
This commit is contained in:
parent
ee03e7606e
commit
531c5d18db
|
|
@ -158,12 +158,11 @@ private[sbt] object Compiler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
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))
|
||||||
|
|
@ -178,7 +177,7 @@ private[sbt] object Compiler {
|
||||||
.flatMap(_.artifacts.map(_._2))
|
.flatMap(_.artifacts.map(_._2))
|
||||||
case None => Nil
|
case None => Nil
|
||||||
}
|
}
|
||||||
val libraryJars = ScalaArtifacts.libraryIds(sv).map(file)
|
val libraryJars = ScalaArtifacts.libraryIds(sv).flatMap(file)
|
||||||
|
|
||||||
makeScalaInstance(
|
makeScalaInstance(
|
||||||
sv,
|
sv,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue