mirror of https://github.com/sbt/sbt.git
Scala compiler plugin support
**Problem** Compiler options for the compiler plugins ends up capturing the absolute path, specific to the machine. **Solution** This encodes the plugin paths as virtual paths.
This commit is contained in:
parent
187eb0f584
commit
2fd08caeda
|
|
@ -995,7 +995,7 @@ object Defaults extends BuildCommon {
|
|||
Vector(
|
||||
"-Ypickle-java",
|
||||
"-Ypickle-write",
|
||||
converter.toPath(earlyOutput.value).toString
|
||||
earlyOutput.value.toString
|
||||
) ++ old
|
||||
else old
|
||||
},
|
||||
|
|
@ -4221,18 +4221,19 @@ object Classpaths {
|
|||
given FileConverter = converter
|
||||
(base * (filter -- excl) +++ (base / config.name).descendantsExcept(filter, excl)).classpath
|
||||
|
||||
def autoPlugins(
|
||||
private def autoPlugins(
|
||||
report: UpdateReport,
|
||||
internalPluginClasspath: Seq[NioPath],
|
||||
isDotty: Boolean
|
||||
): Seq[String] =
|
||||
)(using conv: FileConverter): Seq[String] =
|
||||
import sbt.internal.inc.classpath.ClasspathUtil.compilerPlugins
|
||||
val pluginClasspath =
|
||||
report
|
||||
.matching(configurationFilter(CompilerPlugin.name))
|
||||
.map(_.toPath) ++ internalPluginClasspath
|
||||
val plugins = compilerPlugins(pluginClasspath, isDotty)
|
||||
plugins.map("-Xplugin:" + _.toAbsolutePath.toString).toSeq
|
||||
plugins.toVector.map: p =>
|
||||
"-Xplugin:" + conv.toVirtualFile(p).toString()
|
||||
|
||||
private lazy val internalCompilerPluginClasspath: Initialize[Task[Classpath]] =
|
||||
(Def
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ object Dependencies {
|
|||
|
||||
// sbt modules
|
||||
private val ioVersion = nightlyVersion.getOrElse("1.10.4")
|
||||
val zincVersion = nightlyVersion.getOrElse("2.0.0-M3")
|
||||
val zincVersion = nightlyVersion.getOrElse("2.0.0-M4")
|
||||
|
||||
private val sbtIO = "org.scala-sbt" %% "io" % ioVersion
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue