Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Util._
import Dependencies._
import Scripted._
import com.typesafe.tools.mima.core._, ProblemFilters._

def internalPath = file("internal")

Expand Down Expand Up @@ -489,6 +490,10 @@ lazy val zincClasspath = (project in internalPath / "zinc-classpath")
compilerVersionDependentScalacOptions,
libraryDependencies ++= Seq(scalaCompiler.value, launcherInterface),
mimaSettings,
mimaBinaryIssueFilters ++= Seq(
// Changed the signature of a private[sbt] method
exclude[DirectMissingMethodProblem]("sbt.internal.inc.classpath.ClasspathUtilities.compilerPlugins"),
),
)
.configure(addSbtIO)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,11 @@ object ClasspathUtilities {
} catch { case _: Exception => false }

/** Returns all entries in 'classpath' that correspond to a compiler plugin.*/
private[sbt] def compilerPlugins(classpath: Seq[File]): Iterable[File] = {
private[sbt] def compilerPlugins(classpath: Seq[File], isDotty: Boolean): Iterable[File] = {
import collection.JavaConversions._
val loader = new URLClassLoader(Path.toURLs(classpath))
loader.getResources("scalac-plugin.xml").toList.flatMap(asFile(true))
val metaFile = if (isDotty) "plugin.properties" else "scalac-plugin.xml"
loader.getResources(metaFile).toList.flatMap(asFile(true))
}

/** Converts the given URL to a File. If the URL is for an entry in a jar, the File for the jar is returned. */
Expand Down