diff --git a/build.sbt b/build.sbt index a4aba6a2cc..b562fae3af 100644 --- a/build.sbt +++ b/build.sbt @@ -1,6 +1,7 @@ import Util._ import Dependencies._ import Scripted._ +import com.typesafe.tools.mima.core._, ProblemFilters._ def internalPath = file("internal") @@ -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) diff --git a/internal/zinc-classpath/src/main/scala/sbt/internal/inc/classpath/ClasspathUtilities.scala b/internal/zinc-classpath/src/main/scala/sbt/internal/inc/classpath/ClasspathUtilities.scala index 1aca97f0df..b4a8d16a8f 100644 --- a/internal/zinc-classpath/src/main/scala/sbt/internal/inc/classpath/ClasspathUtilities.scala +++ b/internal/zinc-classpath/src/main/scala/sbt/internal/inc/classpath/ClasspathUtilities.scala @@ -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. */